Browse Source

Support Orange Pi Zero2 LTS

pull/43/head
orangepi-xunlong 3 years ago
parent
commit
1ed20d4003
  1. 90
      build

90
build

@ -45,47 +45,72 @@ check_make_ok() {
select_boards()
{
local cnt=0
local choice
local call=${1}
local cnt=0
local choice
local call=${1}
boards=("orangepir1" "orangepizero" "orangepipc" "orangepipch5" "orangepipcplus" "orangepiplus2e" "orangepione" "orangepioneh5" "orangepilite" "orangepiplus" "orangepizeroplus2h3" "orangepizeroplus" "orangepipc2" "orangepiprime" "orangepizeroplus2h5" "orangepiwin" "orangepiwinplus" "orangepi3" "orangepi3-lts" "orangepilite2" "orangepioneplus" "orangepi4" "orangepirk3399" "orangepi800" "orangepizero2" "orangepir1plus")
boards=("orangepir1"
"orangepizero"
"orangepipc"
"orangepipch5"
"orangepipcplus"
"orangepiplus2e"
"orangepione"
"orangepioneh5"
"orangepilite"
"orangepiplus"
"orangepizeroplus2h3"
"orangepizeroplus"
"orangepipc2"
"orangepiprime"
"orangepizeroplus2h5"
"orangepiwin"
"orangepiwinplus"
"orangepi3"
"orangepi3-lts"
"orangepilite2"
"orangepioneplus"
"orangepi4"
"orangepirk3399"
"orangepi800"
"orangepizero2"
"orangepizero2-lts"
"orangepir1plus")
if [[ -f /etc/orangepi-release ]]; then
if [[ -f /etc/orangepi-release ]]; then
source /etc/orangepi-release
source /etc/orangepi-release
elif [[ -f /etc/armbian-release ]]; then
elif [[ -f /etc/armbian-release ]]; then
source /etc/armbian-release
source /etc/armbian-release
[[ $BOARD == orangepi-r1 ]] && BOARD=orangepir1
[[ $BOARD == orangepi-rk3399 ]] && BOARD=orangepirk3399
[[ $BOARD == orangepizeroplus2-h3 ]] && BOARD=orangepizeroplus2h3
[[ $BOARD == orangepizeroplus2-h5 ]] && BOARD=orangepizeroplus2h5
[[ $BOARD == orangepi-r1 ]] && BOARD=orangepir1
[[ $BOARD == orangepi-rk3399 ]] && BOARD=orangepirk3399
[[ $BOARD == orangepizeroplus2-h3 ]] && BOARD=orangepizeroplus2h3
[[ $BOARD == orangepizeroplus2-h5 ]] && BOARD=orangepizeroplus2h5
else
else
printf "All available boards:\n"
for var in ${boards[@]} ; do
printf "%4d. %s\n" $cnt ${boards[$cnt]}
printf "All available boards:\n"
for var in ${boards[@]} ; do
printf "%4d. %s\n" $cnt ${boards[$cnt]}
((cnt+=1))
done
done
while true ; do
read -p "Choice: " choice
if [ -z "${choice}" ] ; then
continue
fi
if [ -z "${choice//[0-9]/}" ] ; then
if [ $choice -ge 0 -a $choice -lt $cnt ] ; then
export BOARD="${boards[$choice]}"
break
fi
fi
printf "Invalid input ...\n"
done
fi
while true ; do
read -p "Choice: " choice
if [ -z "${choice}" ] ; then
continue
fi
if [ -z "${choice//[0-9]/}" ] ; then
if [ $choice -ge 0 -a $choice -lt $cnt ] ; then
export BOARD="${boards[$choice]}"
break
fi
fi
printf "Invalid input ...\n"
done
fi
[[ $BOARD == orangepir1 ]] && BOARD=orangepir1-h2
[[ $BOARD == orangepizero ]] && BOARD=orangepizero-h2
@ -107,6 +132,7 @@ select_boards()
[[ $BOARD == orangepilite2 ]] && BOARD=orangepilite2-h6
[[ $BOARD == orangepioneplus ]] && BOARD=orangepioneplus-h6
[[ $BOARD == orangepizero2 ]] && BOARD=orangepizero2-h616
[[ $BOARD == orangepizero2-lts ]] && BOARD=orangepizero2-h616
[[ $BOARD == orangepir1plus ]] && BOARD=orangepir1plus-rk3328
export BOARD="${BOARD}"

Loading…
Cancel
Save