]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
riscv: qemu: Switch to use binman to generate u-boot.itb
authorBin Meng <bmeng.cn@gmail.com>
Mon, 10 May 2021 12:23:39 +0000 (20:23 +0800)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Wed, 19 May 2021 09:01:51 +0000 (17:01 +0800)
By utilizing the newly introduced BINMAN_STANDALONE_FDT option, along
with a new dedicated device tree source file for the QEMU virt target
used for binman only, we can now use binman to generate u-boot.itb.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/riscv/cpu/generic/Kconfig
arch/riscv/dts/Makefile
arch/riscv/dts/binman.dtsi
arch/riscv/dts/qemu-virt.dts [new file with mode: 0644]
configs/qemu-riscv32_spl_defconfig
configs/qemu-riscv64_spl_defconfig

index 6f73bdd26b6d93946f6a3160b6b211342bc34a50..e025134b23c756a91ec699f4061343c7892afbee 100644 (file)
@@ -4,6 +4,7 @@
 
 config GENERIC_RISCV
        bool
+       select BINMAN if SPL
        select ARCH_EARLY_INIT_R
        imply CPU
        imply CPU_RISCV
index 37803348753fdc74a0f6cea562469edbb2489399..26ef8532829dd4b0d61f30fe8cd9e2b77cbe9e27 100644 (file)
@@ -2,6 +2,7 @@
 
 dtb-$(CONFIG_TARGET_AX25_AE350) += ae350_32.dtb ae350_64.dtb
 dtb-$(CONFIG_TARGET_MICROCHIP_ICICLE) += microchip-mpfs-icicle-kit.dtb
+dtb-$(CONFIG_TARGET_QEMU_VIRT) += qemu-virt.dtb
 dtb-$(CONFIG_TARGET_SIFIVE_UNLEASHED) += hifive-unleashed-a00.dtb
 dtb-$(CONFIG_TARGET_SIPEED_MAIX) += k210-maix-bit.dtb
 
index e02597e73d4c81bb6eb4365b01561c6b8b54f13c..d26cfdb78a9ee824010d910b36e9364d2880c374 100644 (file)
                                        };
                                };
 
+#ifndef CONFIG_OF_PRIOR_STAGE
                                @fdt-SEQ {
                                        description = "NAME";
                                        type = "flat_dt";
                                        compression = "none";
                                };
+#endif
                        };
 
                        configurations {
                                default = "conf-1";
 
+#ifndef CONFIG_OF_PRIOR_STAGE
                                @conf-SEQ {
+#else
+                               conf-1 {
+#endif
                                        description = "NAME";
                                        firmware = "opensbi";
                                        loadables = "uboot";
+#ifndef CONFIG_OF_PRIOR_STAGE
                                        fdt = "fdt-SEQ";
+#endif
                                };
                        };
                };
diff --git a/arch/riscv/dts/qemu-virt.dts b/arch/riscv/dts/qemu-virt.dts
new file mode 100644 (file)
index 0000000..fecff54
--- /dev/null
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2021, Bin Meng <bmeng.cn@gmail.com>
+ */
+
+/dts-v1/;
+
+#include "binman.dtsi"
index 18dfe33ca80cc05961ac3dd031a57afe607d9832..a4c156612add74351951ad03329e2b3e12395350 100644 (file)
@@ -2,11 +2,13 @@ CONFIG_RISCV=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_SIZE=0x20000
 CONFIG_SPL=y
+CONFIG_DEFAULT_DEVICE_TREE="qemu-virt"
 CONFIG_TARGET_QEMU_VIRT=y
 CONFIG_RISCV_SMODE=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT_ADDRESS=0x80200000
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_DISPLAY_CPUINFO=y
 CONFIG_DISPLAY_BOARDINFO=y
 # CONFIG_CMD_MII is not set
index 897adf6a299e8264603ab5c8a8988e8b1061a25f..6c680483ce46c67e300968250ea25acd6d7e804e 100644 (file)
@@ -2,12 +2,14 @@ CONFIG_RISCV=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_SIZE=0x20000
 CONFIG_SPL=y
+CONFIG_DEFAULT_DEVICE_TREE="qemu-virt"
 CONFIG_TARGET_QEMU_VIRT=y
 CONFIG_ARCH_RV64I=y
 CONFIG_RISCV_SMODE=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT_ADDRESS=0x80200000
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_DISPLAY_CPUINFO=y
 CONFIG_DISPLAY_BOARDINFO=y
 # CONFIG_CMD_MII is not set