Skip to contentSkip to conversation

configs/nezha_defconfig: use OpenSBI 1.4

PATCH Applied Peter Korsgaard 2 participants 5 messages Mar 24, 2024 – Apr 10, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 configs/nezha_defconfig: use OpenSBI 1.4

---
 configs/nezha_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configs/nezha_defconfig +1 -1
index dd94707905..2ab278318f 100644
@@ -16,7 +16,7 @@ BR2_TARGET_ROOTFS_EXT2_4=y
 # BR2_TARGET_ROOTFS_TAR is not set
 BR2_TARGET_OPENSBI=y
 BR2_TARGET_OPENSBI_CUSTOM_VERSION=y
-BR2_TARGET_OPENSBI_CUSTOM_VERSION_VALUE="1.2"
+BR2_TARGET_OPENSBI_CUSTOM_VERSION_VALUE="1.4"
 BR2_TARGET_OPENSBI_PLAT="generic"
 # BR2_TARGET_OPENSBI_INSTALL_JUMP_IMG is not set
 BR2_TARGET_UBOOT=y
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/4 configs/nezha_defconfig: bump u-boot to current top of d1-wip

This is now based on U-Boot 2024.01-rc1.

---
 configs/nezha_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configs/nezha_defconfig +1 -1
index 2ab278318f..7f3070f419 100644
@@ -22,7 +22,7 @@ BR2_TARGET_OPENSBI_PLAT="generic"
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
 BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
-BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,u-boot,528ae9bc6c55edd3ffe642734b4132a8246ea777)/uboot-528ae9bc6c55edd3ffe642734b4132a8246ea777.tar.gz"
+BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,u-boot,2e89b706f5c956a70c989cd31665f1429e9a0b48)/uboot-2e89b706f5c956a70c989cd31665f1429e9a0b48.tar.gz"
 BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nezha"
 BR2_TARGET_UBOOT_NEEDS_DTC=y
 BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

PATCH 3/4 configs/nezha_defconfig: use mainline Linux 6.6.22

In reply to Peter Korsgaard

The D1 support is now in mainline, so use that instead. There is no dedicated nezha defconfig, so use the riscv defconfig. This defconfig has most drivers as modules, so add mdev to ensure they get correctly loaded.

The defconfig does not have USB gadget/OTG support, so enable that using a config fragment to make the USB-C connector work and get rid of the following warning:

[    7.233418] musb-sunxi 4100000.usb: Invalid or missing 'dr_mode' property
[    7.240330] musb-sunxi: probe of 4100000.usb failed with error -22
---
 board/nezha/linux.fragment |  2 ++
 configs/nezha_defconfig    | 10 ++++++----
 2 files changed, 8 insertions(+), 4 deletions(-)
 create mode 100644 board/nezha/linux.fragment
board/nezha/linux.fragment new file +2 -0
new file mode 100644
index 0000000000..4b101eaacb
@@ -0,0 +1,2 @@
+CONFIG_USB_GADGET=y
+CONFIG_USB_MUSB_DUAL_ROLE=y
configs/nezha_defconfig +6 -4
index 7f3070f419..e717c8a08d 100644
@@ -1,13 +1,15 @@
 BR2_riscv=y
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_1=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
 BR2_SYSTEM_DHCP="eth0"
 BR2_ROOTFS_OVERLAY="board/nezha/overlay"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/nezha/genimage.cfg"
 BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
-BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,linux,ca67838d84af4c9f85d06311c9e98e1adf46308f)/linux-ca67838d84af4c9f85d06311c9e98e1adf46308f.tar.gz"
-BR2_LINUX_KERNEL_DEFCONFIG="nezha"
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.22"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/nezha/linux.fragment"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun20i-d1-nezha"
 BR2_LINUX_KERNEL_INSTALL_TARGET=y
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

PATCH 4/4 configs/nezha_defconfig: add hashes for Linux/opensbi/u-boot

In reply to Peter Korsgaard

And enable BR2_DOWNLOAD_FORCE_CHECK_HASHES.

---
 board/nezha/patches/linux-headers/linux-headers.hash | 1 +
 board/nezha/patches/linux/linux.hash                 | 2 ++
 board/nezha/patches/opensbi/opensbi.hash             | 2 ++
 board/nezha/patches/uboot/uboot.hash                 | 2 ++
 configs/nezha_defconfig                              | 2 ++
 5 files changed, 9 insertions(+)
 create mode 120000 board/nezha/patches/linux-headers/linux-headers.hash
 create mode 100644 board/nezha/patches/linux/linux.hash
 create mode 100644 board/nezha/patches/opensbi/opensbi.hash
 create mode 100644 board/nezha/patches/uboot/uboot.hash
board/nezha/patches/linux-headers/linux-headers.hash new file +1 -0
new file mode 120000
index 0000000000..5808d92afe
@@ -0,0 +1 @@
+../linux/linux.hash
\ No newline at end of file
board/nezha/patches/linux/linux.hash new file +2 -0
new file mode 100644
index 0000000000..899adefd07
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256  23e3e7b56407250f5411bdab95763d0bc4e3a19dfa431d951df7eacabd61a2f4  linux-6.6.22.tar.xz
board/nezha/patches/opensbi/opensbi.hash new file +2 -0
new file mode 100644
index 0000000000..bc4058abe6
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256  319b62a4186fbce9b81a0c5f0ec9f003a10c808397a72138bc9745d9b87b1eb1  opensbi-1.4.tar.gz
board/nezha/patches/uboot/uboot.hash new file +2 -0
new file mode 100644
index 0000000000..7d05185938
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256  36db7c20b179f03aa29009565c6b34380d5629fd5c57ed110244594d9930dfed  uboot-2e89b706f5c956a70c989cd31665f1429e9a0b48.tar.gz
configs/nezha_defconfig +2 -0
index e717c8a08d..c234b3e243 100644
@@ -1,5 +1,7 @@
 BR2_riscv=y
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
+BR2_GLOBAL_PATCH_DIR="board/nezha/patches"
+BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
 BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
 BR2_SYSTEM_DHCP="eth0"
 BR2_ROOTFS_OVERLAY="board/nezha/overlay"
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw
In reply to Peter Korsgaard
Quoted 1 line · Peter Korsgaard

Applied all 4 to master, thanks.

Regards,
Arnout

Quoted 9 lines
---
  configs/nezha_defconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
configs/nezha_defconfig +0 -0
index dd94707905..2ab278318f 100644

configs/nezha_defconfig BR2_TARGET_ROOTFS_EXT2_4=y · line 22

Quoted 8 lines
configs/nezha_defconfig +1 -1
@@ -16,7 +16,7 @@ BR2_TARGET_ROOTFS_EXT2_4=y
  # BR2_TARGET_ROOTFS_TAR is not set
  BR2_TARGET_OPENSBI=y
  BR2_TARGET_OPENSBI_CUSTOM_VERSION=y
-BR2_TARGET_OPENSBI_CUSTOM_VERSION_VALUE="1.2"
+BR2_TARGET_OPENSBI_CUSTOM_VERSION_VALUE="1.4"
  BR2_TARGET_OPENSBI_PLAT="generic"
  # BR2_TARGET_OPENSBI_INSTALL_JUMP_IMG is not set
  BR2_TARGET_UBOOT=y

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot