2019-12-21 16:04:15 +00:00
|
|
|
if test ${mmc_bootdev} -eq 0 ; then
|
|
|
|
echo "Booting from SD";
|
|
|
|
setenv bootdev 0;
|
|
|
|
else
|
|
|
|
echo "Booting from eMMC";
|
|
|
|
setenv bootdev 2;
|
|
|
|
fi;
|
|
|
|
|
2020-11-06 15:16:37 +00:00
|
|
|
# This is close to the max env size, https://unix.stackexchange.com/questions/530762/max-line-length-for-u-boot-setenv
|
2021-06-29 21:54:37 +00:00
|
|
|
setenv bootargs init=/init.sh rw console=tty0 console=ttyS0,115200 earlycon=uart,mmio32,0x01c28000 panic=10 consoleblank=0 loglevel=1 fbcon=rotate:1 PMOS_NO_OUTPUT_REDIRECT PMOS_FORCE_PARTITION_RESIZE pmos_boot=/dev/mmcblk${bootdev}p1 pmos_root=/dev/mmcblk${bootdev}p2
|
2019-07-23 22:37:31 +00:00
|
|
|
|
|
|
|
printenv
|
|
|
|
|
|
|
|
echo Loading DTB
|
2020-10-09 22:11:07 +00:00
|
|
|
load mmc ${mmc_bootdev}:1 ${fdt_addr_r} ${pinetabfdt}
|
2019-07-23 22:37:31 +00:00
|
|
|
|
|
|
|
echo Loading Initramfs
|
2021-08-17 07:03:20 +00:00
|
|
|
load mmc ${mmc_bootdev}:1 ${ramdisk_addr_r} uInitrd
|
2019-07-23 22:37:31 +00:00
|
|
|
|
|
|
|
echo Loading Kernel
|
2021-08-17 07:03:20 +00:00
|
|
|
load mmc ${mmc_bootdev}:1 ${kernel_addr_r} vmlinuz
|
2019-07-23 22:37:31 +00:00
|
|
|
|
|
|
|
echo Resizing FDT
|
|
|
|
fdt addr ${fdt_addr_r}
|
|
|
|
fdt resize
|
|
|
|
|
|
|
|
echo Booting kernel
|
|
|
|
booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
|