[PATCH v3 08/10] binman: Add DTBH support
Simon Glass
sjg at chromium.org
Sun Jun 14 18:20:10 CEST 2026
Hi Sam,
On 2026-06-10T01:27:41, Sam Day via B4 Relay
<devnull+me.samcday.com at kernel.org> wrote:
> binman: Add DTBH support
>
> DTBH, used by Samsung S-BOOT bootloaders, is similar to QCDT. That is,
> it's a multi-record container that carries vendor-specific magic values
> to assist the previous bootloader in picking the appropriate FDT for the
> booting device.
>
> dtbTool-exynos was used as a reference for this implementation.
>
> Link: https://github.com/dsankouski/dtbtool-exynos
> Signed-off-by: Sam Day <me at samcday.com>
>
> tools/binman/etype/android_boot.py | 23 +++++
> tools/binman/etype/dtbh.py | 108 +++++++++++++++++++++
> tools/binman/ftest.py | 106 ++++++++++++++++++++
> tools/binman/test/dtbh.dts | 22 +++++
> tools/binman/test/dtbh_bad_model_info.dts | 20 ++++
> tools/binman/test/dtbh_invalid_pagesize.dts | 12 +++
> tools/binman/test/dtbh_missing_model_info.dts | 16 +++
> tools/binman/test/dtbh_missing_payload.dts | 15 +++
> tools/binman/test/dtbh_missing_subnodes.dts | 10 ++
> tools/binman/test/dtbh_multi.dts | 29 ++++++
> tools/binman/test/dtbh_multiple_dtbs.dts | 22 +++++
> tools/binman/test/dtbh_page_size_from_abootimg.dts | 30 ++++++
> tools/binman/test/dtbh_special_subnodes.dts | 11 +++
> 13 files changed, 424 insertions(+)
> diff --git a/tools/binman/etype/dtbh.py b/tools/binman/etype/dtbh.py
> @@ -0,0 +1,108 @@
> +# Fixed per-record "space delimiter" used by dtbTool-exynos.
> +# It's unclear what the 0x20 magic actually means, if anything.
> +DTBH_RECORD_SPACE = 0x20
Did you try probing a real S-BOOT to see if it cares? If it really is
ignored, please say so explicitly ('S-BOOT appears to ignore this
field; dtbTool-exynos emits 0x20 so we do too').
> diff --git a/tools/binman/etype/dtbh.py b/tools/binman/etype/dtbh.py
> @@ -0,0 +1,108 @@
> +DTBH_MAGIC = b'DTBH'
> +DTBH_VERSION = 2
Just to check, are there older DTBH versions in the wild we might need
to support, or is v2 the only thing S-BOOT will accept? A one-line
comment would help future readers.
Reviewed-by: Simon Glass <sjg at chromium.org>
Regards,
Simon
More information about the U-Boot
mailing list