|
29 | 29 | steps: |
30 | 30 | - name: Checkout repository and submodules |
31 | 31 | # Must happen first, else the LoongArch toolchain gets deleted (even with clean: false) |
32 | | - uses: actions/checkout@v4 |
| 32 | + uses: actions/checkout@v5 |
33 | 33 | with: |
34 | 34 | # Need fetch-depth: 0 to obtain the EDK2 stable tag |
35 | 35 | fetch-depth: 0 |
|
38 | 38 | - name: Install toolchains |
39 | 39 | run: | |
40 | 40 | sudo apt-get update |
41 | | - sudo apt-get -y --no-install-recommends install gcc-12-multilib gcc-12-aarch64-linux-gnu gcc-12-arm-linux-gnueabi gcc-12-riscv64-linux-gnu nasm genisoimage uuid-dev |
| 41 | + sudo apt-get -y --no-install-recommends install gcc-12-multilib gcc-12-aarch64-linux-gnu gcc-12-arm-linux-gnueabi gcc-12-riscv64-linux-gnu nasm genisoimage uuid-dev dosfstools mtools |
42 | 42 | sudo ln -s /usr/bin/aarch64-linux-gnu-gcc-12 /usr/bin/aarch64-linux-gnu-gcc |
43 | 43 | sudo ln -s /usr/bin/aarch64-linux-gnu-gcc-ar-12 /usr/bin/aarch64-linux-gnu-gcc-ar |
44 | 44 | sudo ln -s /usr/bin/arm-linux-gnueabi-gcc-12 /usr/bin/arm-linux-gnueabi-gcc |
@@ -101,12 +101,17 @@ jobs: |
101 | 101 | - name: Create ISO filesystem structure |
102 | 102 | run: | |
103 | 103 | for BUILD_TYPE in ${{ env.BUILD_TYPES }}; do |
104 | | - mkdir -p $BUILD_TYPE/efi/boot |
| 104 | + # Follow the casing convention of https://uefi.org/specs/UEFI/2.11/03_Boot_Manager.html#removable-media-boot-behavior |
| 105 | + # which means uppercase for everything except the 'x' in 'BOOTx64.EFI' |
| 106 | + mkdir -p $BUILD_TYPE/EFI/BOOT |
105 | 107 | for ARCH in ${{ env.ARCHS }}; do |
106 | | - mv edk2/Build/Shell/${BUILD_TYPE}_${{ env.COMPILER }}/$ARCH/Shell_${{ env.FULL_SHELL_GUID }}.efi $BUILD_TYPE/efi/boot/boot${ARCH,,}.efi |
| 108 | + mv edk2/Build/Shell/${BUILD_TYPE}_${{ env.COMPILER }}/$ARCH/Shell_${{ env.FULL_SHELL_GUID }}.efi $BUILD_TYPE/EFI/BOOT/BOOT$ARCH.EFI |
107 | 109 | done |
108 | | - if [ -f $BUILD_TYPE/efi/boot/bootaarch64.efi ]; then |
109 | | - mv $BUILD_TYPE/efi/boot/bootaarch64.efi $BUILD_TYPE/efi/boot/bootaa64.efi |
| 110 | + if [ -f $BUILD_TYPE/EFI/BOOT/BOOTAARCH64.EFI ]; then |
| 111 | + mv $BUILD_TYPE/EFI/BOOT/BOOTAARCH64.EFI $BUILD_TYPE/EFI/BOOT/BOOTAA64.EFI |
| 112 | + fi |
| 113 | + if [ -f $BUILD_TYPE/EFI/BOOT/BOOTX64.EFI ]; then |
| 114 | + mv $BUILD_TYPE/EFI/BOOT/BOOTX64.EFI $BUILD_TYPE/EFI/BOOT/BOOTx64.EFI |
110 | 115 | fi |
111 | 116 | printf "*** UEFI Shell v%s, release %s%s ***\n\n" ${{ steps.set_version.outputs.shell_version }} ${{ steps.set_version.outputs.shell_release }} "$( [ $BUILD_TYPE == DEBUG ] && echo ' (DEBUG BUILD)')" > $BUILD_TYPE/README.txt |
112 | 117 | printf "This bootable image contains builds of the official UEFI Shell, as provided by\n" >> $BUILD_TYPE/README.txt |
@@ -139,22 +144,34 @@ jobs: |
139 | 144 | printf "</release>\n" >> Version.xml |
140 | 145 | done |
141 | 146 |
|
| 147 | + - name: Create the El-Torito FAT32 disk images |
| 148 | + run: | |
| 149 | + for BUILD_TYPE in ${{ env.BUILD_TYPES }}; do |
| 150 | + # genisoimage requires the El-Torito images to be within the source directory folder even though they |
| 151 | + # are completely independent of the ISO-9660 CD-ROM volumes (and not part of the visible file system), |
| 152 | + # so we place them into a '[BOOT]/' subfolder that follows 7-zip's virtual image presentation logic. |
| 153 | + mkdir "$BUILD_TYPE/[BOOT]" |
| 154 | + dd if=/dev/zero of="$BUILD_TYPE/[BOOT]/Boot-NoEmul.img" bs=1M count=8 |
| 155 | + mkdosfs "$BUILD_TYPE/[BOOT]/Boot-NoEmul.img" -n "UEFI SHELL" |
| 156 | + mcopy -s -i "$BUILD_TYPE/[BOOT]/Boot-NoEmul.img" $BUILD_TYPE/EFI/ :: |
| 157 | + done |
| 158 | +
|
142 | 159 | - name: Generate ISO images |
143 | 160 | run: | |
144 | 161 | for BUILD_TYPE in ${{ env.BUILD_TYPES }}; do |
145 | | - genisoimage -v -V "UEFI SHELL ${{ steps.set_version.outputs.shell_version }} ${{ steps.set_version.outputs.shell_release }} ($BUILD_TYPE)" -JR -o "UEFI-Shell-${{ steps.set_version.outputs.shell_version }}-${{ steps.set_version.outputs.shell_release }}-$BUILD_TYPE.iso" $BUILD_TYPE |
| 162 | + genisoimage -V "UEFI SHELL ${{ steps.set_version.outputs.shell_version }} ${{ steps.set_version.outputs.shell_release }} ($BUILD_TYPE)" -e "[BOOT]/Boot-NoEmul.img" -no-emul-boot -JR -o "UEFI-Shell-${{ steps.set_version.outputs.shell_version }}-${{ steps.set_version.outputs.shell_release }}-$BUILD_TYPE.iso" $BUILD_TYPE |
146 | 163 | done |
147 | 164 |
|
148 | 165 | - name: Display SHA-256 |
149 | 166 | run: | |
150 | 167 | for BUILD_TYPE in ${{ env.BUILD_TYPES }}; do |
151 | | - sha256sum $BUILD_TYPE/efi/boot/*.efi |
| 168 | + sha256sum $BUILD_TYPE/EFI/BOOT/*.EFI |
152 | 169 | done |
153 | 170 | sha256sum *.iso |
154 | 171 | sha256sum *.efi |
155 | 172 |
|
156 | 173 | - name: Upload ISO artifacts |
157 | | - uses: actions/upload-artifact@v4 |
| 174 | + uses: actions/upload-artifact@v5 |
158 | 175 | with: |
159 | 176 | name: ISOs |
160 | 177 | path: ./*.iso |
|
0 commit comments