|
@@ -35,18 +35,20 @@ $(call inner-generic-package,$(1),$(2),$(3),$(4))
|
|
$(2)_KCONFIG_EDITORS ?= menuconfig
|
|
$(2)_KCONFIG_EDITORS ?= menuconfig
|
|
$(2)_KCONFIG_OPTS ?=
|
|
$(2)_KCONFIG_OPTS ?=
|
|
$(2)_KCONFIG_FIXUP_CMDS ?=
|
|
$(2)_KCONFIG_FIXUP_CMDS ?=
|
|
|
|
+$(2)_KCONFIG_FRAGMENT_FILES ?=
|
|
|
|
|
|
# The config file could be in-tree, so before depending on it the package should
|
|
# The config file could be in-tree, so before depending on it the package should
|
|
# be extracted (and patched) first
|
|
# be extracted (and patched) first
|
|
$$($(2)_KCONFIG_FILE): | $(1)-patch
|
|
$$($(2)_KCONFIG_FILE): | $(1)-patch
|
|
|
|
|
|
-# The .config file is obtained by copying it from the specified source
|
|
|
|
-# configuration file, after the package has been patched.
|
|
|
|
|
|
+# The specified source configuration file and any additional configuration file
|
|
|
|
+# fragments are merged together to .config, after the package has been patched.
|
|
# Since the file could be a defconfig file it needs to be expanded to a
|
|
# Since the file could be a defconfig file it needs to be expanded to a
|
|
# full .config first. We use 'make oldconfig' because this can be safely
|
|
# full .config first. We use 'make oldconfig' because this can be safely
|
|
# done even when the package does not support defconfigs.
|
|
# done even when the package does not support defconfigs.
|
|
-$$($(2)_DIR)/.config: $$($(2)_KCONFIG_FILE)
|
|
|
|
- $$(INSTALL) -m 0644 $$($(2)_KCONFIG_FILE) $$($(2)_DIR)/.config
|
|
|
|
|
|
+$$($(2)_DIR)/.config: $$($(2)_KCONFIG_FILE) $$($(2)_KCONFIG_FRAGMENT_FILES)
|
|
|
|
+ support/kconfig/merge_config.sh -m -O $$(@D) \
|
|
|
|
+ $$($(2)_KCONFIG_FILE) $$($(2)_KCONFIG_FRAGMENT_FILES)
|
|
@yes "" | $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
|
|
@yes "" | $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
|
|
$$($(2)_KCONFIG_OPTS) oldconfig
|
|
$$($(2)_KCONFIG_OPTS) oldconfig
|
|
|
|
|
|
@@ -87,6 +89,8 @@ $(1)-savedefconfig: $$($(2)_DIR)/.stamp_kconfig_fixup_done
|
|
# Even though we could use 'cp --preserve-timestamps' here, the separate
|
|
# Even though we could use 'cp --preserve-timestamps' here, the separate
|
|
# cp and 'touch --reference' is used for symmetry with $(1)-update-defconfig.
|
|
# cp and 'touch --reference' is used for symmetry with $(1)-update-defconfig.
|
|
$(1)-update-config: $$($(2)_DIR)/.stamp_kconfig_fixup_done
|
|
$(1)-update-config: $$($(2)_DIR)/.stamp_kconfig_fixup_done
|
|
|
|
+ @$$(if $$($(2)_KCONFIG_FRAGMENT_FILES), \
|
|
|
|
+ echo "Unable to perform $(1)-update-config when fragment files are set"; exit 1)
|
|
cp -f $$($(2)_DIR)/.config $$($(2)_KCONFIG_FILE)
|
|
cp -f $$($(2)_DIR)/.config $$($(2)_KCONFIG_FILE)
|
|
touch --reference $$($(2)_DIR)/.config $$($(2)_KCONFIG_FILE)
|
|
touch --reference $$($(2)_DIR)/.config $$($(2)_KCONFIG_FILE)
|
|
|
|
|
|
@@ -95,6 +99,8 @@ $(1)-update-config: $$($(2)_DIR)/.stamp_kconfig_fixup_done
|
|
# $(1)-update-config, the reference for 'touch' is _not_ the file from which
|
|
# $(1)-update-config, the reference for 'touch' is _not_ the file from which
|
|
# we copy.
|
|
# we copy.
|
|
$(1)-update-defconfig: $(1)-savedefconfig
|
|
$(1)-update-defconfig: $(1)-savedefconfig
|
|
|
|
+ @$$(if $$($(2)_KCONFIG_FRAGMENT_FILES), \
|
|
|
|
+ echo "Unable to perform $(1)-update-defconfig when fragment files are set"; exit 1)
|
|
cp -f $$($(2)_DIR)/defconfig $$($(2)_KCONFIG_FILE)
|
|
cp -f $$($(2)_DIR)/defconfig $$($(2)_KCONFIG_FILE)
|
|
touch --reference $$($(2)_DIR)/.config $$($(2)_KCONFIG_FILE)
|
|
touch --reference $$($(2)_DIR)/.config $$($(2)_KCONFIG_FILE)
|
|
|
|
|