mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-15 18:03:30 +00:00
34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
echo "Start AMLOGIC mainline U-boot"
|
|
setenv l_mmc "0"
|
|
for l_devtype in "sd usb mmc" ; do
|
|
if test "${l_devtype}" = "usb"; then
|
|
setenv l_mmc "0 1 2 3"
|
|
fi
|
|
if test "${l_devtype}" = "mmc"; then
|
|
setenv l_mmc "1"
|
|
fi
|
|
if test "${l_devtype}" = "sd"; then
|
|
setenv devtype "mmc"
|
|
else
|
|
setenv devtype "${l_devtype}"
|
|
fi
|
|
for devnum in ${l_mmc} ; do
|
|
if test -e ${devtype} ${devnum}:1 /boot.scr; then
|
|
part uuid ${devtype} ${devnum}:2 uuid
|
|
setenv bootargs "console=tty0 no_console_suspend consoleblank=0 console=ttyAML0,115200n8 root=PARTUUID=${uuid} rw rootwait"
|
|
if printenv mac; then
|
|
setenv bootargs ${bootargs} mac=${mac}
|
|
elif printenv eth_mac; then
|
|
setenv bootargs ${bootargs} mac=${eth_mac}
|
|
elif printenv ethaddr; then
|
|
setenv bootargs ${bootargs} mac=${ethaddr}
|
|
fi
|
|
load ${devtype} ${devnum}:1 ${fdt_addr_r} /amlogic.dtb
|
|
load ${devtype} ${devnum}:1 ${kernel_addr_r} /kernel.img
|
|
fdt addr ${fdt_addr_r}
|
|
booti ${kernel_addr_r} - ${fdt_addr_r}
|
|
fi
|
|
done
|
|
done
|
|
# Recompile with:
|
|
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr |