You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -2062,56 +2062,60 @@ The following variables must be set in your `.config` file when using this featu
2062
2062
-`WOLFBOOT_LOAD_BASE`: the address where wolfboot will be loaded in RAM after the first initialization phase
2063
2063
2064
2064
While Intel FSP aims to abstract away specific machine details, you still need
2065
-
some machine-specific code. In the next section we show how to retrieve the
2066
-
target-specific code for qemu. Refer to the Intel Integration Guide of the selected
2067
-
silicon for more information.
2065
+
some machine-specific code. Current supported targets are QEMU and the TigerLake based Kontron VX3060-S2 board.
2066
+
Refer to the Intel Integration Guide of the selected silicon for more information.
2068
2067
2069
2068
Note:
2070
2069
2071
2070
- This feature requires `NASM` to be installed on the machine building wolfBoot.
2072
2071
2073
2072
2074
-
### Running on 64-bit Qemu
2073
+
### Running on 64-bit QEMU
2075
2074
2076
-
An example configuration file is available in `config/examples/x86_fsp_qemu.config`.
2075
+
Two example configuration files are available: `config/examples/x86_fsp_qemu.config` and `config/examples/x86_fsp_qemu_seal.config`.
2076
+
Both will try to load a 64bit ELF/Multiboot2 payload from the emulated sata drive.
2077
+
The second one is an example of configuration that also do measure boot and seal/unseal secrets using a TPM.
2078
+
2079
+
A test ELF/Multiboot2 image is provided as well. To test `config/examples/x86_fsp_qemu.config` use the following steps:
2077
2080
2078
-
Assuming that you have compiled a linux kernel that can boot on qemu, you can verify
2079
-
and stage it by running the following commands:
2080
2081
2081
2082
```
2082
2083
# Copy the example configuration for this target
2083
2084
cp config/examples/x86_fsp_qemu.config .config
2084
2085
2085
2086
# Create necessary Intel FSP binaries from edk2 repo
2086
-
tools/x86_fsp/qemu/qemu_build_fsp.sh
2087
+
./tools/x86_fsp/qemu/qemu_build_fsp.sh
2087
2088
2088
2089
# build wolfboot
2089
2090
make
2090
2091
2091
-
# The next script needs to be run from wolboot root folder and assumes your
2092
-
# kernel is in th root folder, named bzImage
2093
-
# If this is not the case, change the path in the script accordingly
2094
-
tools/x86_fsp/qemu/make_hd.sh
2092
+
# make test-app
2093
+
make test-app/image.elf
2095
2094
2096
-
# Run wolfBoot + Linux in qemu
2097
-
tools/scripts/qemu64/qemu64.sh
2095
+
# make_hd.sh sign the image, creates a file-based hard disk image with GPT table and raw partitions and then copies the signed images into the partitions.
@@ -2245,44 +2276,75 @@ Total partitions on disk0: 2
2245
2276
Checking primary OS image in 0,0...
2246
2277
Checking secondary OS image in 0,1...
2247
2278
Versions, A:1 B:2
2279
+
Load address 0x222FA00
2248
2280
Attempting boot from partition B
2249
-
Image size 11982512
2250
-
Firmware Valid
2251
-
Booting at 5000100
2252
-
linux payload
2281
+
mem: [ 0x222FA00, 0x2241DC8 ] - ELF (0x123C8)
2282
+
Loading image from disk...done.
2283
+
Image size 74696
2284
+
Checking image integrity...done.
2285
+
Verifying image signature...done.
2286
+
Firmware Valid.
2287
+
Booting at 222FB00
2288
+
mem: [ 0x100, 0x1E0 ] - MPTABLE (0xE0)
2289
+
Loading elf at 0x222FB00
2290
+
Found valid elf64 (little endian)
2291
+
Program Headers 7 (size 56)
2292
+
Load 504 bytes (offset 0x0) to 0x400000 (p 0x400000)
2293
+
Load 3999 bytes (offset 0x1000) to 0x401000 (p 0x401000)
2294
+
Load 1952 bytes (offset 0x2000) to 0x402000 (p 0x402000)
2295
+
Load 32 bytes (offset 0x3000) to 0x403000 (p 0x403000)
2296
+
Entry point 0x401000
2297
+
Elf loaded (ret 0), entry 0x0_401000
2298
+
mb2 header found at 2232B00
2253
2299
booting...
2254
-
Linux version 5.17.15 (arch@wb-hg-2) (x86_64-linux-gcc.br_real (Buildroot toolchains.bootlin.com-2021.11-5) 11.2.0, GNU ld (GNU Binutils) 2.37) #24 PREEMPT Wed May 17 13:47:24 UTC 2023
2300
+
wolfBoot QEMU x86 FSP test app
2255
2301
```
2256
2302
2257
-
### Running on 64-bit Qemu with swtpm (TPM emulator)
2258
-
2259
-
The example configuration for this setup can be found in
2260
-
`config/examples/x86_fsp_qemu_tpm.config`.
2303
+
### Running on QEMU with swtpm (TPM emulator)
2261
2304
2262
-
First step: [clone and install swtpm](https://github.com/stefanberger/swtpm), a TPM emulator that can be connected to qemu
2263
-
guest VMs. This TPM emulator will create a memory-mapped I/O device.
2305
+
First step: [clone and install swtpm](https://github.com/stefanberger/swtpm), a
2306
+
TPM emulator that can be connected to qemu guest VMs. This TPM emulator will
2307
+
create a memory-mapped I/O device.
2264
2308
2265
-
The other steps to follow are:
2309
+
A small note is that `config/examples/x86_fsp_qemu_seal.config` showcases two
2310
+
different key ecc size of 384 and 256 of authentication for image verification
# The next script needs to be run from wolboot root folder and assumes your
2278
-
# kernel is in wolfBoot's root folder. The file should be named `bzImage`.
2279
-
# If this is not the case, change the path in the script accordingly
2340
+
# make test-app
2341
+
make test-app/image.elf
2280
2342
2281
-
tools/x86_fsp/qemu/make_hd.sh
2343
+
# make_hd.sh sign the image, creates a file-based hard disk image with GPT table and raw partitions and then copy the signed images into the partitions.
0 commit comments