On 5/25/22 7:08 PM, Bram Stolk wrote:
> Thanks again, Samuel, for all your help.
> 
> Still not getting there:
> 
> => booti ${kernel_addr_r} ${ramdisk_addr_r}:0 ${fdt_addr_r}
> Moving Image from 0x40040000 to 0x40200000, end=415e10d8
> ERROR: Did not find a cmdline Flattened Device Tree
> Could not find a valid device tree
> 
> I will read up on "device trees" but I am not sure if I am responsible for
> setting that up before booting?

It is recommended to reuse the devicetree from U-Boot, which is already loaded
into RAM. Its address is stored in the predefined environment variable[1]
$fdtcontroladdr. Since it appears you don't have a ramdisk, you can try:

   booti ${kernel_addr_r} - ${fdtcontroladdr}

where the hyphen is a shortcut for "no ramdisk".

The devicetree at $fdtcontroladdr contains extra information detected by
firmware during boot, such as the size of RAM, which varies between boards. That
information would be missing, and Linux would fail to boot, if you loaded a DTB
file with "ext4load" or similar.

A generally simpler option may be to use an extlinux.conf file, since that hides
most of these details. The following example may be all you need:

# cat /boot/extlinux/extlinux.conf
label default
        linux   ../Image
        append  root=/dev/mmcblk0p2 rootwait
#

This will be loaded automatically if you mark your boot partition as bootable in
the partition table. Then you don't have to deal with environment variables,
booti vs. bootm, scripts, or devicetrees, etc.

Regards,
Samuel

[1]:
https://u-boot.readthedocs.io/en/latest/develop/devicetree/control.html?highlight=fdtcontroladdr#configuration

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/0f9e8601-bc90-e99d-6aa1-fd58dc27d223%40sholland.org.

Reply via email to