|
45 | 45 | echo ' ---' `date`: Starting build
|
46 | 46 | echo ' ---' Kconfig fragment at: $config_template >> $resdir/log
|
47 | 47 | touch $resdir/ConfigFragment.input
|
| 48 | + |
| 49 | +# Combine additional Kconfig options into an existing set such that newer |
| 50 | +# options win. The first argument is the Kconfig source ID, the second |
| 51 | +# the source file within $T, the third the destination file within $T, |
| 52 | +# and the fourth and final the list of additional Kconfig options. |
| 53 | +config_override_param () { |
| 54 | + if test -n "$4" |
| 55 | + then |
| 56 | + echo $4 | sed -e 's/^ *//' -e 's/ *$//' | tr -s " " "\012" > $T/Kconfig_args |
| 57 | + echo " --- $1" >> $resdir/ConfigFragment.input |
| 58 | + cat $T/Kconfig_args >> $resdir/ConfigFragment.input |
| 59 | + config_override.sh $T/$2 $T/Kconfig_args > $T/$3 |
| 60 | + # Note that "#CHECK#" is not permitted on commandline. |
| 61 | + else |
| 62 | + cp $T/$2 $T/$3 |
| 63 | + fi |
| 64 | +} |
| 65 | + |
48 | 66 | if test -r "$config_dir/CFcommon"
|
49 | 67 | then
|
50 | 68 | echo " --- $config_dir/CFcommon" >> $resdir/ConfigFragment.input
|
|
55 | 73 | fi
|
56 | 74 | echo " --- $config_template" >> $resdir/ConfigFragment.input
|
57 | 75 | cat $config_template >> $resdir/ConfigFragment.input
|
58 |
| -if test -n "$TORTURE_KCONFIG_ARG" |
59 |
| -then |
60 |
| - echo $TORTURE_KCONFIG_ARG | tr -s " " "\012" > $T/cmdline |
61 |
| - echo " --- --kconfig argument" >> $resdir/ConfigFragment.input |
62 |
| - cat $T/cmdline >> $resdir/ConfigFragment.input |
63 |
| - config_override.sh $T/Kc1 $T/cmdline > $T/Kc2 |
64 |
| - # Note that "#CHECK#" is not permitted on commandline. |
65 |
| -else |
66 |
| - cp $T/Kc1 $T/Kc2 |
67 |
| -fi |
68 |
| -cat $T/Kc2 > $resdir/ConfigFragment |
| 76 | +config_override_param "--kconfig argument" Kc1 Kc2 "$TORTURE_KCONFIG_ARG" |
| 77 | +cp $T/Kc2 $resdir/ConfigFragment |
69 | 78 |
|
70 | 79 | base_resdir=`echo $resdir | sed -e 's/\.[0-9]\+$//'`
|
71 | 80 | if test "$base_resdir" != "$resdir" -a -f $base_resdir/bzImage -a -f $base_resdir/vmlinux
|
|
0 commit comments