-
Notifications
You must be signed in to change notification settings - Fork 153
Hamoa IoT EVK support #1211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Hamoa IoT EVK support #1211
Conversation
66b8455 to
01aaa27
Compare
| @@ -0,0 +1,30 @@ | |||
| DESCRIPTION = "QCOM NHLOS Firmware for Qualcomm IQ-X7181 platform" | |||
|
|
|||
| LICENSE = "CLOSED" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add proper LICENSE?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no LICENSE file inside external released boot binaries: https://artifacts.codelinaro.org/ui/native/qli-ci/flashable-binaries/ubuntu-fw/X1E80100/IQ-X.1.0-Ver.1.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be fixed then. Please reach out to the relevant folks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LICENSE should be part of the boot binaries, and then need to add in the firmware inc file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, agree. Target team missed this file in Sprint1 release, I will chat with target to add it in Sprint2 release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well... We can probably trust Qualcomm engineers... More importantly why is the licence not there in the first place? I assumed that the build / publish / etc. scripts are already written in a way to add it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Target team took care of the external push for boot binaries, they will add this in coming sprint2 release. Is there any concern to add it in recipe folder like below ?
meta-qcom/recipes-bsp/firmware-boot$ tree -L 2
.
|-- files
| `-- Qualcomm-Technologies-Inc.-Proprietary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we use https://softwarecenter.qualcomm.com/nexus/generic/software/chip/ubuntu_qualcomm_iot-spf-1-0/ubuntu-qualcomm-iot-spf-1-0_test_device_public/r1.0_00001.0/hamoa_iot-ubun-1-0/ instead? We do have a LICENSE and NOTICE there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we use https://softwarecenter.qualcomm.com/nexus/generic/software/chip/ubuntu_qualcomm_iot-spf-1-0/ubuntu-qualcomm-iot-spf-1-0_test_device_public/r1.0_00001.0/hamoa_iot-ubun-1-0/ instead? We do have a LICENSE and NOTICE there.
I compared the content of LICENSE.txt and the prop license inside boot binaries tar ball, they are different. let me confirm once with target team.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added license file under local recipe folder and inline corresponding comment in recipe.
01aaa27 to
4a7dd63
Compare
| @@ -0,0 +1,30 @@ | |||
| DESCRIPTION = "QCOM NHLOS Firmware for Qualcomm IQ-X7181 platform" | |||
|
|
|||
| LICENSE = "CLOSED" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be fixed then. Please reach out to the relevant folks
|
|
||
| do_deploy:append() { | ||
| install -d ${DEPLOYDIR}/${QCOM_BOOT_IMG_SUBDIR}/spinor | ||
| find "${S}/spinor" -maxdepth 1 -name '*.bin' -exec install -m 0644 {} ${DEPLOYDIR}/${QCOM_BOOT_IMG_SUBDIR}/spinor \; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why you need to create the 'spinor' subfolder in DEPLOYDIR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to align the directory structure in released boot binaries.
shoudil@shoudil2-gv:/local/mnt/workspace2/shoudil/Hamoa_Yocto_Mainine$ ls -l IQ-X.1.0-Ver.1.1-ubuntu-X1E80100-nhlos-bin*
-rw-r----- 1 shoudil users 17016 Nov 13 20:27 IQ-X.1.0-Ver.1.1-ubuntu-X1E80100-nhlos-bins.tar.gz
-rw-r----- 1 shoudil users 17016 Nov 13 20:27 IQ-X.1.0-Ver.1.1-ubuntu-X1E80100-nhlos-bins.tar.gz.1
IQ-X.1.0-Ver.1.1-ubuntu-X1E80100-nhlos-bins:
total 4
drwxr-xr-x 2 shoudil users 4096 Oct 14 15:27 spinor
shoudil@shoudil2-gv:/local/mnt/workspace2/shoudil/Hamoa_Yocto_Mainine$ tree -L 2 IQ-X.1.0-Ver.1.1-ubuntu-X1E80100-nhlos-bins
IQ-X.1.0-Ver.1.1-ubuntu-X1E80100-nhlos-bins
`-- spinor
|-- adsp_dtbs.elf
|-- adsp_lite.lzma
|-- aop_devcfg.mbn
|-- aop.mbn
|-- cpucp_dtbs.elf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to align the directory structure in released boot binaries.
This doesn't really answer the 'why' question.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with "spinor" included in QCOM_BOOT_IMG_SUBDIR.
hamoa, IoT, EVK (also please fix PR subject) |
| BOOTBINARIES = "IQ-X.1.0-Ver.${PV}-ubuntu-X1E80100-nhlos-bins" | ||
|
|
||
| SRC_URI = " \ | ||
| https://artifacts.codelinaro.org/artifactory/qli-ci/flashable-binaries/ubuntu-fw/X1E80100/IQ-X.1.0-Ver.1.1/IQ-X.1.0-Ver.1.1-ubuntu-X1E80100-nhlos-bins.tar.gz;downloadfilename=X7181_bootbinaries.tar.gz;name=bootbinaries \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens with download cache when the next archive gets released?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
downloadfilename should have ${PV} as well. And name it with something more aligned with the original tar (to avoid potential naming conflicts with other X7181 targets), or just use hamoa_iot_evk_bootbinaries_${PV}.tar.gz
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, what is the difference between this boot binary comparing to https://qartifactory-edge.qualcomm.com/artifactory/qsc_releases/software/chip/ubuntu_qualcomm_iot-spf-1-0/ubuntu-qualcomm-iot-spf-1-0_test_device_public/r1.0_00001.0/hamoa_iot-ubun-1-0/HAMOA_bootbinaries.zip ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only the one in recipe was announced by target team and officially pointed to Canonical as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the one in this recipe has no LICENSE, not even in the top folder, we can't include it here until this is fixed.
| if [ -d "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/spinor" ]; then | ||
| install -d spinor | ||
| find "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/spinor" -maxdepth 1 -type f -exec install -m 0644 {} spinor \; | ||
| find "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/spinor" -maxdepth 1 -type f -name 'xbl_s_devprg_ns.melf' -exec install -m 0644 {} . \; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we now getting two copies? Also why is it installed outside of spinor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, we have two flat builds. here I installed the programmer outside of spinor, which is used to flash nvme flat build (with efi/rootfs images)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two copies of xbl_s_devprg_ns.melf. Why does it need special handling?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no programmer in nvme flat build at default, so copy it from spinor boot binaries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can SPI-NOR programmer program NVMe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it worked fine, share the QDL flash logs for your referrence.
shoudil@shoudil2-gv:/local/mnt/workspace2/shoudil/Hamoa_Yocto_Mainine/build/tmp/deploy/images/iq-x7181-evk/core-image-base-iq-x7181-evk.rootfs-20251118034250.qcomflash/spinor$ ./qdl xbl_s_devprg_ns.melf rawprogram0.xml patch0.xml --storage spinor
Waiting for EDL device
waiting for programmer...
flashed "recoveryinfo" successfully
flashed "trial_boot_info" successfully
flashed "XBL_SC" successfully at 193kB/s
flashed "XBL_RAMDUMP" successfully
flashed "XBL_CONFIG" successfully
flashed "UEFI" successfully at 238kB/s
flashed "AOP" successfully
flashed "AOP_CONFIG" successfully
flashed "TZ" successfully at 137kB/s
flashed "DEVCFG" successfully
flashed "HYP" successfully
flashed "QUP" successfully
flashed "TZAPPS" successfully
flashed "MULTIIMGOEM" successfully
flashed "CPUCP" successfully
flashed "CPUCP_DTB" successfully
flashed "SHRM" successfully
flashed "ADSP_UEFI" successfully at 149kB/s
flashed "ADSP_UEFI_DTB" successfully
flashed "ImageFv" successfully
flashed "XBL_SC_BACKUP" successfully at 193kB/s
flashed "XBL_RAMDUMP_BACKUP" successfully
flashed "XBL_CONFIG_BACKUP" successfully
flashed "UEFI_BACKUP" successfully at 247kB/s
flashed "AOP_BACKUP" successfully
flashed "AOP_CONFIG_BACKUP" successfully
flashed "TZ_BACKUP" successfully at 137kB/s
flashed "DEVCFG_BACKUP" successfully
flashed "HYP_BACKUP" successfully
flashed "QUP_BACKUP" successfully
flashed "TZAPPS_BACKUP" successfully
flashed "MULTIIMGOEM_BACKUP" successfully
flashed "CPUCP_BACKUP" successfully
flashed "CPUCP_DTB_BACKUP" successfully
flashed "SHRM_BACKUP" successfully
flashed "ADSP_UEFI_BACKUP" successfully at 149kB/s
flashed "ADSP_UEFI_DTB_BACKUP" successfully
flashed "ImageFv_BACKUP" successfully
flashed "PrimaryGPT" successfully
flashed "BackupGPT" successfully
11 patches applied
shoudil@shoudil2-gv:/local/mnt/workspace2/shoudil/Hamoa_Yocto_Mainine/build/tmp/deploy/images/iq-x7181-evk/core-image-base-iq-x7181-evk.rootfs-20251118034250.qcomflash$ ./qdl xbl_s_devprg_ns.melf rawprogram0.xml patch0.xml --storage nvme
waiting for programmer...
flashed "efi" successfully at 47662kB/s
flashed "rootfs" successfully at 43776kB/s
flashed "PrimaryGPT" successfully
flashed "BackupGPT" successfully
13 patches applied
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please handle those details in the bootbins package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I am not clear how to handle these in bootbins pkgs.
Changes in image_types_qcom.bbclass is to take care of qcom flashable package (flat builds):
=>build/tmp/deploy/images/iq-x7181-evk/qcom-multimedia-image-iq-x7181-evk.rootfs-20251125053933.qcomflash$
while bootbins package take care the non-hlos images under this folder, images in this folder will be provided as input for function in image_type_qcom.bbclass.
=> build/tmp/deploy/images/iq-x7181-evk/iq-x7181/spinor$
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Install a copy of the programmer in the boot firmware recipe, not in the common image class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Install it in boot firmware recipe and consume it to create nvme flat build.
firmware-qcom-boot-iq-x7181.inc:
find "${S}" -maxdepth 1 -type f -name 'xbl_s_devprg_ns.melf' -exec install -m 0644 {} ${DEPLOYDIR}/${QCOM_BOOT_FILES_SUBDIR} ;
image_types_qcom.bbclass:
if [ -e "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/xbl_s_devprg_ns.melf" ]; then
install -m 0644 "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/xbl_s_devprg_ns.melf" .
fi
|
|
||
| QCOM_VFAT_SECTOR_SIZE = "512" | ||
|
|
||
| DEFAULTTUNE = "armv8-2a-crypto" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this part, I just leverage from IQ-8xx/IQ-9xx, it's not suitable ? if yes, could you share what should be configured here ? Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works but it might not be optimized for it, isn't it compatible with armv8.7?
Test run workflowTest jobs for commit 4a7dd63
|
4a7dd63 to
4432991
Compare
lumag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also:
2025-11-19 07:07:41 - INFO - | find: ‘/work/build/tmp/work/all-qcom-linux/firmware-qcom-boot-x7181/1.1/sources/IQ-X7181_bootbinaries/spinor’: No such file or directory
| @@ -0,0 +1,30 @@ | |||
| DESCRIPTION = "QCOM NHLOS Firmware for Qualcomm IQ-X7181 platform" | |||
|
|
|||
| LICENSE = "CLOSED" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well... We can probably trust Qualcomm engineers... More importantly why is the licence not there in the first place? I assumed that the build / publish / etc. scripts are already written in a way to add it.
|
|
||
| do_deploy:append() { | ||
| install -d ${DEPLOYDIR}/${QCOM_BOOT_IMG_SUBDIR}/spinor | ||
| find "${S}/spinor" -maxdepth 1 -name '*.bin' -exec install -m 0644 {} ${DEPLOYDIR}/${QCOM_BOOT_IMG_SUBDIR}/spinor \; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to align the directory structure in released boot binaries.
This doesn't really answer the 'why' question.
| # skip BLANK_GPT and WIPE_PARTITIONS for rawprogram xml files | ||
| for rawpg in `find ${DEPLOY_DIR_IMAGE}/${QCOM_PARTITION_FILES_SUBDIR} -maxdepth 1 -type f -name 'rawprogram*.xml' \ | ||
| ! -name 'rawprogram*_BLANK_GPT.xml' ! -name 'rawprogram*_WIPE_PARTITIONS.xml'`; do | ||
| install -m 0644 ${rawpg} . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meanwhile, copy the programer outside
of spinor folder to be part of NVME flat build.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NVME flat build include partition bins, hlos images efi.bin, rootfs.img and programmer to support build flash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not an answer for the question. Please add a comment that you are reusing SPI-NOR programmer for NVMe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, maybe it's too platform specific. Should it be done in bootbins?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not addressed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is part of qcom flashable images deployment, should be implemented in create_qcomflash_pkg().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't understand your response.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with below (in create_qcomflash_pkg):
if [ -e "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/xbl_s_devprg_ns.melf" ]; then
install -m 0644 "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/xbl_s_devprg_ns.melf" .
fi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is still machine-specific. Move that part to the IQ-X7181 boot binaries recipe.
| if [ -d "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/spinor" ]; then | ||
| install -d spinor | ||
| find "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/spinor" -maxdepth 1 -type f -exec install -m 0644 {} spinor \; | ||
| find "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/spinor" -maxdepth 1 -type f -name 'xbl_s_devprg_ns.melf' -exec install -m 0644 {} . \; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can SPI-NOR programmer program NVMe?
conf/machine/include/qcom-hamoa.inc
Outdated
| @@ -0,0 +1,18 @@ | |||
| # Configurations and variables for IQ-X7181 SoC family. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the
There is no action in the commit message (nor imperative language).
|
Please use |
04acbf1 to
384bc3b
Compare
lumag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shoudil I see a lot unresolved ocmments from the previous review cycles. Why were they ignored?
Test run workflowTest jobs for commit 384bc3b
|
This issue got resolved in new push. |
Please resolve all review comments instead of fixing them one by one |
| @@ -0,0 +1,29 @@ | |||
| DESCRIPTION = "QCOM NHLOS Firmware for Qualcomm IQ-X7181 platform" | |||
| LICENSE = "CLOSED" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Please specify a correct one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Please specify a correct one
There is no correct LICENSE in current available bootbins externally, target team will add LICENSE in coming release. if this is block issue for this PR, then we can consider merge after new release available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not talking about the licence in the archive. Please specify the licence to be used for these binaries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with license file added under recipe folder.
|
| if [ -n "${QCOM_CDT_FILE}" ]; then | ||
| # check CDT file existence and install as per need, for iq-x7181, CDT file will be part of spinor build, which will | ||
| # be placed under spinor subfolder. | ||
| if [ -n "${QCOM_CDT_FILE}" ] && [ -e "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/${QCOM_CDT_FILE}.bin" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why are you copying the CDT to the main folder since it is only really used by spinor?
It should just copy the CDT (provided by the build) to the right destination folder, which could be the main folder itself (e.g. ufs) and inside spinor in your case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The added condition here is to avoid copy on Hamoa as CDT file not present in this folder, it will report error without this.
"-e ${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/${QCOM_CDT_FILE}.bin"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QCOM_BOOT_IMG_SUBDIR should contain spinor, as raised before, then this would have to be changed if you want avoid copying, or just install CDT to the parent folder (as done by other machines) and then copy it here to the right destination folder, which is under spinor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The create_qcomflash_pkg function only support one flat build currently, I updated PR using QCOM_BOOT_IMG_SUBDIR (contain spinor) to take care spinor flashable pkg in subfolder, and QCOM_BOOT_FILES_SUDBDIR pointing to the parent folder to take care of nvme flashable images.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be handled in a generic code instead of creating extra copies. We know that CDT is either in the root folder or in the spinor/ subfolder.
Use the boot firmware from external release to generate spinor flat build for IQ-X7181 platform, meanwhile specify license file under recipe folder, it will be part of boot binaries tarball in next push. Signed-off-by: Shoudi Li <[email protected]>
384bc3b to
d9ee3ff
Compare
Spinor firmware is needed on iq-x7181 based devices, and recently included as part of hamoa sprint one release, deploy them to generate the flat build for spinor flash. Meanwhile, copy the programer outside of spinor folder to be part of NVME flat build. Signed-off-by: Shoudi Li <[email protected]>
Upgrade qcom-ptool to consume partition conf files added for IQ-X7181 platform. Signed-off-by: Shoudi Li <[email protected]>
Enable nvme kernel config to probe nvme driver normally, which help to fix rootfs mount failure. Signed-off-by: Shoudi Li <[email protected]>
Add machine configuration file for IQ-X7181 platform, specify the paths of partition binaries for both NVMe and spinor, where partition bins will be consumed to create flat builds. Signed-off-by: Shoudi Li <[email protected]>
Currently released boot firmware have no capability to load dtb from partition. To address this, pack DTB inside Unified Kernel Image. This ensure proper device tree handling during boot. Signed-off-by: Shoudi Li <[email protected]>
This is the kas config file to support building iq-x7181-evk. Signed-off-by: Shoudi Li <[email protected]>
Update github workflow to build iq-x7181-evk in CI. Signed-off-by: Shoudi Li <[email protected]>
d9ee3ff to
4c9cebf
Compare
| @@ -0,0 +1,3 @@ | |||
| Copyright (c) 2023 Qualcomm Technologies, Inc. | |||
| All Rights Reserved. | |||
| Confidential and Proprietary - Qualcomm Technologies, Inc. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't really add much, I know it is the same content as used by the other boot firmware blobs, but there this file is at least part of the tarball (and it will be updated with the correct license at some point).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not enough at all. It doesn't define any terms or conditions. Please use an actual licence.
| # Install NHLOS boot binaries in DEPLOY_DIR | ||
|
|
||
| S = "${UNPACKDIR}/${BOOTBINARIES}" | ||
| S ?= "${UNPACKDIR}/${BOOTBINARIES}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have this as a separated commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is required at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is a concern, I will put the "include firmware-qcom-boot-common.inc" before the S= override. otherwise, the change is needed for the override to take effect.
firmware-qcom-boot-iq-x7181.inc:
S = "${UNPACKDIR}/${BOOTBINARIES}/spinor"
...
QCOM_BOOT_IMG_SUBDIR = "iq-x7181/spinor"
include firmware-qcom-boot-common.inc
| find "${S}" -maxdepth 1 -name '*.lzma' -exec install -m 0644 {} ${DEPLOYDIR}/${QCOM_BOOT_IMG_SUBDIR} \; | ||
| find "${S}" -maxdepth 1 -name '*.xz' -exec install -m 0644 {} ${DEPLOYDIR}/${QCOM_BOOT_IMG_SUBDIR} \; | ||
|
|
||
| find "${S}" -maxdepth 1 -type f -name 'xbl_s_devprg_ns.melf' -exec install -m 0644 {} ${DEPLOYDIR}/${QCOM_BOOT_FILES_SUBDIR} \; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we can probably add '.lzma', '.xz' and '*.melf' directly in recipes-bsp/firmware-boot/firmware-qcom-boot-common.inc. We just don't want .xml there by default as we prefer to generate those with qcom-ptool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The scope for QCOM_BOOT_FILES_SUBDIR is at image_types_qcom.bbclass (initially set there), and the local variable is actually QCOM_BOOT_IMG_SUBDIR, but you would have to drop spinor out of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather not do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is totally unnecessary, the melf files are handled in firmware-qcom-boot-common.inc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In firmware-qcom-boot-common.inc, it will install .melf (include programmer) to spinor subfolder. previous commit I made a copy of programmer in image_types_qcom.bbclass, looks there is still concern. which recipe do you think we need to install a programmer copy to support flash build for nvme ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same programer will be needed with spinor, nvme and ufs, right? You could handle that in image_types_qcom (as I said, the scope of QCOM_BOOT_FILES_SUBDIR is already outside this file).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I asked for this change. The sharing of SPINOR programmer for NVMe works for this platform, but I don't want to impose such dependencies in a generic code.
|
|
||
| if [ -n "${QCOM_CDT_FILE}" ]; then | ||
| # check CDT file existence and install as per need, for iq-x7181, CDT file will be part of spinor build, which will | ||
| # be placed under spinor subfolder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this comment more generic saying this is due spinor, we will have other spinor devices later.
| # spinor firmware, partition bins, CDT etc. | ||
| if [ -d "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/spinor" ]; then | ||
| install -d spinor | ||
| find "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/spinor" -maxdepth 1 -type f -exec install -m 0644 {} spinor \; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You copied over the xml files before, and then you replace them later, you should probably not copy them over in the first place.
|
| DESCRIPTION = "QCOM NHLOS Firmware for Qualcomm IQ-X7181 platform" | ||
| LICENSE = "Proprietary" | ||
| # Speicify the license in recipe folder, it will be part of tarball for hamoa sprint2 release. | ||
| LIC_FILES_CHKSUM = "file://${THISDIR}/files/license/Qualcomm-Technologies-Inc.-Proprietary;md5=58d50a3d36f27f1a1e6089308a49b403" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope. It must a be a checksum of the file inside the "source". Checksumming a file outside of the source tree makes zero sense. If you want to checksum something, checksum the library. At least we know that it will change for the next release.
| @@ -0,0 +1,27 @@ | |||
| DESCRIPTION = "QCOM NHLOS Firmware for Qualcomm IQ-X7181 platform" | |||
| LICENSE = "Proprietary" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope
| @@ -0,0 +1,27 @@ | |||
| DESCRIPTION = "QCOM NHLOS Firmware for Qualcomm IQ-X7181 platform" | |||
| LICENSE = "Proprietary" | |||
| # Speicify the license in recipe folder, it will be part of tarball for hamoa sprint2 release. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does that mean? I don't know what is sprint2 nor what are the expected release dates. Please think about out-of-context people reading the patch.
|
|
||
| SRC_URI = " \ | ||
| https://artifacts.codelinaro.org/artifactory/qli-ci/flashable-binaries/ubuntu-fw/X1E80100/IQ-X.1.0-Ver.${PV}/IQ-X.1.0-Ver.${PV}-ubuntu-X1E80100-nhlos-bins.tar.gz;downloadfilename=${BOOTBINARIES}.tar.gz;name=bootbinaries \ | ||
| https://artifacts.codelinaro.org/artifactory/codelinaro-le/Qualcomm_Linux/X1E80100/cdt/IQ-X.1.0-EVK-CDT.tar.gz;downloadfilename=cdt-iq-x7181-evk_${PV}.tar.gz;name=iq-x7181-evk \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name=cdt-iq-x7181-evk.
| include firmware-qcom-boot-common.inc | ||
|
|
||
| do_deploy:append() { | ||
| find "${S}" -maxdepth 1 -name '*.xml' -exec install -m 0644 {} ${DEPLOYDIR}/${QCOM_BOOT_IMG_SUBDIR} \; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, no partition files, please.
| find "${S}" -maxdepth 1 -type f -name 'xbl_s_devprg_ns.melf' -exec install -m 0644 {} ${DEPLOYDIR}/${QCOM_BOOT_FILES_SUBDIR} \; | ||
| find "${UNPACKDIR}" -name '*CDT.bin' -exec install -m 0644 {} ${DEPLOYDIR}/${QCOM_BOOT_IMG_SUBDIR} \; | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra empty line
| find "${S}" -maxdepth 1 -name '*.lzma' -exec install -m 0644 {} ${DEPLOYDIR}/${QCOM_BOOT_IMG_SUBDIR} \; | ||
| find "${S}" -maxdepth 1 -name '*.xz' -exec install -m 0644 {} ${DEPLOYDIR}/${QCOM_BOOT_IMG_SUBDIR} \; | ||
|
|
||
| find "${S}" -maxdepth 1 -type f -name 'xbl_s_devprg_ns.melf' -exec install -m 0644 {} ${DEPLOYDIR}/${QCOM_BOOT_FILES_SUBDIR} \; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather not do that.
| # skip BLANK_GPT and WIPE_PARTITIONS for rawprogram xml files | ||
| for rawpg in `find ${DEPLOY_DIR_IMAGE}/${QCOM_PARTITION_FILES_SUBDIR} -maxdepth 1 -type f -name 'rawprogram*.xml' \ | ||
| ! -name 'rawprogram*_BLANK_GPT.xml' ! -name 'rawprogram*_WIPE_PARTITIONS.xml'`; do | ||
| install -m 0644 ${rawpg} . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is still machine-specific. Move that part to the IQ-X7181 boot binaries recipe.
| if [ -n "${QCOM_CDT_FILE}" ]; then | ||
| # check CDT file existence and install as per need, for iq-x7181, CDT file will be part of spinor build, which will | ||
| # be placed under spinor subfolder. | ||
| if [ -n "${QCOM_CDT_FILE}" ] && [ -e "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/${QCOM_CDT_FILE}.bin" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be handled in a generic code instead of creating extra copies. We know that CDT is either in the root folder or in the spinor/ subfolder.
| find "${S}" -maxdepth 1 -name '*.lzma' -exec install -m 0644 {} ${DEPLOYDIR}/${QCOM_BOOT_IMG_SUBDIR} \; | ||
| find "${S}" -maxdepth 1 -name '*.xz' -exec install -m 0644 {} ${DEPLOYDIR}/${QCOM_BOOT_IMG_SUBDIR} \; | ||
|
|
||
| find "${S}" -maxdepth 1 -type f -name 'xbl_s_devprg_ns.melf' -exec install -m 0644 {} ${DEPLOYDIR}/${QCOM_BOOT_FILES_SUBDIR} \; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is totally unnecessary, the melf files are handled in firmware-qcom-boot-common.inc.
To support Homoa IoT EVK board on meta-qcom, includes:
Depends on:
qualcomm-linux/qcom-ptool#51
qualcomm-linux/qcom-ptool#52
The generated flashable builds include builds for spinor and nvme:
tree -L 2 core-image-base-iq-x7181-evk.rootfs-20251116102537.qcomflash
core-image-base-iq-x7181-evk.rootfs-20251116102537.qcomflash
|-- dtb.bin
|-- dtb-hamoa-iot-evk-image.vfat
|-- efi.bin
|-- gpt_backup0.bin
|-- gpt_main0.bin
|-- patch0.xml
|-- rawprogram0.xml
|-- rootfs.img
|-- spinor
| |-- adsp_dtbs.elf
| |-- adsp_lite.lzma
| |-- aop_devcfg.mbn
| |-- aop.mbn
| |-- cpucp_dtbs.elf
| |-- cpucp.elf
| |-- devcfg_windows_hyp.mbn
| |-- gpt_backup0.bin
| |-- gpt_both0.bin
| |-- gpt_empty0.bin
| |-- gpt_main0.bin
| |-- hypvm.mbn
| |-- imagefv.elf
| |-- multi_image.mbn
| |-- patch0.xml
| |-- qupv3fw.elf
| |-- rawprogram0_BLANK_GPT.xml
| |-- rawprogram0_WIPE_PARTITIONS.xml
| |-- rawprogram0.xml
| |-- shrm.elf
| |-- tzapps.bin
| |-- tz.mbn
| |-- uefi.elf
| |-- wipe_rawprogram_PHY0.xml
| |-- wipe_rawprogram_PHY1.xml
| |-- wipe_rawprogram_PHY2.xml
| |-- wipe_rawprogram_PHY4.xml
| |-- wipe_rawprogram_PHY5.xml
| |-- wipe_rawprogram_PHY6.xml
| |-- wipe_rawprogram_PHY7.xml
| |-- xbl_config.elf
| |-- XblRamdump.xz
| |-- xbl_s_devprg_ns.melf
| |-- xbl_s.melf
| |-- zeros_1sector.bin
| |-- zeros_33sectors.bin
|
-- zeros_5sectors.bin |-- vmlinux |-- xbl_s_devprg_ns.melf |-- zeros_1sector.bin-- zeros_33sectors.bin