coreboot-kgpe-d16/targets/buildtarget
Ronald G. Minnich 08febd8b67 new epia target for 512k: targets/via/epia/Config.512kflash.lb
buildtarget now takes either a directory, and uses directory/Config.lb, or
takes a file

epia defaults to 256k flash


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1166 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2003-10-01 05:42:31 +00:00

55 lines
853 B
Bash
Executable file

#!/bin/sh
# Target build script
if [ $# -lt 1 ]; then
echo "usage: buildtarget target [path-to-linuxbios]"
exit 1
fi
if [ $# -gt 1 ]; then
lbpath=$2
else
lbpath=`pwd`
lbpath=`dirname $lbpath`
fi
target_dir=$lbpath/targets
config_lb=$1
config_dir=$lbpath/util/newconfig
config_py=$config_dir/config.py
if [ ! -d $target_dir ]; then
echo "Target directory not found"
exit 1
fi
cd $target_dir
if [ ! -f $config_lb ]; then
config_lb=$1/Config.lb
fi
if [ ! -f $config_lb ]; then
echo "No target config file found"
echo "Tried both $1 and $config_lb"
exit 1
fi
if [ ! -f $config_py ]; then
echo "No linuxbios config script found. Rebuilding it.."
(
cd $config_dir
make config.py
)
echo "done."
# exit 1
fi
# make sure config.py is up-to-date
(cd $config_dir && make config.py)
python $config_py $config_lb $lbpath
exit $?