Skip to content

Commit 54d2c7f

Browse files
committed
CI: add target to build UEFI-only boot.bin
u-boot and linux should be built using specific tags but let's try this first to avoid forgetting updating tags. The workflow runs only on main and for pull request touching it to avoid failures in pull requests due to u-boot and linux changes. Signed-off-by: Janne Grunau <[email protected]>
1 parent 9caeb84 commit 54d2c7f

1 file changed

Lines changed: 81 additions & 0 deletions

File tree

.github/workflows/installer.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: installer
4+
5+
# Controls when the action will run.
6+
on:
7+
# Triggers the workflow on main branch. Build errors are catched in the
8+
# build workflow so failures here are likely caused by the external
9+
# sources. No need to run this on pull-requests unless this file is changed.
10+
push:
11+
branches: [ main ]
12+
pull_request:
13+
branches: [ main ]
14+
paths: [ .github/workflows/installer.yml ]
15+
16+
# Allows you to run this workflow manually from the Actions tab
17+
workflow_dispatch:
18+
19+
jobs:
20+
uefi-only-boot-bin:
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v5
25+
with:
26+
submodules: recursive
27+
28+
- name: Install aarch64-linux-gnu- toolchain
29+
run: |
30+
sudo apt-get update
31+
sudo apt-get install --no-install-recommends -y \
32+
gcc-aarch64-linux-gnu \
33+
libgnutls28-dev \
34+
device-tree-compiler
35+
36+
- name: Install nightly rust
37+
run: |
38+
export RUSTUP_TOOLCHAIN=stable
39+
rustup target install aarch64-unknown-none-softfloat
40+
41+
- name: Build
42+
run: make -k -j2 ARCH=aarch64-linux-gnu- RELEASE=1
43+
44+
- name: Fetch u-boot and downstream device trees
45+
run: |
46+
mkdir -p uefi-only
47+
git clone --depth 1 --no-tags --single-branch -b asahi-releng \
48+
https://github.com/AsahiLinux/u-boot.git uefi-only/u-boot
49+
git clone --depth=1 --no-tags --single-branch -b asahi \
50+
--no-checkout --filter=tree:0 \
51+
https://github.com/AsahiLinux/linux.git uefi-only/linux
52+
cd uefi-only/linux
53+
git sparse-checkout set --no-cone /arch/arm64/boot/dts/apple/
54+
git checkout
55+
56+
- name: Update u-boot apple device trees
57+
run: |
58+
cp -f uefi-only/linux/arch/arm64/boot/dts/apple/*.dts \
59+
uefi-only/linux/arch/arm64/boot/dts/apple/*.dtsi \
60+
uefi-only/linux/arch/arm64/boot/dts/apple/*.h \
61+
uefi-only/u-boot/arch/arm/dts/
62+
63+
- name: Build u-boot
64+
run: |
65+
cd uefi-only/u-boot
66+
make CROSS_COMPILE=aarch64-linux-gnu- apple_m1_defconfig
67+
make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm -k -j2
68+
69+
- name: Create m1n1 uefi only boot.bin
70+
run: |
71+
gzip -k uefi-only/u-boot/u-boot-nodtb.bin
72+
cat build/m1n1.bin \
73+
uefi-only/u-boot/arch/arm/dts/t60*.dtb \
74+
uefi-only/u-boot/arch/arm/dts/t81*.dtb \
75+
> uefi-only/boot.bin
76+
77+
- uses: actions/upload-artifact@v4
78+
with:
79+
name: uefi-only_boot.bin
80+
path: |
81+
uefi-only/boot.bin

0 commit comments

Comments
 (0)