Signed-off-by: Mateusz Maciejewski <mateusz.maciejewski@3mdeb.com>
This commit is contained in:
Mateusz Maciejewski
2025-04-29 16:50:07 +02:00
committed by Filip Lewiński
parent 47dd55defd
commit 3812df7a47
2 changed files with 26 additions and 12 deletions
+13 -8
View File
@@ -1,18 +1,23 @@
## Hello, Dasharo Universe! - Secure Boot test program
An UEFI hello-world program, but with intentionally-added delays: pre- and post;
output to capture in tests: `UEFI Hello, Dasharo Universe!`
### Welcome to Hello Dasharo Universe!
An UEFI hello-world program, but with delay, pre- and post.
Build prerequisites, for Fedora distrubution:
Build prerequisites for Fedora:
- mingw64-gcc
- openssl
- sbsigntools
Installation of mingw64-gcc compiler packages:
Installation of mingw64-gcc compiler, or any other required package on Fedora:
`sudo dnf install mingw64-gcc`
Building dist directory, containing complete set of files for BAD_INFLUE SecureBoot USB stick:
Building `dist/` sub-directory, containing complete set of files for BAD_INFLUE Secure Boot USB stick:
`make clean && make dist`
For more information on available Makefile targets:
`make help`
List of files created in `dist/` sub-directory:
- `cert_fake.der` - fake certificate file with bad contents.
- `cert_good.der` - proper certificate file, can be enrolled with Secure Boot menu.
- `hello-dasharo.efi` - unsigned program binary, can be executed with Secure Boot disabled.
- `hello-dasharo-signed-bad.efi` - program binary signed with some other certificate.
- `hello-dasharo-signed-good.efi` - program binary signed with `cert_good.der`.
For more information on available Makefile targets, please run `make help`.
+13 -4
View File
@@ -1,9 +1,18 @@
# Secure Boot
## sb_test_data.img
## BAD_INFLUE - Secure Boot test image
### sb_test_data.img features:
* Single FAT32 partition, labeled BAD_INFLUE, on MBR disk image
* Contains files from `../hello-dasharo/dist` directory
* Run `create_img.sh` to re-create
* Can be safely transferred with dd command to USB stick
### How to generate image:
1. Go to `../hello-dasharo/` directory.
2. Refer to `README.md` file located there on how to prepare contents od `dist/` sub-directory.
3. Go back here - `secure-boot/`
4. Run `create_img.sh`, observe the output, especially list of files transferred to the image.
5. Script execution should finish with `Image creation and setup completed successfully.`
### How to transfer image to USB stick:
1. Use `lsblk` command to identify target USB stick device node and any active mount points.
2. Use `sudo dd of=./sb_test_data.img if=/dev/X bs=1M status=progress` where X is identified target device node.
3. Use `sync` command to finalize write operations before stick removal.