Files
openloongarch-uboot-2022.04/buildenv.sh
T
loongson 1d58dfa04b update to cadd162f
1. support update dtb
2. support install rootfs from ramdisk
3. other fixs
2024-07-25 14:11:52 +08:00

50 lines
622 B
Bash
Executable File

#!/bin/bash
set -e
PS3="Please enter your choice:"
conf=""
function get_conf()
{
plat=loongson_${1}
opts=(`cd configs && ls ${plat}*`)
select opt in "${opts[@]}"
do
conf=$opt
break
done
echo
echo "Your select is:${conf}"
echo
}
function usage()
{
echo "Usage:"
echo "./buildenv.sh <chip> [options]"
echo "chip: <2k300/2k500/2k1000/2p500/all>"
echo "options: it's same as u-boot make defconfig"
}
function main()
{
if [ $# -ge 1 ]; then
param=${1}
if [ ${param} = "all" ]; then
get_conf
else
get_conf $param
fi
shift
make $conf $@
else
usage
fi
}
main $@