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
This commit is contained in:
parent
7fe2b7cd5c
commit
50f84bdea8
|
@ -7,8 +7,7 @@ option MAXIMUM_CONSOLE_LOGLEVEL=8
|
||||||
option DEFAULT_CONSOLE_LOGLEVEL=8
|
option DEFAULT_CONSOLE_LOGLEVEL=8
|
||||||
option CONFIG_CONSOLE_SERIAL8250=1
|
option CONFIG_CONSOLE_SERIAL8250=1
|
||||||
|
|
||||||
option ROM_SIZE=512*1024
|
option ROM_SIZE=256*1024
|
||||||
|
|
||||||
|
|
||||||
option HAVE_OPTION_TABLE=1
|
option HAVE_OPTION_TABLE=1
|
||||||
option CONFIG_ROM_STREAM=1
|
option CONFIG_ROM_STREAM=1
|
||||||
|
@ -28,16 +27,16 @@ option _RAMBASE=0x00004000
|
||||||
#
|
#
|
||||||
romimage "normal"
|
romimage "normal"
|
||||||
option USE_FALLBACK_IMAGE=0
|
option USE_FALLBACK_IMAGE=0
|
||||||
option ROM_IMAGE_SIZE=0x20000
|
option ROM_IMAGE_SIZE=64*1024
|
||||||
option LINUXBIOS_EXTRA_VERSION=".0-Normal"
|
option LINUXBIOS_EXTRA_VERSION=".0-Normal"
|
||||||
payload /dev/null
|
payload PAYLOAD
|
||||||
end
|
end
|
||||||
|
|
||||||
romimage "fallback"
|
romimage "fallback"
|
||||||
option USE_FALLBACK_IMAGE=1
|
option USE_FALLBACK_IMAGE=1
|
||||||
option ROM_IMAGE_SIZE=0x20000
|
option ROM_IMAGE_SIZE=64*1024
|
||||||
option LINUXBIOS_EXTRA_VERSION=".0-Fallback"
|
option LINUXBIOS_EXTRA_VERSION=".0-Fallback"
|
||||||
payload /dev/null
|
payload PAYLOAD
|
||||||
end
|
end
|
||||||
|
|
||||||
buildrom ./linuxbios.rom ROM_SIZE "normal" "fallback"
|
buildrom ./linuxbios.rom ROM_SIZE "normal" "fallback"
|
||||||
|
|
|
@ -85,22 +85,23 @@ function create_config
|
||||||
TARGCONFIG=$LBROOT/targets/$VENDOR/$MAINBOARD/Config-abuild.lb
|
TARGCONFIG=$LBROOT/targets/$VENDOR/$MAINBOARD/Config-abuild.lb
|
||||||
|
|
||||||
# get a working payload for the board if we have one.
|
# get a working payload for the board if we have one.
|
||||||
|
|
||||||
if [ -x $payloads/payload.sh ]; then
|
if [ -x $payloads/payload.sh ]; then
|
||||||
PAYLOAD=`$payloads/payload.sh $VENDOR $MAINBOARD`
|
PAYLOAD=`$payloads/payload.sh $VENDOR $MAINBOARD`
|
||||||
|
echo "Using custom payload $PAYLOAD"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p $TARGET
|
mkdir -p $TARGET
|
||||||
|
|
||||||
if [ -f $TARGCONFIG ]; then
|
if [ -f $TARGCONFIG ]; then
|
||||||
cp $TARGCONFIG $TARGET/Config-${VENDOR}_${MAINBOARD}.lb
|
cp $TARGCONFIG $TARGET/Config-${VENDOR}_${MAINBOARD}.lb
|
||||||
echo "Used existing test target $TARGCONFIG"
|
echo -n "Using existing test target $TARGCONFIG"
|
||||||
xml " <config>$TARGCONFIG</config>"
|
xml " <config>$TARGCONFIG</config>"
|
||||||
return
|
else
|
||||||
fi
|
|
||||||
|
|
||||||
echo -n " Creating config file..."
|
echo -n " Creating config file..."
|
||||||
xml " <config>autogenerated</config>"
|
xml " <config>autogenerated</config>"
|
||||||
( cat << EOF
|
( cat << EOF
|
||||||
# This will make a target directory of ./VENDOR_MAINBOARD
|
# This will make a target directory of ./VENDOR_MAINBOARD
|
||||||
|
|
||||||
target VENDOR_MAINBOARD
|
target VENDOR_MAINBOARD
|
||||||
|
@ -111,8 +112,8 @@ option CROSS_COMPILE="CROSS_PREFIX"
|
||||||
option HOSTCC="CROSS_HOSTCC"
|
option HOSTCC="CROSS_HOSTCC"
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
if [ "$TARCH" == i386 ] ; then
|
if [ "$TARCH" == i386 ] ; then
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
romimage "normal"
|
romimage "normal"
|
||||||
option USE_FALLBACK_IMAGE=0
|
option USE_FALLBACK_IMAGE=0
|
||||||
option ROM_IMAGE_SIZE=0x20000
|
option ROM_IMAGE_SIZE=0x20000
|
||||||
|
@ -128,22 +129,26 @@ romimage "fallback"
|
||||||
end
|
end
|
||||||
buildrom ./linuxbios.rom ROM_SIZE "normal" "fallback"
|
buildrom ./linuxbios.rom ROM_SIZE "normal" "fallback"
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
romimage "only"
|
romimage "only"
|
||||||
option LINUXBIOS_EXTRA_VERSION=".0"
|
option LINUXBIOS_EXTRA_VERSION=".0"
|
||||||
payload PAYLOAD
|
payload PAYLOAD
|
||||||
end
|
end
|
||||||
buildrom ./linuxbios.rom ROM_SIZE "only"
|
buildrom ./linuxbios.rom ROM_SIZE "only"
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
|
) > $TARGET/Config-${VENDOR}_${MAINBOARD}.lb
|
||||||
fi
|
fi
|
||||||
) | sed -e s,VENDOR,$VENDOR,g \
|
|
||||||
|
sed -i.pre -e s,VENDOR,$VENDOR,g \
|
||||||
-e s,MAINBOARD,$MAINBOARD,g \
|
-e s,MAINBOARD,$MAINBOARD,g \
|
||||||
-e s,PAYLOAD,$PAYLOAD,g \
|
-e s,PAYLOAD,$PAYLOAD,g \
|
||||||
-e s,CROSSCC,"$CC",g \
|
-e s,CROSSCC,"$CC",g \
|
||||||
-e s,CROSS_PREFIX,"$CROSS_COMPILE",g \
|
-e s,CROSS_PREFIX,"$CROSS_COMPILE",g \
|
||||||
-e s,CROSS_HOSTCC,"$HOSTCC",g \
|
-e s,CROSS_HOSTCC,"$HOSTCC",g \
|
||||||
> $TARGET/Config-${VENDOR}_${MAINBOARD}.lb
|
$TARGET/Config-${VENDOR}_${MAINBOARD}.lb
|
||||||
|
|
||||||
echo " ok"
|
echo " ok"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue