aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/rockchip/image/default.bootscript
diff options
context:
space:
mode:
authorJustin Klaassen <justin@tidylabs.app>2024-01-13 20:28:57 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2024-01-19 21:31:39 +0100
commit4d49ce1bde84fdd83f0e9df5ec9c43f4ff2a0a9a (patch)
tree1f1140bcd9b21eb3027150934e90c49aa180c1d1 /target/linux/rockchip/image/default.bootscript
parent34fd41a99784b5d0f281d3c7053ec27f0dedca39 (diff)
downloadupstream-4d49ce1bde84fdd83f0e9df5ec9c43f4ff2a0a9a.tar.gz
upstream-4d49ce1bde84fdd83f0e9df5ec9c43f4ff2a0a9a.tar.bz2
upstream-4d49ce1bde84fdd83f0e9df5ec9c43f4ff2a0a9a.zip
rockchip: fix boot from non-MMC devices
Booting from non-MMC devices on Rockchip targets without this change results in a boot failure: Model: FriendlyElec NanoPi R5S Net: eth0: ethernet@fe2a0000 Hit any key to stop autoboot: 0 ** Booting bootflow 'nvme#0.blk#1.bootdev.part_1' with script ** No partition table - mmc 0 ** ** No partition table - mmc 0 ** Couldn't find partition mmc 0:1 Can't set block device Wrong Image Type for bootm command ERROR -91: Protocol wrong type for socket: can't get kernel image! Boot failed (err=1) This change fixes the default boot script for Rockchip targets to support booting from non-MMC devices such as NVMe or USB drives. Some targets with only a boot rom (e.g. NanoPi R5S) may require u-boot to be installed on the eMMC or a MicroSD card in order to boot from non-MMC devices. Fixes: #14420 Reviewed-by: Tianling Shen <cnsztl@immortalwrt.org> Signed-off-by: Justin Klaassen <justin@tidylabs.app>
Diffstat (limited to 'target/linux/rockchip/image/default.bootscript')
-rw-r--r--target/linux/rockchip/image/default.bootscript15
1 files changed, 15 insertions, 0 deletions
diff --git a/target/linux/rockchip/image/default.bootscript b/target/linux/rockchip/image/default.bootscript
new file mode 100644
index 00000000000..e9de14ff7ac
--- /dev/null
+++ b/target/linux/rockchip/image/default.bootscript
@@ -0,0 +1,15 @@
+part uuid ${devtype} ${devnum}:2 uuid
+
+if test $stdout = 'serial@fe660000' ;
+then serial_addr=',0xfe660000';
+elif test $stdout = 'serial@ff130000' ;
+then serial_addr=',0xff130000';
+elif test $stdout = 'serial@ff1a0000' ;
+then serial_addr=',0xff1a0000';
+fi;
+
+setenv bootargs "console=ttyS2,1500000 console=tty1 earlycon=uart8250,mmio32${serial_addr} swiotlb=1 root=PARTUUID=${uuid} rw rootwait";
+
+load ${devtype} ${devnum}:1 ${kernel_addr_r} kernel.img
+
+bootm ${kernel_addr_r}