Message ID | 20230918121136.2295900-4-randolph@andestech.com |
---|---|
State | Changes Requested |
Delegated to: | Tom Rini |
Headers | show |
Series | andes: rearrange defconfig and dts | expand |
On Mon, Sep 18, 2023 at 08:11:36PM +0800, Randolph wrote: > Add SPL_LOAD_FIT_CONFIG for binman itb layout selection > > Signed-off-by: Randolph <randolph@andestech.com> > --- > arch/riscv/dts/ae350-u-boot.dtsi | 1 + > arch/riscv/dts/ae350_32.dts | 1 - > arch/riscv/dts/ae350_64.dts | 1 - > board/AndesTech/ae350/Kconfig | 6 ++++++ > configs/ae350_rv32_defconfig | 1 + > configs/ae350_rv32_spl_defconfig | 1 + > configs/ae350_rv32_spl_xip_defconfig | 1 + > configs/ae350_rv32_xip_defconfig | 1 + > configs/ae350_rv64_defconfig | 1 + > configs/ae350_rv64_spl_defconfig | 1 + > configs/ae350_rv64_spl_xip_defconfig | 1 + > configs/ae350_rv64_xip_defconfig | 1 + > 12 files changed, 15 insertions(+), 2 deletions(-) So this is where I have a problem. It's not clear why you need to change anything here, as there's no example given for doing something other than what you do today, and there's no documentation about it either. From other contexts, it seems like you're trying to re-implement CONFIG_SPL_OS_BOOT but not explaining why you can't use the existing framework.
Hi Tom, Tom Rini <trini@konsulko.com> 於 2023年9月18日 週一 下午11:04寫道: > > On Mon, Sep 18, 2023 at 08:11:36PM +0800, Randolph wrote: > > > Add SPL_LOAD_FIT_CONFIG for binman itb layout selection > > > > Signed-off-by: Randolph <randolph@andestech.com> > > --- > > arch/riscv/dts/ae350-u-boot.dtsi | 1 + > > arch/riscv/dts/ae350_32.dts | 1 - > > arch/riscv/dts/ae350_64.dts | 1 - > > board/AndesTech/ae350/Kconfig | 6 ++++++ > > configs/ae350_rv32_defconfig | 1 + > > configs/ae350_rv32_spl_defconfig | 1 + > > configs/ae350_rv32_spl_xip_defconfig | 1 + > > configs/ae350_rv32_xip_defconfig | 1 + > > configs/ae350_rv64_defconfig | 1 + > > configs/ae350_rv64_spl_defconfig | 1 + > > configs/ae350_rv64_spl_xip_defconfig | 1 + > > configs/ae350_rv64_xip_defconfig | 1 + > > 12 files changed, 15 insertions(+), 2 deletions(-) > > So this is where I have a problem. It's not clear why you need to > change anything here, as there's no example given for doing something > other than what you do today, and there's no documentation about it > either. From other contexts, it seems like you're trying to re-implement > CONFIG_SPL_OS_BOOT but not explaining why you can't use the existing > framework. > > -- > Tom We want to add our binman.dtsi (very similar to SPL_OS_BOOT) in the future, but this may affect other vendors' code under arch/riscv. To take a step back and reduce the gap, we just want to rearrange our code now (in this patch). We are not re-implementing SPL_OS_BOOT, the goal (skip loading u-boot proper) is the same, the method is different. For example, in ARM architecture, the Falcon mode (by enabling SPL_OS_BOOT), the boot flow is u-boot SPL jump to Linux kernel. In RISC-V architecture, most SOCs require OpenSBI, the boot flow should be u-boot SPL -> OpenSBI -> Linux kernel. Apart from the boot flow, the code flow is also different, "jump_to_image_linux" is not necessary and the names are not quite right in the RISC-V architecture. The CONFIG_SPL_ARGS_ADDR macro is also not required when building RISC-V u-boot. That's why we need to create another way for OpenSBI to do the actions like CONFIG_SPL_OS_BOOT. Randolph Sincerely
diff --git a/arch/riscv/dts/ae350-u-boot.dtsi b/arch/riscv/dts/ae350-u-boot.dtsi index aef9159b7a..ff5725501f 100644 --- a/arch/riscv/dts/ae350-u-boot.dtsi +++ b/arch/riscv/dts/ae350-u-boot.dtsi @@ -1,4 +1,5 @@ // SPDX-License-Identifier: (GPL-2.0 OR MIT) +#include CONFIG_SPL_LOAD_FIT_CONFIG / { cpus { diff --git a/arch/riscv/dts/ae350_32.dts b/arch/riscv/dts/ae350_32.dts index 61af6d5465..2caabad888 100644 --- a/arch/riscv/dts/ae350_32.dts +++ b/arch/riscv/dts/ae350_32.dts @@ -2,7 +2,6 @@ /dts-v1/; -#include "binman.dtsi" #include "ae350-u-boot.dtsi" / { diff --git a/arch/riscv/dts/ae350_64.dts b/arch/riscv/dts/ae350_64.dts index 8c7db29b4f..9d5f6c743c 100644 --- a/arch/riscv/dts/ae350_64.dts +++ b/arch/riscv/dts/ae350_64.dts @@ -2,7 +2,6 @@ /dts-v1/; -#include "binman.dtsi" #include "ae350-u-boot.dtsi" / { diff --git a/board/AndesTech/ae350/Kconfig b/board/AndesTech/ae350/Kconfig index a85e7d6351..49a2f8ec23 100644 --- a/board/AndesTech/ae350/Kconfig +++ b/board/AndesTech/ae350/Kconfig @@ -41,4 +41,10 @@ config BOARD_SPECIFIC_OPTIONS # dummy imply SPL_RAM_DEVICE imply OF_HAS_PRIOR_STAGE +config SPL_LOAD_FIT_CONFIG + string "Default FIT configuration for SPL" + depends on SPL_LOAD_FIT + help + Specify corresponding FIT configuration for SPL modes. + endif diff --git a/configs/ae350_rv32_defconfig b/configs/ae350_rv32_defconfig index 2fbb87a9b3..eea919249d 100644 --- a/configs/ae350_rv32_defconfig +++ b/configs/ae350_rv32_defconfig @@ -10,6 +10,7 @@ CONFIG_SYS_PROMPT="RISC-V # " CONFIG_SYS_MONITOR_LEN=786432 CONFIG_SYS_LOAD_ADDR=0x100000 CONFIG_TARGET_ANDES_AE350=y +CONFIG_SPL_LOAD_FIT_CONFIG="binman.dtsi" CONFIG_FIT=y CONFIG_SYS_MONITOR_BASE=0x88000000 CONFIG_DISTRO_DEFAULTS=y diff --git a/configs/ae350_rv32_spl_defconfig b/configs/ae350_rv32_spl_defconfig index b28a0a84fb..0d100bdbb1 100644 --- a/configs/ae350_rv32_spl_defconfig +++ b/configs/ae350_rv32_spl_defconfig @@ -13,6 +13,7 @@ CONFIG_SPL=y CONFIG_SYS_LOAD_ADDR=0x100000 CONFIG_TARGET_ANDES_AE350=y CONFIG_RISCV_SMODE=y +CONFIG_SPL_LOAD_FIT_CONFIG="binman.dtsi" # CONFIG_AVAILABLE_HARTS is not set CONFIG_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x10000000 diff --git a/configs/ae350_rv32_spl_xip_defconfig b/configs/ae350_rv32_spl_xip_defconfig index 5e8f1b3631..0284d18e58 100644 --- a/configs/ae350_rv32_spl_xip_defconfig +++ b/configs/ae350_rv32_spl_xip_defconfig @@ -14,6 +14,7 @@ CONFIG_SPL=y CONFIG_SYS_LOAD_ADDR=0x100000 CONFIG_TARGET_ANDES_AE350=y CONFIG_RISCV_SMODE=y +CONFIG_SPL_LOAD_FIT_CONFIG="binman.dtsi" CONFIG_SPL_XIP=y CONFIG_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x80010000 diff --git a/configs/ae350_rv32_xip_defconfig b/configs/ae350_rv32_xip_defconfig index f1c1e5bc00..1b01b881ed 100644 --- a/configs/ae350_rv32_xip_defconfig +++ b/configs/ae350_rv32_xip_defconfig @@ -10,6 +10,7 @@ CONFIG_SYS_PROMPT="RISC-V # " CONFIG_SYS_MONITOR_LEN=786432 CONFIG_SYS_LOAD_ADDR=0x100000 CONFIG_TARGET_ANDES_AE350=y +CONFIG_SPL_LOAD_FIT_CONFIG="binman.dtsi" CONFIG_XIP=y CONFIG_FIT=y CONFIG_SYS_MONITOR_BASE=0x88000000 diff --git a/configs/ae350_rv64_defconfig b/configs/ae350_rv64_defconfig index 3f30842a8e..cd13fc58a5 100644 --- a/configs/ae350_rv64_defconfig +++ b/configs/ae350_rv64_defconfig @@ -9,6 +9,7 @@ CONFIG_DEFAULT_DEVICE_TREE="ae350_64" CONFIG_SYS_PROMPT="RISC-V # " CONFIG_SYS_LOAD_ADDR=0x100000 CONFIG_TARGET_ANDES_AE350=y +CONFIG_SPL_LOAD_FIT_CONFIG="binman.dtsi" CONFIG_ARCH_RV64I=y CONFIG_FIT=y CONFIG_SYS_MONITOR_BASE=0x88000000 diff --git a/configs/ae350_rv64_spl_defconfig b/configs/ae350_rv64_spl_defconfig index 1592ec811a..2d32aea041 100644 --- a/configs/ae350_rv64_spl_defconfig +++ b/configs/ae350_rv64_spl_defconfig @@ -13,6 +13,7 @@ CONFIG_SYS_LOAD_ADDR=0x100000 CONFIG_TARGET_ANDES_AE350=y CONFIG_ARCH_RV64I=y CONFIG_RISCV_SMODE=y +CONFIG_SPL_LOAD_FIT_CONFIG="binman.dtsi" # CONFIG_AVAILABLE_HARTS is not set CONFIG_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x10000000 diff --git a/configs/ae350_rv64_spl_xip_defconfig b/configs/ae350_rv64_spl_xip_defconfig index 97f961b6c9..f2fea9d28e 100644 --- a/configs/ae350_rv64_spl_xip_defconfig +++ b/configs/ae350_rv64_spl_xip_defconfig @@ -14,6 +14,7 @@ CONFIG_SYS_LOAD_ADDR=0x100000 CONFIG_TARGET_ANDES_AE350=y CONFIG_ARCH_RV64I=y CONFIG_RISCV_SMODE=y +CONFIG_SPL_LOAD_FIT_CONFIG="binman.dtsi" CONFIG_SPL_XIP=y CONFIG_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x80010000 diff --git a/configs/ae350_rv64_xip_defconfig b/configs/ae350_rv64_xip_defconfig index cabbf75f84..88c3869f75 100644 --- a/configs/ae350_rv64_xip_defconfig +++ b/configs/ae350_rv64_xip_defconfig @@ -9,6 +9,7 @@ CONFIG_DEFAULT_DEVICE_TREE="ae350_64" CONFIG_SYS_PROMPT="RISC-V # " CONFIG_SYS_LOAD_ADDR=0x100000 CONFIG_TARGET_ANDES_AE350=y +CONFIG_SPL_LOAD_FIT_CONFIG="binman.dtsi" CONFIG_ARCH_RV64I=y CONFIG_XIP=y CONFIG_FIT=y
Add SPL_LOAD_FIT_CONFIG for binman itb layout selection Signed-off-by: Randolph <randolph@andestech.com> --- arch/riscv/dts/ae350-u-boot.dtsi | 1 + arch/riscv/dts/ae350_32.dts | 1 - arch/riscv/dts/ae350_64.dts | 1 - board/AndesTech/ae350/Kconfig | 6 ++++++ configs/ae350_rv32_defconfig | 1 + configs/ae350_rv32_spl_defconfig | 1 + configs/ae350_rv32_spl_xip_defconfig | 1 + configs/ae350_rv32_xip_defconfig | 1 + configs/ae350_rv64_defconfig | 1 + configs/ae350_rv64_spl_defconfig | 1 + configs/ae350_rv64_spl_xip_defconfig | 1 + configs/ae350_rv64_xip_defconfig | 1 + 12 files changed, 15 insertions(+), 2 deletions(-)