build-dtb-image: add FIT DTB image generation mode for multi-DTB selection#121
build-dtb-image: add FIT DTB image generation mode for multi-DTB selection#121xinlon-z wants to merge 1 commit intoqualcomm-linux:mainfrom
Conversation
…ction The existing build-dtb-image.sh only supported generating a combined (concatenated) DTB image. This approach does not allow UEFI to dynamically select the correct DTB at boot time based on hardware identity. Add --fit-image mode to build-dtb-image.sh to support FIT-based multi-DTB selection at boot time. In this mode, the script: - Extracts DTBs from a kernel .deb package or a dtb source directory - Clones qcom-dtb-metadata to obtain the its template and compiles qcom-metadata.dtb via dtc - Run mkimage to generate qclinux_fit.img (filename required by UEFI) - Packs the FIT image into a FAT-formatted bin for flashing to dtb partiton. Signed-off-by: Xinzheng Long <xinzheng.long@oss.qualcomm.com>
|
NB: I'm not a reviewer here Generally, this is valuable and I'd like to use this; us there a change we can make the script generic enough that it can be used by people that would use qcom-dtb-metadata? Could we host the script there? This is getting slightly complex for shell; would it make sense to pivot to Python? I love shell, up to a point :) |
|
Did we agree on extending build-dtb-image (qcom-build-utils) to add FIT support? I had created this tool as interim solution to build combined dtb, until FIT support was there from boot team, but the tool to build FIT already exists on kmake image repository. I also have a fork on kmake-image project, that adds support to build FIT dtb out of the a kernel deb package input (bjordiscollaku/kmake-image@da28ac8), in addition to a kernel source tree; had tested my fork locally and was able to generate FIT image successfully. Question is, were do we keep this tool? We have:
This is a bit redundant I'd say, it'd be way cleaner to have both metadata and tool in same repo. |
Hi @lool , Not sure if there is plan to merge repo kmake-image and qcom-dtb-metadata into one repo from kernel team ? I checked the two repos, looks image related generation scripts get maintained in kmage-image repo, qcom-dtb-metadata only include the dtb metadata. I raised one issue for qcom-dtb-metadata, hope there will be some inputs/comments from kernel team. |
Hey @bjordiscollaku |
The existing build-dtb-image.sh only supported generating a combined (concatenated) DTB image. This approach does not allow UEFI to dynamically select the correct DTB at boot time based on hardware identity. Depends on PR #122
In the FIT DTB boot model:
Add --fit-image mode to build-dtb-image.sh to support FIT-based multi-DTB selection at boot time. In this mode, the script:
Usage example:
Build from kernel deb
Build from DTB source code
Output example: