Files
Tobias Waldekranz 9869c1a290 common: uboot: Update environment to new disk layout
- Adapt boot scripts to exepect the split FIT header/SquashFS image
  layout.

- Make sure that we can boot from any kind of block device (most
  importantly virtio for GNS3).

- Rename net -> dhcp as we might have more kinds of netboots in the
  future (http).
2023-03-13 09:55:16 +01:00

17 lines
483 B
Bash

if dhcp ${ramdisk_addr_r}; then
setenv old_fdt_addr ${fdt_addr}
if fdt addr ${ramdisk_addr_r}; then
fdt get value sqoffs /images/rootfs data-position
fdt get value sqsize /images/rootfs data-size
fdt addr ${old_fdt_addr}
setexpr sqaddr ${ramdisk_addr_r} + ${sqoffs}
setexpr sqblkcnt ${sqsize} / 0x200
setexpr sqkbsize ${sqsize} / 0x400
setenv bootargs_root "root=/dev/ram0 ramdisk_size=0x${sqkbsize} initrd=0x${sqaddr},${sqsize}"
setenv prepared ok
fi
fi