[PATCH 0/2] Allow defconfigs defined from fragments

Hello all,
For context see thread ending here[0].
Thanks, Andrew
Changes from RFC[1]: - Added Reviewed-by
[0] https://marc.info/?l=u-boot&m=169333616210919&w=2 [1] https://lists.denx.de/pipermail/u-boot/2023-August/529084.html
Andrew Davis (2): Makefile: Run defconfig files through the C preprocessor configs: Add am62x_beagleplay_* defconfigs
configs/am62x_beagleplay_a53_defconfig | 3 +++ configs/am62x_beagleplay_r5_defconfig | 3 +++ scripts/kconfig/Makefile | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 configs/am62x_beagleplay_a53_defconfig create mode 100644 configs/am62x_beagleplay_r5_defconfig

This allows us to use some of the normal preprocessor directives inside defconfig files. Such as #define and #include.
Signed-off-by: Andrew Davis afd@ti.com Reviewed-by: Simon Glass sjg@chromium.org --- scripts/kconfig/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 2d97aab8d21..5ce5845e824 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -93,7 +93,8 @@ endif endif
%_defconfig: $(obj)/conf - $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig) + $(Q)$(CPP) -nostdinc -I $(srctree) -undef -x assembler-with-cpp $(srctree)/arch/$(SRCARCH)/configs/$@ -o generated_defconfig + $(Q)$< $(silent) --defconfig=generated_defconfig $(Kconfig)
# Added for U-Boot (backward compatibility) %_config: %_defconfig

On 12:05-20231101, Andrew Davis wrote:
This allows us to use some of the normal preprocessor directives inside defconfig files. Such as #define and #include.
Signed-off-by: Andrew Davis afd@ti.com Reviewed-by: Simon Glass sjg@chromium.org
Reviewed-by: Nishanth Menon nm@ti.com

Add am62x_beagleplay_r5_defconfig for R5 SPL and am62x_beagleplay_a53_defconfig for A53 SPL and U-Boot support.
These defconfigs are composite defconfigs built from the config fragment board/ti/am62x/beagleplay_*.config applied onto the base am62x_evm_*_defconfig.
Signed-off-by: Andrew Davis afd@ti.com Reviewed-by: Simon Glass sjg@chromium.org --- configs/am62x_beagleplay_a53_defconfig | 3 +++ configs/am62x_beagleplay_r5_defconfig | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 configs/am62x_beagleplay_a53_defconfig create mode 100644 configs/am62x_beagleplay_r5_defconfig
diff --git a/configs/am62x_beagleplay_a53_defconfig b/configs/am62x_beagleplay_a53_defconfig new file mode 100644 index 00000000000..ad708e15397 --- /dev/null +++ b/configs/am62x_beagleplay_a53_defconfig @@ -0,0 +1,3 @@ +// The BeaglePlay defconfig for A53 core +#include "configs/am62x_evm_a53_defconfig" +#include "board/ti/am62x/beagleplay_a53.config" diff --git a/configs/am62x_beagleplay_r5_defconfig b/configs/am62x_beagleplay_r5_defconfig new file mode 100644 index 00000000000..276b1f81a3e --- /dev/null +++ b/configs/am62x_beagleplay_r5_defconfig @@ -0,0 +1,3 @@ +// The BeaglePlay defconfig for R5 core +#include "configs/am62x_evm_r5_defconfig" +#include "board/ti/am62x/beagleplay_r5.config"

On 12:05-20231101, Andrew Davis wrote:
Add am62x_beagleplay_r5_defconfig for R5 SPL and am62x_beagleplay_a53_defconfig for A53 SPL and U-Boot support.
These defconfigs are composite defconfigs built from the config fragment board/ti/am62x/beagleplay_*.config applied onto the base am62x_evm_*_defconfig.
Signed-off-by: Andrew Davis afd@ti.com Reviewed-by: Simon Glass sjg@chromium.org
configs/am62x_beagleplay_a53_defconfig | 3 +++ configs/am62x_beagleplay_r5_defconfig | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 configs/am62x_beagleplay_a53_defconfig create mode 100644 configs/am62x_beagleplay_r5_defconfig
diff --git a/configs/am62x_beagleplay_a53_defconfig b/configs/am62x_beagleplay_a53_defconfig new file mode 100644 index 00000000000..ad708e15397 --- /dev/null +++ b/configs/am62x_beagleplay_a53_defconfig @@ -0,0 +1,3 @@ +// The BeaglePlay defconfig for A53 core +#include "configs/am62x_evm_a53_defconfig" +#include "board/ti/am62x/beagleplay_a53.config" diff --git a/configs/am62x_beagleplay_r5_defconfig b/configs/am62x_beagleplay_r5_defconfig new file mode 100644 index 00000000000..276b1f81a3e --- /dev/null +++ b/configs/am62x_beagleplay_r5_defconfig @@ -0,0 +1,3 @@ +// The BeaglePlay defconfig for R5 core +#include "configs/am62x_evm_r5_defconfig" +#include "board/ti/am62x/beagleplay_r5.config"
Let us also update the documentation doc/board/ti/am62x_beagleplay.rst to point people to this configuration?
participants (2)
-
Andrew Davis
-
Nishanth Menon