summaryrefslogtreecommitdiff
path: root/util/abuild
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2006-11-10 13:30:28 +0000
committerStefan Reinauer <stepan@openbios.org>2006-11-10 13:30:28 +0000
commitca6312010da56b1e01e1b53f5f4305e96b4e11f5 (patch)
treed77c17f72a96f0d829c41f3a6e0f553fc9efc9c4 /util/abuild
parentc0defea8b60855302df680696b54f2112c2f649f (diff)
downloadcoreboot-ca6312010da56b1e01e1b53f5f4305e96b4e11f5.tar.xz
* fix the automatic build system by compressing payloads if possible
and leaving enough room for a real payload (not /dev/null) This is a wonderful example why "uses" sucks. * add Config-abuild.lb for those boards that dont build with the default settings and a real payload: arima/hdama, amd/quartet, amd/serengeti_cheetah, ibm/e326 * if lzma is installed and a real payload is used, try compressing it. * fix a small bug in "abuild --help" This patch is acked by me because its due to infrastructural changes only. Flames welcome. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2496 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/abuild')
-rwxr-xr-xutil/abuild/abuild24
1 files changed, 18 insertions, 6 deletions
diff --git a/util/abuild/abuild b/util/abuild/abuild
index 6a5c808e44..db84debd23 100755
--- a/util/abuild/abuild
+++ b/util/abuild/abuild
@@ -105,10 +105,14 @@ function create_config
TARGCONFIG=$LBROOT/targets/$VENDOR/$MAINBOARD/Config-abuild.lb
# get a working payload for the board if we have one.
+ # the --payload option expects a directory containing
+ # an executable shell script payload.sh
+ # Usage: payload.sh [VENDOR] [DEVICE]
+ # the script returns an absolute path to the payload binary.
if [ -x $payloads/payload.sh ]; then
PAYLOAD=`$payloads/payload.sh $VENDOR $MAINBOARD`
- printf "Using custom payload $PAYLOAD\n"
+ printf "Using payload $PAYLOAD\n"
fi
mkdir -p $TARGET
@@ -131,19 +135,21 @@ option CC="CROSSCC"
option CROSS_COMPILE="CROSS_PREFIX"
option HOSTCC="CROSS_HOSTCC"
+__COMPRESSION__
+
EOF
if [ "$TARCH" == i386 ] ; then
cat <<EOF
romimage "normal"
option USE_FALLBACK_IMAGE=0
- option ROM_IMAGE_SIZE=0x20000
+ option ROM_IMAGE_SIZE=0x16000
option LINUXBIOS_EXTRA_VERSION=".0-normal"
payload PAYLOAD
end
romimage "fallback"
option USE_FALLBACK_IMAGE=1
- option ROM_IMAGE_SIZE=0x20000
+ option ROM_IMAGE_SIZE=0x16000
option LINUXBIOS_EXTRA_VERSION=".0-fallback"
payload PAYLOAD
end
@@ -161,14 +167,20 @@ EOF
) > $TARGET/Config-${VENDOR}_${MAINBOARD}.lb
fi
+ if [ "`which lzma`" != "" -a "$PAYLOAD" != /dev/null ]; then
+ COMPRESSION="option CONFIG_COMPRESSED_ROM_STREAM_LZMA=1"
+ else
+ COMPRESSION="# no compression"
+ fi
+
sed -i.pre -e s,VENDOR,$VENDOR,g \
-e s,MAINBOARD,$MAINBOARD,g \
-e s,payload\ PAYLOAD,payload\ $PAYLOAD,g \
-e s,CROSSCC,"$CC",g \
-e s,CROSS_PREFIX,"$CROSS_COMPILE",g \
-e s,CROSS_HOSTCC,"$HOSTCC",g \
+ -e s,__COMPRESSION__,"$COMPRESSION",g \
$TARGET/Config-${VENDOR}_${MAINBOARD}.lb
-
printf " ok\n"
}
@@ -422,8 +434,8 @@ function myhelp
{
printf "Usage: $0 [-v] [-a] [-b] [-t <vendor/board>] [-p <dir>] [lbroot]\n"
printf " $0 [-V|--version]\n"
- printf " $0 [-h|--help]\n"
- printf
+ printf " $0 [-h|--help]\n\n"
+
printf "Options:\n"
printf " [-v|--verbose] print more messages\n"
printf " [-a|--all] build previously succeeded ports as well\n"