Skip to content

Conversation

luqmana
Copy link
Contributor

@luqmana luqmana commented Oct 20, 2025

Wanted to cut down on some more of the repetition we have, especially with cases like the rubyred configs that make use of the patch functionality.

Example rubyred run. Can see it now reads the base ruby app toml:

$ cargo xtask gen --payload ../bldb/target/x86_64-oxide-none-elf/release/bldb --amd-firmware ../amd-firmware --app apps/turin-rubyred-1.0.0.5.toml --image target/test_blobs/turin-rubyred-1.0.0.5.img
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.07s
     Running `target/debug/xtask gen --payload ../bldb/target/x86_64-oxide-none-elf/release/bldb --amd-firmware ../amd-firmware --app apps/turin-rubyred-1.0.0.5.toml --image target/test_blobs/turin-rubyred-1.0.0.5.img`
reading from "apps/turin-rubyred-1.0.0.5.toml"
reading from "apps/turin-ruby-1.0.0.5.toml"
patching file target/turin-rubyred-1.0.0.5.efs.json5 (read from etc/turin-ruby-1.0.0.5.efs.json5)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.09s
     Running `target/debug/amd-host-image-builder generate -v -s 16MiB -r ../bldb/target/x86_64-oxide-none-elf/release/bldb -c target/turin-rubyred-1.0.0.5.efs.json5 -B ../amd-firmware/BRH/1.0.0.5 -o target/test_blobs/turin-rubyred-1.0.0.5.img`
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x00_AmdPubKey_BRH.tkn"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x01_PspBl_BRH.esbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x02_PspOS_BRH.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x03_PspRecBl_BRH.esbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x08_SmuFirmware_breithorn.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x208_SmuFirmware_BRHDense.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x09_PspDebugUnlockToken_BRH.stkn"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x0A_PspAblPubKey_BRH.stkn"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x13_SduFw_BRH.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x21_PspAmdIkek_BRH.bin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x22_SecureEmptyToken.bin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x24_RegisterAccessPolicy_BRH.cesbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x224_RegisterAccessPolicy_BRHDense.cesbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x28_PspSystemDriver_BRH.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x2A_SmuFirmware_breithorn.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x22A_SmuFirmware_BRHDense.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x2D_AblRt.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x30_AgesaBootLoaderU_BRH.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x42_PhyFw_BRH.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x44_USB_PHY_BRH.esbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x45_RegisterAccessPolicy_BRH.cesbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x245_RegisterAccessPolicy_BRHDense.cesbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x50_PspKeyDataBase_BRH.sbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x51_PspTosKeyDataBase_BRH.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x55_SPLTable_BRH.sbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x5DMpioFw_BRH.cesbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x64_RasDriver_BRH.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x65_ta_ras_prod_amdTEE.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x73_PspBl_BRH.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x76_DfRib_BRH.csbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x8C_MPDMATF_BRH.sbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x91_GmiPhyFw_BRH.esbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x92_Page_BRH.sbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x9D_AspSramFwExt_BRH.sbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0x9F_psp_tos_wl_bin_brh.sbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0xA0_S3Image_BRH_A0.sbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0xA0_S3Image_BRHD_A0.sbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0xA0_S3Image_BRH_B0.sbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0xA0_S3Image_BRH_C0.sbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0xA0_S3Image_BRHD_B0.sbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/TypeId0xA0_S3Image_BRH_C1.sbin"
Info: ABL version: 0x1005f011
Info: For sub_program 2: SMU firmware version: 99.122.0
Info: For sub_program 0: SMU firmware version: 94.122.0
Info: Using blob "../amd-firmware/BRH/1.0.0.5/Type0x64_AppbDdr5RdimmImem3_BRH.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/Type0x64_AppbDdr5RdimmImem3_BRH_C0.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/Type0x64_AppbDdr5RdimmImem4_BRH.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/Type0x64_AppbDdr5RdimmImem4_BRH_C0.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/Type0x64_AppbDdr5RdimmPosttrainImem9_BRH.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/Type0x64_AppbDdr5RdimmPosttrainImem9_BRH_C0.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/Type0x64_AppbDdr5RdimmPosttrainImem10_BRH.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/Type0x64_AppbDdr5RdimmPosttrainImem10_BRH_C0.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/Type0x64_AppbDdr5RdimmQuickbootImem11_BRH_C0.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/Type0x65_AppbDdr5RdimmDmem3_BRH.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/Type0x65_AppbDdr5RdimmDmem3_BRH_C0.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/Type0x65_AppbDdr5RdimmDmem4_BRH.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/Type0x65_AppbDdr5RdimmDmem4_BRH_C0.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/Type0x65_AppbDdr5RdimmPosttrainDmem9_BRH.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/Type0x65_AppbDdr5RdimmPosttrainDmem9_BRH_C0.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/Type0x65_AppbDdr5RdimmPosttrainDmem10_BRH.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/Type0x65_AppbDdr5RdimmPosttrainDmem10_BRH_C0.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/Type0x65_AppbDdr5RdimmQuickbootDmem11_BRH_C0.ecsbin"
Info: Using blob "../amd-firmware/BRH/1.0.0.5/Type0x65_AppbDdr5RdimmQuickbootDmem12_BRH_C0.ecsbin"

@luqmana luqmana requested a review from dancrossnyc October 20, 2025 19:26
Copy link
Contributor

@dancrossnyc dancrossnyc left a comment

Choose a reason for hiding this comment

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

Much nicer; thanks.

Btw, something I would like to do eventually is make it so that the blobs are passed to ahib proper as a vector (key,value) pairs; the key would be the reference from the config file, while the value would be the actual file name. Right now, these are accumulated in an ad hoc manner which seems fragile and easy to break.

@luqmana luqmana merged commit 8851b7f into main Oct 20, 2025
7 checks passed
@luqmana luqmana deleted the inherit-app branch October 20, 2025 20:50
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