[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH v2 13/23] Kconfig: Shifting to the new Kconfig system



In this patch, we use the version of the kconfig. The existing
kconfig still exists. In later commits we will replace the old
kconfig with the new config.

NOTE: The later kconfig system deprecates silentoldconfig. In a
later patch this will be replace syncconfig.

Signed-off-by: Sharan Santhanam <sharan.santhanam@xxxxxxxxx>
---
 Config.uk                    | 29 +++++++++++++++--------------
 Makefile                     | 16 +++++++++-------
 support/build/Makefile.rules |  2 +-
 3 files changed, 25 insertions(+), 22 deletions(-)

diff --git a/Config.uk b/Config.uk
index d2a4e32d..21ae657f 100644
--- a/Config.uk
+++ b/Config.uk
@@ -2,34 +2,35 @@
 # For a description of the syntax of this configuration file,
 # see https://www.kernel.org/doc/Documentation/kbuild/Config.in-language.txt.
 #
-mainmenu "Unikraft/$UK_FULLVERSION Configuration"
+mainmenu "Unikraft/$(UK_FULLVERSION) Configuration"
 config KCONFIG_APP_IN
        string
-       option env="KCONFIG_APP_IN"
+       default "$(KCONFIG_APP_IN)"
 config KCONFIG_ELIB_IN
        string
-       option env="KCONFIG_ELIB_IN"
+       default "$(KCONFIG_ELIB_IN)"
 config KCONFIG_EPLAT_IN
        string
-       option env="KCONFIG_EPLAT_IN"
+       default "$(KCONFIG_EPLAT_IN)"
+
 config UK_FULLVERSION
        string
-       option env="UK_FULLVERSION"
+       default "$(UK_FULLVERSION)"
 config UK_CODENAME
        string
-       option env="UK_CODENAME"
+       default "$(UK_CODENAME)"
 config UK_ARCH
        string
-       option env="UK_ARCH"
+       default "$(UK_ARCH)"
 config UK_BASE
        string
-       option env="UK_BASE"
+       default "$(UK_BASE)"
 config UK_APP
        string
-       option env="UK_APP"
+       default "$(UK_APP)"
 config UK_DEFNAME
        string
-       option env="UK_NAME"
+       default "$(UK_NAME)"
 
 menu "Architecture Selection"
        source "arch/Config.uk"
@@ -37,12 +38,12 @@ endmenu
 
 menu "Platform Configuration"
        source "plat/Config.uk"
-       source "$KCONFIG_EPLAT_IN"
+       source "$(KCONFIG_EPLAT_IN)"
 endmenu
 
 menu "Library Configuration"
        source "lib/Config.uk"
-       source "$KCONFIG_ELIB_IN"
+       source "$(KCONFIG_ELIB_IN)"
 endmenu
 
 menu "Build Options"
@@ -183,12 +184,12 @@ endmenu
 
 if UK_APP != UK_BASE
        menu "Application Options"
-               source "$KCONFIG_APP_IN"
+               source "$(KCONFIG_APP_IN)"
        endmenu
 endif
 
 config UK_NAME
        string "Image name"
-       default $UK_DEFNAME
+       default UK_DEFNAME
        help
          Name to be used for final image
diff --git a/Makefile b/Makefile
index afb82068..c7a6a99f 100644
--- a/Makefile
+++ b/Makefile
@@ -127,11 +127,11 @@ ELIB_DIR := $(realpath $(patsubst %/,%,$(patsubst 
%.,%,$(ELIB_DIR))))
 # KConfig settings
 CONFIG_DIR            := $(CONFIG_UK_APP)
 CONFIG_CONFIG_IN      := $(CONFIG_UK_BASE)/Config.uk
-CONFIG                := $(CONFIG_UK_BASE)/support/kconfig
+CONFIG                := $(CONFIG_UK_BASE)/support/kconfig.new
 UK_CONFIG             := $(CONFIG_DIR)/.config
 UK_CONFIG_OUT         := $(BUILD_DIR)/config
 UK_GENERATED_INCLUDES := $(BUILD_DIR)/include
-KCONFIG_DIR           := $(BUILD_DIR)/kconfig
+KCONFIG_DIR           := $(BUILD_DIR)/kconfig.new
 UK_FIXDEP             := $(KCONFIG_DIR)/fixdep
 KCONFIG_AUTOCONFIG    := $(KCONFIG_DIR)/auto.conf
 KCONFIG_TRISTATE      := $(KCONFIG_DIR)/tristate.config
@@ -473,6 +473,8 @@ AR          := ar
 CAT            := cat
 SED            := sed
 AWK            := awk
+YACC           := bison
+LEX            := flex
 PATCH          := patch
 GZIP           := gzip
 TAR            := tar
@@ -496,7 +498,7 @@ CXXFLAGS    += -DCC_VERSION=$(CC_VERSION)
 GOCFLAGS       += -DCC_VERSION=$(CC_VERSION)
 
 # ensure $(BUILD_DIR)/kconfig, $(BUILD_DIR)/include and 
$(BUILD_DIR)/include/uk exists
-$(call mk_sub_build_dir,kconfig)
+$(call mk_sub_build_dir,kconfig.new)
 $(call mk_sub_build_dir,include)
 $(call mk_sub_build_dir,include/uk)
 
@@ -661,13 +663,13 @@ $(KCONFIG_EPLAT_IN).new:
 # enforce execution
 .PHONY: $(KCONFIG_APP_IN).new $(KCONFIG_ELIB_IN).new $(KCONFIG_EPLAT_IN).new
 
-KCONFIG_TOOLS = conf mconf gconf nconf fixdep
+KCONFIG_TOOLS = conf mconf gconf nconf qconf fixdep
 KCONFIG_TOOLS := $(addprefix $(KCONFIG_DIR)/,$(KCONFIG_TOOLS))
 
 $(KCONFIG_TOOLS):
        mkdir -p $(@D)/lxdialog
        $(MAKE) CC="$(HOSTCC_NOCCACHE)" HOSTCC="$(HOSTCC_NOCCACHE)" \
-           obj=$(@D) -C $(CONFIG) -f Makefile.br $(@F)
+           obj=$(@D) -C $(CONFIG) -f Makefile.br $(@)
 
 DEFCONFIG = $(call qstrip,$(UK_DEFCONFIG))
 
@@ -675,7 +677,7 @@ DEFCONFIG = $(call qstrip,$(UK_DEFCONFIG))
 # recognize that if it's still at its default $(CONFIG_DIR)/defconfig
 COMMON_CONFIG_ENV = \
        CONFIG_="CONFIG_" \
-       BR2_CONFIG="$(UK_CONFIG)" \
+       KCONFIG_CONFIG="$(UK_CONFIG)" \
        KCONFIG_AUTOCONFIG="$(KCONFIG_AUTOCONFIG)" \
        KCONFIG_AUTOHEADER="$(KCONFIG_AUTOHEADER)" \
        KCONFIG_TRISTATE="$(KCONFIG_TRISTATE)" \
@@ -763,7 +765,7 @@ savedefconfig: $(KCONFIG_DIR)/conf $(KCONFIG_APP_IN) 
$(KCONFIG_ELIB_IN) $(KCONFI
 
 # Regenerate $(KCONFIG_AUTOHEADER) whenever $(UK_CONFIG) changed
 $(KCONFIG_AUTOHEADER): $(UK_CONFIG) $(KCONFIG_DIR)/conf $(KCONFIG_APP_IN) 
$(KCONFIG_ELIB_IN) $(KCONFIG_EPLAT_IN)
-       @$(COMMON_CONFIG_ENV) $(KCONFIG_DIR)/conf --silentoldconfig 
$(CONFIG_CONFIG_IN)
+       @$(COMMON_CONFIG_ENV) $(KCONFIG_DIR)/conf --syncconfig 
$(CONFIG_CONFIG_IN)
 
 
 # Misc stuff
diff --git a/support/build/Makefile.rules b/support/build/Makefile.rules
index 74b6d7d1..906a0a6e 100644
--- a/support/build/Makefile.rules
+++ b/support/build/Makefile.rules
@@ -234,7 +234,7 @@ depflags = -Wp$(comma)-MD$(comma)$(call tmp_depfile,$(3))
 define build_cmd_fixdep =
        $(call build_cmd,$1,$2,$3,$4)
        $Q $(UK_FIXDEP) $(call tmp_depfile,$3) $3 '$(call strip,$4)' \
-               $(BUILD_DIR)    > $(call out2dep,$3) && \
+               > $(call out2dep,$3) && \
                $(RM) $(call tmp_depfile,$3)
 endef
 
-- 
2.20.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.