Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aarch64 live iso support #384

Merged
merged 13 commits into from
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
README.md linguist-generated=true
/README.md linguist-generated=true
83 changes: 50 additions & 33 deletions .github/workflows/gen-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
type: boolean
live_archs:
description: "Archs to build live ISOs for"
default: "x86_64 x86_64-musl i686"
default: "x86_64 x86_64-musl i686 aarch64 aarch64-musl"
required: false
type: string
live_flavors:
Expand Down Expand Up @@ -69,6 +69,11 @@ jobs:
datecode: ${{ steps.prep.outputs.datecode }}
revision: ${{ steps.prep.outputs.revision }}
mirror: ${{ steps.prep.outputs.mirror }}
live_archs: ${{ steps.prep.outputs.live_archs }}
live_flavors: ${{ steps.prep.outputs.live_flavors }}
rootfs: ${{ steps.prep.outputs.rootfs }}
platformfs: ${{ steps.prep.outputs.platformfs }}
sbc_imgs: ${{ steps.prep.outputs.sbc_imgs }}

steps:
- name: Prepare Environment
Expand All @@ -82,12 +87,28 @@ jobs:
echo "revision=${GITHUB_SHA:0:8}" >> $GITHUB_OUTPUT
echo "mirror=https://repo-ci.voidlinux.org/current" >> $GITHUB_OUTPUT

jsonify() {
sed 's/\s\+/ /g' | jq -Rrc 'split(" ")'
}

echo "live_archs=$(echo "${{ inputs.live_archs }}" | jsonify)" >> $GITHUB_OUTPUT
echo "live_flavors=$(echo "${{ inputs.live_flavors }}" | jsonify)" >> $GITHUB_OUTPUT

echo "rootfs=$(echo "${{ inputs.rootfs }}" | jsonify)" >> $GITHUB_OUTPUT
echo "platformfs=$(echo "${{ inputs.platformfs }}" | jsonify)" >> $GITHUB_OUTPUT
echo "sbc_imgs=$(echo "${{ inputs.sbc_imgs }}" | jsonify)" >> $GITHUB_OUTPUT

build-live-isos:
name: Build Live ISOs
runs-on: ubuntu-latest
needs: prepare
if: ${{ inputs.live_iso_flag }}

strategy:
matrix:
arch: ${{ fromJson(needs.prepare.outputs.live_archs) }}
flavor: ${{ fromJson(needs.prepare.outputs.live_flavors) }}

container:
image: 'ghcr.io/void-linux/void-glibc-full:20231230R1'
options: --privileged
Expand All @@ -105,12 +126,8 @@ jobs:
mkdir -p /etc/xbps.d && cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
sed -i 's|https://repo-default.voidlinux.org/current|'"${{ needs.prepare.outputs.mirror }}"'|g' \
/etc/xbps.d/*-repository-*.conf
# Sync and upgrade once, assume error comes from xbps update
xbps-install -Syu || xbps-install -yu xbps
# Upgrade again (in case there was a xbps update)
xbps-install -yu
# Install depedencies
xbps-install -yu bash make git kmod xz lzo qemu-user-static outils dosfstools e2fsprogs
xbps-install -Syu xbps && xbps-install -yu
xbps-install -yu bash make git kmod xz lzo qemu-user-aarch64 binfmt-support outils dosfstools e2fsprogs
- name: Clone and checkout
uses: classabbyamp/treeless-checkout-action@v1

Expand All @@ -119,15 +136,15 @@ jobs:
make live-iso-all-print live-iso-all \
SUDO= REPOSITORY="${{ needs.prepare.outputs.mirror }}" \
DATECODE="${{ needs.prepare.outputs.datecode }}" \
LIVE_ARCHS="${{ inputs.live_archs }}" LIVE_FLAVORS="${{ inputs.live_flavors }}"
LIVE_ARCHS="${{ matrix.arch }}" LIVE_FLAVORS="${{ matrix.flavor }}"

- name: Prepare artifacts for upload
run: |
make dist DATECODE="${{ needs.prepare.outputs.datecode }}"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: void-iso-${{ needs.prepare.outputs.datecode }}
name: void-iso-${{ matrix.arch }}-${{ matrix.flavor }}-${{ needs.prepare.outputs.datecode }}
path: |
distdir-${{ needs.prepare.outputs.datecode }}/*
if-no-files-found: error
Expand All @@ -138,6 +155,10 @@ jobs:
needs: prepare
if: ${{ inputs.rootfs_flag }}

strategy:
matrix:
arch: ${{ fromJson(needs.prepare.outputs.rootfs) }}

container:
image: 'ghcr.io/void-linux/void-glibc-full:20231230R1'
options: --privileged
Expand All @@ -155,12 +176,8 @@ jobs:
mkdir -p /etc/xbps.d && cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
sed -i 's|https://repo-default.voidlinux.org/current|'"${{ needs.prepare.outputs.mirror }}"'|g' \
/etc/xbps.d/*-repository-*.conf
# Sync and upgrade once, assume error comes from xbps update
xbps-install -Syu || xbps-install -yu xbps
# Upgrade again (in case there was a xbps update)
xbps-install -yu
# Install depedencies
xbps-install -yu bash make git kmod xz lzo qemu-user-static outils dosfstools e2fsprogs
xbps-install -Syu xbps && xbps-install -yu
xbps-install -yu bash make git kmod xz lzo qemu-user-arm qemu-user-aarch64 binfmt-support outils dosfstools e2fsprogs
- name: Clone and checkout
uses: classabbyamp/treeless-checkout-action@v1

Expand All @@ -169,15 +186,15 @@ jobs:
make rootfs-all-print rootfs-all \
SUDO= REPOSITORY="${{ needs.prepare.outputs.mirror }}" \
DATECODE="${{ needs.prepare.outputs.datecode }}" \
ARCHS="${{ inputs.rootfs }}"
ARCHS="${{ matrix.arch }}"

- name: Prepare artifacts for upload
run: |
make dist DATECODE="${{ needs.prepare.outputs.datecode }}"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: void-rootfs-${{ needs.prepare.outputs.datecode }}
name: void-rootfs-${{ matrix.arch }}-${{ needs.prepare.outputs.datecode }}
path: |
distdir-${{ needs.prepare.outputs.datecode }}/*
if-no-files-found: error
Expand All @@ -188,6 +205,10 @@ jobs:
needs: prepare
if: ${{ inputs.platformfs_flag }}

strategy:
matrix:
platform: ${{ fromJson(needs.prepare.outputs.platformfs) }}

container:
image: 'ghcr.io/void-linux/void-glibc-full:20231230R1'
options: --privileged
Expand All @@ -205,12 +226,8 @@ jobs:
mkdir -p /etc/xbps.d && cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
sed -i 's|https://repo-default.voidlinux.org/current|'"${{ needs.prepare.outputs.mirror }}"'|g' \
/etc/xbps.d/*-repository-*.conf
# Sync and upgrade once, assume error comes from xbps update
xbps-install -Syu || xbps-install -yu xbps
# Upgrade again (in case there was a xbps update)
xbps-install -yu
# Install depedencies
xbps-install -yu bash make git kmod xz lzo qemu-user-static outils dosfstools e2fsprogs
xbps-install -Syu xbps && xbps-install -yu
xbps-install -yu bash make git kmod xz lzo qemu-user-arm qemu-user-aarch64 binfmt-support outils dosfstools e2fsprogs
- name: Clone and checkout
uses: classabbyamp/treeless-checkout-action@v1

Expand All @@ -219,15 +236,15 @@ jobs:
make platformfs-all-print platformfs-all \
SUDO= REPOSITORY="${{ needs.prepare.outputs.mirror }}" \
DATECODE="${{ needs.prepare.outputs.datecode }}" \
PLATFORMS="${{ inputs.platformfs }}"
PLATFORMS="${{ matrix.platform }}"

- name: Prepare artifacts for upload
run: |
make dist DATECODE="${{ needs.prepare.outputs.datecode }}"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: void-platformfs-${{ needs.prepare.outputs.datecode }}
name: void-platformfs-${{ matrix.platform }}-${{ needs.prepare.outputs.datecode }}
path: |
distdir-${{ needs.prepare.outputs.datecode }}/*
!distdir-${{ needs.prepare.outputs.datecode }}/*ROOTFS*
Expand All @@ -239,6 +256,10 @@ jobs:
needs: prepare
if: ${{ inputs.sbc_img_flag }}

strategy:
matrix:
platform: ${{ fromJson(needs.prepare.outputs.sbc_imgs) }}

container:
image: 'ghcr.io/void-linux/void-glibc-full:20231230R1'
options: --privileged
Expand All @@ -256,12 +277,8 @@ jobs:
mkdir -p /etc/xbps.d && cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
sed -i 's|https://repo-default.voidlinux.org/current|'"${{ needs.prepare.outputs.mirror }}"'|g' \
/etc/xbps.d/*-repository-*.conf
# Sync and upgrade once, assume error comes from xbps update
xbps-install -Syu || xbps-install -yu xbps
# Upgrade again (in case there was a xbps update)
xbps-install -yu
# Install depedencies
xbps-install -yu bash make git kmod xz lzo qemu-user-static outils dosfstools e2fsprogs
xbps-install -Syu xbps && xbps-install -yu
xbps-install -yu bash make git kmod xz lzo qemu-user-arm qemu-user-aarch64 binfmt-support outils dosfstools e2fsprogs
- name: Clone and checkout
uses: classabbyamp/treeless-checkout-action@v1

Expand All @@ -270,15 +287,15 @@ jobs:
make images-all-sbc-print images-all-sbc \
SUDO= REPOSITORY="${{ needs.prepare.outputs.mirror }}" \
DATECODE="${{ needs.prepare.outputs.datecode }}" \
SBC_IMGS="${{ inputs.sbc_imgs }}"
SBC_IMGS="${{ matrix.platform }}"

- name: Prepare artifacts for upload
run: |
make dist DATECODE="${{ needs.prepare.outputs.datecode }}"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: void-sbc-img-${{ needs.prepare.outputs.datecode }}
name: void-sbc-img-${{ matrix.platform }}-${{ needs.prepare.outputs.datecode }}
path: |
distdir-${{ needs.prepare.outputs.datecode }}/*
!distdir-${{ needs.prepare.outputs.datecode }}/*ROOTFS*
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ distdir-*/
release/
packer/cloud-*/
packer/vagrant-*/
mklive-build*/
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
DATECODE:=$(shell date -u "+%Y%m%d")
SHELL=/bin/bash

T_LIVE_ARCHS=i686 x86_64{,-musl}
T_LIVE_ARCHS=i686 x86_64{,-musl} aarch64{,-musl}

T_PLATFORMS=rpi-{armv{6,7}l,aarch64}{,-musl} GCP{,-musl} pinebookpro{,-musl}
T_ARCHS=i686 x86_64{,-musl} armv{6,7}l{,-musl} aarch64{,-musl}
Expand All @@ -13,6 +13,7 @@ T_PXE_ARCHS=x86_64{,-musl}

LIVE_ARCHS:=$(shell echo $(T_LIVE_ARCHS))
LIVE_FLAVORS:=base enlightenment xfce mate cinnamon gnome kde lxde lxqt
LIVE_PLATFORMS:=pinebookpro x13s
ARCHS:=$(shell echo $(T_ARCHS))
PLATFORMS:=$(shell echo $(T_PLATFORMS))
SBC_IMGS:=$(shell echo $(T_SBC_IMGS))
Expand All @@ -34,16 +35,16 @@ COMPRESSOR_THREADS:=$(shell nproc)

all:

README.md: README.md.in build-x86-images.sh mklive.sh mkrootfs.sh mkplatformfs.sh mkimage.sh mknet.sh
README.md: README.md.in mkiso.sh mklive.sh mkrootfs.sh mkplatformfs.sh mkimage.sh mknet.sh
printf '<!-- DO NOT EDIT, generated by make README.md -->\n\n' > README.md
cat README.md.in >> README.md
for script in build-x86-images mklive mkrootfs mkplatformfs mkimage mknet; do \
for script in mkiso mklive mkrootfs mkplatformfs mkimage mknet; do \
printf '### %s.sh\n\n```\n' "$${script}" >> README.md ; \
"./$${script}.sh" -h 2>/dev/null >> README.md ; \
printf '```\n\n' >> README.md ; \
done

build-x86-images.sh: mklive.sh
mkiso.sh: mklive.sh

checksum: distdir-$(DATECODE)
cd distdir-$(DATECODE)/ && sha256 * > sha256sum.txt
Expand All @@ -59,9 +60,9 @@ live-iso-all: $(ALL_LIVE_ISO)
live-iso-all-print:
@echo $(ALL_LIVE_ISO) | sed "s: :\n:g"

void-live-%.iso: build-x86-images.sh
void-live-%.iso: mkiso.sh
@[ -n "${CI}" ] && printf "::group::\x1b[32mBuilding $@...\x1b[0m\n" || true
$(SUDO) ./build-x86-images.sh -r $(REPOSITORY) -t $*
$(SUDO) ./mkiso.sh -r $(REPOSITORY) -t $* -- -P "$(LIVE_PLATFORMS)"
@[ -n "${CI}" ] && printf '::endgroup::\n' || true

rootfs-all: $(ALL_ROOTFS)
Expand Down
24 changes: 15 additions & 9 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions README.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
This repository contains several utilities:

* [*mklive.sh*](#mklivesh) - The Void Linux live image generator for x86
* [*build-x86-images.sh*](#build-x86-imagessh) - Wrapper script to generate bootable
and installable live images for x86
* [*mkiso.sh*](#mkisosh) - Wrapper script to generate bootable and installable live
images for i686, x86_64, and aarch64.
* [*mkrootfs.sh*](#mkrootfssh) - The Void Linux rootfs generator for all platforms
* [*mkplatformfs.sh*](#mkplatformfssh) - The Void Linux filesystem tool to produce
a rootfs for a particular platform
Expand All @@ -20,7 +20,7 @@ This repository contains several utilities:
#### Generating x86 live ISOs

To generate a live ISO like the officially-published ones, use
[*build-x86-images.sh*](#build-x86-imagessh). To generate a more basic live ISO
[*mkiso.sh*](#mkisosh). To generate a more basic live ISO
(which does not include things like `void-installer`), use [*mklive.sh*](#mklivesh).

#### Generating ROOTFS tarballs
Expand Down
Loading