bootdata: Remove bootdata and replace with zbi.

The old "bootdata" format has been deprecated for almost three
years in favour of the Zircon Boot Image format, which is a very similar
format but not quite identical.

The bulk of this CL is syncing the bootdata/ZBI implementation with
upstream Fuchsia, and importing a new libzbi[0], a library intended
for use in firmware to simplify ZBI manipulation. This library replaces
all of the custom bootdata manipulation that previously existed (i.e.

This CL also changes depthcharge from passing BOOTDATA_DEBUG_UART (which
is no longer functional in upstream Fuchsia) to the newer ZBI_TYPE_KERNEL_DRIVER


Test: emerge-atlas depthcharge
Test: Manually compare ZBI items passed by depthcharge to Zircon before and after.
Bug: fuchsia:74793
Change-Id: Ifd2e39d7881f91c391786c5c99da34294c04b049
Reviewed-by: Duncan Laurie <>
Tested-by: Simon Shields <>
Commit-Queue: Simon Shields <>
55 files changed