diff --git a/.github/workflows/build-yocto.yml b/.github/workflows/build-yocto.yml index a6a34aa1c..8a4f737d2 100644 --- a/.github/workflows/build-yocto.yml +++ b/.github/workflows/build-yocto.yml @@ -109,6 +109,7 @@ jobs: machine: - iq-8275-evk - iq-9075-evk + - iq-x7181-evk - qcm6490-idp - qcs615-adp-air - qcs8300-ride-sx diff --git a/ci/iq-x7181-evk.yml b/ci/iq-x7181-evk.yml new file mode 100644 index 000000000..00ae0a435 --- /dev/null +++ b/ci/iq-x7181-evk.yml @@ -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 diff --git a/classes-recipe/image_types_qcom.bbclass b/classes-recipe/image_types_qcom.bbclass index ed37a0157..5556846d6 100644 --- a/classes-recipe/image_types_qcom.bbclass +++ b/classes-recipe/image_types_qcom.bbclass @@ -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" @@ -87,7 +88,9 @@ create_qcomflash_pkg() { install -m 0644 ${rawpg} . 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. + if [ -n "${QCOM_CDT_FILE}" ] && [ -e "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/${QCOM_CDT_FILE}.bin" ]; then install -m 0644 ${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/${QCOM_CDT_FILE}.bin cdt.bin fi @@ -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 \; + + # 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 diff --git a/conf/machine/include/qcom-hamoa.inc b/conf/machine/include/qcom-hamoa.inc new file mode 100644 index 000000000..ea0d7d3e8 --- /dev/null +++ b/conf/machine/include/qcom-hamoa.inc @@ -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" +require conf/machine/include/arm/arch-armv8-2a.inc + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ + packagegroup-qcom-boot-essential \ +" + +MACHINE_EXTRA_RRECOMMENDS += " \ + packagegroup-qcom-boot-additional \ +" diff --git a/conf/machine/iq-x7181-evk.conf b/conf/machine/iq-x7181-evk.conf new file mode 100644 index 000000000..91e2fffd6 --- /dev/null +++ b/conf/machine/iq-x7181-evk.conf @@ -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" diff --git a/recipes-bsp/firmware-boot/files/license/Qualcomm-Technologies-Inc.-Proprietary b/recipes-bsp/firmware-boot/files/license/Qualcomm-Technologies-Inc.-Proprietary new file mode 100644 index 000000000..1dc32f95f --- /dev/null +++ b/recipes-bsp/firmware-boot/files/license/Qualcomm-Technologies-Inc.-Proprietary @@ -0,0 +1,3 @@ +Copyright (c) 2023 Qualcomm Technologies, Inc. +All Rights Reserved. +Confidential and Proprietary - Qualcomm Technologies, Inc. diff --git a/recipes-bsp/firmware-boot/firmware-qcom-boot-common.inc b/recipes-bsp/firmware-boot/firmware-qcom-boot-common.inc index 9081e3e88..8ffceed5f 100644 --- a/recipes-bsp/firmware-boot/firmware-qcom-boot-common.inc +++ b/recipes-bsp/firmware-boot/firmware-qcom-boot-common.inc @@ -1,6 +1,6 @@ # Install NHLOS boot binaries in DEPLOY_DIR -S = "${UNPACKDIR}/${BOOTBINARIES}" +S ?= "${UNPACKDIR}/${BOOTBINARIES}" QCOM_BOOT_IMG_SUBDIR ?= "" diff --git a/recipes-bsp/firmware-boot/firmware-qcom-boot-iq-x7181.inc b/recipes-bsp/firmware-boot/firmware-qcom-boot-iq-x7181.inc new file mode 100644 index 000000000..131e08fb1 --- /dev/null +++ b/recipes-bsp/firmware-boot/firmware-qcom-boot-iq-x7181.inc @@ -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. +LIC_FILES_CHKSUM = "file://${THISDIR}/files/license/Qualcomm-Technologies-Inc.-Proprietary;md5=58d50a3d36f27f1a1e6089308a49b403" + +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 \ + " +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} \; + 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} \; + find "${UNPACKDIR}" -name '*CDT.bin' -exec install -m 0644 {} ${DEPLOYDIR}/${QCOM_BOOT_IMG_SUBDIR} \; +} + diff --git a/recipes-bsp/firmware-boot/firmware-qcom-boot-iq-x7181_1.1.bb b/recipes-bsp/firmware-boot/firmware-qcom-boot-iq-x7181_1.1.bb new file mode 100644 index 000000000..6c248a035 --- /dev/null +++ b/recipes-bsp/firmware-boot/firmware-qcom-boot-iq-x7181_1.1.bb @@ -0,0 +1,3 @@ +require firmware-qcom-boot-iq-x7181.inc + +SRC_URI[bootbinaries.sha256sum] = "8a2ab2f320995a4e89511218a1e81f8811f264f5881ebcedc601b26706858fb5" diff --git a/recipes-bsp/partition/qcom-partition-conf_git.bb b/recipes-bsp/partition/qcom-partition-conf_git.bb index c26ca85f4..5ee5127e2 100644 --- a/recipes-bsp/partition/qcom-partition-conf_git.bb +++ b/recipes-bsp/partition/qcom-partition-conf_git.bb @@ -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" diff --git a/recipes-kernel/images/esp-qcom-image.bb b/recipes-kernel/images/esp-qcom-image.bb index 0ef15eb58..8947cb077 100644 --- a/recipes-kernel/images/esp-qcom-image.bb +++ b/recipes-kernel/images/esp-qcom-image.bb @@ -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 = "" diff --git a/recipes-kernel/linux/linux-qcom-next/configs/qcom.cfg b/recipes-kernel/linux/linux-qcom-next/configs/qcom.cfg index b5a294f97..dc07b33f5 100644 --- a/recipes-kernel/linux/linux-qcom-next/configs/qcom.cfg +++ b/recipes-kernel/linux/linux-qcom-next/configs/qcom.cfg @@ -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