2020-03-22 12:44:35 +00:00
|
|
|
gpio set 98
|
2019-08-28 08:27:48 +00:00
|
|
|
gpio set 114
|
2019-12-09 00:31:47 +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;
|
|
|
|
|
2024-06-18 19:53:59 +00:00
|
|
|
setenv bootargs init=/init.sh rw console=tty0 console=ttyS0,115200 earlycon=uart,mmio32,0x01c28000 panic=10 consoleblank=0 loglevel=1 PMOS_FORCE_PARTITION_RESIZE pmos_boot=/dev/mmcblk${bootdev}p1 pmos_root=/dev/mmcblk${bootdev}p2
|
2019-08-28 08:27:48 +00:00
|
|
|
|
|
|
|
printenv
|
|
|
|
|
2023-01-13 23:43:12 +00:00
|
|
|
echo Detecting psci idle state
|
|
|
|
fdt addr ${fdtcontroladdr}
|
|
|
|
fdt get name pscifdt /cpus/idle-states /
|
|
|
|
if test $? -eq 0; then
|
|
|
|
echo PSCI idle state enabled;
|
|
|
|
setenv iscpscienabled 1;
|
|
|
|
else
|
|
|
|
echo PSCI idle state disabled;
|
|
|
|
fi
|
|
|
|
|
2019-08-28 08:27:48 +00:00
|
|
|
echo Loading DTB
|
2020-06-17 17:18:14 +00:00
|
|
|
load mmc ${mmc_bootdev}:1 ${fdt_addr_r} ${fdtfile}
|
2023-01-13 23:43:12 +00:00
|
|
|
fdt addr ${fdt_addr_r}
|
|
|
|
fdt resize 2048
|
|
|
|
|
|
|
|
if printenv ram_freq; then
|
|
|
|
echo Adding FTD RAM clock
|
|
|
|
fdt mknode / memory
|
|
|
|
fdt set /memory ram_freq ${ram_freq}
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test ${iscpscienabled} -eq 1; then
|
|
|
|
echo Applying PSCI DTBO;
|
|
|
|
load mmc ${mmc_bootdev}:1 ${fdtoverlay_addr_r} sun50i-a64-psci.dtbo
|
|
|
|
fdt apply ${fdtoverlay_addr_r}
|
|
|
|
fi
|
2019-08-28 08:27:48 +00:00
|
|
|
|
|
|
|
echo Loading Initramfs
|
2021-08-17 07:03:20 +00:00
|
|
|
load mmc ${mmc_bootdev}:1 ${ramdisk_addr_r} initramfs
|
2021-08-19 16:46:51 +00:00
|
|
|
setenv ramdisk_size ${filesize}
|
2019-08-28 08:27:48 +00:00
|
|
|
|
|
|
|
echo Loading Kernel
|
2021-08-17 07:03:20 +00:00
|
|
|
load mmc ${mmc_bootdev}:1 ${kernel_addr_r} vmlinuz
|
2019-08-28 08:27:48 +00:00
|
|
|
|
|
|
|
gpio set 115
|
|
|
|
|
2021-03-29 22:07:22 +00:00
|
|
|
|
2021-11-06 21:28:00 +00:00
|
|
|
echo Loading user script
|
2022-02-19 11:24:28 +00:00
|
|
|
setenv user_scriptaddr 0x50700000
|
2021-11-06 21:28:00 +00:00
|
|
|
load mmc ${mmc_bootdev}:1 ${user_scriptaddr} user.scr
|
|
|
|
if test $? -eq 0; then source ${user_scriptaddr}; else echo No user script found; fi
|
|
|
|
|
2019-08-28 08:27:48 +00:00
|
|
|
echo Booting kernel
|
|
|
|
gpio set 116
|
2020-03-22 12:44:35 +00:00
|
|
|
gpio clear 98
|
2021-08-19 16:46:51 +00:00
|
|
|
booti ${kernel_addr_r} ${ramdisk_addr_r}:${ramdisk_size} ${fdt_addr_r}
|