Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build-yocto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ jobs:
machine:
- iq-8275-evk
- iq-9075-evk
- iq-x7181-evk
- qcm6490-idp
- qcs615-adp-air
- qcs8300-ride-sx
Expand Down
8 changes: 8 additions & 0 deletions ci/iq-x7181-evk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siemens/kas/master/kas/schema-kas.json

header:
version: 14
includes:
- ci/base.yml

machine: iq-x7181-evk
37 changes: 36 additions & 1 deletion classes-recipe/image_types_qcom.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ QCOM_DTB_FILE ?= "dtb.bin"

QCOM_BOOT_FILES_SUBDIR ?= ""
QCOM_PARTITION_FILES_SUBDIR ??= "${QCOM_BOOT_FILES_SUBDIR}"
QCOM_PARTITION_FILES_SUBDIR_SPINOR ??= ""

QCOM_PARTITION_CONF ?= "qcom-partition-conf"

Expand Down Expand Up @@ -87,7 +88,9 @@ create_qcomflash_pkg() {
install -m 0644 ${rawpg} .
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still not addressed

Copy link
Contributor Author

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().

Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor

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.

done

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.
Copy link
Contributor

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.

if [ -n "${QCOM_CDT_FILE}" ] && [ -e "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/${QCOM_CDT_FILE}.bin" ]; then
Copy link
Contributor

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.

Copy link
Contributor Author

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"

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

install -m 0644 ${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/${QCOM_CDT_FILE}.bin cdt.bin
fi

Expand Down Expand Up @@ -126,12 +129,44 @@ create_qcomflash_pkg() {
install -m 0644 "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/${xbl_config}" xbl_config.elf
fi

# programmer
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

# sail nor firmware
if [ -d "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/sail_nor" ]; then
install -d sail_nor
find "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/sail_nor" -maxdepth 1 -type f -exec install -m 0644 {} sail_nor \;
fi

# 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 \;
Copy link
Contributor

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.


# partition bins for spinor
for pbin in `find ${DEPLOY_DIR_IMAGE}/${QCOM_PARTITION_FILES_SUBDIR_SPINOR} -maxdepth 1 -type f -name 'gpt_main*.bin' \
-o -name 'gpt_backup*.bin' -o -name 'patch*.xml'`; do
install -m 0644 ${pbin} spinor
done

# skip BLANK_GPT and WIPE_PARTITIONS for rawprogram xml files
for rawpg in `find ${DEPLOY_DIR_IMAGE}/${QCOM_PARTITION_FILES_SUBDIR_SPINOR} -maxdepth 1 -type f -name 'rawprogram*.xml' \
! -name 'rawprogram*_BLANK_GPT.xml' ! -name 'rawprogram*_WIPE_PARTITIONS.xml'`; do
install -m 0644 ${rawpg} spinor
done

for zeros in `find ${DEPLOY_DIR_IMAGE}/${QCOM_PARTITION_FILES_SUBDIR_SPINOR} -maxdepth 1 -type f -name 'zeros_*.bin'`; do
install -m 0644 ${zeros} spinor
done

# rename CDT file to match the filename in partition conf
if [ -n "${QCOM_CDT_FILE}" ]; then
install -m 0644 ${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/spinor/${QCOM_CDT_FILE}.bin spinor/cdt.bin
fi
fi

# Create symlink to ${QCOMFLASH_DIR} dir
ln -rsf ${QCOMFLASH_DIR} ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.qcomflash

Expand Down
18 changes: 18 additions & 0 deletions conf/machine/include/qcom-hamoa.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Configurations and variables for hamoa SoC family.

SOC_FAMILY = "hamoa"
require conf/machine/include/qcom-base.inc
require conf/machine/include/qcom-common.inc

QCOM_VFAT_SECTOR_SIZE = "512"

DEFAULTTUNE = "armv8-2a-crypto"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So?

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diff --git a/meta/conf/machine/include/arm/armv8-6a/tune-oryon1.inc b/meta/conf/machine/include/arm/armv8-6a/tune-oryon1.inc
new file mode 100644
index 0000000000..952e3a8986
--- /dev/null
+++ b/meta/conf/machine/include/arm/armv8-6a/tune-oryon1.inc
@@ -0,0 +1,15 @@
+#
+# Tune Settings for Qualcomnm Oryon-1
+#
+DEFAULTTUNE                                 ?= "oryon1"
+
+TUNEVALID[oryon1] = "Enable Qualcomm Oryon-1 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'oryon1', ' -mcpu=oryon-1', '', d)}"
+
+require conf/machine/include/arm/arch-armv8-6a.inc
+
+AVAILTUNES                                  += "oryon1"
+ARMPKGARCH:tune-oryon1                      = "oryon1"
+TUNE_FEATURES:tune-oryon1                   = "${TUNE_FEATURES:tune-armv8-6a-crypto} oryon1"
+PACKAGE_EXTRA_ARCHS:tune-oryon1             = "${PACKAGE_EXTRA_ARCHS:tune-armv8-6a-crypto} oryon1"
+BASE_LIB:tune-oryon1                        = "lib64"

Care to try?

-DEFAULTTUNE = "armv8-2a-crypto"
-require conf/machine/include/arm/arch-armv8-2a.inc
+require conf/machine/include/arm/armv8-6a/tune-oryon1.inc

Once confirmed I will send to oe-core.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oryon-1 baseline is v8-6a.

require conf/machine/include/arm/arch-armv8-2a.inc

MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
packagegroup-qcom-boot-essential \
"

MACHINE_EXTRA_RRECOMMENDS += " \
packagegroup-qcom-boot-additional \
"
25 changes: 25 additions & 0 deletions conf/machine/iq-x7181-evk.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#@TYPE: Machine
#@NAME: Qualcomm Hamoa IoT Evaluation Kit (EVK) based on IQ-X7181
#@DESCRIPTION: Machine configuration for Qualcomm IQ-X7181 Evaluation Kit (EVK)

require conf/machine/include/qcom-hamoa.inc

MACHINE_FEATURES += "efi pci"

QCOM_DTB_DEFAULT ?= "hamoa-iot-evk"

KERNEL_DEVICETREE ?= " \
qcom/hamoa-iot-evk.dtb \
"

MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
packagegroup-hamoa-iot-evk-firmware \
packagegroup-hamoa-iot-evk-hexagon-dsp-binaries \
"

QCOM_CDT_FILE = "IQ_X_EVK_CDT"
QCOM_BOOT_FILES_SUBDIR = "iq-x7181"
QCOM_PARTITION_FILES_SUBDIR ?= "partitions/iq-x7181-evk/nvme"
QCOM_PARTITION_FILES_SUBDIR_SPINOR ?= "partitions/iq-x7181-evk/spinor"

QCOM_BOOT_FIRMWARE = "firmware-qcom-boot-iq-x7181"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Copyright (c) 2023 Qualcomm Technologies, Inc.
All Rights Reserved.
Confidential and Proprietary - Qualcomm Technologies, Inc.
Copy link
Contributor

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).

Copy link
Contributor

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.

2 changes: 1 addition & 1 deletion recipes-bsp/firmware-boot/firmware-qcom-boot-common.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Install NHLOS boot binaries in DEPLOY_DIR

S = "${UNPACKDIR}/${BOOTBINARIES}"
S ?= "${UNPACKDIR}/${BOOTBINARIES}"
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

@shoudil shoudil Dec 2, 2025

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


QCOM_BOOT_IMG_SUBDIR ?= ""

Expand Down
27 changes: 27 additions & 0 deletions recipes-bsp/firmware-boot/firmware-qcom-boot-iq-x7181.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
DESCRIPTION = "QCOM NHLOS Firmware for Qualcomm IQ-X7181 platform"
LICENSE = "Proprietary"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope

# Speicify the license in recipe folder, it will be part of tarball for hamoa sprint2 release.
Copy link
Contributor

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.

LIC_FILES_CHKSUM = "file://${THISDIR}/files/license/Qualcomm-Technologies-Inc.-Proprietary;md5=58d50a3d36f27f1a1e6089308a49b403"
Copy link
Contributor

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.


BOOTBINARIES = "IQ-X.1.0-Ver.${PV}-ubuntu-X1E80100-nhlos-bins"
S = "${UNPACKDIR}/${BOOTBINARIES}/spinor"

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 \
Copy link
Contributor

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.

"
SRC_URI[iq-x7181-evk.sha256sum] = "d55cfc97c810582cdfc88c77b0fbe516cd77468ea40ab88f7e0cd53cadd9df12"

QCOM_BOOT_IMG_SUBDIR = "iq-x7181/spinor"

include firmware-qcom-boot-common.inc

do_deploy:append() {
find "${S}" -maxdepth 1 -name '*.xml' -exec install -m 0644 {} ${DEPLOYDIR}/${QCOM_BOOT_IMG_SUBDIR} \;
Copy link
Contributor

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 -name '*.lzma' -exec install -m 0644 {} ${DEPLOYDIR}/${QCOM_BOOT_IMG_SUBDIR} \;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be precise here, list XblRamdump.xz and adsp_lite.lzma rather than glob wildcards

Copy link
Contributor Author

@shoudil shoudil Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be precise here, list XblRamdump.xz and adsp_lite.lzma rather than glob wildcards
It's fine to update as there is only one file on hamoa EVK currently.

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} \;
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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 ?

Copy link
Contributor

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).

Copy link
Contributor

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.

find "${UNPACKDIR}" -name '*CDT.bin' -exec install -m 0644 {} ${DEPLOYDIR}/${QCOM_BOOT_IMG_SUBDIR} \;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename the file in the do_compile stage rather than adding extra commands here.

}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra empty line

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
require firmware-qcom-boot-iq-x7181.inc

SRC_URI[bootbinaries.sha256sum] = "8a2ab2f320995a4e89511218a1e81f8811f264f5881ebcedc601b26706858fb5"
2 changes: 1 addition & 1 deletion recipes-bsp/partition/qcom-partition-conf_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b0a8acd90d872086b279ead88af03369"

SRC_URI = "git://github.com/qualcomm-linux/qcom-ptool.git;branch=main;protocol=https"
SRCREV = "f410a567c4913c6a6b719eb6ea8103f2cd5c6be0"
SRCREV = "8ed8d47982228e4fe21fdc670318fc083d8e7614"

INHIBIT_DEFAULT_DEPS = "1"

Expand Down
1 change: 1 addition & 0 deletions recipes-kernel/images/esp-qcom-image.bb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ UKI_CMDLINE += "${@d.getVar('KERNEL_CMDLINE_EXTRA') or ''}"
# Remove 'upstream' dtb, rely on EFI provided one
KERNEL_DEVICETREE = ""
KERNEL_DEVICETREE:sm8750-mtp = "${QCOM_DTB_DEFAULT}.dtb"
KERNEL_DEVICETREE:iq-x7181-evk = "${QCOM_DTB_DEFAULT}.dtb"

IMAGE_FSTYPES = "vfat"
IMAGE_FSTYPES_DEBUGFS = ""
Expand Down
3 changes: 3 additions & 0 deletions recipes-kernel/linux/linux-qcom-next/configs/qcom.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ CONFIG_SCSI_UFS_QCOM=y
CONFIG_SM_TCSRCC_8750=y
CONFIG_CLK_KAANAPALI_TCSRCC=y

# for NVME
CONFIG_BLK_DEV_NVME=y

# DMA BUF userspace heaps, for e.g. IMSDK
CONFIG_DMABUF_HEAPS=y
CONFIG_DMABUF_HEAPS_SYSTEM=y
Expand Down
Loading