device tree loading from uboot.

Sam Price thesamprice at gmail.com
Mon Oct 16 16:18:52 UTC 2023


i want to test the device tree loading stuff in qemu.
I don't see a way to set the r5 register on startup via command line in qemu.


void bsp_fdt_copy(const void *src)
{
  const volatile uint32_t *s = (const uint32_t *) src;

im tempted to either hard code the src location rather than passing it in via r5
or add a check if the passed in value is null then use a hard coded address.
if(src == 0x0)
{
  s = BSP_START_COPY_FDT_ADDRESS;
}

qemu can then take a address for the device tree file and place it in
the proper memory address

-device loader,file=$DTB_FILE,addr=$BSP_START_COPY_FDT_ADDRESS,force-raw=true \

Does this seem reasonable or is there a way people are testing device
tree support in qemu by setting the r5 register on startup?

-- 
Sincerely,

Sam Price


More information about the devel mailing list