summaryrefslogtreecommitdiff
path: root/util/abuild
diff options
context:
space:
mode:
Diffstat (limited to 'util/abuild')
-rwxr-xr-xutil/abuild/abuild45
1 files changed, 21 insertions, 24 deletions
diff --git a/util/abuild/abuild b/util/abuild/abuild
index 5a17e5e328..8b292ddcb8 100755
--- a/util/abuild/abuild
+++ b/util/abuild/abuild
@@ -162,53 +162,52 @@ function create_config
if [ "$CONFIG" != "" ]; then
printf " Using existing configuration $CONFIG ... "
xml " <config>$CONFIG</config>"
- cp $CONFIG .config
+ cp $CONFIG ${build_dir}/config.build
else
printf " Creating config file... "
xml " <config>autogenerated</config>"
grep "if[\t ]*VENDOR" src/mainboard/$VENDOR/$MAINBOARD/../Kconfig | \
- sed "s,^.*\(VENDOR_.*\)[^A-Z0-9_]*,CONFIG_\1=y," > .config
+ sed "s,^.*\(VENDOR_.*\)[^A-Z0-9_]*,CONFIG_\1=y," > ${build_dir}/config.build
grep "if[\t ]*BOARD" src/mainboard/$VENDOR/$MAINBOARD/Kconfig | \
- sed "s,^.*\(BOARD_.*\)[^A-Z0-9_]*,CONFIG_\1=y," >> .config
+ sed "s,^.*\(BOARD_.*\)[^A-Z0-9_]*,CONFIG_\1=y," >> ${build_dir}/config.build
grep "select[\t ]*ARCH" src/mainboard/$VENDOR/$MAINBOARD/Kconfig | \
- sed "s,^.*\(ARCH_.*\)[^A-Z0-9_]*,CONFIG_\1=y," >> .config
- echo "CONFIG_MAINBOARD_DIR=\"$VENDOR/$MAINBOARD\"" >> .config
- echo "CONFIG_CBFS_PREFIX=\"$cbfs_prefix\"" >> .config
+ sed "s,^.*\(ARCH_.*\)[^A-Z0-9_]*,CONFIG_\1=y," >> ${build_dir}/config.build
+ echo "CONFIG_MAINBOARD_DIR=\"$VENDOR/$MAINBOARD\"" >> ${build_dir}/config.build
+ echo "CONFIG_CBFS_PREFIX=\"$cbfs_prefix\"" >> ${build_dir}/config.build
if [ "$PAYLOAD" != "/dev/null" ]; then
- echo "# CONFIG_PAYLOAD_NONE is not set" >> .config
- echo "CONFIG_PAYLOAD_ELF=y" >> .config
- echo "CONFIG_FALLBACK_PAYLOAD_FILE=\"$PAYLOAD\"" >> .config
+ echo "# CONFIG_PAYLOAD_NONE is not set" >> ${build_dir}/config.build
+ echo "CONFIG_PAYLOAD_ELF=y" >> ${build_dir}/config.build
+ echo "CONFIG_FALLBACK_PAYLOAD_FILE=\"$PAYLOAD\"" >> ${build_dir}/config.build
fi
if [ "$loglevel" != "default" ]; then
printf "(loglevel override) "
- echo "CONFIG_MAXIMUM_CONSOLE_LOGLEVEL_$loglevel=y" >> .config
- echo "CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=$loglevel" >> .config
- echo "CONFIG_DEFAULT_CONSOLE_LOGLEVEL_$loglevel=y" >> .config
- echo "CONFIG_DEFAULT_CONSOLE_LOGLEVEL=$loglevel" >> .config
+ echo "CONFIG_MAXIMUM_CONSOLE_LOGLEVEL_$loglevel=y" >> ${build_dir}/config.build
+ echo "CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=$loglevel" >> ${build_dir}/config.build
+ echo "CONFIG_DEFAULT_CONSOLE_LOGLEVEL_$loglevel=y" >> ${build_dir}/config.build
+ echo "CONFIG_DEFAULT_CONSOLE_LOGLEVEL=$loglevel" >> ${build_dir}/config.build
fi
if [ "$update" != "false" ]; then
printf "(update) "
- echo "CONFIG_UPDATE_IMAGE=y" >> .config
+ echo "CONFIG_UPDATE_IMAGE=y" >> ${build_dir}/config.build
fi
if [ "$ccache" = "true" ]; then
printf "(ccache enabled) "
- echo "CONFIG_CCACHE=y" >> .config
+ echo "CONFIG_CCACHE=y" >> ${build_dir}/config.build
fi
if [ "$scanbuild" = "true" ]; then
printf "(scan-build enabled) "
- echo "CONFIG_SCANBUILD_ENABLE=y" >> .config
- echo "CONFIG_SCANBUILD_REPORT_LOCATION=\"$TARGET/scan-build-results-tmp\"" >> .config
+ echo "CONFIG_SCANBUILD_ENABLE=y" >> ${build_dir}/config.build
+ echo "CONFIG_SCANBUILD_REPORT_LOCATION=\"$TARGET/scan-build-results-tmp\"" >> ${build_dir}/config.build
fi
fi
#yes "" | $MAKE oldconfig -j $cpus obj=${build_dir} objutil=$TARGET/sharedutils &> ${build_dir}/config.log
- yes "" | $MAKE oldconfig obj=${build_dir} objutil=$TARGET/sharedutils &> ${build_dir}/config.log
+ yes "" | $MAKE oldconfig DOTCONFIG=${build_dir}/config.build obj=${build_dir} objutil=$TARGET/sharedutils &> ${build_dir}/config.log
ret=$?
- mv .config.old $TARGET/${VENDOR}_${MAINBOARD}/config.in
if [ $ret -eq 0 ]; then
printf "ok; "
xml " <builddir>ok</builddir>"
@@ -245,9 +244,8 @@ function create_buildenv
echo "TOP=$ROOT" >> $MAKEFILE
echo "OUT=$TARGET/${VENDOR}_${MAINBOARD}" >> $MAKEFILE
echo "all:" >> $MAKEFILE
- echo " cp config.build \$(TOP)/.config" >> $MAKEFILE
- echo " cd \$(TOP); \$(MAKE) oldconfig obj=\$(OUT)" >> $MAKEFILE
- echo " cd \$(TOP); \$(MAKE) obj=\$(OUT)" >> $MAKEFILE
+ echo " cd \$(TOP); \$(MAKE) oldconfig DOTCONFIG=\$(OUT)/config.build obj=\$(OUT)" >> $MAKEFILE
+ echo " cd \$(TOP); \$(MAKE) DOTCONFIG=\$(OUT)/config.build obj=\$(OUT)" >> $MAKEFILE
return $ret
}
@@ -265,10 +263,9 @@ function compile_target
CURR=$( pwd )
#stime=`perl -e 'print time();' 2>/dev/null || date +%s`
build_dir=$TARGET/${VENDOR}_${MAINBOARD}
- eval $MAKE $silent -j $cpus obj=${build_dir} objutil=$TARGET/sharedutils \
+ eval $MAKE $silent -j $cpus DOTCONFIG=${build_dir}/config.build obj=${build_dir} objutil=$TARGET/sharedutils \
&> ${build_dir}/make.log
ret=$?
- mv .config ${build_dir}/config.build
mv .xcompile ${build_dir}/xcompile.build
cd $TARGET/${VENDOR}_${MAINBOARD}