Skip to content

Commit 672a521

Browse files
committed
kernel: armbian: fix: use ORAS binary appropriate to the (host) arch; bump ORAS to 1.2.0-rc.1 (from beta.1)
- otherwise can't build those "kernels" on arm64-only & qemu+binfmt-deprived hosts Signed-off-by: Ricardo Pardini <[email protected]>
1 parent 38b5e58 commit 672a521

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

bash/kernel/kernel_armbian.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,15 @@ function calculate_kernel_version_armbian() {
4545

4646
declare -g ARMBIAN_KERNEL_DOCKERFILE="kernel/Dockerfile.autogen.armbian.${inventory_id}"
4747

48-
declare oras_version="1.2.0-beta.1" # @TODO bump this once it's released; yes it's much better than 1.1.x's
49-
declare oras_down_url="https://github.com/oras-project/oras/releases/download/v${oras_version}/oras_${oras_version}_linux_amd64.tar.gz"
48+
declare oras_version="1.2.0-rc.1" # @TODO bump this once it's released; yes it's much better than 1.1.x's
49+
# determine the arch to download from current arch
50+
declare oras_arch="unknown"
51+
case "$(uname -m)" in
52+
"x86_64") oras_arch="amd64" ;;
53+
"aarch64") oras_arch="arm64" ;;
54+
*) log error "ERROR: ARCH $(uname -m) not supported by ORAS? check https://github.com/oras-project/oras/releases" && exit 1 ;;
55+
esac
56+
declare oras_down_url="https://github.com/oras-project/oras/releases/download/v${oras_version}/oras_${oras_version}_linux_${oras_arch}.tar.gz"
5057

5158
# Lets create a Dockerfile that will be used to obtain the artifacts needed, using ORAS binary
5259
echo "Creating Dockerfile '${ARMBIAN_KERNEL_DOCKERFILE}'... "

0 commit comments

Comments
 (0)