diff options
author | Patrick Georgi <patrick@georgi-clan.de> | 2010-12-08 19:58:30 +0000 |
---|---|---|
committer | Patrick Georgi <patrick.georgi@coresystems.de> | 2010-12-08 19:58:30 +0000 |
commit | 89ec3760a9c2e5189681240aae866b20a9d6b592 (patch) | |
tree | cae632453c92b42fdaa6eedd1e6cf224300c05fb /util | |
parent | d35192544675575276482e5ce65d1b6a6fd9e4a0 (diff) | |
download | coreboot-89ec3760a9c2e5189681240aae866b20a9d6b592.tar.xz |
Allow user to define location for Kconfig config via
DOTCONFIG make variable (defaults to .config).
Let abuild use that.
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6152 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util')
-rwxr-xr-x | util/abuild/abuild | 45 |
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} |