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.
sysdeps.h:LIBABR_USE_STDLIB_DEPSutil.h:<common.h> includeutil.c:<util.h> includedata.h:static const char* kAbrMagic = "\0AB0"; to #define kAbrMagic "\0AB0"avb_atx_validate.hAVB_ATX_PIK_VERSION_LOCATION to 29AVB_ATX_PSK_VERSION_LOCATION to 28avb_cmdline.cverity_mode and dm_verity_mode to NULLavb_sha.havb_slot_verify.hAVB_MAX_NUMBER_OF_ROLLBACK_INDEX_LOCATIONS to 28avb_slot_verify.cret in avb_slot_verify()avb_sysdeps.hzbi.c:<string.h> includezircon/boot/bootfs.h:<stdint.h> includezircon/boot/image.h:<stdint.h> includezircon/boot/dirver-config.h:<stdint.h> include<zircon/types.h> include with zx_duration_t typedef