Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359234
b: refs/heads/master
c: 409f117
h: refs/heads/master
v: v3
  • Loading branch information
Zhangfei Gao authored and Michal Marek committed Dec 9, 2012
1 parent 57b63b9 commit 6845493
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 169dfd880ad3f301f60587b2e6145afd3edbbd59
refs/heads/master: 409f117e2d6b38d714ab26def840801e33dfe115
20 changes: 16 additions & 4 deletions trunk/scripts/kconfig/merge_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ usage() {
echo " -m only merge the fragments, do not execute the make command"
echo " -n use allnoconfig instead of alldefconfig"
echo " -r list redundant entries when merging fragments"
echo " -O dir to put generated output files"
}

MAKE=true
ALLTARGET=alldefconfig
WARNREDUN=false
OUTPUT=.

while true; do
case $1 in
Expand All @@ -59,6 +61,16 @@ while true; do
shift
continue
;;
"-O")
if [ -d $2 ];then
OUTPUT=$(echo $2 | sed 's/\/*$//')
else
echo "output directory $2 does not exist" 1>&2
exit 1
fi
shift 2
continue
;;
*)
break
;;
Expand Down Expand Up @@ -100,9 +112,9 @@ for MERGE_FILE in $MERGE_LIST ; do
done

if [ "$MAKE" = "false" ]; then
cp $TMP_FILE .config
cp $TMP_FILE $OUTPUT/.config
echo "#"
echo "# merged configuration written to .config (needs make)"
echo "# merged configuration written to $OUTPUT/.config (needs make)"
echo "#"
clean_up
exit
Expand All @@ -111,14 +123,14 @@ fi
# Use the merged file as the starting point for:
# alldefconfig: Fills in any missing symbols with Kconfig default
# allnoconfig: Fills in any missing symbols with # CONFIG_* is not set
make KCONFIG_ALLCONFIG=$TMP_FILE $ALLTARGET
make KCONFIG_ALLCONFIG=$TMP_FILE O=$OUTPUT $ALLTARGET


# Check all specified config values took (might have missed-dependency issues)
for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do

REQUESTED_VAL=$(grep -w -e "$CFG" $TMP_FILE)
ACTUAL_VAL=$(grep -w -e "$CFG" .config)
ACTUAL_VAL=$(grep -w -e "$CFG" $OUTPUT/.config)
if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then
echo "Value requested for $CFG not in final .config"
echo "Requested value: $REQUESTED_VAL"
Expand Down

0 comments on commit 6845493

Please sign in to comment.