Skip to content

Building Hafnium for Thor - #564

Open
dperezzoghbi wants to merge 3 commits into
anduril:masterfrom
dperezzoghbi:hafnium
Open

dperezzoghbi wants to merge 3 commits into
anduril:masterfrom
dperezzoghbi:hafnium

Conversation

@dperezzoghbi

Copy link
Copy Markdown
Contributor
Description of changes

Add hafnium as an overridable package for Thor.
Separated out fiptool as it's own package from armTrustedFirmware for use by hafnium.

Testing

I built + booted on Thor with a custom patch changing the start banner of hafnium to show successful customization.
I also built + booted on Orin to show that there shouldn't be any regressions.

fiptool is already created within armTrustedFirmware, but it invovles a
whole build and is specific to aarch64. This pulls it out as it's own
derivation.
Hafnium is currently entirely pulled in through nvidia's BSP. Building
it here is the first step in being able to add customizations and more
secure partitions.

The build rules were mostly trial & error from hafnium_src_build.sh
down, stripping what wasn't needed for hafnium.bin.

@Princemachiavelli Princemachiavelli left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Maybe let @elliotberman review before merging.

Also just wondering, how long does building hafnium take? Since we are always building it for Thor now.

Comment thread pkgs/optee/hafnium.nix

socType =
if l4tMajorVersion == "39" then "t264"
else throw "Unknown SoC type: ${l4tMajorVersion}";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rephrase to "Unsupported SoC type"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants