Kconfig: Source Kconfig from Zephyr application directory.

Enable application specific configuration to be easily included
and manageable via Kconfig. Add sample.

Signed-off-by: Michał Kruszewski <mkru@protonmail.com>
This commit is contained in:
Michał Kruszewski 2017-06-17 22:22:51 +02:00 committed by Anas Nashif
commit 83edd615ca
8 changed files with 42 additions and 0 deletions

View file

@ -28,6 +28,12 @@ source "ext/Kconfig"
source "tests/Kconfig"
config PROJECT_BASE
string
option env="PROJECT_BASE"
source "$PROJECT_BASE/Kconfig"
#
# The following are for Kconfig files for default values only.
# These should be parsed at the end.

View file

@ -0,0 +1,5 @@
menu "APPLICATION CONFIGURATION"
source "$PROJECT_BASE/src/Kconfig"
endmenu

View file

@ -0,0 +1,4 @@
BOARD ?= qemu_x86
CONF_FILE = prj.conf
include ${ZEPHYR_BASE}/Makefile.test

View file

@ -0,0 +1 @@
# nothing here

View file

@ -0,0 +1,6 @@
config MERGE_PATCH
bool "Merge patch"
default y
help
Will this patch, supporting application
Kconfig configuration, be merged?

View file

@ -0,0 +1 @@
obj-y = main.o

View file

@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr.h>
#include <misc/printk.h>
void main(void)
{
#if defined(CONFIG_MERGE_PATCH)
printk("This patch will be merged!\n");
#else
printk("This patch will not be merged!\n");
#endif
}

View file

@ -0,0 +1,4 @@
[test]
tags = appdev
build_only = true
platform_whitelist = qemu_x86