tree: 3dd774511c24e8ea4f34a22af08b6e00f6e74e1b [path history] [tgz]
  1. firmware_sdk/
  2. abr_sysdeps.c
  3. avb_sysdeps.c
  4. Kconfig
  5. Makefile
  6. README.md
lib/fuchsia/README.md

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
  • util.h:
    • Add <common.h> include
  • util.c:
    • Add <util.h> include
  • data.h:
    • change static const char* kAbrMagic = "\0AB0"; to #define kAbrMagic "\0AB0"

libavb

  • avb_atx_validate.h
    • Set AVB_ATX_PIK_VERSION_LOCATION to 29
    • Set AVB_ATX_PSK_VERSION_LOCATION to 28
  • avb_cmdline.c
    • Initialize verity_mode and dm_verity_mode to NULL
  • avb_sha.h
    • replace software SHA256 with accelerated HW implementation
  • avb_slot_verify.h
    • Set AVB_MAX_NUMBER_OF_ROLLBACK_INDEX_LOCATIONS to 28
  • 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/bootfs.h:
    • Replace <stdint.h> include
  • zircon/boot/image.h:
    • Replace <stdint.h> include
  • zircon/boot/dirver-config.h:
    • Replace <stdint.h> include
    • Replace <zircon/types.h> include with zx_duration_t typedef