Hello Peter, Thanks for your reply.
Hmm. In theory that's supposed to work, but it's a bit of > an odd thing to do -- generally you just let the virt > board autogenerate the DTB and you don't need to use > the -dtb option at all. (If you do this it's important > that the options you pass to the qemu binary when you > do the dumpdtb exactly match the ones you use when you > later use the virt.dtb, but it seems like you're doing that.) > I agree that it is a bit of an odd thing to do, but I need the DTB for the Linux kernel which is loaded by my custom bootloader, so I decided to dump the DTB using the dumpdtb Qemu option and then concatenate it with the kernel. In general, it looks like that the dumpdtb option dump incorrect the DTB file. Because when I saved the pointer to the DTB in my bootloader, it is in x0 register if I am right, and pass it to the Linux kernel then all is working fine. So for some reason dtb that is already in memory differs from that generated by the dumpdtb option. Thanks. Best regards, Oleksii сб, 12 окт. 2019 г. в 22:20, Peter Maydell <peter.mayd...@linaro.org>: > On Sat, 12 Oct 2019 at 13:30, Oleksii Kurochko > <oleksii.kuroc...@gmail.com> wrote: > > First I successfully booted it without dtb flag in the next way: > > qemu-system-aarch64 -M virt -cpu cortex-a57 -nographic -m 2048 -kernel > kernel/arch/arm64/boot/Image -append "console=ttyAMA0" > > Yes, this is the expected way to use the 'virt' board. > > > After that I decided to dump dtb that is generated inside Qemu: > > qemu-system-aarch64 -M virt,dumpdtb=virt.dtb -cpu cortex-a57 -nographic > -m 2048 -kernel kernel/arch/arm64/boot/Image -append "console=ttyAMA0" > > > > Finally I tried to boot it with dumped dtb: > > qemu-system-aarch64 -M virt -cpu cortex-a57 -nographic -m 2048 -kernel > kernel/arch/arm64/boot/Image -append "console=ttyAMA0 > > " -dtb virt.dtb > > But I did not see any messages. > > Hmm. In theory that's supposed to work, but it's a bit of > an odd thing to do -- generally you just let the virt > board autogenerate the DTB and you don't need to use > the -dtb option at all. (If you do this it's important > that the options you pass to the qemu binary when you > do the dumpdtb exactly match the ones you use when you > later use the virt.dtb, but it seems like you're doing that.) > > thanks > -- PMM >