Well, you wanted to flash only part of the image, right?
Without going into much detail, firmware packages contain multiple images and a header describing each image (what it is, where it’s supposed to go in flash).
You can have:
-
a full package (all
) that contains all firmware images and also has the exact layout of the flash, meaning that it can be written directly with a programmer or the provided UEFI update app.
-
a partial package (ota
) that can contain only the image(s) you want updated. This has the header right at the beginning and must only be flashed through the UEFI, as the update app needs to parse it and place each image at the correct location.
You can find the full package description here: edk2-non-osi/Platform/CIX/Sky1/PackageTool/spi_flash_config_all.json
The OTA package is described here: edk2-non-osi/Platform/CIX/Sky1/PackageTool/spi_flash_config_ota.json
As you can see, it currently includes just the BL33 EDK2 image:
{
"cfs_version": 1,
"fip_version": 2345,
"flash_size": "0x800000",
"ota_flags": "0x80000000",
"image_count": 1,
"image_header_groups": [{
"image_type": 7,
"address": "0x3FE000",
"size": "0x402000",
"file": "Firmwares/bootloader3.img"
}
]
}
But you can replace that with any other image description taken from the full package.
For instance, if we want to update the pm_config
:
{
"cfs_version": 1,
"fip_version": 2345,
"flash_size": "0x800000",
"ota_flags": "0x80000000",
"image_count": 1,
"image_header_groups": [{
"image_type": 4,
"address": "0x3FC000",
"size": "0x1000",
"file": "Firmwares/csu_pm_config.bin"
}
]
}
Run the build script, then pass the generated cix_flash_ota.bin
package to the FlashUpdate.efi
app and it will know what to do with it.
I can understand your point on thisn especially from the vendor’s perspective. However, even after trying hard, I still couldn’t figure the options to change the default settings. EDK2 is a super-complicated thing where I really do not understand what each part is doing. For example I’d just have liked to enable ACPI by default (nowadays it’s the only option I change), and haven’t found which build options (or even code lines) change the default values for the BIOS settings. If you happen to find it without wasting your time, a pointer would be greatly appreciated!
This is also how you keep the NV variables across updates. But it does require care from the hardware vendor when adding new settings, to not break compatibility.