From 4d2ac767c14222443c9c9d76e545c3728f1e21a2 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sun, 1 Mar 2026 21:32:35 +0100 Subject: [PATCH 1/2] CI: add manual uefi-only boot.bin build workflow Move the CI build for deployable uefi-only boot.bin artifacts to asahi-installer. Those are not tied in any way to commits in a single repository so use repository variables to determine name and used Linux and U-boot tags. Expected use is to trigger manual workflow runs after updating one or more repository variables. Signed-off-by: Janne Grunau --- .github/workflows/uefi-only-build.yaml | 89 ++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 .github/workflows/uefi-only-build.yaml diff --git a/.github/workflows/uefi-only-build.yaml b/.github/workflows/uefi-only-build.yaml new file mode 100644 index 0000000..9021edd --- /dev/null +++ b/.github/workflows/uefi-only-build.yaml @@ -0,0 +1,89 @@ +name: uefi-only-build + +# Controls when the action will run. +on: + # Triggers the workflow only on pull-requests when this file is changed. + # Intended use is to manually trigger runs after updating the repository + # variables `UEFI_DATE`, `UEFI_LINUX_TAG` or `UEFI_UBOOT_TAG`. + pull_request: + branches: [ main ] + paths: [ .github/workflows/uefi-only-build.yaml ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + uefi-only-boot-bin: + runs-on: ubuntu-latest + + env: + UEFI_ONLY_VERSION: uefi-only-${{ vars.UEFI_DATE }}-${{ vars.UEFI_LINUX_TAG }} + + steps: + - name: Checkout + uses: actions/checkout@v5 + with: + submodules: recursive + + - name: Checkout linux + uses: actions/checkout@v5 + with: + repository: AsahiLinux/linux + ref: ${{ vars.UEFI_LINUX_TAG }} + path: linux + sparse-checkout: 'arch/arm64/boot/dts/apple/' + + - name: Checkout u-boot + uses: actions/checkout@v5 + with: + repository: AsahiLinux/u-boot + ref: ${{ vars.UEFI_UBOOT_TAG }} + path: u-boot + + - name: Install aarch64-linux-gnu- toolchain + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y \ + gcc-aarch64-linux-gnu \ + libgnutls28-dev \ + device-tree-compiler + + - name: Install aarch64-unknown-none-softfloat rust target + run: | + rustup target install aarch64-unknown-none-softfloat + + - name: Build + run: | + cd m1n1 + make -k -j2 ARCH=aarch64-linux-gnu- RELEASE=1 + + - name: Update u-boot apple device trees + run: | + cp -f linux/arch/arm64/boot/dts/apple/*.dts \ + linux/arch/arm64/boot/dts/apple/*.dtsi \ + linux/arch/arm64/boot/dts/apple/*.h \ + u-boot/arch/arm/dts/ + + - name: Build u-boot + run: | + cd u-boot + make CROSS_COMPILE=aarch64-linux-gnu- apple_m1_defconfig + make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm -k -j2 + + - name: Create m1n1 uefi only boot.bin + run: | + mkdir -p out/esp/m1n1/ + gzip -k u-boot/u-boot-nodtb.bin + cat m1n1/build/m1n1.bin \ + u-boot/arch/arm/dts/t60*.dtb \ + u-boot/arch/arm/dts/t81*.dtb \ + u-boot/u-boot-nodtb.bin.gz \ + > out/esp/m1n1/boot.bin + cd out + zip -r ${{ env.UEFI_ONLY_VERSION }}.zip esp + + - uses: actions/upload-artifact@v4 + with: + name: uefi-only-boot.bin + path: | + out/${{ env.UEFI_ONLY_VERSION }}.zip From 60a0cddb27ba24b8542f84a97f0d251b50c6784c Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sun, 1 Mar 2026 23:29:21 +0100 Subject: [PATCH 2/2] CI: add manual uefi-only boot.bin deploy workflow This workflow deploys versioned uefi-only OS zip images for installer use. Since it depends on repository variables it will only run manually via workflow_dispatch. Signed-off-by: Janne Grunau --- .github/workflows/uefi-only-build.yaml | 2 ++ .github/workflows/uefi-only-deploy.yaml | 44 +++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .github/workflows/uefi-only-deploy.yaml diff --git a/.github/workflows/uefi-only-build.yaml b/.github/workflows/uefi-only-build.yaml index 9021edd..e6f1e87 100644 --- a/.github/workflows/uefi-only-build.yaml +++ b/.github/workflows/uefi-only-build.yaml @@ -11,6 +11,8 @@ on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: + # Allow being called from other workflows to deploy the artifact. + workflow_call: jobs: uefi-only-boot-bin: diff --git a/.github/workflows/uefi-only-deploy.yaml b/.github/workflows/uefi-only-deploy.yaml new file mode 100644 index 0000000..5f8207d --- /dev/null +++ b/.github/workflows/uefi-only-deploy.yaml @@ -0,0 +1,44 @@ +name: uefi-only-deploy + +on: + workflow_dispatch: + +env: + UEFI_ONLY_VERSION: uefi-only-${{ vars.UEFI_DATE }}-${{ vars.UEFI_LINUX_TAG }} + +jobs: + build: + uses: ./.github/workflows/uefi-only-build.yaml + + deploy: + needs: build + runs-on: ubuntu-latest + steps: + - name: Download artifact + uses: actions/download-artifact@v5 + with: + name: uefi-only-boot.bin + + - name: Deploy to Bunny + env: + PKG_URL: https://storage.bunnycdn.com/asahilinux/os + PKG_VER: ${{ env.UEFI_ONLY_VERSION }}.zip + ACCESS_KEY: ${{ secrets.BUNNY_TOKEN }} + run: | + if [ ! -e "${PKG_VER}" ]; then + echo "Package not found!" + ls -R + exit 1 + fi + + upload() { + curl -# --fail --request PUT \ + --url "${2}" \ + --variable %ACCESS_KEY \ + --expand-header 'AccessKey: {{ACCESS_KEY}}' \ + -H "Content-Type: ${3}" \ + -H "Accept: application/json" \ + --data-binary @${1} + } + + upload "${PKG_VER}" "${PKG_URL}/${PKG_VER}" "application/octet-stream"