Skip to content

Commit

Permalink
build.sh: upload fit for all boards except bpi-r2
Browse files Browse the repository at this point in the history
drop r2pro specific case for barebox
  • Loading branch information
frank-w committed Feb 17, 2024
1 parent fd3368e commit 6a8d38e
Showing 1 changed file with 10 additions and 22 deletions.
32 changes: 10 additions & 22 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -350,27 +350,19 @@ function upload {
b=""
fi

if [[ "$board" == "bpi-r2pro" ]];then
imagename="none-linux-bpi-r2pro"
read -e -i $imagename -p "Kernel-filename: " input
imagename="${input:-$imagename}"
else
imagename="uImage_${kernver}${gitbranch}${b}"
read -e -i $imagename -p "Kernel-filename: " input
imagename="${input:-$imagename}"
fi
imagename="${kernver}${gitbranch}${b}"
read -e -i $imagename -p "Kernel-filename: " input
imagename="${input:-$imagename}"

echo "Name: $imagename"

if [[ "$board" == "bpi-r2pro" ]];then
dtbname="none-oftree-bpi-r2pro"
read -e -i $dtbname -p "dtb-filename: " input
dtbname="${input:-$dtbname}"
elif [[ "$board" == "bpi-r64" || "$board" == "bpi-r3" || "$board" == "bpi-r4" ]];then
if [[ "$board" == "bpi-r2" ]];then
imagename="uImage_$imagename"
else
read -e -i y -p "upload fit? " fitupload
if [[ "$fitupload" == "y" ]];
then
imagename="${imagename//uImage_}.itb"
imagename="${imagename}.itb"
echo "uploading fit as $imagename"
else
dtbname="${kernver}${b}${gitbranch}.dtb"
Expand All @@ -383,20 +375,16 @@ function upload {
echo "DTB Name: $dtbname"
echo "uploading to ${uploadserver}:${uploaddir}..."

if [[ "$board" == "bpi-r2pro" ]];then
scp ${bindir}arch/arm64/boot/Image.gz ${uploaduser}@${uploadserver}:${uploaddir}/${imagename}
scp ${bindir}${DTBFILE} ${uploaduser}@${uploadserver}:${uploaddir}/${dtbname}
elif [[ "$board" == "bpi-r64" || "$board" == "bpi-r3" || "$board" == "bpi-r4" ]];then
if [[ "$board" == "bpi-r2" ]];then
scp uImage ${uploaduser}@${uploadserver}:${uploaddir}/${imagename}
else
if [[ "$fitupload" == "y" ]];
then
scp ${board}.itb ${uploaduser}@${uploadserver}:${uploaddir}/${imagename}
else
scp uImage_nodt ${uploaduser}@${uploadserver}:${uploaddir}/${imagename}
scp ${bindir}${DTBFILE} ${uploaduser}@${uploadserver}:${uploaddir}/${dtbname}
fi

else
scp uImage ${uploaduser}@${uploadserver}:${uploaddir}/${imagename}
fi
}

Expand Down

0 comments on commit 6a8d38e

Please sign in to comment.