abuild: drop the ability to specify a configuration
If you already have a configuration, there's no need to run it through abuild. Change-Id: I4dde9a7b96bb0c08ec5c91426a4dd3aa15e74edf Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/12273 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
This commit is contained in:
parent
b2a1a59ab5
commit
e6adabdf3a
|
@ -134,7 +134,6 @@ function create_config
|
||||||
{
|
{
|
||||||
VENDOR=$1
|
VENDOR=$1
|
||||||
MAINBOARD=$2
|
MAINBOARD=$2
|
||||||
CONFIG=$3
|
|
||||||
|
|
||||||
build_dir=$TARGET/${VENDOR}_${MAINBOARD}
|
build_dir=$TARGET/${VENDOR}_${MAINBOARD}
|
||||||
|
|
||||||
|
@ -158,31 +157,26 @@ function create_config
|
||||||
mkdir -p ${build_dir}
|
mkdir -p ${build_dir}
|
||||||
mkdir -p $TARGET/sharedutils
|
mkdir -p $TARGET/sharedutils
|
||||||
|
|
||||||
if [ "$CONFIG" != "" ]; then
|
if [ "$quiet" == "false" ]; then printf " Creating config file for $VENDOR/$MAINBOARD... \n"; fi
|
||||||
printf " Using existing configuration $CONFIG ... "
|
grep "if[\t ]*VENDOR" src/mainboard/$VENDOR/$MAINBOARD/../Kconfig | \
|
||||||
cp src/mainboard/$VENDOR/$MAINBOARD/$CONFIG ${build_dir}/config.build
|
sed "s,^.*\(VENDOR_.*\)[^A-Z0-9_]*,CONFIG_\1=y," > ${build_dir}/config.build
|
||||||
else
|
grep "if[\t ]*BOARD" src/mainboard/$VENDOR/$MAINBOARD/Kconfig | \
|
||||||
if [ "$quiet" == "false" ]; then printf " Creating config file for $VENDOR/$MAINBOARD... \n"; fi
|
sed "s,^.*\(BOARD_.*\)[^A-Z0-9_]*,CONFIG_\1=y," >> ${build_dir}/config.build
|
||||||
grep "if[\t ]*VENDOR" src/mainboard/$VENDOR/$MAINBOARD/../Kconfig | \
|
grep "select[\t ]*ARCH" src/mainboard/$VENDOR/$MAINBOARD/Kconfig | \
|
||||||
sed "s,^.*\(VENDOR_.*\)[^A-Z0-9_]*,CONFIG_\1=y," > ${build_dir}/config.build
|
sed "s,^.*\(ARCH_.*\)[^A-Z0-9_]*,CONFIG_\1=y," >> ${build_dir}/config.build
|
||||||
grep "if[\t ]*BOARD" src/mainboard/$VENDOR/$MAINBOARD/Kconfig | \
|
echo "CONFIG_MAINBOARD_DIR=\"$VENDOR/$MAINBOARD\"" >> ${build_dir}/config.build
|
||||||
sed "s,^.*\(BOARD_.*\)[^A-Z0-9_]*,CONFIG_\1=y," >> ${build_dir}/config.build
|
if [ "$PAYLOAD" = "none" ]; then
|
||||||
grep "select[\t ]*ARCH" src/mainboard/$VENDOR/$MAINBOARD/Kconfig | \
|
echo "CONFIG_PAYLOAD_NONE=y" >> ${build_dir}/config.build
|
||||||
sed "s,^.*\(ARCH_.*\)[^A-Z0-9_]*,CONFIG_\1=y," >> ${build_dir}/config.build
|
elif [ "$PAYLOAD" != "/dev/null" ]; then
|
||||||
echo "CONFIG_MAINBOARD_DIR=\"$VENDOR/$MAINBOARD\"" >> ${build_dir}/config.build
|
echo "# CONFIG_PAYLOAD_NONE is not set" >> ${build_dir}/config.build
|
||||||
if [ "$PAYLOAD" = "none" ]; then
|
echo "# CONFIG_PAYLOAD_SEABIOS is not set" >> ${build_dir}/config.build
|
||||||
echo "CONFIG_PAYLOAD_NONE=y" >> ${build_dir}/config.build
|
echo "CONFIG_PAYLOAD_ELF=y" >> ${build_dir}/config.build
|
||||||
elif [ "$PAYLOAD" != "/dev/null" ]; then
|
echo "CONFIG_PAYLOAD_FILE=\"$PAYLOAD\"" >> ${build_dir}/config.build
|
||||||
echo "# CONFIG_PAYLOAD_NONE is not set" >> ${build_dir}/config.build
|
|
||||||
echo "# CONFIG_PAYLOAD_SEABIOS is not set" >> ${build_dir}/config.build
|
|
||||||
echo "CONFIG_PAYLOAD_ELF=y" >> ${build_dir}/config.build
|
|
||||||
echo "CONFIG_PAYLOAD_FILE=\"$PAYLOAD\"" >> ${build_dir}/config.build
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$quiet" == "false" ]; then printf " $VENDOR/$MAINBOARD ($customizing)\n"; fi
|
|
||||||
printf "$configoptions" >> ${build_dir}/config.build
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$quiet" == "false" ]; then printf " $VENDOR/$MAINBOARD ($customizing)\n"; fi
|
||||||
|
printf "$configoptions" >> ${build_dir}/config.build
|
||||||
|
|
||||||
yes "" 2>/dev/null | $MAKE oldconfig $silent DOTCONFIG=${build_dir}/config.build obj=${build_dir} objutil=$TARGET/sharedutils &> ${build_dir}/config.log
|
yes "" 2>/dev/null | $MAKE oldconfig $silent DOTCONFIG=${build_dir}/config.build obj=${build_dir} objutil=$TARGET/sharedutils &> ${build_dir}/config.log
|
||||||
ret=$?
|
ret=$?
|
||||||
if [ $ret -eq 0 ]; then
|
if [ $ret -eq 0 ]; then
|
||||||
|
@ -200,9 +194,8 @@ function create_buildenv
|
||||||
{
|
{
|
||||||
VENDOR=$1
|
VENDOR=$1
|
||||||
MAINBOARD=$2
|
MAINBOARD=$2
|
||||||
CONFIG=$3
|
|
||||||
|
|
||||||
create_config $VENDOR $MAINBOARD $CONFIG
|
create_config $VENDOR $MAINBOARD
|
||||||
ret=$?
|
ret=$?
|
||||||
|
|
||||||
# Allow simple "make" in the target directory
|
# Allow simple "make" in the target directory
|
||||||
|
@ -270,7 +263,6 @@ function build_target
|
||||||
{
|
{
|
||||||
VENDOR=$1
|
VENDOR=$1
|
||||||
MAINBOARD=$2
|
MAINBOARD=$2
|
||||||
CONFIG=$3
|
|
||||||
|
|
||||||
if [ "`cat $TARGET/${VENDOR}_${MAINBOARD}/compile.status 2>/dev/null`" = "ok" -a \
|
if [ "`cat $TARGET/${VENDOR}_${MAINBOARD}/compile.status 2>/dev/null`" = "ok" -a \
|
||||||
"$buildall" = "false" ]; then
|
"$buildall" = "false" ]; then
|
||||||
|
@ -298,7 +290,7 @@ function build_target
|
||||||
|
|
||||||
|
|
||||||
stime=`perl -e 'print time();' 2>/dev/null || date +%s`
|
stime=`perl -e 'print time();' 2>/dev/null || date +%s`
|
||||||
create_buildenv $VENDOR $MAINBOARD $CONFIG
|
create_buildenv $VENDOR $MAINBOARD
|
||||||
|
|
||||||
required_arches=`egrep "^CONFIG_ARCH_(BOOTBLOCK|R.MSTAGE|VERSTAGE)" $TARGET/${VENDOR}_${MAINBOARD}/config.build | \
|
required_arches=`egrep "^CONFIG_ARCH_(BOOTBLOCK|R.MSTAGE|VERSTAGE)" $TARGET/${VENDOR}_${MAINBOARD}/config.build | \
|
||||||
sed "s,^CONFIG_ARCH_[^_]*_\([^=]*\)=.*$,\1," |sort -u |tr 'A-Z\n\r' 'a-z '`
|
sed "s,^CONFIG_ARCH_[^_]*_\([^=]*\)=.*$,\1," |sort -u |tr 'A-Z\n\r' 'a-z '`
|
||||||
|
@ -654,12 +646,11 @@ if [ "$target" != "" ]; then
|
||||||
# build a single board
|
# build a single board
|
||||||
VENDOR=`printf $target|cut -f1 -d/`
|
VENDOR=`printf $target|cut -f1 -d/`
|
||||||
MAINBOARD=`printf $target|cut -f2 -d/`
|
MAINBOARD=`printf $target|cut -f2 -d/`
|
||||||
CONFIG=`printf $target|cut -f3 -d/`
|
|
||||||
if [ ! -r $ROOT/src/mainboard/$target ]; then
|
if [ ! -r $ROOT/src/mainboard/$target ]; then
|
||||||
printf "No such target: $target\n"
|
printf "No such target: $target\n"
|
||||||
failed=1
|
failed=1
|
||||||
else
|
else
|
||||||
build_target $VENDOR $MAINBOARD $CONFIG
|
build_target $VENDOR $MAINBOARD
|
||||||
test_target $VENDOR $MAINBOARD
|
test_target $VENDOR $MAINBOARD
|
||||||
remove_target $VENDOR $MAINBOARD
|
remove_target $VENDOR $MAINBOARD
|
||||||
test "$mode" != "text" && \
|
test "$mode" != "text" && \
|
||||||
|
|
Loading…
Reference in New Issue