summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@openbios.org>2006-09-15 23:14:37 +0000
committerStefan Reinauer <stepan@openbios.org>2006-09-15 23:14:37 +0000
commit50f84bdea8648d8890e2f3be09f81514094d64f8 (patch)
treee511bd870ec51ff6531059fec60d983a2e3d81f7 /util
parent7fe2b7cd5cadb11a8bd3500c15a09c51f326b7fa (diff)
run preprocessor on hand-crafted config files in abuild, too
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2418 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util')
-rwxr-xr-xutil/abuild/abuild.sh29
1 files changed, 17 insertions, 12 deletions
diff --git a/util/abuild/abuild.sh b/util/abuild/abuild.sh
index 07bad28885..53b492bfe0 100755
--- a/util/abuild/abuild.sh
+++ b/util/abuild/abuild.sh
@@ -85,22 +85,23 @@ function create_config
TARGCONFIG=$LBROOT/targets/$VENDOR/$MAINBOARD/Config-abuild.lb
# get a working payload for the board if we have one.
+
if [ -x $payloads/payload.sh ]; then
PAYLOAD=`$payloads/payload.sh $VENDOR $MAINBOARD`
+ echo "Using custom payload $PAYLOAD"
fi
mkdir -p $TARGET
if [ -f $TARGCONFIG ]; then
cp $TARGCONFIG $TARGET/Config-${VENDOR}_${MAINBOARD}.lb
- echo "Used existing test target $TARGCONFIG"
+ echo -n "Using existing test target $TARGCONFIG"
xml " <config>$TARGCONFIG</config>"
- return
- fi
+ else
- echo -n " Creating config file..."
- xml " <config>autogenerated</config>"
- ( cat << EOF
+ echo -n " Creating config file..."
+ xml " <config>autogenerated</config>"
+ ( cat << EOF
# This will make a target directory of ./VENDOR_MAINBOARD
target VENDOR_MAINBOARD
@@ -111,8 +112,8 @@ option CROSS_COMPILE="CROSS_PREFIX"
option HOSTCC="CROSS_HOSTCC"
EOF
- if [ "$TARCH" == i386 ] ; then
- cat <<EOF
+ if [ "$TARCH" == i386 ] ; then
+ cat <<EOF
romimage "normal"
option USE_FALLBACK_IMAGE=0
option ROM_IMAGE_SIZE=0x20000
@@ -128,22 +129,26 @@ romimage "fallback"
end
buildrom ./linuxbios.rom ROM_SIZE "normal" "fallback"
EOF
- else
- cat <<EOF
+ else
+ cat <<EOF
romimage "only"
option LINUXBIOS_EXTRA_VERSION=".0"
payload PAYLOAD
end
buildrom ./linuxbios.rom ROM_SIZE "only"
EOF
+ fi
+ ) > $TARGET/Config-${VENDOR}_${MAINBOARD}.lb
fi
- ) | sed -e s,VENDOR,$VENDOR,g \
+
+ sed -i.pre -e s,VENDOR,$VENDOR,g \
-e s,MAINBOARD,$MAINBOARD,g \
-e s,PAYLOAD,$PAYLOAD,g \
-e s,CROSSCC,"$CC",g \
-e s,CROSS_PREFIX,"$CROSS_COMPILE",g \
-e s,CROSS_HOSTCC,"$HOSTCC",g \
- > $TARGET/Config-${VENDOR}_${MAINBOARD}.lb
+ $TARGET/Config-${VENDOR}_${MAINBOARD}.lb
+
echo " ok"
}