blob: 8c67004cceb79f8ef428732477328c7a6ebcd623 [file] [log] [blame] [view]
# Fuchsia Firmware SDK
We attempt to bring the Fuchsa Firmware SDK in with as few modifications as
possible, but at the moment there are a few small changes that are necessary.
Standard library includes are a bit tricky, for example `stdint.h`. We can't
include `stdint.h` directly because it uses the toolchain's built-in
mplementation which conflicts with u-boot's custom `common.h` definitions.
However, we also can't create a fake `stdint.h` that just redirects to
`common.h` because the `scp_task` sub-build *does* use the built-in `stdint.h`,
so replacing it breaks that build.
The current approach is just to modify the SDK files directly as needed to
point to u-boot's custom headers instead of the standard library ones.
## libabr
* `sysdeps.h`:
* Undefine `LIBABR_USE_STDLIB_DEPS`
* Adjust include files
* Add `AbrIsValidMetadata()` API
* `util.h`:
* Add `<common.h>` include
* `util.c`:
* Add `<util.h>` include
* Add `abr_sysdeps.c` to provide sysdep implementations
## libavb
* `avb_atx_validate.h`
* Set `AVB_ATX_PIK_VERSION_LOCATION` to 7
* Set `AVB_ATX_PSK_VERSION_LOCATION` to 6
* `avb_cmdline.c`
* Initialize `verity_mode` and `dm_verity_mode` to `NULL`
* `avb_slot_verify.h`
* Set `AVB_MAX_NUMBER_OF_ROLLBACK_INDEX_LOCATIONS` to 6
* `avb_slot_verify.c`
* Initialize `ret` in `avb_slot_verify()`
* `avb_sysdeps.h`
* Replace standard library includes
## libzbi
* `zbi.c`:
* Replace `<string.h>` include
## sysroot
* `zircon/boot/image.h`:
* Replace `<stdint.h>` include