Skip to content

Commit

Permalink
fix(crossBuild): correct build arg and update qemu image
Browse files Browse the repository at this point in the history
  • Loading branch information
ElioDiNino committed May 5, 2024
1 parent d65766b commit 17df7b7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions crossBuild.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
vehicleType=$1
version=$2
buildArgs="--build-arg ${version}"
buildArgs="--build-arg VERSION=${version}"

if [[ "$vehicleType" == "" || "$vehicleType" == "copter" ]]; then
echo "Building ArduCopter"
Expand All @@ -15,15 +15,14 @@ else
fi

# Add QEMU stuff
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker run --privileged --rm tonistiigi/binfmt --install arm64,arm

# Create and bootstrap builder
docker buildx create --name mubuilder
docker buildx use mubuilder
docker buildx create --name mubuilder --use
docker buildx inspect --bootstrap

# Build and push images
docker buildx build ${buildArgs} --tag ubcuas/uasitl:${vehicleType}-arm-${version} --output type=image arm/ --platform "linux/arm64,linux/arm/v7"

# Cleanup
docker buildx rm mubuilder
docker buildx rm --keep-state mubuilder

0 comments on commit 17df7b7

Please sign in to comment.