2003-07-17 19:50:11 +02:00
|
|
|
#!/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
|
2003-07-23 23:30:29 +02:00
|
|
|
config_dir=$lbpath/util/newconfig
|
|
|
|
config_py=$config_dir/config.py
|
2003-07-17 19:50:11 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2003-07-23 23:30:29 +02:00
|
|
|
# make sure config.py is up-to-date
|
|
|
|
|
|
|
|
(cd $config_dir && make config.py)
|
|
|
|
|
2003-07-17 19:50:11 +02:00
|
|
|
python $config_py $config_lb $lbpath
|
|
|
|
|
|
|
|
exit $?
|