Skip to content

Commit 9cda78c

Browse files
committed
CI: add manual uefionly boot.bin build
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 <[email protected]>
1 parent 7f3725e commit 9cda78c

1 file changed

Lines changed: 91 additions & 0 deletions

File tree

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: uefi-only-build
2+
3+
# Controls when the action will run.
4+
on:
5+
# Triggers the workflow only on pull-requests when this file is changed.
6+
# Intended use is to manually trigger runs after updating the repository
7+
# variables `UEFI_DATE`, `UEFI_LINUX_TAG` or `UEFI_UBOOT_TAG`.
8+
pull_request:
9+
branches: [ main ]
10+
paths: [ .github/workflows/uefi-only-build.yaml ]
11+
12+
# Allows you to run this workflow manually from the Actions tab
13+
workflow_dispatch:
14+
15+
jobs:
16+
uefi-only-boot-bin:
17+
runs-on: ubuntu-latest
18+
19+
env:
20+
UEFI_DATE: ${{ vars.UEFI_DATE }}
21+
UEFI_LINUX_TAG: ${{ vars.UEFI_LINUX_TAG }}
22+
UEFI_UBOOT_TAG: ${{ vars.UEFI_UBOOT_TAG }}
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v5
27+
with:
28+
submodules: recursive
29+
30+
- name: Checkout linux
31+
uses: actions/checkout@v5
32+
with:
33+
repository: AsahiLinux/linux
34+
ref: ${{ env.UEFI_LINUX_TAG }}
35+
path: linux
36+
sparse-checkout: 'arch/arm64/boot/dts/apple/'
37+
38+
- name: Checkout u-boot
39+
uses: actions/checkout@v5
40+
with:
41+
repository: AsahiLinux/u-boot
42+
ref: ${{ env.UEFI_UBOOT_TAG }}
43+
path: u-boot
44+
45+
- name: Install aarch64-linux-gnu- toolchain
46+
run: |
47+
sudo apt-get update
48+
sudo apt-get install --no-install-recommends -y \
49+
gcc-aarch64-linux-gnu \
50+
libgnutls28-dev \
51+
device-tree-compiler
52+
53+
- name: Install aarch64-unknown-none-softfloat rust target
54+
run: |
55+
rustup target install aarch64-unknown-none-softfloat
56+
57+
- name: Build
58+
run: |
59+
cd m1n1
60+
make -k -j2 ARCH=aarch64-linux-gnu- RELEASE=1
61+
62+
- name: Update u-boot apple device trees
63+
run: |
64+
cp -f linux/arch/arm64/boot/dts/apple/*.dts \
65+
linux/arch/arm64/boot/dts/apple/*.dtsi \
66+
linux/arch/arm64/boot/dts/apple/*.h \
67+
u-boot/arch/arm/dts/
68+
69+
- name: Build u-boot
70+
run: |
71+
cd u-boot
72+
make CROSS_COMPILE=aarch64-linux-gnu- apple_m1_defconfig
73+
make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm -k -j2
74+
75+
- name: Create m1n1 uefi only boot.bin
76+
run: |
77+
mkdir -p out/esp/m1n1/
78+
gzip -k u-boot/u-boot-nodtb.bin
79+
cat m1n1/build/m1n1.bin \
80+
u-boot/arch/arm/dts/t60*.dtb \
81+
u-boot/arch/arm/dts/t81*.dtb \
82+
u-boot/u-boot-nodtb.bin.gz \
83+
> out/esp/m1n1/boot.bin
84+
cd out
85+
zip -r uefi-only-${{ env.UEFI_DATE }}-${{ env.UEFI_LINUX_TAG }}.zip esp
86+
87+
- uses: actions/upload-artifact@v4
88+
with:
89+
name: ci-uefi-only-${{ env.UEFI_DATE }}-${{ env.UEFI_LINUX_TAG }}
90+
path: |
91+
out/uefi-only-${{ env.UEFI_DATE }}-${{ env.UEFI_LINUX_TAG }}.zip

0 commit comments

Comments
 (0)