Skip to contentSkip to conversation

Allow defconfigs defined from fragments

PATCH In review Andrew Davis 2 participants 5 messages Nov 1, 2023 – Nov 2, 2023 Kconfig

lore
Share & tools
lore
#0 lore raw

cover 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
Signature · 1 line
2.39.2
#1 lore raw

PATCH 1/2 Makefile: Run defconfig files through the C preprocessor

This allows us to use some of the normal preprocessor directives inside defconfig files. Such as #define and #include.

---
 scripts/kconfig/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
scripts/kconfig/Makefile +2 -1
index 2d97aab8d21..5ce5845e824 100644
@@ -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
Signature · 1 line
2.39.2
#3 lore raw

PATCH 2/2 configs: Add am62x_beagleplay_* defconfigs

In reply to Andrew Davis

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.

---
 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
configs/am62x_beagleplay_a53_defconfig new file +3 -0
new file mode 100644
index 00000000000..ad708e15397
@@ -0,0 +1,3 @@
+// The BeaglePlay defconfig for A53 core
+#include "configs/am62x_evm_a53_defconfig"
+#include "board/ti/am62x/beagleplay_a53.config"
configs/am62x_beagleplay_r5_defconfig new file +3 -0
new file mode 100644
index 00000000000..276b1f81a3e
@@ -0,0 +1,3 @@
+// The BeaglePlay defconfig for R5 core
+#include "configs/am62x_evm_r5_defconfig"
+#include "board/ti/am62x/beagleplay_r5.config"
Signature · 1 line
2.39.2
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] Makefile: Run defconfig files through the C preprocessor

In reply to Andrew Davis
Quoted 5 lines · Andrew Davis

This allows us to use some of the normal preprocessor directives inside defconfig files. Such as #define and #include.

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#4 lore raw

Re: [PATCH 2/2] configs: Add am62x_beagleplay_* defconfigs

In reply to Andrew Davis
Quoted 31 lines · Andrew Davis

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.

---
 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
configs/am62x_beagleplay_a53_defconfig new file +3 -0
new file mode 100644
index 00000000000..ad708e15397
@@ -0,0 +1,3 @@
+// The BeaglePlay defconfig for A53 core
+#include "configs/am62x_evm_a53_defconfig"
+#include "board/ti/am62x/beagleplay_a53.config"
configs/am62x_beagleplay_r5_defconfig new file +0 -0
new file mode 100644
index 00000000000..276b1f81a3e

configs/am62x_beagleplay_r5_defconfig line 3

Quoted 3 lines
configs/am62x_beagleplay_r5_defconfig new file +3 -0
@@ -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?

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D