nezha_defconfig: bump opensbi, u-boot and linux

Opensbi is now based on 1.1, U-Boot on 2022.07-rc3 and Linux on 5.19-rc1.
We don't yet support 5.19 kernel headers, so use 5.17 instead.

The incompatibility between opensbi and u-boot is now fixed, so drop
0001-arch-riscv-dts-sun20i-d1.dtsi-adjust-plic-compatible.patch.

The updated device tree in the kernel tree no longer specifies a memory
node (and the board exists in 512M/1G/2G variants, so instead use the
(otherwise identical) device tree provided by u-boot, where the memory
node is fixed up based on the detected memory size.

On riscv, the linux kernel unconditionally wants to build its bundled
dtc, so it needs flex and bison, even if it is not going to build any
DTB. We can get flex and bison either via the system ones, or we get
them as they are in LINUX_KCONFIG_DEPENDENCIES. However, relying on this
is a bit fragile, so we keep asking the kernel to build a DTB, so that
we do ensure that our host-{flex,bison} are built and in the dependency
chain of the kernel (for PPD).

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
[yann.morin.1998@free.fr:
  - extend on why we keep building a DTB from the kernel
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
Peter Korsgaard 2022-09-06 18:15:56 +02:00 committed by Yann E. MORIN
parent 7317875802
commit 3461465ac0
4 changed files with 5 additions and 41 deletions

View File

@ -1,4 +1,4 @@
label linux
kernel /boot/Image
devicetree /boot/sun20i-d1-nezha.dtb
# use devicetree from u-boot
append console=ttyS0,115200 root=/dev/mmcblk0p1 ro rootwait

View File

@ -1,36 +0,0 @@
From 99cf8f37ceb1def9e7bbaccc395cf2275723e03d Mon Sep 17 00:00:00 2001
From: Peter Korsgaard <peter@korsgaard.com>
Date: Thu, 4 Nov 2021 22:15:13 +0100
Subject: [PATCH] arch/riscv/dts/sun20i-d1.dtsi: adjust plic compatible to
match opensbi
The T-HEAD PLIC is by default not accessible from S-mode, and access must be
enabled by opensbi to make it accessible to Linux.
The DTB is used both by U-Boot and opensbi (but the PLIC node is ignored by
U-Boot), so change the compatible to match what opensbi expects to fix a
crash during Linux boot:
https://github.com/riscv-software-src/opensbi/commit/78c2b19218bd
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
arch/riscv/dts/sun20i-d1.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/dts/sun20i-d1.dtsi b/arch/riscv/dts/sun20i-d1.dtsi
index 280e0336d4..56d02c33b0 100644
--- a/arch/riscv/dts/sun20i-d1.dtsi
+++ b/arch/riscv/dts/sun20i-d1.dtsi
@@ -1136,7 +1136,7 @@
plic: interrupt-controller@10000000 {
compatible = "allwinner,sun20i-d1-plic",
- "sifive,plic-1.0.0";
+ "thead,c900-plic";
reg = <0x10000000 0x4000000>;
#address-cells = <0>;
interrupts-extended = <&cpu0_intc 11>,
--
2.20.1

View File

@ -1,12 +1,12 @@
BR2_riscv=y
BR2_GLOBAL_PATCH_DIR="board/nezha/patches"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_14=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_17=y
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,012f5a3d01be6d44e32c74bb3637ec281790b297)/linux-012f5a3d01be6d44e32c74bb3637ec281790b297.tar.gz"
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,linux,fe178cf0153d98b71cb01a46c8cc050826a17e77)/linux-fe178cf0153d98b71cb01a46c8cc050826a17e77.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="nezha"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun20i-d1-nezha"
@ -16,14 +16,14 @@ BR2_TARGET_ROOTFS_EXT2_4=y
# BR2_TARGET_ROOTFS_TAR is not set
BR2_TARGET_OPENSBI=y
BR2_TARGET_OPENSBI_CUSTOM_TARBALL=y
BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,opensbi,b9125c6f8909d1cc0417795737fc13cb6297ff11)/opensbi-b9125c6f8909d1cc0417795737fc13cb6297ff11.tar.gz"
BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,opensbi,e6793dc36a71537023f078034fe795c64a9992a3)/opensbi-e6793dc36a71537023f078034fe795c64a9992a3.tar.gz"
BR2_TARGET_OPENSBI_PLAT="generic"
# BR2_TARGET_OPENSBI_INSTALL_JUMP_IMG is not set
BR2_TARGET_SUN20I_D1_SPL=y
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,62392d3b8a624a80646c1876533336f90140088d)/uboot-62392d3b8a624a80646c1876533336f90140088d.tar.gz"
BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,u-boot,d1-2022-05-26)/uboot-d1-2022-05-26.tar.gz"
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nezha"
BR2_TARGET_UBOOT_NEEDS_DTC=y
BR2_TARGET_UBOOT_NEEDS_PYTHON3=y