# 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. # # After editing make this into 'boot.scr' file with command below # mkimage -A arm64 -T script -O linux -n 'boot script' -C none -d boot.txt boot.scr # ## based on odroid-m1 from ubuntu setenv board odroidm1 setenv bootargs " ${bootargs} root=UUID=bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb" setenv overlay_resize 8192 setenv bootlabel "Gentoo SD card EXT4" setenv console "tty1" setenv bootargs "${bootargs} pci=nomsi console=tty1" setenv bootargs "${bootargs} mtdparts=sfc_nor:0x20000@0xe0000(env),0x200000@0x100000(uboot),0x100000@0x300000(splash),0xc00000@0x400000(firmware)" setenv fk_kvers "4.19.219-arm64" 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 Debian ${fk_kvers} from ${devtype} ${devnum}:${partition}..." \ && booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}