File tree 4 files changed +22
-2
lines changed
4 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ endmenu
20
20
# precedence over SoC defaults, so include them in that order.
21
21
#
22
22
# $ARCH and $BOARD_DIR will be glob patterns when building documentation.
23
- source "boards/shields/*/ Kconfig.defconfig"
23
+ source "$(KCONFIG_BINARY_DIR)/ Kconfig.shield .defconfig"
24
24
source "$(BOARD_DIR)/Kconfig.defconfig"
25
25
source "$(KCONFIG_BINARY_DIR)/Kconfig.soc.defconfig"
26
26
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ endchoice
25
25
26
26
# Parse shields references
27
27
# Don't do it as a menuconfig, as shield selection is a CMake feature.
28
- rsource "shields/* /Kconfig.shield"
28
+ source "$(KCONFIG_BINARY_DIR) /Kconfig.shield"
29
29
30
30
menu "Board Options"
31
31
config QEMU_ICOUNT
Original file line number Diff line number Diff line change @@ -21,6 +21,18 @@ foreach(root ${SOC_ROOT})
21
21
set (OPERATION APPEND )
22
22
endforeach ()
23
23
24
+ # Support multiple shields in BOARD_ROOT
25
+ set (OPERATION WRITE)
26
+ foreach (root ${BOARD_ROOT} )
27
+ file (${OPERATION} ${KCONFIG_BINARY_DIR} /Kconfig.shield.defconfig
28
+ "osource \" ${root} /boards/shields/*/Kconfig.defconfig\"\n "
29
+ )
30
+ file (${OPERATION} ${KCONFIG_BINARY_DIR} /Kconfig.shield
31
+ "osource \" ${root} /boards/shields/*/Kconfig.shield\"\n "
32
+ )
33
+ set (OPERATION APPEND )
34
+ endforeach ()
35
+
24
36
if (KCONFIG_ROOT)
25
37
zephyr_file(APPLICATION_ROOT KCONFIG_ROOT)
26
38
# KCONFIG_ROOT has either been specified as a CMake variable or is
Original file line number Diff line number Diff line change @@ -265,6 +265,8 @@ def write_kconfig_soc(self):
265
265
soc_defconfig_file = os .path .join (tempfile .gettempdir (), "Kconfig.soc.defconfig" )
266
266
soc_file = os .path .join (tempfile .gettempdir (), "Kconfig.soc" )
267
267
soc_arch_file = os .path .join (tempfile .gettempdir (), "Kconfig.soc.arch" )
268
+ shield_defconfig_file = os .path .join (tempfile .gettempdir (), "Kconfig.shield.defconfig" )
269
+ shield_file = os .path .join (tempfile .gettempdir (), "Kconfig.shield" )
268
270
try :
269
271
with open (soc_defconfig_file , 'w' , encoding = "utf-8" ) as fp :
270
272
fp .write (f'osource "{ ZEPHYR_BASE } /soc/$(ARCH)/*/Kconfig.defconfig"\n ' )
@@ -275,6 +277,12 @@ def write_kconfig_soc(self):
275
277
with open (soc_arch_file , 'w' , encoding = "utf-8" ) as fp :
276
278
fp .write (f'osource "{ ZEPHYR_BASE } /soc/$(ARCH)/Kconfig"\n \
277
279
osource "{ ZEPHYR_BASE } /soc/$(ARCH)/*/Kconfig"\n ' )
280
+
281
+ with open (shield_defconfig_file , 'w' , encoding = "utf-8" ) as fp :
282
+ fp .write (f'osource "{ ZEPHYR_BASE } /boards/shields/*/Kconfig.defconfig"\n ' )
283
+
284
+ with open (shield_file , 'w' , encoding = "utf-8" ) as fp :
285
+ fp .write (f'osource "{ ZEPHYR_BASE } /boards/shields/*/Kconfig.shield"\n ' )
278
286
except IOError as ex :
279
287
self .error (ex .output )
280
288
You can’t perform that action at this time.
0 commit comments