2020-01-14 03:55:23 +00:00
|
|
|
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
|
2020-09-07 23:32:48 +00:00
|
|
|
|
|
|
|
# select the correct dtb based on device revision
|
2021-02-03 06:48:01 +00:00
|
|
|
# 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
|
2020-09-07 23:32:48 +00:00
|
|
|
dtb_file=imx8mq-librem5-r3.dtb
|
2021-01-08 18:46:24 +00:00
|
|
|
elif itest.s "x4" == "x$board_rev" ; then
|
|
|
|
dtb_file=imx8mq-librem5-r4.dtb
|
2020-09-07 23:32:48 +00:00
|
|
|
fi
|
|
|
|
|
2020-01-14 03:55:23 +00:00
|
|
|
echo Loading DTB
|
2020-09-07 23:32:48 +00:00
|
|
|
ext2load mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${dtb_file}
|
2020-01-14 03:55:23 +00:00
|
|
|
|
|
|
|
echo Loading Initramfs
|
|
|
|
ext2load mmc ${mmcdev}:${mmcpart} ${ramdisk_addr_r} uInitrd-purism-librem5
|
|
|
|
|
|
|
|
echo Loading Kernel
|
|
|
|
ext2load mmc ${mmcdev}:${mmcpart} ${kernel_addr_r} vmlinuz-purism-librem5
|
|
|
|
|
|
|
|
echo Resizing FDT
|
|
|
|
fdt addr ${fdt_addr_r}
|
|
|
|
fdt resize
|
|
|
|
|
|
|
|
echo Booting kernel
|
|
|
|
booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
|