Skip to content

Commit 750f06c

Browse files
Actually, homebrew does ship EDK2 with qemu-system-aarch64
1 parent db2c0ab commit 750f06c

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

exercise-book/src/building-linux-kernel-driver.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,15 @@ wget https://cdimage.debian.org/images/cloud/bookworm/20250316-2053/debian-12-no
2929

3030
## Task 1a - Fetch the BIOS (AArch64 only)
3131

32-
If you are going to use AArch64, you'll need a UEFI boot-loader because QEMU
33-
doesn't come with one (or at least, the QEMU in homebrew that I used didn't come
34-
with one).
35-
36-
Download it from <https://gist.githubusercontent.com/theboreddev/5f79f86a0f163e4a1f9df919da5eea20/raw/f546faea68f4149c06cca88fa67ace07a3758268/QEMU_EFI-a096471-edk2-stable202011.tar.gz> and unpack it.
37-
38-
```bash
39-
wget https://gist.githubusercontent.com/theboreddev/5f79f86a0f163e4a1f9df919da5eea20/raw/f546faea68f4149c06cca88fa67ace07a3758268/QEMU_EFI-a096471-edk2-stable202011.tar.gz
40-
tar xvf QEMU_EFI-a096471-edk2-stable202011.tar.gz
41-
```
42-
43-
(Windows users, use your favourite tools for this)
32+
If you are going to use AArch64, you'll need a UEFI boot-loader. On macOS,
33+
homebrew installs a copy of [EDK2](https://github.com/tianocore/edk2), which is
34+
fine for our use-case. On my machine it was installed into
35+
`/opt/homebrew/Cellar/qemu/9.2.2/share/qemu/edk2-aarch64-code.fd`. You'll need
36+
to have a look in your QEMU installation directory to find where your copy is.
37+
Once you have found it, copy it to `./QEMU_EFI.fd`, which is what the following
38+
`qemu-system-aarch64` command lines expect.
39+
40+
When emulating x86-64, QEMU uses a copy of SeaBIOS automatically.
4441

4542
## Task 2 - Resize the disk image
4643

0 commit comments

Comments
 (0)