mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-01-28 03:37:17 +01:00
On some SoCs like RK3399, U-Boot no longer export the serial address in $stdout variable, it has been changed to something like `stdout=serial,vidconsole` since video supported was added. So detect $soc variable instead, this also makes the script more clear. Addtional note: rk3566 is reported as rk3568, rk3582 is reported as rk3588 in $soc. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org> Link: https://github.com/openwrt/openwrt/pull/21610 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 lines
812 B
Text
23 lines
812 B
Text
part uuid ${devtype} ${devnum}:2 uuid
|
|
|
|
if test $soc = 'rk3308'; then
|
|
serial_addr=',0xff0c0000'; serial_port='ttyS2';
|
|
elif test $soc = 'rk3328'; then
|
|
serial_addr=',0xff130000'; serial_port='ttyS2';
|
|
elif test $soc = 'rk3399'; then
|
|
serial_addr=',0xff1a0000'; serial_port='ttyS2';
|
|
elif test $soc = 'rk3528'; then
|
|
serial_addr=',0xff9f0000'; serial_port='ttyS0';
|
|
elif test $soc = 'rk3568'; then
|
|
serial_addr=',0xfe660000'; serial_port='ttyS2';
|
|
elif test $soc = 'rk3576'; then
|
|
serial_addr=',0x2ad40000'; serial_port='ttyS0';
|
|
elif test $soc = 'rk3588'; then
|
|
serial_addr=',0xfeb50000'; serial_port='ttyS2';
|
|
fi
|
|
|
|
setenv bootargs "console=${serial_port},1500000 earlycon=uart8250,mmio32${serial_addr} root=PARTUUID=${uuid} rw rootwait";
|
|
|
|
load ${devtype} ${devnum}:1 ${kernel_addr_r} kernel.img
|
|
|
|
bootm ${kernel_addr_r}
|