qcom-capsule: enable capsule generation for hamoa (iq-x7181-evk)#2300
qcom-capsule: enable capsule generation for hamoa (iq-x7181-evk)#2300xueqnie wants to merge 4 commits into
Conversation
Bump SRCREV to b5c7d77 which includes our GenFfs/GenFv PATH fallback fix (352ec67) merged upstream. Drop the now-redundant local patch. Signed-off-by: Xueqian Nie <xueqnie@qti.qualcomm.com>
lumag
left a comment
There was a problem hiding this comment.
Split the second commit into atomical logical chunks.
|
Also please drop the description of the changes from the PR description. If you want to keep the 'testing' part, please rewrite it to be an English text rather than an unreadable bullet list. |
Add hamoa to COMPATIBLE_MACHINE in the capsule recipe and set the IQ-X7181 ESRT GUID in the machine configuration. Signed-off-by: Xueqian Nie <xueqnie@qti.qualcomm.com>
Define the capsule partition layout for iq-x7181-evk via a bbappend. Hamoa uses SPINOR flash and only updates the DTB partition via capsule, targeting the dtb_a/dtb_b A/B partitions. Signed-off-by: Xueqian Nie <xueqnie@qti.qualcomm.com>
Extend the capsule class to support platforms like hamoa that lack xbl_config.elf and need dynamic FvUpdate.xml generation: - CAPSULE_ENTRIES variable flag system generates FvUpdate.xml at build time from per-machine flags, replacing the need for a static XML file - Guard the xbl_config.elf cert injection block so it is skipped on platforms where xbl_config.elf is not present - Stage kernel DTB vfat image as dtb.bin when QCOM_DTB_DEFAULT is set and CAPSULE_ENTRIES includes a dtb entry Signed-off-by: Xueqian Nie <xueqnie@qti.qualcomm.com>
|
|
|
||
| QCOM_BOOT_FIRMWARE = "firmware-qcom-boot-iq-x7181" | ||
|
|
||
| CAPSULE_GUID = "0F6D58FC-2258-4D27-9E23-D77219B0897C" |
There was a problem hiding this comment.
Why does it need a separate GUID?
There was a problem hiding this comment.
Each platform requires a unique ESRT GUID so the OS firmware update stack can identify which device a capsule targets. The IQ-X7181 GUID is defined in cbsp-boot-utilities documentation.
| @@ -0,0 +1,10 @@ | |||
| CAPSULE_FLASH_TYPE:iq-x7181-evk = "NORUFS" | |||
There was a problem hiding this comment.
This is useless before the next commit. And I guess that the previous commit is also useless. Could you order them?
| @@ -59,13 +59,24 @@ XBLCONFIG_DTB_SECTION ?= "" | |||
| BOOTBINS_DIR ?= "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}" | |||
There was a problem hiding this comment.
CAPSULE_ENTRIES variable flag system generates
No, the flag can't generate anything. Also you are still describing the contents. Start by describing the issue. What is not working?
| # --------------------------------------------------------------------------- | ||
| # To provide a board/project-specific capsule layout, append your file to | ||
| # SRC_URI and name it FvUpdate.xml, e.g. in a .bbappend or local.conf: | ||
| # SRC_URI:append = " file://my-board-FvUpdate.xml;subdir=fvupdate" |
There was a problem hiding this comment.
Why are you dropping this comment?
| do_compile[depends] += "${@'${QCOM_BOOT_FIRMWARE}:do_deploy' if d.getVar('QCOM_BOOT_FIRMWARE') else ''}" | ||
|
|
||
| # Pull in the kernel DTB vfat image when capsule includes a dtb entry. | ||
| do_compile[depends] += "${@'virtual/kernel:do_deploy' if 'dtb' in (d.getVar('CAPSULE_ENTRIES') or '').split() else ''}" |
There was a problem hiding this comment.
You don't need or '' here, There is a default value.
|
|
||
| lines.append('</FVItems>') | ||
|
|
||
| out = os.path.join(workdir, 'FvUpdate.xml') |
There was a problem hiding this comment.
What will clean this file? Can we use ${B} instad?
| DTB_PATCH=$(echo "${POST_DDR_LINE}" | sed "s|.* -> '||;s|'.*||" | xargs basename) | ||
| DTB_SECTION=$(echo "${POST_DDR_LINE}" | sed "s/.*PH# \([0-9]*\).*/\1/") | ||
| fi | ||
| # Stage kernel DTB vfat image as dtb.bin so FVCreation.py can find it |
There was a problem hiding this comment.
This looks like a separate commit.
| file://0001-FVCreation-fall-back-to-PATH-when-locating-GenFfs-Ge.patch \ | ||
| " | ||
| SRCREV = "c25b41a49595aca2a3480db050dee78edd2a3bff" | ||
| SRCREV = "b5c7d77383b0090f62daeea9bf059a2bbbef6376" |
| LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
|
|
||
| COMPATIBLE_MACHINE = "qcm6490|qcs9100|qcs8300|qcs615" | ||
| COMPATIBLE_MACHINE = "qcm6490|qcs9100|qcs8300|qcs615|hamoa" |
There was a problem hiding this comment.
This should only be done after all the other changes, reorder the commits logically.
Enable UEFI FMP capsule generation for the Hamoa platform (iq-x7181-evk).
Hamoa uses SPINOR flash and only updates the DTB partition via capsule.
This extends the qcom-capsule class with a CAPSULE_ENTRIES mechanism for
dynamic FvUpdate.xml generation and guards xbl_config.elf cert injection
for platforms that lack this component.
Built and verified capsule generation produces a valid .cap file targeting
the SPINOR dtb_a/dtb_b A/B partitions.