Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
image efi-part.vfat {
vfat {
file EFI {
image = "efi-part/EFI"
}
file zImage {
image = "zImage"
}
}
size = 128M
}
image disk.img {
hdimage {
partition-table-type = "gpt"
}
partition boot {
image = "efi-part.vfat"
partition-type-uuid = U
offset = 32K
bootable = true
}
partition root {
partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3
image = "rootfs.ext2"
}
}

View File

@@ -0,0 +1,6 @@
set default="0"
set timeout="5"
menuentry "Buildroot" {
linux /zImage root=PARTLABEL=root rootwait
}

View File

@@ -0,0 +1,2 @@
CONFIG_TEE=y
CONFIG_OPTEE=y

View File

@@ -0,0 +1,11 @@
#!/bin/sh
set -eu
BOARD_DIR=$(dirname "$0")
# Create flash.bin TF-A FIP image from bl1.bin and fip.bin
dd if="${BINARIES_DIR}/bl1.bin" of="${BINARIES_DIR}/flash.bin" bs=1M
dd if="${BINARIES_DIR}/fip.bin" of="${BINARIES_DIR}/flash.bin" seek=64 bs=4096 conv=notrunc
# Override the default GRUB configuration file with our own.
cp -f "${BOARD_DIR}/grub.cfg" "${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg"

View File

@@ -0,0 +1,70 @@
Introduction
============
The qemu_arm_ebbr_defconfig is meant to illustrate some aspects of the Arm
EBBR specification[1] and the Arm SystemReady IR[2] compliance program.
It allows building a 32b ARMv7-A U-Boot based firmware implementing the subset
of UEFI defined by EBBR, as well as a Linux OS disk image booting with UEFI, to
run on Qemu.
Building
========
$ make qemu_arm_ebbr_defconfig
$ make
Generated files under output/images:
* flash.bin: A firmware image comprising TF-A, OP-TEE and the U-Boot bootloader.
* disk.img: An OS disk image comprising the GRUB bootloader, the Linux kernel
and the root filesystem.
Running under Qemu
==================
Run the emulation with:
qemu-system-arm \
-M virt,secure=on,acpi=off \
-bios output/images/flash.bin \
-cpu cortex-a15 \
-device virtio-blk-device,drive=hd0 \
-device virtio-net-device,netdev=eth0 \
-device virtio-rng-device,rng=rng0 \
-drive file=output/images/disk.img,if=none,format=raw,id=hd0 \
-m 1024 \
-netdev user,id=eth0 \
-nographic \
-object rng-random,filename=/dev/urandom,id=rng0 \
-rtc base=utc,clock=host \
-smp 2 # qemu_arm_ebbr_defconfig
The login prompt will appear in the terminal that started Qemu.
Using the EBBR firmware to run another OS under Qemu
----------------------------------------------------
It is possible to use the generated firmware binary to run another OS
supporting the EBBR specification.
To run another OS on emulation using a live or pre-installed image, use the same
Qemu command line as for the generated OS but adapt the OS image path in the
-drive stanza.
The 32b Arm ACS-IR image[3] is an example of a pre-installed OS image.
Linux distributions such as Debian or openSUSE provide a pre-installed OS
image.
Miscellaneous
=============
This configuration is inspired by the qemu_arm_vexpress_tz_defconfig, the
qemu_aarch64_ebbr_defconfig and the Arm SystemReady IR IoT Integration, Test,
and Certification Guide[4].
Firmware update is currently not supported.
[1]: https://github.com/ARM-software/ebbr
[2]: https://developer.arm.com/Architectures/Arm%20SystemReady%20IR
[3]: https://github.com/ARM-software/arm-systemready/tree/main/IR/prebuilt_images
[4]: https://developer.arm.com/documentation/DUI1101/latest/

View File

@@ -0,0 +1,35 @@
CONFIG_BOOTM_EFI=y
CONFIG_CMD_BOOTEFI=y
CONFIG_CMD_BOOTEFI_HELLO=y
CONFIG_CMD_BOOTEFI_HELLO_COMPILE=y
CONFIG_CMD_BOOTEFI_SELFTEST=y
CONFIG_CMD_EFIDEBUG=y
CONFIG_CMD_EFI_VARIABLE_FILE_STORE=y
CONFIG_CMD_GPT=y
CONFIG_CMD_NVEDIT_EFI=y
CONFIG_CMD_RNG=y
CONFIG_CMD_RTC=y
CONFIG_DM_RTC=y
CONFIG_EFI_DEVICE_PATH_TO_TEXT=y
CONFIG_EFI_GET_TIME=y
CONFIG_EFI_HAVE_RUNTIME_RESET=y
CONFIG_EFI_LOADER=y
CONFIG_EFI_LOADER_HII=y
CONFIG_EFI_MM_COMM_TEE=y
CONFIG_EFI_PARTITION=y
CONFIG_EFI_SECURE_BOOT=y
CONFIG_EFI_SET_TIME=y
CONFIG_EFI_UNICODE_CAPITALIZATION=y
CONFIG_EFI_UNICODE_COLLATION_PROTOCOL2=y
CONFIG_EFI_VARIABLE_FILE_STORE=y
CONFIG_FAT_WRITE=y
CONFIG_FIT=y
CONFIG_FS_FAT=y
CONFIG_OF_LIBFDT=y
CONFIG_OPTEE=y
CONFIG_PARTITION_TYPE_GUID=y
CONFIG_RNG_OPTEE=y
CONFIG_RTC_EMULATION=y
CONFIG_SCMI_FIRMWARE=y
CONFIG_TEE=y
CONFIG_TEXT_BASE=0x60000000