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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ revision: HEAD

The dependency is optional, and not strictly required. When meta-oe is enabled
in the build (e.g. it is used in BBLAYERS) then additional recipes from
meta-qcom are added to the metadata. You can refer to meta-qcom/conf/layer.conf
meta-qcom are added to the metadata. You can refer to meta-qcom/meta-qcom/conf/layer.conf
for the implementation details.

## Branches
Expand Down
2 changes: 2 additions & 0 deletions ci/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ defaults:

repos:
meta-qcom:
layers:
meta-qcom:

oe-core:
url: https://github.com/openembedded/openembedded-core
Expand Down
4 changes: 2 additions & 2 deletions ci/yocto-check-layer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ export KAS_WORK_DIR=$(realpath ${KAS_WORK_DIR:-$(mktemp -d)})
# Yocto Project layer checking tool
CMD="yocto-check-layer-wrapper"
# Layer to check
CMD="$CMD $TOPDIR"
CMD="$CMD $TOPDIR/meta-qcom"
# Disable auto layer discovery
CMD="$CMD --no-auto"
# Layers to process for dependencies
CMD="$CMD --dependency $KAS_WORK_DIR/oe-core/meta"
# Disable automatic testing of dependencies
CMD="$CMD --no-auto-dependency"
# Set machines to all machines defined in this BSP layer
CMD="$CMD --machines $(echo $(find $TOPDIR/conf/machine/ -maxdepth 1 -name *.conf -exec basename {} .conf \; ))"
CMD="$CMD --machines $(echo $(find $TOPDIR/meta-qcom/conf/machine/ -maxdepth 1 -name *.conf -exec basename {} .conf \; ))"

echo "Running kas in $KAS_WORK_DIR"
exec kas shell $TOPDIR/ci/base.yml --command "$CMD"
17 changes: 17 additions & 0 deletions meta-qcom-tip/COPYING.MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
13 changes: 13 additions & 0 deletions meta-qcom-tip/conf/layer.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"

# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"

BBFILE_COLLECTIONS += "meta-qcom-tip"
BBFILE_PATTERN_meta-qcom-tip = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-qcom-tip = "9"

LAYERDEPENDS_meta-qcom-tip = "qcom"
LAYERSERIES_COMPAT_meta-qcom-tip = "walnascar"
11 changes: 11 additions & 0 deletions meta-qcom-tip/conf/qcom-tip.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
QCOM_QCM6490_PV = "00085.0"
QCOM_QCM6490_BOOTBINARIES_SUM = "9b2b38e22c18896765d789609ed321f47b25e4f9574204995f591abc1b598ec4"
QCOM_QCM6490_FIRMWARE_SUM = "771de30b5f2c352de4d770f2352e2a038c424c9221eed743256d44fda77a4dee"

QCOM_QCS8300_PV = "00085.0"
QCOM_QCS8300_BOOTBINARIES_SUM = "5f82e10d64afb10fe812bb6741aa74894718fd05654f39d1466f54ebe81dbb42"
QCOM_QCS8300_FIRMWARE_SUM = "f09d2e6ad5f89a9ec23f0b16ce8fe88eed430c708fbcea12ec55733176394d2a"

QCOM_QCS9100_PV = "00085.0"
QCOM_QCS9100_BOOTBINARIES_SUM = "10a0f1859021ef8e0e8e367c5050faf16573af99c4e4ffc608f5e0804093ff01"
QCOM_QCS9100_FIRMWARE_SUM = "b41759b0adb324d304703ab162e9d5656551e37d216744a6d3e476666d9b0b5e"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require recipes-bsp/firmware-boot/firmware-qcom-boot-qcs6490.inc
require firmware-qcom-boot-tip.inc

QCOM_FW_SOC = "qcm6490"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require recipes-bsp/firmware-boot/firmware-qcom-boot-qcs8300.inc
require firmware-qcom-boot-tip.inc

QCOM_FW_SOC = "qcs8300"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require recipes-bsp/firmware-boot/firmware-qcom-boot-qcs9100.inc
require firmware-qcom-boot-tip.inc

QCOM_FW_SOC = "qcs9100"
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
require conf/qcom-tip.conf

def get_var(d, var):
name = var % d.getVar('QCOM_FW_SOC').upper()
return d.getVar(name)

PV = "${@get_var(d, 'QCOM_%s_PV')}"
SRC_URI[bootbinaries.sha256sum] = "${@get_var(d, 'QCOM_%s_BOOTBINARIES_SUM')}"
16 changes: 16 additions & 0 deletions meta-qcom-tip/recipes-bsp/firmware/firmware-qcom-qcs6490_tip.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
QCOM_FW_BOARD = "Robotics RB3 Gen2"
QCOM_FW_SOC = "qcm6490"
QCOM_FW_NAME = "QCM6490_fw"

FW_QCOM_NAME = "qcm6490"

DSP_PKG_NAME = "thundercomm-rb3gen2"
DSP_QCOM_VENDOR = "Thundercomm"
DSP_QCOM_DEVICE = "RB3gen2"

require firmware-qcom-tip.inc

do_install:append() {
install -d ${D}/${FW_QCOM_BASE_PATH}/qcs6490
ln -sr ${D}/${FW_QCOM_PATH}/* ${D}/${FW_QCOM_BASE_PATH}/qcs6490/
}
11 changes: 11 additions & 0 deletions meta-qcom-tip/recipes-bsp/firmware/firmware-qcom-qcs8300_tip.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
QCOM_FW_BOARD = "QCS8300"
QCOM_FW_SOC = "qcs8300"
QCOM_FW_NAME = "QCS8300_fw"

FW_QCOM_NAME = "qcs8300"

DSP_PKG_NAME = "qcom-qcs8300-ride"
DSP_QCOM_VENDOR = "Qualcomm"
DSP_QCOM_DEVICE = "QCS8300-RIDE"

require firmware-qcom-tip.inc
15 changes: 15 additions & 0 deletions meta-qcom-tip/recipes-bsp/firmware/firmware-qcom-qcs9100_tip.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
QCOM_FW_BOARD = "QCS9100"
QCOM_FW_SOC = "qcs9100"
QCOM_FW_NAME = "QCS9100_fw"

FW_QCOM_NAME = "sa8775p"

DSP_PKG_NAME = "qcom-sa8775p-ride"
DSP_QCOM_VENDOR = "Qualcomm"
DSP_QCOM_DEVICE = "SA8775P-RIDE"

require firmware-qcom-tip.inc

do_install:append() {
mv ${D}/${DSP_QCOM_PATH}/dsp/*/*jsn ${D}/${FW_QCOM_PATH}
}
63 changes: 63 additions & 0 deletions meta-qcom-tip/recipes-bsp/firmware/firmware-qcom-tip.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
DESCRIPTION = "QCOM HLOS Firmware for Qualcomm ${QCOM_FW_BOARD} platform"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://Qualcomm-Technologies-Inc.-Proprietary;md5=58d50a3d36f27f1a1e6089308a49b403"

require conf/qcom-tip.conf

def get_var(d, var):
name = var % d.getVar('QCOM_FW_SOC').upper()
return d.getVar(name) or ""

PV = "${@get_var(d, 'QCOM_%s_PV')}"
SRC_URI[fw.sha256sum] = "${@get_var(d, 'QCOM_%s_FIRMWARE_SUM')}"

FW_ARTIFACTORY = "softwarecenter.qualcomm.com/download/software/chip/qualcomm_linux-spf-1-0/qualcomm-linux-spf-1-0_test_device_public"
FW_BUILD_ID = "r1.0_${PV}/${QCOM_FW_SOC}-le-1-0"
FW_BIN_PATH = "common/build/ufs/bin"

DSP_QCOM_SOC ?= "${FW_QCOM_NAME}"

DSP_QCOM_BASE_PATH = "${datadir}/qcom"
DSP_QCOM_PATH = "${DSP_QCOM_BASE_PATH}/${DSP_QCOM_SOC}/${DSP_QCOM_VENDOR}/${DSP_QCOM_DEVICE}"

SRC_URI = " \
https://${FW_ARTIFACTORY}/${FW_BUILD_ID}/${FW_BIN_PATH}/${QCOM_FW_NAME}.zip;downloadfilename=${QCOM_FW_NAME}_r1.0_${PV}.zip;name=fw \
"

S = "${UNPACKDIR}/${QCOM_FW_NAME}"

require recipes-bsp/firmware/firmware-qcom.inc

do_install:append() {
install -d ${D}${FW_QCOM_PATH}
install -m 0644 ${S}/lib/firmware/qcom/${FW_QCOM_SUBDIR}/*.mbn ${D}${FW_QCOM_PATH}
install -m 0644 ${S}/lib/firmware/qcom/${FW_QCOM_SUBDIR}/*.jsn ${D}${FW_QCOM_PATH}
if [ -e "${S}/lib/firmware/qupv3fw.elf" ] ; then
install -m 0644 "${S}/lib/firmware/qupv3fw.elf" ${D}${FW_QCOM_PATH}
fi

for subdir in `ls -1 ${S}/usr/lib/dsp` ; do
install -d ${D}${DSP_QCOM_PATH}/dsp/${subdir}
install -m 0644 ${S}/usr/lib/dsp/${subdir}/* ${D}${DSP_QCOM_PATH}/dsp/${subdir}
done
}

SPLIT_FIRMWARE_PACKAGES = " \
linux-firmware-qcom-${FW_QCOM_NAME}-audio \
linux-firmware-qcom-${FW_QCOM_NAME}-compute \
linux-firmware-qcom-${FW_QCOM_NAME}-generalpurpose \
hexagon-dsp-binaries-${DSP_PKG_NAME}-adsp \
hexagon-dsp-binaries-${DSP_PKG_NAME}-cdsp \
hexagon-dsp-binaries-${DSP_PKG_NAME}-gdsp \
hexagon-dsp-binaries-${DSP_PKG_NAME}-sdsp \
"

FILES:hexagon-dsp-binaries-${DSP_PKG_NAME}-adsp = "${DSP_QCOM_PATH}/dsp/adsp"
FILES:hexagon-dsp-binaries-${DSP_PKG_NAME}-cdsp = "${DSP_QCOM_PATH}/dsp/cdsp*"
FILES:hexagon-dsp-binaries-${DSP_PKG_NAME}-gdsp = "${DSP_QCOM_PATH}/dsp/gdsp*"
FILES:hexagon-dsp-binaries-${DSP_PKG_NAME}-sdsp = "${DSP_QCOM_PATH}/dsp/sdsp*"

INSANE_SKIP:hexagon-dsp-binaries-${DSP_PKG_NAME}-adsp = "arch libdir file-rdeps textrel"
INSANE_SKIP:hexagon-dsp-binaries-${DSP_PKG_NAME}-cdsp = "arch libdir file-rdeps textrel"
INSANE_SKIP:hexagon-dsp-binaries-${DSP_PKG_NAME}-gdsp = "arch libdir file-rdeps textrel"
INSANE_SKIP:hexagon-dsp-binaries-${DSP_PKG_NAME}-sdsp = "arch libdir file-rdeps textrel"
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
REMOVE_BOARDS = " \
qcom-sa8775p-ride \
qcom-qcs8300-ride \
thundercomm-rb3gen2 \
"
REMOVE_PACKAGES = " \
adsp \
cdsp \
gdsp \
"

python() {
pkgs = d.getVar('PACKAGES').split()
newpkgs = []
for board in d.getVar('REMOVE_BOARDS').split():
for pkg in d.getVar('REMOVE_PACKAGES').split():
name = 'hexagon-dsp-binaries-%s-%s' % (board, pkg)
x_name = 'x-' + name
if name in pkgs:
pkgs.remove(name)
newpkgs.append(x_name)
files = d.getVar('FILES:%s' % name, False)
d.setVar('FILES:%s' % x_name, files)
files = d.getVar('LICENSE:%s' % name)
d.setVar('LICENSE:%s' % x_name, files)
files = d.getVar('RDEPENDS:%s' % name)
d.setVar('RDEPENDS:%s' % x_name, files)
files = d.getVar('INSANE_SKIP:%s' % name)
d.setVar('INSANE_SKIP:%s' % x_name, files)
newpkgs.extend(pkgs)
d.setVar('PACKAGES', ' '.join(newpkgs))
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
REMOVE_SOCS = " \
qcm6490 \
qcs8300 \
sa8775p \
"
REMOVE_PACKAGES = " \
audio \
compute \
generalpurpose \
"

python() {
pkgs = d.getVar('PACKAGES').split()
newpkgs = []
for soc in d.getVar('REMOVE_SOCS').split():
for pkg in d.getVar('REMOVE_PACKAGES').split():
name = 'linux-firmware-qcom-%s-%s' % (soc, pkg)
x_name = 'x-' + name
if name in pkgs:
pkgs.remove(name)
newpkgs.append(x_name)
files = d.getVar('FILES:%s' % name, False)
d.setVar('FILES:%s' % x_name, files)
files = d.getVar('LICENSE:%s' % name)
d.setVar('LICENSE:%s' % x_name, files)
files = d.getVar('RDEPENDS:%s' % name)
d.setVar('RDEPENDS:%s' % x_name, files)
newpkgs.extend(pkgs)
d.setVar('PACKAGES', ' '.join(newpkgs))
}

python populate_packages:append() {
newpkgs = d.getVar('RRECOMMENDS:linux-firmware').split()
newpkgs = filter(lambda x: not x.startswith('x-'), newpkgs)
d.setVar('RRECOMMENDS:linux-firmware', ' '.join(newpkgs))
}
1 change: 1 addition & 0 deletions meta-qcom/README
File renamed without changes.
Loading