coreboot-kgpe-d16/targets/buildtarget

46 lines
690 B
Plaintext
Raw Normal View History

#!/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.lb
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
echo "No target config file found"
exit 1
fi
if [ ! -f $config_py ]; then
echo "No linuxbios config file found"
exit 1
fi
# make sure config.py is up-to-date
(cd $config_dir && make config.py)
python $config_py $config_lb $lbpath
exit $?