Skip to content

Commit 62d72e5

Browse files
NN708axtloss
authored andcommitted
feat: aarch64 support
1 parent 87fb8c8 commit 62d72e5

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ jobs:
1818
run: |
1919
apk add xz squashfs-tools
2020
/bin/sh ./genrootfs.sh
21+
ARCH=aarch64 /bin/sh ./genrootfs.sh
2122
2223
- uses: actions/upload-artifact@v4
2324
with:
24-
name: FsWarn-x86_64
25-
path: ./fswarn-x86_64.squash
25+
name: FsWarn
26+
path: ./fswarn*.squash

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ jobs:
1919
run: |
2020
apk add xz squashfs-tools
2121
/bin/sh ./genrootfs.sh
22-
tar cvf fswarn.tar.xz fswarn-x86_64.squash
22+
tar cvf fswarn-x86_64.tar.xz fswarn-x86_64.squash
23+
ARCH=aarch64 /bin/sh ./genrootfs.sh
24+
tar cvf fswarn-aarch64.tar.xz fswarn-aarch64.squash
2325
2426
- name: Upload release
2527
uses: softprops/action-gh-release@v2
2628
with:
27-
files: fswarn.tar.xz
29+
files: fswarn*.tar.xz

genrootfs.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ tmp="$(mktemp -d)"
88
trap cleanup EXIT
99
chmod 0755 "$tmp"
1010

11-
arch="x86_64"
11+
arch=${ARCH:-"$(apk --print-arch)"}
1212
repositories_file=/etc/apk/repositories
13-
keys_dir=/etc/apk/keys
14-
outfile="./fswarn-x86_64.squash"
13+
keys_dir=/usr/share/apk/keys
14+
outfile="./fswarn-$arch.squash"
1515

1616
packages="alpine-baselayout-data busybox imagemagick gawk bash"
1717

@@ -25,12 +25,13 @@ ${APK:-apk} add --keys-dir "$keys_dir" --no-cache \
2525
--repositories-file "$repositories_file" \
2626
--no-script --root "$tmp" --initdb --arch "$arch" \
2727
$packages
28-
for link in $("$tmp"/bin/busybox --list-full); do
28+
for link in $(/bin/busybox --list-full); do
2929
[ -e "$tmp"/$link ] || ln -s /bin/busybox "$tmp"/$link
3030
done
3131

3232
${APK:-apk} fetch --keys-dir "$keys_dir" --no-cache \
33-
--repositories-file "$repositories_file" --root "$tmp" \
33+
--repositories-file "$repositories_file" \
34+
--root "$tmp" --arch "$arch" \
3435
--stdout --quiet alpine-release | tar -zx -C "$tmp" etc/
3536

3637
# make sure root login is disabled

0 commit comments

Comments
 (0)