Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
jirutka committed Sep 11, 2023
1 parent a8b3a3d commit 0d1c1d5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
- uses: jirutka/setup-alpine@v1
with:
arch: aarch64
shell-name: alpine-aarch64.sh

- name: Build image for aarch64 on x86_64 host
run: |
Expand All @@ -79,3 +80,16 @@ jobs:
--fs-skel-chown root:root \
--script-chroot \
alpine-$(date +%Y-%m-%d).qcow2 -- ./example/configure.sh
- name: Build image for aarch64 on Alpine aarch64 host
run: |
sudo ./alpine-make-vm-image \
--image-format qcow2 \
--image-size 2G \
--repositories-file example/repositories \
--packages "$(cat example/packages)" \
--fs-skel-dir example/rootfs \
--fs-skel-chown root:root \
--script-chroot \
alpine-$(date +%Y-%m-%d).qcow2 -- ./example/configure.sh
shell: alpine-aarch64.sh {0}
14 changes: 10 additions & 4 deletions alpine-make-vm-image
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,15 @@ alpine-devel@lists.alpinelinux.org-58199dcc.rsa.pub:MIIBIjANBgkqhkiG9w0BAQEFAAOC
alpine-devel@lists.alpinelinux.org-616ae350.rsa.pub:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAyduVzi1mWm+lYo2Tqt/0\nXkCIWrDNP1QBMVPrE0/ZlU2bCGSoo2Z9FHQKz/mTyMRlhNqTfhJ5qU3U9XlyGOPJ\npiM+b91g26pnpXJ2Q2kOypSgOMOPA4cQ42PkHBEqhuzssfj9t7x47ppS94bboh46\nxLSDRff/NAbtwTpvhStV3URYkxFG++cKGGa5MPXBrxIp+iZf9GnuxVdST5PGiVGP\nODL/b69sPJQNbJHVquqUTOh5Ry8uuD2WZuXfKf7/C0jC/ie9m2+0CttNu9tMciGM\nEyKG1/Xhk5iIWO43m4SrrT2WkFlcZ1z2JSf9Pjm4C2+HovYpihwwdM/OdP8Xmsnr\nDzVB4YvQiW+IHBjStHVuyiZWc+JsgEPJzisNY0Wyc/kNyNtqVKpX6dRhMLanLmy+\nf53cCSI05KPQAcGj6tdL+D60uKDkt+FsDa0BTAobZ31OsFVid0vCXtsbplNhW1IF\nHwsGXBTVcfXg44RLyL8Lk/2dQxDHNHzAUslJXzPxaHBLmt++2COa2EI1iWlvtznk\nOk9WP8SOAIj+xdqoiHcC4j72BOVVgiITIJNHrbppZCq6qPR+fgXmXa+sDcGh30m6\n9Wpbr28kLMSHiENCWTdsFij+NQTd5S47H7XTROHnalYDuF1RpS+DpQidT5tUimaT\nJZDr++FjKrnnijbyNF8b98UCAwEAAQ==
'

: ${APK_TOOLS_URI:="https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v2.14.0/x86_64/apk.static"}
: ${APK_TOOLS_SHA256:="1c65115a425d049590bec7c729c7fd88357fbb090a6fc8c31d834d7b0bc7d6f2"}
readonly HOST_ARCH="$(uname -m)"

# SHA256 checksum of $APK_TOOLS_URI for each architecture.
case "$HOST_ARCH" in
aarch64) : ${APK_TOOLS_SHA256:="d49a63b8b6780fc1342d3e7e14862aa006c30bafbf74beec8e1dfe99e6f89471"};;
x86_64) : ${APK_TOOLS_SHA256:="1c65115a425d049590bec7c729c7fd88357fbb090a6fc8c31d834d7b0bc7d6f2"};;
esac

: ${APK_TOOLS_URI:="https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v2.14.0/$HOST_ARCH/apk.static"}
: ${APK:="apk"}
: ${APK_OPTS:="--no-progress"}

Expand Down Expand Up @@ -436,13 +442,13 @@ case "$ALPINE_BRANCH" in
[0-9]*) ALPINE_BRANCH="v$ALPINE_BRANCH";;
esac

if [ -z "$ARCH" ] || [ "$(uname -m)" = "$ARCH" ]; then
if [ -z "$ARCH" ] || [ "$HOST_ARCH" = "$ARCH" ]; then
: ${KEYS_DIR:="/etc/apk/keys"}
else
: ${KEYS_DIR:=}
fi

case "${ARCH:-"$(uname -m)"}" in
case "${ARCH:-"$HOST_ARCH"}" in
x86*) : ${BOOT_MODE:="BIOS"}
: ${INITFS_FEATURES:="scsi virtio"};;

Expand Down

0 comments on commit 0d1c1d5

Please sign in to comment.