Browse Source

dubhe: linux-starfive-dev: Update Linux to support Dubhe 80
Remove bootarg patches as they're included in the recipe.
Rebase .dtb patch and add Dubhe 80 .dtb files to the patch.
Fix do_configure() as the bootargs is moved to dubhe_fpga_common.dtsi

Signed-off-by: weiheng.cheng <weiheng.cheng@starfivetech.com>

weiheng.cheng 7 months ago
parent
commit
3888598e22

+ 3 - 3
recipes-kernel/linux/files/add-dubhe-additional-dtb.patch

@@ -1,9 +1,9 @@
 diff --git a/arch/riscv/boot/dts/starfive/Makefile b/arch/riscv/boot/dts/starfive/Makefile
-index 7179c511f2fa..2807b20c2d73 100644
+index afd54ff97bd3..19cec25ad47b 100644
 --- a/arch/riscv/boot/dts/starfive/Makefile
 +++ b/arch/riscv/boot/dts/starfive/Makefile
 @@ -1,3 +1,4 @@
  # SPDX-License-Identifier: GPL-2.0
  dtb-$(CONFIG_SOC_STARFIVE) += jh7100-beaglev-starlight-a1.dtb jh7100-beaglev-starlight.dtb jh7100-starfive-visionfive-v1.dtb
- dtb-$(CONFIG_SOC_STARFIVE_DUBHE) += dubhe_fpga.dtb dubhe_fpga_dual.dtb
-+dtb-$(CONFIG_SOC_STARFIVE_DUBHE) += dubhe_fpga_ext4.dtb dubhe_fpga_ubi.dtb dubhe_fpga_nfs.dtb
+ dtb-$(CONFIG_SOC_STARFIVE_DUBHE) += dubhe80_fpga.dtb dubhe90_fpga.dtb dubhe90_fpga_dual.dtb
++dtb-$(CONFIG_SOC_STARFIVE_DUBHE) += dubhe90_fpga_ext4.dtb dubhe90_fpga_ubi.dtb dubhe90_fpga_nfs.dtb dubhe80_fpga_ext4.dtb dubhe80_fpga_ubi.dtb dubhe80_fpga_nfs.dtb

+ 0 - 13
recipes-kernel/linux/files/ext4.patch

@@ -1,13 +0,0 @@
-diff --git a/arch/riscv/boot/dts/starfive/dubhe_fpga.dts b/arch/riscv/boot/dts/starfive/dubhe_fpga.dts
-index 879d11946631..8fb6a311b138 100755
---- a/arch/riscv/boot/dts/starfive/dubhe_fpga.dts
-+++ b/arch/riscv/boot/dts/starfive/dubhe_fpga.dts
-@@ -12,7 +12,7 @@ aliases {
- 	};
- 
- 	chosen {
--		bootargs = "console=ttySIF0,115200 earlycon=sbi ip=:::255.255.255.0::eth0:dhcp";
-+		bootargs = "console=ttySIF0,115200 earlycon=sbi root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait ip=:::255.255.255.0::eth0:dhcp";
- 	};
- 
- 	cpus {

+ 0 - 13
recipes-kernel/linux/files/nfs.patch

@@ -1,13 +0,0 @@
-diff --git a/arch/riscv/boot/dts/starfive/dubhe_fpga.dts b/arch/riscv/boot/dts/starfive/dubhe_fpga.dts
-index 879d11946631..f90df1bff74b 100755
---- a/arch/riscv/boot/dts/starfive/dubhe_fpga.dts
-+++ b/arch/riscv/boot/dts/starfive/dubhe_fpga.dts
-@@ -12,7 +12,7 @@ aliases {
- 	};
- 
- 	chosen {
--		bootargs = "console=ttySIF0,115200 earlycon=sbi ip=:::255.255.255.0::eth0:dhcp";
-+		bootargs = "console=ttySIF0,115200 earlycon=sbi root=/dev/nfs rw nfsroot=192.168.1.1:/filepath,rw,tcp,vers=3 ip=:::255.255.255.0::eth0:dhcp rootfstype=ext4 rootwait";
- 	};
- 
- 	cpus {

+ 0 - 13
recipes-kernel/linux/files/ubi.patch

@@ -1,13 +0,0 @@
-diff --git a/arch/riscv/boot/dts/starfive/dubhe_fpga.dts b/arch/riscv/boot/dts/starfive/dubhe_fpga.dts
-index 879d11946631..7026ca656f4a 100755
---- a/arch/riscv/boot/dts/starfive/dubhe_fpga.dts
-+++ b/arch/riscv/boot/dts/starfive/dubhe_fpga.dts
-@@ -12,7 +12,7 @@ aliases {
- 	};
- 
- 	chosen {
--		bootargs = "console=ttySIF0,115200 earlycon=sbi ip=:::255.255.255.0::eth0:dhcp";
-+		bootargs = "console=ttySIF0,115200 earlycon=sbi ip=:::255.255.255.0::eth0:dhcp root=ubi0:starfive-dubhe-rootfs ubi.mtd=1 rw rootfstype=ubifs rootwait";
- 	};
- 
- 	cpus {

+ 23 - 7
recipes-kernel/linux/linux-starfive-dev_6.1.20.bb

@@ -10,7 +10,7 @@ BRANCH = "master"
 
 FORK:starfive-dubhe = "starfive-tech"
 BRANCH:starfive-dubhe = "starfive-6.1-dubhe"
-SRCREV:starfive-dubhe = "0a9c9aa4208378d4da0cf13c6c5a3a92da370b26"
+SRCREV:starfive-dubhe = "1e3b15b8f416e8d26af7bff467d8debc3f1f5fd9"
 
 FORK:starfive-jh8100 = "starfive-tech"
 BRANCH:starfive-jh8100 = "starfive-6.1-dev-jh8100-bmc"
@@ -47,10 +47,26 @@ BOOTARGS_UBI = "console=ttySIF0,115200 earlycon=sbi ip=:::255.255.255.0::eth0:dh
 BOOTARGS_NFS = "console=ttySIF0,115200 earlycon=sbi root=/dev/nfs rw nfsroot=192.168.1.1:/filepath,rw,tcp,vers=3 ip=:::255.255.255.0::eth0:dhcp rootfstype=ext4 rootwait"
 
 do_configure:append:starfive-dubhe() {
-	cp ${S}/arch/riscv/boot/dts/starfive/dubhe_fpga.dts ${S}/arch/riscv/boot/dts/starfive/dubhe_fpga_ext4.dts
-	cp ${S}/arch/riscv/boot/dts/starfive/dubhe_fpga.dts ${S}/arch/riscv/boot/dts/starfive/dubhe_fpga_ubi.dts
-	cp ${S}/arch/riscv/boot/dts/starfive/dubhe_fpga.dts ${S}/arch/riscv/boot/dts/starfive/dubhe_fpga_nfs.dts
-	sed -i "s+bootargs.*+bootargs = \"${BOOTARGS_EXT4}\";+g" ${S}/arch/riscv/boot/dts/starfive/dubhe_fpga_ext4.dts
-	sed -i "s+bootargs.*+bootargs = \"${BOOTARGS_UBI}\";+g" ${S}/arch/riscv/boot/dts/starfive/dubhe_fpga_ubi.dts
-	sed -i "s+bootargs.*+bootargs = \"${BOOTARGS_NFS}\";+g" ${S}/arch/riscv/boot/dts/starfive/dubhe_fpga_nfs.dts
+	cp ${S}/arch/riscv/boot/dts/starfive/dubhe80_fpga.dts ${S}/arch/riscv/boot/dts/starfive/dubhe80_fpga_ext4.dts
+        cp ${S}/arch/riscv/boot/dts/starfive/dubhe80_fpga.dts ${S}/arch/riscv/boot/dts/starfive/dubhe80_fpga_ubi.dts
+        cp ${S}/arch/riscv/boot/dts/starfive/dubhe80_fpga.dts ${S}/arch/riscv/boot/dts/starfive/dubhe80_fpga_nfs.dts
+
+	cp ${S}/arch/riscv/boot/dts/starfive/dubhe90_fpga.dts ${S}/arch/riscv/boot/dts/starfive/dubhe90_fpga_ext4.dts
+	cp ${S}/arch/riscv/boot/dts/starfive/dubhe90_fpga.dts ${S}/arch/riscv/boot/dts/starfive/dubhe90_fpga_ubi.dts
+	cp ${S}/arch/riscv/boot/dts/starfive/dubhe90_fpga.dts ${S}/arch/riscv/boot/dts/starfive/dubhe90_fpga_nfs.dts
+
+	for dts_file in ${S}/arch/riscv/boot/dts/starfive/dubhe*0_fpga_*.dts; do
+		if [ "$dts_file" = "${S}/arch/riscv/boot/dts/starfive/dubhe90_fpga_dual.dts" ]; then
+			continue
+		fi
+		echo -e "/ {" >> "$dts_file"
+		echo -e "\tchosen {" >> "$dts_file"
+		echo -e "\t\tbootargs" >> "$dts_file"
+		echo -e "\t};" >> "$dts_file"
+		echo -e "};" >> "$dts_file"
+	done
+
+	sed -i "s+bootargs+bootargs = \"${BOOTARGS_EXT4}\";+g" ${S}/arch/riscv/boot/dts/starfive/dubhe*0_fpga_ext4.dts
+	sed -i "s+bootargs+bootargs = \"${BOOTARGS_UBI}\";+g" ${S}/arch/riscv/boot/dts/starfive/dubhe*0_fpga_ubi.dts
+	sed -i "s+bootargs+bootargs = \"${BOOTARGS_NFS}\";+g" ${S}/arch/riscv/boot/dts/starfive/dubhe*0_fpga_nfs.dts
 }