zephyr: Allow to have per-board Zephyr config fragments.

To enable options which may be incompatible with other boards, etc.
This commit is contained in:
Paul Sokolovsky 2017-01-27 23:42:11 +03:00
parent 40e72e4a5c
commit 1df1642b70
3 changed files with 12 additions and 8 deletions

View File

@ -62,7 +62,7 @@ CFLAGS = $(KBUILD_CFLAGS) $(NOSTDINC_FLAGS) $(ZEPHYRINCLUDE) \
include ../py/mkrules.mk
$(Z_EXPORTS):
$(Z_EXPORTS): $(CONF_FILE)
$(MAKE) -f Makefile.zephyr BOARD=$(BOARD) CONF_FILE=$(CONF_FILE) initconfig outputexports
GENERIC_TARGETS = all zephyr qemu qemugdb flash debug
@ -95,3 +95,8 @@ clean: z_clean
z_clean:
$(MAKE) -f Makefile.zephyr BOARD=$(BOARD) clean
.PHONY: prj.conf
prj.conf: prj_base.conf
cat $< >$@
if [ -f prj_$(BOARD).conf ]; then cat prj_$(BOARD).conf >>$@; fi

View File

@ -10,10 +10,3 @@ CONFIG_NETWORKING=y
CONFIG_NET_IPV4=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_NET_NBUF_RX_COUNT=4
# Networking drivers
# SLIP driver for QEMU
CONFIG_NET_SLIP_TAP=y
# BOARD-specific config (qemu_x86)
CONFIG_RAM_SIZE=256

6
zephyr/prj_qemu_x86.conf Normal file
View File

@ -0,0 +1,6 @@
# Networking drivers
# SLIP driver for QEMU
CONFIG_NET_SLIP_TAP=y
# Default RAM easily overflows with uPy and networking
CONFIG_RAM_SIZE=256