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