-
Notifications
You must be signed in to change notification settings - Fork 36
390 lines (332 loc) · 14.2 KB
/
Copy pathacs_build_check.yml
File metadata and controls
390 lines (332 loc) · 14.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
name: SYSARCH-ACS Integration Build
on:
push:
branches: # trigger on push to master
- main
pull_request: # trigger on pull requests to master
branches:
- main
workflow_dispatch: # to dispatch from Github Actions
jobs:
build_acpi:
name: BSA-ACS UEFI build for ACPI target
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y git build-essential nasm
- name: Download edk2 and its submodules
run: |
git clone --recursive https://github.com/tianocore/edk2
cd edk2
git checkout edk2-stable202505
cd ..
git clone https://github.com/tianocore/edk2-libc edk2/edk2-libc
- name: Checkout sysarch-acs repository
uses: actions/checkout@v4
with:
path: 'edk2/ShellPkg/Application/sysarch-acs'
- name: Download Arm GCC cross-compiler
run: |
mkdir -p /opt/cross
cd /opt/cross
wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz
tar -xf arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz
- name: Set up EDK2 environment and build Bsa.efi
run: |
cd edk2
export GCC49_AARCH64_PREFIX=/opt/cross/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
export PACKAGES_PATH=$PWD/edk2-libc
source edksetup.sh
make -C BaseTools/Source/C
source ShellPkg/Application/sysarch-acs/tools/scripts/acsbuild.sh bsa
- name: Save Bsa.efi as an artifact
uses: actions/upload-artifact@v4
with:
name: Bsa_acpi_target.efi
path: edk2/Build/Shell/DEBUG_GCC49/AARCH64/Bsa.efi
if-no-files-found: error
build_dt:
name: BSA-ACS UEFI build for DT target
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y git build-essential nasm
- name: Download edk2 and its submodules
run: |
git clone --recursive https://github.com/tianocore/edk2
cd edk2
git checkout edk2-stable202505
cd ..
git clone https://github.com/tianocore/edk2-libc edk2/edk2-libc
- name: Checkout sysarch-acs repository
uses: actions/checkout@v4
with:
path: 'edk2/ShellPkg/Application/sysarch-acs'
- name: Download Arm GCC cross-compiler
run: |
mkdir -p /opt/cross
cd /opt/cross
wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz
tar -xf arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz
- name: Set up EDK2 environment and build Bsa.efi
run: |
cd edk2
export GCC49_AARCH64_PREFIX=/opt/cross/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
export PACKAGES_PATH=$PWD/edk2-libc
source edksetup.sh
make -C BaseTools/Source/C
source ShellPkg/Application/sysarch-acs/tools/scripts/acsbuild.sh bsa_dt
- name: Save Bsa.efi as an artifact
uses: actions/upload-artifact@v4
with:
name: Bsa_dt_target.efi
path: edk2/Build/Shell/DEBUG_GCC49/AARCH64/Bsa.efi
if-no-files-found: error
build_sbsa_acpi:
name: SBSA-ACS UEFI build for ACPI target
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y git build-essential nasm
- name: Download edk2 and its submodules
run: |
git clone --recursive https://github.com/tianocore/edk2
cd edk2
git checkout edk2-stable202505
cd ..
git clone https://github.com/tianocore/edk2-libc edk2/edk2-libc
- name: Checkout sysarch-acs repository
uses: actions/checkout@v4
with:
path: 'edk2/ShellPkg/Application/sysarch-acs'
- name: Download Arm GCC cross-compiler
run: |
mkdir -p /opt/cross
cd /opt/cross
wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz
tar -xf arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz
- name: Set up EDK2 environment and build Sbsa.efi
run: |
cd edk2
export GCC49_AARCH64_PREFIX=/opt/cross/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
export PACKAGES_PATH=$PWD/edk2-libc
source edksetup.sh
make -C BaseTools/Source/C
source ShellPkg/Application/sysarch-acs/tools/scripts/acsbuild.sh sbsa
ls Build/Shell/DEBUG_GCC49/AARCH64/Sbsa.efi
- name: Save Sbsa.efi as an artifact
uses: actions/upload-artifact@v4
with:
name: Sbsa.efi
path: edk2/Build/Shell/DEBUG_GCC49/AARCH64/Sbsa.efi
if-no-files-found: error
build_drtm_acpi:
name: DRTM-ACS UEFI build for ACPI target
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y git build-essential nasm
- name: Download edk2 and its submodules
run: |
git clone --recursive https://github.com/tianocore/edk2
cd edk2
git checkout edk2-stable202505
cd ..
git clone https://github.com/tianocore/edk2-libc edk2/edk2-libc
- name: Checkout sysarch-acs repository
uses: actions/checkout@v4
with:
path: 'edk2/ShellPkg/Application/sysarch-acs'
- name: Download Arm GCC cross-compiler
run: |
mkdir -p /opt/cross
cd /opt/cross
wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz
tar -xf arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz
- name: Set up EDK2 environment and build Drtm.efi
run: |
cd edk2
export GCC49_AARCH64_PREFIX=/opt/cross/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
export PACKAGES_PATH=$PWD/edk2-libc
source edksetup.sh
make -C BaseTools/Source/C
source ShellPkg/Application/sysarch-acs/tools/scripts/acsbuild.sh drtm
- name: Save Drtm.efi as an artifact
uses: actions/upload-artifact@v4
with:
name: Drtm_acpi_target.efi
path: edk2/Build/Shell/DEBUG_GCC49/AARCH64/Drtm.efi
if-no-files-found: error
build_mpam_acpi:
name: MPAM-ACS UEFI build for ACPI target
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y git build-essential nasm
- name: Download edk2 and its submodules
run: |
git clone --recursive https://github.com/tianocore/edk2
cd edk2
git checkout edk2-stable202505
cd ..
git clone https://github.com/tianocore/edk2-libc edk2/edk2-libc
- name: Checkout sysarch-acs repository
uses: actions/checkout@v4
with:
path: 'edk2/ShellPkg/Application/sysarch-acs'
- name: Download Arm GCC cross-compiler
run: |
mkdir -p /opt/cross
cd /opt/cross
wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz
tar -xf arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz
- name: Set up EDK2 environment and build Mpam.efi
run: |
cd edk2
export GCC49_AARCH64_PREFIX=/opt/cross/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
export PACKAGES_PATH=$PWD/edk2-libc
source edksetup.sh
make -C BaseTools/Source/C
source ShellPkg/Application/sysarch-acs/tools/scripts/acsbuild.sh mpam
- name: Save Mpam.efi as an artifact
uses: actions/upload-artifact@v4
with:
name: Mpam_acpi_target.efi
path: edk2/Build/Shell/DEBUG_GCC49/AARCH64/Mpam.efi
if-no-files-found: error
bsa-baremetal-compilation:
name: BSA Baremetal CMake compilation check
runs-on: ubuntu-22.04
steps:
- name: Checkout sysarch-acs repository
uses: actions/checkout@v4
- name: Remove build folder if present in sysarch-acs
run: |
rm -rf build
- name: Download Arm GCC cross-compiler
run: |
mkdir -p /opt/cross
cd /opt/cross
wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-elf.tar.xz
tar -xf arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-elf.tar.xz
- name: Compile BSA Baremetal ACS for RDN2 Platform
run: |
export CROSS_COMPILE=/opt/cross/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-elf/bin/aarch64-none-elf-
mkdir build
cd build
cmake ../ -G "Unix Makefiles" -DTARGET=RDN2
make bsa
- name: Save Baremetel bsa.bin as an artifact
uses: actions/upload-artifact@v4
with:
name: Bsa_baremetal_RDN2.bin
path: build/bsa_build/output/bsa.bin
if-no-files-found: error
sbsa-baremetal-compilation:
name: SBSA-ACS Baremetal CMake compilation
runs-on: ubuntu-22.04
steps:
- name: Checkout sysarch-acs repository
uses: actions/checkout@v4
- name: Remove build folder if present in sysarch-acs
run: |
rm -rf build
- name: Download Arm GCC cross-compiler
run: |
mkdir -p /opt/cross
cd /opt/cross
wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-elf.tar.xz
tar -xf arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-elf.tar.xz
- name: Compile SBSA Baremetal ACS for RDN2 Platform
run: |
export CROSS_COMPILE=/opt/cross/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-elf/bin/aarch64-none-elf-
mkdir build
cd build
cmake ../ -G "Unix Makefiles" -DTARGET=RDN2
make sbsa
- name: Save Baremetel sbsa.bin as an artifact
uses: actions/upload-artifact@v4
with:
name: Sbsa_baremetal_RDN2.bin
path: build/sbsa_build/output/sbsa.bin
if-no-files-found: error
linux-compilation:
name: BSA, SBSA and PC-BSA linux compilation
runs-on: ubuntu-22.04
steps:
- name: Checkout sysarch-acs repository
uses: actions/checkout@v4
- name: Download Linux ACS
run: |
cd ..
wget https://gitlab.arm.com/linux-arm/linux-acs/-/raw/master/acs-drv/files/build.sh
chmod +x build.sh
ls
- name: Compile BSA, SBSA and PC-BSA Linux ACS module and app
run: |
cd ..
mkdir linux-bsa
mkdir linux-sbsa
mkdir linux-pcbsa
./build.sh
cp build/bsa_acs.ko /home/runner/work/sysarch-acs/linux-bsa/
cp build/bsa_app /home/runner/work/sysarch-acs/linux-bsa/
cp build/sbsa_acs.ko /home/runner/work/sysarch-acs/linux-sbsa/
cp build/sbsa_app /home/runner/work/sysarch-acs/linux-sbsa/
cp build/pcbsa_acs.ko /home/runner/work/sysarch-acs/linux-pcbsa/
cp build/pcbsa_app /home/runner/work/sysarch-acs/linux-pcbsa/
- name: Save BSA kernel module and app as an artifact
uses: actions/upload-artifact@v4
with:
name: BSA Kernel Module and App
path: /home/runner/work/sysarch-acs/linux-bsa/*
if-no-files-found: error
- name: Save SBSA kernel module and app as an artifact
uses: actions/upload-artifact@v4
with:
name: SBSA Kernel Module and App
path: /home/runner/work/sysarch-acs/linux-sbsa/*
if-no-files-found: error
- name: Save PC-BSA kernel module and app as an artifact
uses: actions/upload-artifact@v4
with:
name: PC-BSA Kernel Module and App
path: /home/runner/work/sysarch-acs/linux-pcbsa/*
if-no-files-found: error
build_pcbsa:
name: PCBSA-ACS UEFI build for ACPI target
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y git build-essential nasm
- name: Download edk2 and its submodules
run: |
git clone --recursive https://github.com/tianocore/edk2
cd edk2
git checkout edk2-stable202505
cd ..
git clone https://github.com/tianocore/edk2-libc edk2/edk2-libc
- name: Checkout sysarch-acs repository
uses: actions/checkout@v4
with:
path: 'edk2/ShellPkg/Application/sysarch-acs'
- name: Download Arm GCC cross-compiler
run: |
mkdir -p /opt/cross
cd /opt/cross
wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz
tar -xf arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz
- name: Set up EDK2 environment and build PC_Bsa.efi
run: |
cd edk2
export GCC49_AARCH64_PREFIX=/opt/cross/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
export PACKAGES_PATH=$PWD/edk2-libc
source edksetup.sh
make -C BaseTools/Source/C
source ShellPkg/Application/sysarch-acs/tools/scripts/acsbuild.sh pc_bsa
- name: Save PC_Bsa.efi as an artifact
uses: actions/upload-artifact@v4
with:
name: PC_Bsa_acpi_target.efi
path: edk2/Build/Shell/DEBUG_GCC49/AARCH64/PC_Bsa.efi
if-no-files-found: error