• Chen-Yu Tsai's avatar
    scripts/make_fit: Support decomposing DTBs · 17c31ade
    Chen-Yu Tsai authored
    The kernel tree builds some "composite" DTBs, where the final DTB is the
    result of applying one or more DTB overlays on top of a base DTB with
    fdtoverlay.
    
    The FIT image specification already supports configurations having one
    base DTB and overlays applied on top. It is then up to the bootloader to
    apply said overlays and either use or pass on the final result. This
    allows the FIT image builder to reuse the same FDT images for multiple
    configurations, if such cases exist.
    
    The decomposition function depends on the kernel build system, reading
    back the .cmd files for the to-be-packaged DTB files to check for the
    fdtoverlay command being called. This will not work outside the kernel
    tree. The function is off by default to keep compatibility with possible
    existing users.
    
    To facilitate the decomposition and keep the code clean, the model and
    compatitble string extraction have been moved out of the output_dtb
    function. The FDT image description is replaced with the base file name
    of the included image.
    Signed-off-by: default avatarChen-Yu Tsai <wenst@chromium.org>
    Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
    Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
    17c31ade
make_fit.py 10.5 KB