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.