pmaports/device/main/device-purism-librem5/uboot-script.cmd
Clayton Craft 01febf4f0b
device-purism-librem5: don't use legacy u-boot images for booting (MR 2842)
Using uInitrd is no longer necessary. I'm not sure *why*, but it just
works using the non-u-boot-image initramfs. The post-upgrade script was
changed to clean up the old images from /boot/u{Image,Initrd}, restoring
a lot of free space in that partition (~25MB)

This also sneaks in a small 1 character change to silence removing the
gpsd service from the default runlevel

[ci:skip-build]: already built successfully in CI
2022-01-16 16:57:16 +01:00

31 lines
876 B
Batchfile

setenv bootargs init=/init.sh rw console=ttymxc0,115200 cma=256M PMOS_NO_OUTPUT_REDIRECT PMOS_FORCE_PARTITION_RESIZE
setenv mmcdev 0
setenv mmcpart 1
printenv
# select the correct dtb based on device revision
# default to "-r2" if board_rev isn't set, since it'll boot on any librem5
# revision
dtb_file=imx8mq-librem5-r2.dtb
if itest.s "x3" == "x$board_rev" ; then
dtb_file=imx8mq-librem5-r3.dtb
elif itest.s "x4" == "x$board_rev" ; then
dtb_file=imx8mq-librem5-r4.dtb
fi
echo Loading DTB
ext2load mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${dtb_file}
echo Loading Initramfs
ext2load mmc ${mmcdev}:${mmcpart} ${ramdisk_addr_r} initramfs
echo Loading Kernel
ext2load mmc ${mmcdev}:${mmcpart} ${kernel_addr_r} vmlinuz
echo Resizing FDT
fdt addr ${fdt_addr_r}
fdt resize
echo Booting kernel
booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}