Skip to content

Commit 1df1642

Browse files
committed
zephyr: Allow to have per-board Zephyr config fragments.
To enable options which may be incompatible with other boards, etc.
1 parent 40e72e4 commit 1df1642

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

zephyr/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ CFLAGS = $(KBUILD_CFLAGS) $(NOSTDINC_FLAGS) $(ZEPHYRINCLUDE) \
6262

6363
include ../py/mkrules.mk
6464

65-
$(Z_EXPORTS):
65+
$(Z_EXPORTS): $(CONF_FILE)
6666
$(MAKE) -f Makefile.zephyr BOARD=$(BOARD) CONF_FILE=$(CONF_FILE) initconfig outputexports
6767

6868
GENERIC_TARGETS = all zephyr qemu qemugdb flash debug
@@ -95,3 +95,8 @@ clean: z_clean
9595

9696
z_clean:
9797
$(MAKE) -f Makefile.zephyr BOARD=$(BOARD) clean
98+
99+
.PHONY: prj.conf
100+
prj.conf: prj_base.conf
101+
cat $< >$@
102+
if [ -f prj_$(BOARD).conf ]; then cat prj_$(BOARD).conf >>$@; fi

zephyr/prj.conf renamed to zephyr/prj_base.conf

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,3 @@ CONFIG_NETWORKING=y
1010
CONFIG_NET_IPV4=y
1111
CONFIG_TEST_RANDOM_GENERATOR=y
1212
CONFIG_NET_NBUF_RX_COUNT=4
13-
14-
# Networking drivers
15-
# SLIP driver for QEMU
16-
CONFIG_NET_SLIP_TAP=y
17-
18-
# BOARD-specific config (qemu_x86)
19-
CONFIG_RAM_SIZE=256

zephyr/prj_qemu_x86.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Networking drivers
2+
# SLIP driver for QEMU
3+
CONFIG_NET_SLIP_TAP=y
4+
5+
# Default RAM easily overflows with uPy and networking
6+
CONFIG_RAM_SIZE=256

0 commit comments

Comments
 (0)