Add AArch64 UEFI support (NVIDIA Jetson Orin)#818
Draft
dgarske wants to merge 1 commit into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds a new aarch64_efi target so wolfBoot can run as an AArch64 UEFI application (validated on NVIDIA Jetson Orin), loading/verifying kernel.img/update.img from the ESP and booting via UEFI LoadImage/StartImage.
Changes:
- Add a new AArch64 UEFI HAL (
hal/aarch64_efi.c) plus boot glue (src/boot_aarch64_efi.c) and linker-script stub. - Extend the build system to support an AArch64 PE/COFF
wolfboot.efioutput and a new example config. - Add helper scripts and documentation for building gnu-efi for AArch64 and running under QEMU/Jetson deployment.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/scripts/build-gnu-efi-aarch64.sh | Helper to clone/build/install gnu-efi (AArch64) into the repo tree |
| tools/scripts/aarch64-efi-qemu.sh | Convenience runner for wolfboot.efi under QEMU + AAVMF |
| tools/keytools/keygen.c | Extends keystore section handling for the new UEFI target macro |
| src/boot_aarch64_efi.c | Adds UEFI-target do_boot() glue for AArch64 |
| Makefile | Makes the wolfboot.efi objcopy output format configurable per target |
| hal/aarch64_efi.ld | Empty placeholder linker script (gnu-efi script used instead) |
| hal/aarch64_efi.c | New AArch64 UEFI HAL: ESP file loading, verification, LoadImage/StartImage handoff |
| docs/Targets.md | Adds aarch64_efi target documentation (Jetson Orin + QEMU workflow) |
| config/examples/aarch64_efi.config | Example configuration for aarch64_efi |
| arch.mk | Adds aarch64_efi target build flags, gnu-efi paths, and linking rules |
| .gitignore | Ignores gnu-efi build artifacts and staging dirs for the new target |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+66
to
+68
| static EFI_SYSTEM_TABLE *gSystemTable; | ||
| static EFI_HANDLE *gImageHandle; | ||
| EFI_PHYSICAL_ADDRESS kernel_addr; |
Comment on lines
+39
to
+48
| extern void RAMFUNCTION aarch64_efi_do_boot(uint8_t *kernel); | ||
|
|
||
| #ifdef MMU | ||
| void RAMFUNCTION do_boot(const uint32_t *app_offset, const uint32_t* dts_offset) | ||
| #else | ||
| void RAMFUNCTION do_boot(const uint32_t *app_offset) | ||
| #endif | ||
| { | ||
| aarch64_efi_do_boot((uint8_t *)app_offset); | ||
| } |
|
|
||
| SetDevicePathEndNode(&mem_path_device[1].Header); | ||
|
|
||
| wolfBoot_printf("Staging kernel at address %x, size: %u\n", boot_addr, *size); |
Comment on lines
+351
to
+355
| EFI_STATUS status; | ||
| uint8_t *mem; | ||
| UINT64 size; | ||
| UINT64 r; | ||
| uint32_t kernel_size, update_size; |
Comment on lines
+22
to
+24
| if [ ! -d "$SRC" ]; then | ||
| git clone --depth 1 -b "$GNU_EFI_REF" https://github.com/ncroxon/gnu-efi "$SRC" | ||
| fi |
| # WOLFBOOT_DEBUG_EFI) and are not clean against wolfBoot's -Wextra/-DDEBUG | ||
| # flags (e.g. efidebug.h redefines DEBUG). Do not treat them as errors; our | ||
| # own sources are kept warning-clean. | ||
| CFLAGS := $(filter-out -Werror,$(CFLAGS)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.