3461465ac0
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>
55 lines
1.4 KiB
Diff
55 lines
1.4 KiB
Diff
From 4a923e0e4ef6d2b41cb89d658e269adada847573 Mon Sep 17 00:00:00 2001
|
|
From: Peter Korsgaard <peter@korsgaard.com>
|
|
Date: Thu, 4 Nov 2021 22:32:04 +0100
|
|
Subject: [PATCH] Makefile: HACK: Support building u-boot.toc1 for nezda board
|
|
|
|
For easier integration into Buildroot. The boot0 / toc1 logic is WIP until
|
|
U-Boot gains SPL support for the D1, so add a hack to make it easier to
|
|
integrate in Buildroot as-is.
|
|
|
|
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
|
---
|
|
Makefile | 9 +++++++++
|
|
nezha.cfg | 9 +++++++++
|
|
2 files changed, 18 insertions(+)
|
|
create mode 100644 nezha.cfg
|
|
|
|
diff --git a/Makefile b/Makefile
|
|
index f911f70344..259d93bf80 100644
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -1084,6 +1084,15 @@ endif
|
|
.binman_stamp: FORCE
|
|
@touch $@
|
|
|
|
+fw_dynamic.bin: $(OPENSBI)
|
|
+ $(call if_changed,copy)
|
|
+
|
|
+MKIMAGEFLAGS_u-boot.toc1 = -T sunxi_toc1
|
|
+u-boot.toc1: nezha.cfg fw_dynamic.bin inputs
|
|
+ $(call if_changed,mkimage)
|
|
+
|
|
+all: u-boot.toc1
|
|
+
|
|
ifeq ($(CONFIG_DEPRECATED),y)
|
|
$(warning "You have deprecated configuration options enabled in your .config! Please check your configuration.")
|
|
endif
|
|
diff --git a/nezha.cfg b/nezha.cfg
|
|
new file mode 100644
|
|
index 0000000000..2d23b9b388
|
|
--- /dev/null
|
|
+++ b/nezha.cfg
|
|
@@ -0,0 +1,9 @@
|
|
+[opensbi]
|
|
+file = fw_dynamic.bin
|
|
+addr = 0x40000000
|
|
+[dtb]
|
|
+file = arch/riscv/dts/sun20i-d1-nezha.dtb
|
|
+addr = 0x44000000
|
|
+[u-boot]
|
|
+file = u-boot-nodtb.bin
|
|
+addr = 0x4a000000
|
|
--
|
|
2.20.1
|
|
|