Commit 6ba8e2f4 authored by Adam Wujek's avatar Adam Wujek 💬

userspace/dot-config: add support for menuconfig on target

compile and copy needed mconf used by make menuconfig
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 638d3d32
......@@ -310,9 +310,7 @@ time, to be run in @t{/wr/etc}; the file is called @t{dot-config}, and
not @t{.config}. This is meant to be useful for developers, when
testing different configurations in the lab, rather than in
production. We also support ``@t{make config}'', ``@t{make
defconfig}'' and @t{make oldconfig}''. We are not yet able to
run ``@t{make menuconfig}'', but that may be added when we upgrade
@i{buildroot} after release 4.2.
defconfig}'', @t{make oldconfig}'' and ``@t{make menuconfig}''.
@c ==========================================================================
@node Dynamic WRS Configuration
......
Kconfig
dot-config
conf
mconf
wrs_release_defconfig
......@@ -16,7 +16,7 @@ CFLAGS = -D KBUILD_NO_NLS
# most of this is just copying stuff in
RFILES = Kconfig dot-config wrs_release_defconfig
XFILES = conf
XFILES = conf mconf
FILES = $(RFILES) $(XFILES)
all: $(FILES)
......@@ -36,9 +36,27 @@ dot-config: $(WRS_BASE_DIR)/../.config
Kconfig: $(WRS_BASE_DIR)/../Kconfig
cp $^ $@
CONF_LOC=$(WRS_BASE_DIR)/../scripts/kconfig
conf:
$(CC) $(CFLAGS) -o $@ $(WRS_BASE_DIR)/../scripts/kconfig/conf.c \
$(WRS_BASE_DIR)/../scripts/kconfig/zconf.tab.c
$(CC) $(CFLAGS) -o $@ $(CONF_LOC)/conf.c \
$(CONF_LOC)/zconf.tab.c
CURSES_BUILD := $(wildcard $(WRS_OUTPUT_DIR)/build/buildroot-2*)
CURSES_BUILD := $(wildcard $(CURSES_BUILD)/output/build/ncurses-*)
lxdialog := $(CONF_LOC)/lxdialog/checklist.c
lxdialog += $(CONF_LOC)/lxdialog/util.c
lxdialog += $(CONF_LOC)/lxdialog/inputbox.c
lxdialog += $(CONF_LOC)/lxdialog/textbox.c
lxdialog += $(CONF_LOC)/lxdialog/yesno.c
lxdialog += $(CONF_LOC)/lxdialog/menubox.c
mconf:
$(CC) $(CFLAGS) -o $@ $(CONF_LOC)/mconf.c $(CONF_LOC)/zconf.tab.c \
$(lxdialog) \
-DCURSES_LOC="<curses.h>" -I$(CURSES_BUILD)/include \
-L$(CURSES_BUILD)/lib -lncurses
wrs_release_defconfig: $(WRS_BASE_DIR)/../configs/wrs_release_defconfig
cp $^ $@
......
......@@ -7,7 +7,7 @@ config:
defconfig:
cp dot-config .config
./conf -D wrs_release_defconfig Kconfig
./conf -D wrs_release_defconfig Kconfig
mv .config.old dot-config.old
mv .config dot-config
......@@ -18,5 +18,7 @@ oldconfig:
mv .config dot-config
menuconfig:
@echo "Sorry, we don't support menuconfig on the target, yet"
@exit 1
cp dot-config .config
./mconf Kconfig
mv .config.old dot-config.old
mv .config dot-config
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment