mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
kconfig/merge_config.sh: Support KCONFIG_CONFIG
All make targets support $KCONFIG_CONFIG because they run scripts/kconf. Make sure merge_config.sh accesses the correct file in all cases. Previously this script broke in two different code paths, one for targets like kvmconfig (which use merge_config.sh -m then call a target that respects KCONFIG_CONFIG) and one for direct use of the script without -m, which called make rules that edit KCONFIG_CONFIG but verified a different file. Signed-off-by: Gabriel de Perthuis <g2p.code@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.com>
This commit is contained in:
parent
d1b0dc90ab
commit
ed94fea5ba
1 changed files with 12 additions and 4 deletions
|
@ -32,7 +32,7 @@ usage() {
|
||||||
echo " -m only merge the fragments, do not execute the make command"
|
echo " -m only merge the fragments, do not execute the make command"
|
||||||
echo " -n use allnoconfig instead of alldefconfig"
|
echo " -n use allnoconfig instead of alldefconfig"
|
||||||
echo " -r list redundant entries when merging fragments"
|
echo " -r list redundant entries when merging fragments"
|
||||||
echo " -O dir to put generated output files"
|
echo " -O dir to put generated output files. Consider setting \$KCONFIG_CONFIG instead."
|
||||||
}
|
}
|
||||||
|
|
||||||
RUNMAKE=true
|
RUNMAKE=true
|
||||||
|
@ -82,6 +82,14 @@ if [ "$#" -lt 2 ] ; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$KCONFIG_CONFIG" ]; then
|
||||||
|
if [ "$OUTPUT" != . ]; then
|
||||||
|
KCONFIG_CONFIG=$(readlink -m -- "$OUTPUT/.config")
|
||||||
|
else
|
||||||
|
KCONFIG_CONFIG=.config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
INITFILE=$1
|
INITFILE=$1
|
||||||
shift;
|
shift;
|
||||||
|
|
||||||
|
@ -124,9 +132,9 @@ for MERGE_FILE in $MERGE_LIST ; do
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$RUNMAKE" = "false" ]; then
|
if [ "$RUNMAKE" = "false" ]; then
|
||||||
cp $TMP_FILE $OUTPUT/.config
|
cp -T -- "$TMP_FILE" "$KCONFIG_CONFIG"
|
||||||
echo "#"
|
echo "#"
|
||||||
echo "# merged configuration written to $OUTPUT/.config (needs make)"
|
echo "# merged configuration written to $KCONFIG_CONFIG (needs make)"
|
||||||
echo "#"
|
echo "#"
|
||||||
clean_up
|
clean_up
|
||||||
exit
|
exit
|
||||||
|
@ -150,7 +158,7 @@ make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
|
||||||
for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do
|
for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do
|
||||||
|
|
||||||
REQUESTED_VAL=$(grep -w -e "$CFG" $TMP_FILE)
|
REQUESTED_VAL=$(grep -w -e "$CFG" $TMP_FILE)
|
||||||
ACTUAL_VAL=$(grep -w -e "$CFG" $OUTPUT/.config)
|
ACTUAL_VAL=$(grep -w -e "$CFG" "$KCONFIG_CONFIG")
|
||||||
if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then
|
if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then
|
||||||
echo "Value requested for $CFG not in final .config"
|
echo "Value requested for $CFG not in final .config"
|
||||||
echo "Requested value: $REQUESTED_VAL"
|
echo "Requested value: $REQUESTED_VAL"
|
||||||
|
|
Loading…
Reference in a new issue