# Bootscript using the new unified bootcmd handling # # Expects to be called with the following environment variables set: # # devtype e.g. mmc/scsi etc # devnum The device number of the given type # bootpart The partition containing the boot files # (introduced in u-boot mainline 2016.01) # prefix Prefix within the boot partiion to the boot files # kernel_addr_r Address to load the kernel to # fdt_addr_r Address to load the FDT to # ramdisk_addr_r Address to load the initrd to. # # The uboot must support the booti and generic filesystem load commands. if test -z "${variant}"; then setenv variant m1 fi setenv board odroid${variant} setenv bootargs " ${bootargs} init=/lib/systemd/systemd root=UUID=bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb root_trim=yes pci=nomsi console=ttyS2,1500000" setenv overlay_resize 8192 setenv bootlabel "Gentoo 6.6.47" load ${devtype} ${devnum}:${partition} ${loadaddr} ${prefix}config.ini \ && ini generic ${loadaddr} if test -n "${overlay_profile}"; then ini overlay_${overlay_profile} ${loadaddr} fi if test -n "${console}"; then setenv bootargs "${bootargs} console=${console}" fi if test -n "${default_console}"; then setenv bootargs "${bootargs} console=${default_console}" fi if test -z "${fk_kvers}"; then setenv fk_kvers "6.6.47-gentoo-arm64" fi setenv fdtfile "gentoo.dtb" if test -z "${distro_bootpart}"; then setenv partition ${bootpart} else setenv partition ${distro_bootpart} fi load ${devtype} ${devnum}:${partition} ${fdt_addr_r} ${prefix}gentoo.dtb fdt addr ${fdt_addr_r} load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} ${prefix}vmlinuz-${fk_kvers} \ && unzip ${ramdisk_addr_r} ${kernel_addr_r} \ && load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} ${prefix}initramfs-${fk_kvers}.img \ && echo "Booting Gentoo ${fk_kvers} from ${devtype} ${devnum}:${partition}..." \ && booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r} load ${devtype} ${devnum}:${partition} ${kernel_addr_r} ${prefix}vmlinuz-${fk_kvers} \ && load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} ${prefix}initramfs-${fk_kvers}.img \ && echo "Booting Gentoo ${fk_kvers} from ${devtype} ${devnum}:${partition}..." \ && booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}