aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorTianling Shen <cnsztl@immortalwrt.org>2023-05-13 12:19:52 +0800
committerHauke Mehrtens <hauke@hauke-m.de>2023-05-18 17:42:53 +0200
commite35c7ab51fd161724924321f0590a9e26cb24aa7 (patch)
treea2c1f0c6d49b5d882d3505f88efce36cda0b93c3 /target
parent1a5cb37dd3a09b4ce58c8c7708ad0aff87c86569 (diff)
downloadupstream-e35c7ab51fd161724924321f0590a9e26cb24aa7.tar.gz
upstream-e35c7ab51fd161724924321f0590a9e26cb24aa7.tar.bz2
upstream-e35c7ab51fd161724924321f0590a9e26cb24aa7.zip
rockchip: merge bootscript
The bootscript for nanopi r2s/r4s only changes the serial address, so make it auto detected in mmc bootscript rather than creating more (redudant) files. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Diffstat (limited to 'target')
-rw-r--r--target/linux/rockchip/image/armv8.mk6
-rw-r--r--target/linux/rockchip/image/mmc.bootscript10
-rw-r--r--target/linux/rockchip/image/nanopi-r2s.bootscript7
-rw-r--r--target/linux/rockchip/image/nanopi-r4s.bootscript7
4 files changed, 12 insertions, 18 deletions
diff --git a/target/linux/rockchip/image/armv8.mk b/target/linux/rockchip/image/armv8.mk
index 86e7cec979..f441f9b087 100644
--- a/target/linux/rockchip/image/armv8.mk
+++ b/target/linux/rockchip/image/armv8.mk
@@ -11,7 +11,7 @@ define Device/firefly_roc-rk3328-cc
SOC := rk3328
DEVICE_DTS := rockchip/rk3328-roc-cc
UBOOT_DEVICE_NAME := roc-cc-rk3328
- IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r2s | pine64-img | gzip | append-metadata
+ IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata
endef
TARGET_DEVICES += firefly_roc-rk3328-cc
@@ -20,7 +20,7 @@ define Device/friendlyarm_nanopi-r2s
DEVICE_MODEL := NanoPi R2S
SOC := rk3328
UBOOT_DEVICE_NAME := nanopi-r2s-rk3328
- IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r2s | pine64-img | gzip | append-metadata
+ IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata
DEVICE_PACKAGES := kmod-usb-net-rtl8152
endef
TARGET_DEVICES += friendlyarm_nanopi-r2s
@@ -31,7 +31,7 @@ define Device/friendlyarm_nanopi-r4s
DEVICE_VARIANT := 4GB LPDDR4
SOC := rk3399
UBOOT_DEVICE_NAME := nanopi-r4s-rk3399
- IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r4s | pine64-img | gzip | append-metadata
+ IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata
DEVICE_PACKAGES := kmod-r8169
endef
TARGET_DEVICES += friendlyarm_nanopi-r4s
diff --git a/target/linux/rockchip/image/mmc.bootscript b/target/linux/rockchip/image/mmc.bootscript
index 9269fda9cf..60b59e1b6b 100644
--- a/target/linux/rockchip/image/mmc.bootscript
+++ b/target/linux/rockchip/image/mmc.bootscript
@@ -1,6 +1,14 @@
part uuid mmc ${devnum}:2 uuid
-setenv bootargs "console=ttyS2,1500000 console=tty1 earlycon=uart8250,mmio32,0xff1a0000 root=PARTUUID=${uuid} rw rootwait"
+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 mmc ${devnum}:1 ${kernel_addr_r} kernel.img
diff --git a/target/linux/rockchip/image/nanopi-r2s.bootscript b/target/linux/rockchip/image/nanopi-r2s.bootscript
deleted file mode 100644
index 8f961d3732..0000000000
--- a/target/linux/rockchip/image/nanopi-r2s.bootscript
+++ /dev/null
@@ -1,7 +0,0 @@
-part uuid mmc ${devnum}:2 uuid
-
-setenv bootargs "console=ttyS2,1500000 earlycon=uart8250,mmio32,0xff130000 root=PARTUUID=${uuid} rw rootwait"
-
-load mmc ${devnum}:1 ${kernel_addr_r} kernel.img
-
-bootm ${kernel_addr_r}
diff --git a/target/linux/rockchip/image/nanopi-r4s.bootscript b/target/linux/rockchip/image/nanopi-r4s.bootscript
deleted file mode 100644
index 1e53200027..0000000000
--- a/target/linux/rockchip/image/nanopi-r4s.bootscript
+++ /dev/null
@@ -1,7 +0,0 @@
-part uuid mmc ${devnum}:2 uuid
-
-setenv bootargs "console=ttyS2,1500000 earlycon=uart8250,mmio32,0xff1a0000 root=PARTUUID=${uuid} rw rootwait"
-
-load mmc ${devnum}:1 ${kernel_addr_r} kernel.img
-
-bootm ${kernel_addr_r}