diff options
Diffstat (limited to 'meta-ti-bsp')
219 files changed, 7434 insertions, 0 deletions
diff --git a/meta-ti-bsp/COPYING.MIT b/meta-ti-bsp/COPYING.MIT new file mode 100644 index 00000000..fb950dc6 --- /dev/null +++ b/meta-ti-bsp/COPYING.MIT @@ -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. diff --git a/meta-ti-bsp/README b/meta-ti-bsp/README new file mode 100644 index 00000000..c5780531 --- /dev/null +++ b/meta-ti-bsp/README @@ -0,0 +1,33 @@ +The official OpenEmbedded/Yocto BSP layer for Texas Instruments platforms. + +It is hosted on http://git.yoctoproject.org/cgit/cgit.cgi/meta-ti/ with the +source repository at git://git.yoctoproject.org/meta-ti + + +This layer depends on: + +URI: git://git.openembedded.org/openembedded-core +layers: meta +branch: master + +URI: git://git.yoctoproject.org/meta-arm +layers: meta-arm +branch: master + + +The base BSP part of meta-ti should work with different OpenEmbedded/Yocto +distributions and layer stacks, such as: +distro-less (only with OE-Core), with Yocto/Poky, with Angstrom or Arago. + +Please follow the recommended setup procedures of your OE distribution. + + +Send pull requests, patches, comments or questions to: +meta-ti@lists.yoctoproject.org + +Please note - meta-ti mailing list requires subscription for posting: +https://lists.yoctoproject.org/g/meta-ti + +Maintainers: +Ryan Eatmon <reatmon@ti.com> +Denys Dmytriyenko <denys@konsulko.com> diff --git a/meta-ti-bsp/classes/kernel-fitimage-legacyhs.bbclass b/meta-ti-bsp/classes/kernel-fitimage-legacyhs.bbclass new file mode 100644 index 00000000..5e1fa56a --- /dev/null +++ b/meta-ti-bsp/classes/kernel-fitimage-legacyhs.bbclass @@ -0,0 +1,758 @@ +inherit ti-secdev kernel-uboot uboot-sign-legacyhs + +FITIMAGE_HASH_ALGO ?= "sha1" +FITIMAGE_PACK_TEE ?= "0" +FITIMAGE_DTB_BY_NAME ?= "0" +FITIMAGE_TEE_BY_NAME ?= "0" +FITIMAGE_CONF_BY_NAME ?= "0" + +python __anonymous () { + kerneltypes = d.getVar('KERNEL_IMAGETYPES') or "" + if 'fitImage' in kerneltypes.split(): + depends = d.getVar("DEPENDS") + depends = "%s u-boot-mkimage-native dtc-native" % depends + d.setVar("DEPENDS", depends) + + uarch = d.getVar("UBOOT_ARCH") + if uarch == "arm64": + replacementtype = "Image" + elif uarch == "mips": + replacementtype = "vmlinuz.bin" + elif uarch == "x86": + replacementtype = "bzImage" + elif uarch == "microblaze": + replacementtype = "linux.bin" + else: + replacementtype = "zImage" + + # Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal + # to kernel.bbclass . We have to override it, since we pack zImage + # (at least for now) into the fitImage . + typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE") or "" + if 'fitImage' in typeformake.split(): + d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake.replace('fitImage', replacementtype)) + + image = d.getVar('INITRAMFS_IMAGE') + if image: + d.appendVarFlag('do_assemble_fitimage_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete') + + # Verified boot will sign the fitImage and append the public key to + # U-boot dtb. We ensure the U-Boot dtb is deployed before assembling + # the fitImage: + if d.getVar('UBOOT_SIGN_ENABLE'): + uboot_pn = d.getVar('PREFERRED_PROVIDER_u-boot') or 'u-boot' + d.appendVarFlag('do_assemble_fitimage', 'depends', ' %s:do_deploy' % uboot_pn) + + if d.getVar('FITIMAGE_PACK_TEE') == "1": + d.appendVarFlag('do_assemble_fitimage', 'depends', ' optee-os:do_deploy') +} + +# Options for the device tree compiler passed to mkimage '-D' feature: +UBOOT_MKIMAGE_DTCOPTS ??= "" + +fitimage_ti_secure() { + if test -f "${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh"; then + export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG} + ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh $1 $2 + else + cp $1 $2 + fi +} + +# +# Emit the fitImage ITS header +# +# $1 ... .its filename +fitimage_emit_fit_header() { + cat << EOF >> ${1} +/dts-v1/; + +/ { + description = "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"; + #address-cells = <1>; +EOF +} + +# +# Emit the fitImage section bits +# +# $1 ... .its filename +# $2 ... Section bit type: imagestart - image section start +# confstart - configuration section start +# sectend - section end +# fitend - fitimage end +# +fitimage_emit_section_maint() { + case $2 in + imagestart) + cat << EOF >> ${1} + + images { +EOF + ;; + confstart) + cat << EOF >> ${1} + + configurations { +EOF + ;; + sectend) + cat << EOF >> ${1} + }; +EOF + ;; + fitend) + cat << EOF >> ${1} +}; +EOF + ;; + esac +} + +# +# Emit the fitImage ITS kernel section +# +# $1 ... .its filename +# $2 ... Image counter +# $3 ... Path to kernel image +# $4 ... Compression type +fitimage_emit_section_kernel() { + + kernel_csum=${FITIMAGE_HASH_ALGO} + + ENTRYPOINT="${UBOOT_ENTRYPOINT}" + if test -n "${UBOOT_ENTRYSYMBOL}"; then + ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \ + awk '$4=="${UBOOT_ENTRYSYMBOL}" {print $2}'` + fi + + cat << EOF >> ${1} + kernel-${2} { + description = "Linux kernel"; + data = /incbin/("${3}"); + type = "kernel"; + arch = "${UBOOT_ARCH}"; + os = "linux"; + compression = "${4}"; + load = <${UBOOT_LOADADDRESS}>; + entry = <${ENTRYPOINT}>; +EOF + if test -n "${FITIMAGE_HASH_ALGO}"; then + cat << EOF >> ${1} + hash-1 { + algo = "${kernel_csum}"; + }; +EOF + fi + cat << EOF >> ${1} + }; +EOF +} + +# +# Emit the fitImage ITS DTB section +# +# $1 ... .its filename +# $2 ... Image counter/name +# $3 ... Path to DTB image +# $4 ... Load address +fitimage_emit_section_dtb() { + + dtb_csum=${FITIMAGE_HASH_ALGO} + dtb_loadline="${4}" + + cat << EOF >> ${1} + ${2} { + description = "Flattened Device Tree blob"; + data = /incbin/("${3}"); + type = "flat_dt"; + arch = "${UBOOT_ARCH}"; + compression = "none"; + ${dtb_loadline} +EOF + if test -n "${FITIMAGE_HASH_ALGO}"; then + cat << EOF >> ${1} + hash-1 { + algo = "${dtb_csum}"; + }; +EOF + fi + cat << EOF >> ${1} + }; +EOF +} + +# +# Emit the fitImage ITS TEE section +# +# $1 ... .its filename +# $2 ... Image counter/name +# $3 ... Path to TEE image +fitimage_emit_section_tee() { + + tee_csum=${FITIMAGE_HASH_ALGO} + + cat << EOF >> ${1} + ${2} { + description = "OPTEE OS Image"; + data = /incbin/("${3}"); + type = "tee"; + arch = "${UBOOT_ARCH}"; + compression = "none"; +EOF + if test -n "${FITIMAGE_HASH_ALGO}"; then + cat << EOF >> ${1} + hash-1 { + algo = "${tee_csum}"; + }; +EOF + fi + cat << EOF >> ${1} + }; +EOF +} + +# +# Emit the fitImage ITS setup section +# +# $1 ... .its filename +# $2 ... Image counter +# $3 ... Path to setup image +fitimage_emit_section_setup() { + + setup_csum=${FITIMAGE_HASH_ALGO} + + cat << EOF >> ${1} + setup-${2} { + description = "Linux setup.bin"; + data = /incbin/("${3}"); + type = "x86_setup"; + arch = "${UBOOT_ARCH}"; + os = "linux"; + compression = "none"; + load = <0x00090000>; + entry = <0x00090000>; +EOF + if test -n "${FITIMAGE_HASH_ALGO}"; then + cat << EOF >> ${1} + hash-1 { + algo = "${setup_csum}"; + }; +EOF + fi + cat << EOF >> ${1} + }; +EOF +} + +# +# Emit the fitImage ITS ramdisk section +# +# $1 ... .its filename +# $2 ... Image counter +# $3 ... Path to ramdisk image +fitimage_emit_section_ramdisk() { + + ramdisk_csum=${FITIMAGE_HASH_ALGO} + ramdisk_ctype="none" + + case $3 in + *.gz|*.gz.sec) + ramdisk_ctype="gzip" + ;; + *.bz2|*.bz2.sec) + ramdisk_ctype="bzip2" + ;; + *.lzma|*.lzma.sec) + ramdisk_ctype="lzma" + ;; + *.lzo|*.lzo.sec) + ramdisk_ctype="lzo" + ;; + *.lz4|*.lz4.sec) + ramdisk_ctype="lz4" + ;; + esac + + cat << EOF >> ${1} + ramdisk-${2} { + description = "ramdisk image"; + data = /incbin/("${3}"); + type = "ramdisk"; + arch = "${UBOOT_ARCH}"; + os = "linux"; + compression = "${ramdisk_ctype}"; +EOF + if test -n "${UBOOT_RD_LOADADDRESS}"; then + cat << EOF >> ${1} + load = <${UBOOT_RD_LOADADDRESS}>; +EOF + fi + + if test -n "${UBOOT_RD_ENTRYPOINT}"; then + cat << EOF >> ${1} + entry = <${UBOOT_RD_ENTRYPOINT}>; +EOF + fi + + if test -n "${FITIMAGE_HASH_ALGO}"; then + cat << EOF >> ${1} + hash-1 { + algo = "${ramdisk_csum}"; + }; +EOF + fi + cat << EOF >> ${1} + }; +EOF +} + +# +# Emit the fitImage ITS configuration section +# +# $1 ... .its filename +# $2 ... Linux kernel ID +# $3 ... DTB image ID/name +# $4 ... ramdisk ID +# $5 ... config ID +# $6 ... tee ID/name +fitimage_emit_section_config() { + + conf_csum=${FITIMAGE_HASH_ALGO} + if [ -n "${UBOOT_SIGN_ENABLE}" ] ; then + conf_sign_keyname="${UBOOT_SIGN_KEYNAME}" + fi + + sep="" + conf_desc="" + kernel_line="" + fdt_line="" + ramdisk_line="" + setup_line="" + default_line="" + + if [ -n "${2}" ]; then + conf_desc="Linux kernel" + sep=", " + kernel_line="kernel = \"kernel-${2}\";" + fi + + if [ -n "${3}" ]; then + conf_desc="${conf_desc}${sep}FDT blob" + sep=", " + fi + + if [ -n "${4}" ]; then + conf_desc="${conf_desc}${sep}ramdisk" + sep=", " + ramdisk_line="ramdisk = \"ramdisk-${4}\";" + fi + + if [ -n "${5}" ]; then + conf_desc="${conf_desc}${sep}setup" + sep=", " + setup_line="setup = \"setup-${5}\";" + fi + + if [ -n "${6}" -a "x${FITIMAGE_PACK_TEE}" = "x1" ]; then + if [ "x${FITIMAGE_TEE_BY_NAME}" = "x1" ]; then + loadables_line="loadables = \"${6}.optee\";" + loadables_pager_line="loadables = \"${6}-pager.optee\";" + else + loadables_line="loadables = \"tee-${6}\";" + nextnum=`expr ${6} + 1` + loadables_pager_line="loadables = \"tee-${nextnum}\";" + fi + final_conf_desc="${conf_desc}${sep}OPTEE OS Image" + else + loadables_line="" + loadables_pager_line="" + final_conf_desc="${conf_desc}" + fi + + dtbcount=1 + for DTB in ${KERNEL_DEVICETREE}; do + DTB=$(basename "${DTB}") + dtb_ext=${DTB##*.} + if [ "x${FITIMAGE_CONF_BY_NAME}" = "x1" ] ; then + conf_name="${DTB}" + else + conf_name="conf-${dtbcount}" + fi + + if [ "x${FITIMAGE_DTB_BY_NAME}" = "x1" ] ; then + fdt_line="fdt = \"${DTB}\";" + else + fdt_line="fdt = \"fdt-${dtbcount}\";" + fi + + if [ "x${dtbcount}" = "x1" ]; then + cat << EOF >> ${1} + default = "${conf_name}"; +EOF + fi + +# Generate a single configuration section + cat << EOF >> ${1} + ${conf_name} { + description = "${final_conf_desc}"; + ${fdt_line} +EOF + if [ "${dtb_ext}" != "dtbo" ]; then + cat << EOF >> ${1} + ${kernel_line} + ${ramdisk_line} + ${setup_line} + ${loadables_line} +EOF + fi + if test -n "${FITIMAGE_HASH_ALGO}"; then + cat << EOF >> ${1} + hash-1 { + algo = "${conf_csum}"; + }; +EOF + fi + + if [ ! -z "${conf_sign_keyname}" ] ; then + + sign_line="sign-images = \"kernel\"" + + if [ -n "${3}" ]; then + sign_line="${sign_line}, \"fdt\"" + fi + + if [ -n "${4}" ]; then + sign_line="${sign_line}, \"ramdisk\"" + fi + + if [ -n "${5}" ]; then + sign_line="${sign_line}, \"setup\"" + fi + + sign_line="${sign_line};" + + cat << EOF >> ${1} + signature-1 { + algo = "${conf_csum},rsa2048"; + key-name-hint = "${conf_sign_keyname}"; + ${sign_line} + }; +EOF + fi + + cat << EOF >> ${1} + }; +EOF +# End single config section + +# Generate a single "pager" configuration section + if [ "${OPTEEPAGER}" = "y" ]; then + if [ "x${FITIMAGE_CONF_BY_NAME}" = "x1" ] ; then + conf_name="${DTB}-pager" + else + conf_name="conf-${dtbcount}" + fi + + cat << EOF >> ${1} + ${conf_name} { + description = "${final_conf_desc}"; + ${fdt_line} +EOF + if [ "${dtb_ext}" != "dtbo" ]; then + cat << EOF >> ${1} + ${kernel_line} + ${ramdisk_line} + ${setup_line} + ${loadables_pager_line} +EOF + fi + if test -n "${FITIMAGE_HASH_ALGO}"; then + cat << EOF >> ${1} + hash-1 { + algo = "${conf_csum}"; + }; +EOF + fi + + if [ ! -z "${conf_sign_keyname}" ] ; then + + sign_line="sign-images = \"kernel\"" + + if [ -n "${3}" ]; then + sign_line="${sign_line}, \"fdt\"" + fi + + if [ -n "${4}" ]; then + sign_line="${sign_line}, \"ramdisk\"" + fi + + if [ -n "${5}" ]; then + sign_line="${sign_line}, \"setup\"" + fi + + sign_line="${sign_line};" + + cat << EOF >> ${1} + signature-1 { + algo = "${conf_csum},rsa2048"; + key-name-hint = "${conf_sign_keyname}"; + ${sign_line} + }; +EOF + fi + + cat << EOF >> ${1} + }; +EOF + fi +# End single config section + + dtbcount=`expr ${dtbcount} + 1` + done +} + +# +# Assemble fitImage +# +# $1 ... .its filename +# $2 ... fitImage name +# $3 ... include ramdisk +fitimage_assemble() { + kernelcount=1 + dtbcount="" + ramdiskcount=${3} + setupcount="" + teecount=1 + rm -f ${1} arch/${ARCH}/boot/${2} + + fitimage_emit_fit_header ${1} + + # + # Step 1: Prepare a kernel image section. + # + fitimage_emit_section_maint ${1} imagestart + + uboot_prep_kimage + fitimage_ti_secure linux.bin linux.bin.sec + fitimage_emit_section_kernel ${1} "${kernelcount}" linux.bin.sec "${linux_comp}" + + # + # Step 2: Prepare a DTB image section + # + if test -n "${KERNEL_DEVICETREE}"; then + dtbcount=1 + dtboaddress="${UBOOT_DTBO_LOADADDRESS}" + for DTB in ${KERNEL_DEVICETREE}; do + if echo ${DTB} | grep -q '/dts/'; then + bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used." + DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'` + fi + DTB_PATH="arch/${ARCH}/boot/dts/${DTB}" + if [ ! -e "${DTB_PATH}" ]; then + DTB_PATH="arch/${ARCH}/boot/${DTB}" + fi + DTB=$(basename "${DTB}") + + dtb_ext=${DTB##*.} + if [ "${dtb_ext}" = "dtbo" ]; then + if [ -n "${UBOOT_DTBO_LOADADDRESS}" ]; then + dtb_loadline="load = <${dtboaddress}>;" + num1=`printf "%d\n" ${dtboaddress}` + num2=`printf "%d\n" ${UBOOT_DTBO_OFFSET}` + num3=`expr $num1 + $num2` + dtboaddress=`printf "0x%x\n" $num3` + fi + elif [ -n "${UBOOT_DTB_LOADADDRESS}" ]; then + dtb_loadline="load = <${UBOOT_DTB_LOADADDRESS}>;" + fi + + fitimage_ti_secure ${DTB_PATH} ${DTB_PATH}.sec + if [ "x${FITIMAGE_DTB_BY_NAME}" = "x1" ] ; then + fitimage_emit_section_dtb ${1} ${DTB} ${DTB_PATH}.sec "${dtb_loadline}" + else + fitimage_emit_section_dtb ${1} "fdt-${dtbcount}" ${DTB_PATH}.sec "${dtb_loadline}" + fi + if [ "x${dtbcount}" = "x1" ]; then + dtbref=${DTB} + fi + dtbcount=`expr ${dtbcount} + 1` + done + fi + + # + # Step 2a: Prepare OP/TEE image section + # + if [ "x${FITIMAGE_PACK_TEE}" = "x1" ] ; then + mkdir -p ${B}/usr + rm -f ${B}/usr/${OPTEEFLAVOR}.optee + if [ -e "${DEPLOY_DIR_IMAGE}/${OPTEEFLAVOR}.optee" ]; then + cp ${DEPLOY_DIR_IMAGE}/${OPTEEFLAVOR}.optee ${B}/usr/. + fi + TEE_PATH="usr/${OPTEEFLAVOR}.optee" + fitimage_ti_secure ${TEE_PATH} ${TEE_PATH}.sec + if [ "x${FITIMAGE_TEE_BY_NAME}" = "x1" ] ; then + fitimage_emit_section_tee ${1} ${OPTEEFLAVOR}.optee ${TEE_PATH}.sec + else + fitimage_emit_section_tee ${1} "tee-${teecount}" ${TEE_PATH}.sec + fi + + if [ "${OPTEEPAGER}" = "y" ]; then + teecount=`expr ${teecount} + 1` + rm -f ${B}/usr/${OPTEEFLAVOR}-pager.optee + if [ -e "${DEPLOY_DIR_IMAGE}/${OPTEEFLAVOR}-pager.optee" ]; then + cp ${DEPLOY_DIR_IMAGE}/${OPTEEFLAVOR}-pager.optee ${B}/usr/. + fi + TEE_PATH="usr/${OPTEEFLAVOR}-pager.optee" + fitimage_ti_secure ${TEE_PATH} ${TEE_PATH}.sec + if [ "x${FITIMAGE_TEE_BY_NAME}" = "x1" ] ; then + fitimage_emit_section_tee ${1} ${OPTEEFLAVOR}-pager.optee ${TEE_PATH}.sec + else + fitimage_emit_section_tee ${1} "tee-${teecount}" ${TEE_PATH}.sec + fi + fi + fi + + # + # Step 3: Prepare a setup section. (For x86) + # + if test -e arch/${ARCH}/boot/setup.bin ; then + setupcount=1 + fitimage_emit_section_setup ${1} "${setupcount}" arch/${ARCH}/boot/setup.bin + fi + + # + # Step 4: Prepare a ramdisk section. + # + if [ "x${ramdiskcount}" = "x1" ] ; then + # Find and use the first initramfs image archive type we find + for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz cpio; do + initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${img}" + initramfs_local="usr/${INITRAMFS_IMAGE}-${MACHINE}.${img}" + echo "Using $initramfs_path" + if [ -e "${initramfs_path}" ]; then + fitimage_ti_secure ${initramfs_path} ${initramfs_local}.sec + fitimage_emit_section_ramdisk ${1} "${ramdiskcount}" ${initramfs_local}.sec + break + fi + done + fi + + fitimage_emit_section_maint ${1} sectend + + # Force the first Kernel and DTB in the default config + kernelcount=1 + if test -n "${dtbcount}"; then + dtbcount=1 + fi + teecount=1 + + # + # Step 5: Prepare a configurations section + # + fitimage_emit_section_maint ${1} confstart + + if [ "x${FITIMAGE_DTB_BY_NAME}" != "x1" ] ; then + dtbref="fdt-${dtbcount}" + fi + if [ "x${FITIMAGE_TEE_BY_NAME}" = "x1" ] ; then + teeref="${OPTEEFLAVOR}" + else + teeref="${teecount}" + fi + fitimage_emit_section_config ${1} "${kernelcount}" "${dtbref}" "${ramdiskcount}" "${setupcount}" "${teeref}" + + fitimage_emit_section_maint ${1} sectend + + fitimage_emit_section_maint ${1} fitend + + # + # Step 6: Assemble the image + # + uboot-mkimage \ + ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \ + -f ${1} \ + arch/${ARCH}/boot/${2} + + # + # Step 7: Sign the image and add public key to U-Boot dtb + # + if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then + uboot-mkimage \ + ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \ + -F -k "${UBOOT_SIGN_KEYDIR}" \ + -K "${DEPLOY_DIR_IMAGE}/${UBOOT_DTB_BINARY}" \ + -r arch/${ARCH}/boot/${2} + fi +} + +do_assemble_fitimage() { + if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then + cd ${B} + fitimage_assemble fit-image.its fitImage + fi +} + +addtask assemble_fitimage before do_install after do_compile + +do_assemble_fitimage_initramfs() { + if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage" && \ + test -n "${INITRAMFS_IMAGE}" ; then + cd ${B} + fitimage_assemble fit-image-${INITRAMFS_IMAGE}.its fitImage-${INITRAMFS_IMAGE} 1 + fi +} + +addtask assemble_fitimage_initramfs before do_deploy after do_install + +FITIMAGE_ITS_SUFFIX ?= "its" +FITIMAGE_ITB_SUFFIX ?= "itb" + +FITIMAGE_ITS_IMAGE ?= "fitImage-its-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}.${FITIMAGE_ITS_SUFFIX}" +FITIMAGE_ITS_IMAGE[vardepsexclude] = "DATETIME" +FITIMAGE_ITS_BINARY ?= "fitImage-its.${FITIMAGE_ITS_SUFFIX}" +FITIMAGE_ITS_SYMLINK ?= "fitImage-its-${MACHINE}.${FITIMAGE_ITS_SUFFIX}" + +FITIMAGE_ITB_IMAGE ?= "fitImage-linux.bin-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}.${FITIMAGE_ITB_SUFFIX}" +FITIMAGE_ITB_IMAGE[vardepsexclude] = "DATETIME" +FITIMAGE_ITB_BINARY ?= "fitImage-linux.bin.${FITIMAGE_ITB_SUFFIX}" +FITIMAGE_ITB_SYMLINK ?= "fitImage-linux.bin-${MACHINE}.${FITIMAGE_ITB_SUFFIX}" + +FITIMAGE_INITRAMFS_ITS_IMAGE ?= "fitImage-its-${INITRAMFS_IMAGE}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}.${FITIMAGE_ITS_SUFFIX}" +FITIMAGE_INITRAMFS_ITS_IMAGE[vardepsexclude] = "DATETIME" +FITIMAGE_INITRAMFS_ITS_BINARY ?= "fitImage-its-${INITRAMFS_IMAGE}.${FITIMAGE_ITS_SUFFIX}" +FITIMAGE_INITRAMFS_ITS_SYMLINK ?= "fitImage-its-${INITRAMFS_IMAGE}-${MACHINE}.${FITIMAGE_ITS_SUFFIX}" + +FITIMAGE_INITRAMFS_ITB_IMAGE ?= "fitImage-${INITRAMFS_IMAGE}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}.${FITIMAGE_ITB_SUFFIX}" +FITIMAGE_INITRAMFS_ITB_IMAGE[vardepsexclude] = "DATETIME" +FITIMAGE_INITRAMFS_ITB_BINARY ?= "fitImage-${INITRAMFS_IMAGE}.${FITIMAGE_ITB_SUFFIX}" +FITIMAGE_INITRAMFS_ITB_SYMLINK ?= "fitImage-${INITRAMFS_IMAGE}-${MACHINE}.${FITIMAGE_ITB_SUFFIX}" + +kernel_do_deploy:append() { + # Update deploy directory + if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then + cd ${B} + echo "Copying fit-image.its source file..." + install -m 0644 fit-image.its ${DEPLOYDIR}/${FITIMAGE_ITS_IMAGE} + install -m 0644 arch/${ARCH}/boot/fitImage ${DEPLOYDIR}/${FITIMAGE_ITB_IMAGE} + + if [ -n "${INITRAMFS_IMAGE}" ]; then + echo "Copying fit-image-${INITRAMFS_IMAGE}.its source file..." + install -m 0644 fit-image-${INITRAMFS_IMAGE}.its ${DEPLOYDIR}/${FITIMAGE_INITRAMFS_ITS_IMAGE} + install -m 0644 arch/${ARCH}/boot/fitImage-${INITRAMFS_IMAGE} ${DEPLOYDIR}/${FITIMAGE_INITRAMFS_ITB_IMAGE} + fi + + cd ${DEPLOYDIR} + ln -sf ${FITIMAGE_ITS_IMAGE} ${FITIMAGE_ITS_SYMLINK} + ln -sf ${FITIMAGE_ITS_IMAGE} ${FITIMAGE_ITS_BINARY} + ln -sf ${FITIMAGE_ITB_IMAGE} ${FITIMAGE_ITB_SYMLINK} + ln -sf ${FITIMAGE_ITB_IMAGE} ${FITIMAGE_ITB_BINARY} + + if [ -n "${INITRAMFS_IMAGE}" ]; then + ln -sf ${FITIMAGE_INITRAMFS_ITS_IMAGE} ${FITIMAGE_INITRAMFS_ITS_SYMLINK} + ln -sf ${FITIMAGE_INITRAMFS_ITS_IMAGE} ${FITIMAGE_INITRAMFS_ITS_BINARY} + ln -sf ${FITIMAGE_INITRAMFS_ITB_IMAGE} ${FITIMAGE_INITRAMFS_ITB_SYMLINK} + ln -sf ${FITIMAGE_INITRAMFS_ITB_IMAGE} ${FITIMAGE_INITRAMFS_ITB_BINARY} + fi + fi +} diff --git a/meta-ti-bsp/classes/ti-secdev.bbclass b/meta-ti-bsp/classes/ti-secdev.bbclass new file mode 100644 index 00000000..b3d70e5c --- /dev/null +++ b/meta-ti-bsp/classes/ti-secdev.bbclass @@ -0,0 +1,21 @@ +# Helper class to prepare correct environment for signing with TI Security Development Tools + +# K3 SECDEV scripts use OpenSSL +DEPENDS:append:k3 = " openssl-native" +DEPENDS:append:k3r5 = " openssl-native" + +# Use package version of TI SECDEV for K3 if one is not provided through the environment +DEPENDS:append:k3 = "${@ '' if d.getVar('TI_SECURE_DEV_PKG_K3') else ' ti-k3-secdev-native' }" +DEPENDS:append:k3r5 = "${@ '' if d.getVar('TI_SECURE_DEV_PKG_K3') else ' ti-k3-secdev-native' }" +TI_K3_SECDEV_INSTALL_DIR = "${STAGING_DIR_NATIVE}${datadir}/ti/ti-k3-secdev" +TI_SECURE_DEV_PKG:k3 = "${@ d.getVar('TI_SECURE_DEV_PKG_K3') or d.getVar('TI_K3_SECDEV_INSTALL_DIR') }" +TI_SECURE_DEV_PKG:k3r5 = "${@ d.getVar('TI_SECURE_DEV_PKG_K3') or d.getVar('TI_K3_SECDEV_INSTALL_DIR') }" + +# For non-K3 we require the SECDEV tools be provided through the environment with the following vars +TI_SECURE_DEV_PKG:ti33x = "${TI_SECURE_DEV_PKG_CAT}/am3x" +TI_SECURE_DEV_PKG:ti43x = "${TI_SECURE_DEV_PKG_CAT}/am4x" +TI_SECURE_DEV_PKG:am57xx = "${TI_SECURE_DEV_PKG_AUTO}/am5x" +TI_SECURE_DEV_PKG:dra7xx = "${TI_SECURE_DEV_PKG_AUTO}/dra7" + +# The SECDEV scripts may need their own location provided through the environment +export TI_SECURE_DEV_PKG diff --git a/meta-ti-bsp/classes/uboot-sign-legacyhs.bbclass b/meta-ti-bsp/classes/uboot-sign-legacyhs.bbclass new file mode 100644 index 00000000..102232b9 --- /dev/null +++ b/meta-ti-bsp/classes/uboot-sign-legacyhs.bbclass @@ -0,0 +1,131 @@ +# This file is part of U-Boot verified boot support and is intended to be +# inherited from u-boot recipe and from kernel-fitimage.bbclass. +# +# The signature procedure requires the user to generate an RSA key and +# certificate in a directory and to define the following variable: +# +# UBOOT_SIGN_KEYDIR = "/keys/directory" +# UBOOT_SIGN_KEYNAME = "dev" # keys name in keydir (eg. "dev.crt", "dev.key") +# UBOOT_MKIMAGE_DTCOPTS = "-I dts -O dtb -p 2000" +# UBOOT_SIGN_ENABLE = "1" +# +# As verified boot depends on fitImage generation, following is also required: +# +# KERNEL_CLASSES ?= " kernel-fitimage " +# KERNEL_IMAGETYPE ?= "fitImage" +# +# The signature support is limited to the use of CONFIG_OF_SEPARATE in U-Boot. +# +# The tasks sequence is set as below, using DEPLOY_IMAGE_DIR as common place to +# treat the device tree blob: +# +# * u-boot:do_install:append +# Install UBOOT_DTB_BINARY to datadir, so that kernel can use it for +# signing, and kernel will deploy UBOOT_DTB_BINARY after signs it. +# +# * virtual/kernel:do_assemble_fitimage +# Sign the image +# +# * u-boot:do_deploy[postfuncs] +# Deploy files like UBOOT_DTB_IMAGE, UBOOT_DTB_SYMLINK and others. +# +# For more details on signature process, please refer to U-Boot documentation. + +# Signature activation. +UBOOT_SIGN_ENABLE ?= "0" + +# Default value for deployment filenames. +UBOOT_DTB_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.dtb" +UBOOT_DTB_BINARY ?= "u-boot.dtb" +UBOOT_DTB_SYMLINK ?= "u-boot-${MACHINE}.dtb" +UBOOT_NODTB_IMAGE ?= "u-boot-nodtb-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}" +UBOOT_NODTB_BINARY ?= "u-boot-nodtb.${UBOOT_SUFFIX}" +UBOOT_NODTB_SYMLINK ?= "u-boot-nodtb-${MACHINE}.${UBOOT_SUFFIX}" + +# Functions in this bbclass is for u-boot only +UBOOT_PN = "${@d.getVar('PREFERRED_PROVIDER_u-boot') or 'u-boot'}" + +concat_dtb_helper() { + if [ -e "${UBOOT_DTB_BINARY}" ]; then + ln -sf ${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_BINARY} + ln -sf ${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_SYMLINK} + fi + + if [ -f "${UBOOT_NODTB_BINARY}" ]; then + install ${UBOOT_NODTB_BINARY} ${DEPLOYDIR}/${UBOOT_NODTB_IMAGE} + ln -sf ${UBOOT_NODTB_IMAGE} ${DEPLOYDIR}/${UBOOT_NODTB_SYMLINK} + ln -sf ${UBOOT_NODTB_IMAGE} ${DEPLOYDIR}/${UBOOT_NODTB_BINARY} + fi + + # Concatenate U-Boot w/o DTB & DTB with public key + # (cf. kernel-fitimage.bbclass for more details) + deployed_uboot_dtb_binary='${DEPLOY_DIR_IMAGE}/${UBOOT_DTB_IMAGE}' + if [ "x${UBOOT_SUFFIX}" = "ximg" -o "x${UBOOT_SUFFIX}" = "xrom" ] && \ + [ -e "$deployed_uboot_dtb_binary" ]; then + oe_runmake EXT_DTB=$deployed_uboot_dtb_binary + install ${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} + elif [ -e "${DEPLOYDIR}/${UBOOT_NODTB_IMAGE}" -a -e "$deployed_uboot_dtb_binary" ]; then + cd ${DEPLOYDIR} + cat ${UBOOT_NODTB_IMAGE} $deployed_uboot_dtb_binary | tee ${B}/${CONFIG_B_PATH}/${UBOOT_BINARY} > ${UBOOT_IMAGE} + else + bbwarn "Failure while adding public key to u-boot binary. Verified boot won't be available." + fi +} + +concat_dtb() { + if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${PN}" = "${UBOOT_PN}" -a -n "${UBOOT_DTB_BINARY}" ]; then + mkdir -p ${DEPLOYDIR} + if [ -n "${UBOOT_CONFIG}" ]; then + for config in ${UBOOT_MACHINE}; do + CONFIG_B_PATH="${config}" + cd ${B}/${config} + concat_dtb_helper + done + else + CONFIG_B_PATH="" + cd ${B} + concat_dtb_helper + fi + fi +} + +# Install UBOOT_DTB_BINARY to datadir, so that kernel can use it for +# signing, and kernel will deploy UBOOT_DTB_BINARY after signs it. +install_helper() { + if [ -f "${UBOOT_DTB_BINARY}" ]; then + install -d ${D}${datadir} + # UBOOT_DTB_BINARY is a symlink to UBOOT_DTB_IMAGE, so we + # need both of them. + install ${UBOOT_DTB_BINARY} ${D}${datadir}/${UBOOT_DTB_IMAGE} + ln -sf ${UBOOT_DTB_IMAGE} ${D}${datadir}/${UBOOT_DTB_BINARY} + else + bbwarn "${UBOOT_DTB_BINARY} not found" + fi +} + +do_install:append() { + if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${PN}" = "${UBOOT_PN}" -a -n "${UBOOT_DTB_BINARY}" ]; then + if [ -n "${UBOOT_CONFIG}" ]; then + for config in ${UBOOT_MACHINE}; do + cd ${B}/${config} + install_helper + done + else + cd ${B} + install_helper + fi + fi +} + +python () { + if d.getVar('UBOOT_SIGN_ENABLE') == '1' and d.getVar('PN') == d.getVar('UBOOT_PN') and d.getVar('UBOOT_DTB_BINARY'): + kernel_pn = d.getVar('PREFERRED_PROVIDER_virtual/kernel') + + # Make "bitbake u-boot -cdeploy" deploys the signed u-boot.dtb + d.appendVarFlag('do_deploy', 'depends', ' %s:do_deploy' % kernel_pn) + + # kernerl's do_deploy is a litle special, so we can't use + # do_deploy:append, otherwise it would override + # kernel_do_deploy. + d.appendVarFlag('do_deploy', 'prefuncs', ' concat_dtb') +} diff --git a/meta-ti-bsp/conf/layer.conf b/meta-ti-bsp/conf/layer.conf new file mode 100644 index 00000000..03cbd7ea --- /dev/null +++ b/meta-ti-bsp/conf/layer.conf @@ -0,0 +1,34 @@ +# We have a conf and classes directory, append to BBPATH +BBPATH .= ":${LAYERDIR}" +METATIBASE := '${@os.path.normpath("${LAYERDIR}/")}' + +# We have a recipes directory, add to BBFILES +BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend" + +BBFILE_COLLECTIONS += "meta-ti-bsp" +BBFILE_PATTERN_meta-ti-bsp := "^${LAYERDIR}/" +BBFILE_PRIORITY_meta-ti-bsp = "6" + +LAYERSERIES_COMPAT_meta-ti-bsp = "nanbield scarthgap styhead" + +LICENSE_PATH += "${LAYERDIR}/licenses" + +LAYERDEPENDS_meta-ti-bsp = " \ + core \ + meta-arm \ +" + +BBFILES_DYNAMIC += " \ + clang-layer:${LAYERDIR}/dynamic-layers/clang-layer/recipes*/*/*.bbappend \ +" + +SIGGEN_EXCLUDERECIPES_ABISAFE += " \ + mesa-pvr \ +" + +HOSTTOOLS_NONFATAL += "truncate xxd comm" + +TI_COMMON_DEPLOY ?= "${TOPDIR}/deploy-ti" +DEPLOY_DIR_IMAGE:ti-soc = "${TI_COMMON_DEPLOY}/images/${MACHINE}" +SDK_DEPLOY:ti-soc = "${TI_COMMON_DEPLOY}/sdk" +PSEUDO_IGNORE_PATHS:append:ti-soc = ",${TI_COMMON_DEPLOY}" diff --git a/meta-ti-bsp/conf/machine/am335x-evm.conf b/meta-ti-bsp/conf/machine/am335x-evm.conf new file mode 100644 index 00000000..5b7739ce --- /dev/null +++ b/meta-ti-bsp/conf/machine/am335x-evm.conf @@ -0,0 +1,33 @@ +#@TYPE: Machine +#@NAME: AM335x EVM +#@DESCRIPTION: Machine configuration for the TI AM335x EVM + +require conf/machine/include/ti33x.inc + +MACHINE_FEATURES += "screen touchscreen" + +IMAGE_FSTYPES += "ubifs ubi" + +# Normally AM335 boards use ttyS0, but ICE uses ttyS3, so try both +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS3" + +# UBI information. Note that this is board and kernel specific. Changes +# in your kernel port may require changes in these variables. For more +# details about this board please see +# http://processors.wiki.ti.com/index.php/UBIFS_Support + +# do ubiattach /dev/ubi_ctrl -m 7 -O 2048 +# From dmesg: +# UBI: smallest flash I/O unit: 2048 +# UBI: logical eraseblock size: 126976 bytes +# from ubiattach stdout: +# UBI device number 0, total 1988 LEBs +MKUBIFS_ARGS ?= "-F -m 2048 -e 126976 -c 13000" + +# do ubiattach /dev/ubi_ctrl -m 7 -O 2048 +# from dmesg: +# UBI: smallest flash I/O unit: 2048 +# UBI: physical eraseblock size: 131072 bytes (128 KiB) +# UBI: sub-page size: 512 +# UBI: VID header offset: 2048 (aligned 2048) +UBINIZE_ARGS ?= "-m 2048 -p 128KiB -s 512 -O 2048" diff --git a/meta-ti-bsp/conf/machine/am335x-hs-evm.conf b/meta-ti-bsp/conf/machine/am335x-hs-evm.conf new file mode 100644 index 00000000..ca102961 --- /dev/null +++ b/meta-ti-bsp/conf/machine/am335x-hs-evm.conf @@ -0,0 +1,26 @@ +#@TYPE: Machine +#@NAME: AM335x HS EVM +#@DESCRIPTION: Machine configuration for the TI AM335x HS EVM + +require conf/machine/am335x-evm.conf + +UBOOT_MACHINE = "" +# Last config in the list is default +UBOOT_CONFIG ??= "uart mmc" +UBOOT_CONFIG[uart] = "am335x_hs_evm_uart_config" +UBOOT_CONFIG[mmc] = "am335x_hs_evm_config" + +UBOOT_ENTRYPOINT = "0x82000000" +UBOOT_LOADADDRESS = "0x82000000" +UBOOT_RD_LOADADDRESS = "0x84000000" +UBOOT_RD_ENTRYPOINT = "0x84000000" + +# FIT image for legacy secure devices +KERNEL_CLASSES += " kernel-fitimage-legacyhs" +KERNEL_IMAGETYPES += " fitImage" + +# FIT image settings +FITIMAGE_HASH_ALGO = "" +FITIMAGE_DTB_BY_NAME = "1" +FITIMAGE_TEE_BY_NAME = "1" +FITIMAGE_CONF_BY_NAME = "1" diff --git a/meta-ti-bsp/conf/machine/am437x-evm.conf b/meta-ti-bsp/conf/machine/am437x-evm.conf new file mode 100644 index 00000000..248add70 --- /dev/null +++ b/meta-ti-bsp/conf/machine/am437x-evm.conf @@ -0,0 +1,32 @@ +#@TYPE: Machine +#@NAME: AM437x EVM +#@DESCRIPTION: Machine configuration for the TI AM437x EVM + +require conf/machine/include/ti43x.inc + +MACHINE_FEATURES += "touchscreen" + +IMAGE_FSTYPES += "ubifs ubi" + +SERIAL_CONSOLES = "115200;ttyS0" + +# UBI information. Note that this is board and kernel specific. Changes +# in your kernel port may require changes in these variables. For more +# details about this board please see +# http://processors.wiki.ti.com/index.php/UBIFS_Support + +# do ubiattach /dev/ubi_ctrl -m 11 -O 4096 +# From dmesg: +# UBI: smallest flash I/O unit: 4096 +# UBI: logical eraseblock size: 253952 bytes +# from ubiattach stdout: +# UBI device number 0, total 994 LEBs +MKUBIFS_ARGS = "-F -m 4096 -e 253952 -c 8000" + +# do ubiattach /dev/ubi_ctrl -m 11 -O 4096 +# from dmesg: +# UBI: smallest flash I/O unit: 4096 +# UBI: physical eraseblock size: 262144 bytes (256 KiB) +# UBI: sub-page size: 4096 +# UBI: VID header offset: 4096 (aligned 4096) +UBINIZE_ARGS = "-m 4096 -p 256KiB -s 4096 -O 4096" diff --git a/meta-ti-bsp/conf/machine/am437x-hs-evm.conf b/meta-ti-bsp/conf/machine/am437x-hs-evm.conf new file mode 100644 index 00000000..632b4995 --- /dev/null +++ b/meta-ti-bsp/conf/machine/am437x-hs-evm.conf @@ -0,0 +1,28 @@ +#@TYPE: Machine +#@NAME: AM437x HS EVM +#@DESCRIPTION: Machine configuration for the TI AM437x HS EVM + +require conf/machine/am437x-evm.conf + +UBOOT_MACHINE = "am43xx_hs_evm_config" + +UBOOT_ENTRYPOINT = "0x82000000" +UBOOT_LOADADDRESS = "0x82000000" +UBOOT_RD_LOADADDRESS = "0x84000000" +UBOOT_RD_ENTRYPOINT = "0x84000000" + +OPTEEMACHINE = "ti-am43xx" +OPTEEFLAVOR = "am43xx" + +EXTRA_IMAGEDEPENDS += "optee-os" + +# FIT image for legacy secure devices +KERNEL_CLASSES += " kernel-fitimage-legacyhs" +KERNEL_IMAGETYPES += " fitImage" + +# FIT image settings +FITIMAGE_HASH_ALGO = "" +FITIMAGE_PACK_TEE = "1" +FITIMAGE_DTB_BY_NAME = "1" +FITIMAGE_TEE_BY_NAME = "1" +FITIMAGE_CONF_BY_NAME = "1" diff --git a/meta-ti-bsp/conf/machine/am57xx-evm.conf b/meta-ti-bsp/conf/machine/am57xx-evm.conf new file mode 100644 index 00000000..09eb4705 --- /dev/null +++ b/meta-ti-bsp/conf/machine/am57xx-evm.conf @@ -0,0 +1,58 @@ +#@TYPE: Machine +#@NAME: AM57xx EVM +#@DESCRIPTION: Machine configuration for the TI AM57xx EVM + +require conf/machine/include/am57xx.inc + +MACHINE_FEATURES += "touchscreen" + +SERIAL_CONSOLES = "115200;ttyS2" + +KERNEL_DEVICETREE_PREFIX = " \ + am57 \ + ov10635 \ + ti/am57 \ + ti/lcd \ + ti/ov10635 \ + ti/omap/am57 \ +" + +KERNEL_DEVICETREE_DTBMERGE = " \ + am57xx-evm.dtb \ + am57xx-evm-reva3.dtb \ + ti/omap/am57xx-evm.dtb \ + ti/omap/am57xx-evm-reva3.dtb \ +" + +KERNEL_DEVICETREE = " \ + ti/omap/am57xx-beagle-x15.dtb \ + ti/omap/am57xx-beagle-x15-revb1.dtb \ + ti/omap/am57xx-beagle-x15-revc.dtb \ + ti/omap/am5729-beagleboneai.dtb \ + ti/omap/am571x-idk.dtb \ + ti/omap/am572x-idk.dtb \ + ti/omap/am574x-idk.dtb \ +" + +UBOOT_MACHINE = "am57xx_evm_config" + +# UBI information. Note that this is board and kernel specific. Changes +# in your kernel port may require changes in these variables. For more +# details about this board please see +# http://processors.wiki.ti.com/index.php/UBIFS_Support + +# do ubiattach /dev/ubi_ctrl -m 7 -O 2048 +# From dmesg: +# UBI: smallest flash I/O unit: 2048 +# UBI: logical eraseblock size: 126976 bytes +# from ubiattach stdout: +# UBI device number 0, total 1988 LEBs +MKUBIFS_ARGS = "-F -m 2048 -e 126976 -c 8192" + +# do ubiattach /dev/ubi_ctrl -m 7 -O 2048 +# from dmesg: +# UBI: smallest flash I/O unit: 2048 +# UBI: physical eraseblock size: 131072 bytes (128 KiB) +# UBI: sub-page size: 512 +# UBI: VID header offset: 2048 (aligned 2048) +UBINIZE_ARGS = "-m 2048 -p 128KiB -s 512 -O 2048" diff --git a/meta-ti-bsp/conf/machine/am57xx-hs-evm.conf b/meta-ti-bsp/conf/machine/am57xx-hs-evm.conf new file mode 100644 index 00000000..4f36a847 --- /dev/null +++ b/meta-ti-bsp/conf/machine/am57xx-hs-evm.conf @@ -0,0 +1,29 @@ +#@TYPE: Machine +#@NAME: AM57xx HS EVM +#@DESCRIPTION: Machine configuration for the TI AM57xx HS EVM + +require conf/machine/am57xx-evm.conf + +UBOOT_MACHINE = "am57xx_hs_evm_config" + +UBOOT_ENTRYPOINT = "0x82000000" +UBOOT_LOADADDRESS = "0x82000000" +UBOOT_RD_LOADADDRESS = "0x84000000" +UBOOT_RD_ENTRYPOINT = "0x84000000" + +OPTEEMACHINE = "ti-am57xx" +OPTEEFLAVOR = "am57xx" +OPTEEPAGER = "y" + +EXTRA_IMAGEDEPENDS += "optee-os" + +# FIT image for legacy secure devices +KERNEL_CLASSES += " kernel-fitimage-legacyhs" +KERNEL_IMAGETYPES += " fitImage" + +# FIT image settings +FITIMAGE_HASH_ALGO = "" +FITIMAGE_PACK_TEE = "1" +FITIMAGE_DTB_BY_NAME = "1" +FITIMAGE_TEE_BY_NAME = "1" +FITIMAGE_CONF_BY_NAME = "1" diff --git a/meta-ti-bsp/conf/machine/am62axx-evm-k3r5.conf b/meta-ti-bsp/conf/machine/am62axx-evm-k3r5.conf new file mode 100644 index 00000000..2af3317e --- /dev/null +++ b/meta-ti-bsp/conf/machine/am62axx-evm-k3r5.conf @@ -0,0 +1,11 @@ +#@TYPE: Machine +#@NAME: AM62A HS-FS EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI AM62A EVM (R5F core) + +require conf/machine/include/k3r5.inc + +SYSFW_SOC = "am62ax" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "hs-fs" + +UBOOT_MACHINE = "am62ax_evm_r5_defconfig" diff --git a/meta-ti-bsp/conf/machine/am62axx-evm.conf b/meta-ti-bsp/conf/machine/am62axx-evm.conf new file mode 100644 index 00000000..238718d0 --- /dev/null +++ b/meta-ti-bsp/conf/machine/am62axx-evm.conf @@ -0,0 +1,18 @@ +#@TYPE: Machine +#@NAME: AM62AXX EVM +#@DESCRIPTION: Machine configuration for the TI AM62AXX EVM + +require conf/machine/include/am62axx.inc + +KERNEL_DEVICETREE_PREFIX = " \ + ti/k3-am62a7 \ + ti/k3-am62x-sk \ + ti/k3-fpdlink \ + ti/k3-v3link \ +" + +KERNEL_DEVICETREE = " \ + ti/k3-am62a7-sk.dtb \ +" + +UBOOT_MACHINE = "am62ax_evm_a53_defconfig" diff --git a/meta-ti-bsp/conf/machine/am62pxx-evm-k3r5.conf b/meta-ti-bsp/conf/machine/am62pxx-evm-k3r5.conf new file mode 100644 index 00000000..36915381 --- /dev/null +++ b/meta-ti-bsp/conf/machine/am62pxx-evm-k3r5.conf @@ -0,0 +1,12 @@ +#@TYPE: Machine +#@NAME: AM62PX EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI AM62Px EVM (R5F core) + +require conf/machine/include/k3r5.inc +require conf/machine/include/ti-extras.inc + +SYSFW_SOC = "am62px" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "hs-fs" + +UBOOT_MACHINE = "am62px_evm_r5_defconfig" diff --git a/meta-ti-bsp/conf/machine/am62pxx-evm.conf b/meta-ti-bsp/conf/machine/am62pxx-evm.conf new file mode 100644 index 00000000..fab96bd8 --- /dev/null +++ b/meta-ti-bsp/conf/machine/am62pxx-evm.conf @@ -0,0 +1,26 @@ +#@TYPE: Machine +#@NAME: AM62PX EVM +#@DESCRIPTION: Machine configuration for the TI AM62PX EVM + +require conf/machine/include/am62pxx.inc +require conf/machine/include/ti-extras.inc + +KERNEL_DEVICETREE_PREFIX = " \ + ti/k3-am62p5 \ + ti/k3-am62x-sk-csi2 \ + ti/k3-am62x-sk-hdmi \ + ti/k3-am62x-sk-lpm \ +" + +KERNEL_DEVICETREE = " \ + ti/k3-am62p5-sk.dtb \ +" + +UBOOT_MACHINE = "am62px_evm_a53_defconfig" + +# UBOOT_CONFIG_FRAGMENTS holds the list of u-boot config fragments which has to be build +# along with the base defconfig mentioned in UBOOT_MACHINE. Refer u-boot-mergeconfig.inc +# under meta-ti-bsp/recipes-bsp/u-boot/ for more details. +# For AM62P tisdk-display-cluster image, splash screen is handled by SBL. +# Hence, disable the A53 based splash screen using the am62px_evm_prune_splashscreen.config fragment present in ti-u-boot tree +UBOOT_CONFIG_FRAGMENTS = "${@oe.utils.conditional('DISPLAY_CLUSTER_ENABLE', '1', 'am62px_evm_prune_splashscreen.config', '', d)}" diff --git a/meta-ti-bsp/conf/machine/am62xx-evm-k3r5.conf b/meta-ti-bsp/conf/machine/am62xx-evm-k3r5.conf new file mode 100644 index 00000000..548369ca --- /dev/null +++ b/meta-ti-bsp/conf/machine/am62xx-evm-k3r5.conf @@ -0,0 +1,12 @@ +#@TYPE: Machine +#@NAME: AM62XX EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI AM62xx EVM (R5F core) + +require conf/machine/include/k3r5.inc +require conf/machine/include/ti-extras.inc + +SYSFW_SOC = "am62x" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "hs-fs" + +UBOOT_MACHINE = "am62x_evm_r5_defconfig" diff --git a/meta-ti-bsp/conf/machine/am62xx-evm.conf b/meta-ti-bsp/conf/machine/am62xx-evm.conf new file mode 100644 index 00000000..fadbc6f4 --- /dev/null +++ b/meta-ti-bsp/conf/machine/am62xx-evm.conf @@ -0,0 +1,17 @@ +#@TYPE: Machine +#@NAME: AM62XX EVM +#@DESCRIPTION: Machine configuration for the TI AM62XX EVM + +require conf/machine/include/am62xx.inc +require conf/machine/include/ti-extras.inc + +KERNEL_DEVICETREE_PREFIX = " \ + ti/k3-am625 \ + ti/k3-am62x-sk \ +" + +KERNEL_DEVICETREE = " \ + ti/k3-am625-sk.dtb \ +" + +UBOOT_MACHINE = "am62x_evm_a53_defconfig" diff --git a/meta-ti-bsp/conf/machine/am62xx-lp-evm-k3r5.conf b/meta-ti-bsp/conf/machine/am62xx-lp-evm-k3r5.conf new file mode 100644 index 00000000..52b69a72 --- /dev/null +++ b/meta-ti-bsp/conf/machine/am62xx-lp-evm-k3r5.conf @@ -0,0 +1,12 @@ +#@TYPE: Machine +#@NAME: AM62XX LP GP EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI AM62xx LP GP EVM (R5F core) + +require conf/machine/include/k3r5.inc +require conf/machine/include/ti-extras.inc + +SYSFW_SOC = "am62x" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "hs-fs" + +UBOOT_MACHINE = "am62x_lpsk_r5_defconfig" diff --git a/meta-ti-bsp/conf/machine/am62xx-lp-evm.conf b/meta-ti-bsp/conf/machine/am62xx-lp-evm.conf new file mode 100644 index 00000000..51e99728 --- /dev/null +++ b/meta-ti-bsp/conf/machine/am62xx-lp-evm.conf @@ -0,0 +1,20 @@ +#@TYPE: Machine +#@NAME: AM62XX LP EVM +#@DESCRIPTION: Machine configuration for the TI AM62XX LP EVM + +require conf/machine/include/am62xx.inc +require conf/machine/include/ti-extras.inc + +KERNEL_DEVICETREE_PREFIX = " \ + ti/k3-am62-lp \ + ti/k3-am625-sk \ + ti/k3-am62x-sk-hdmi \ + ti/k3-am62x-sk-lpm \ + ti/k3-am62x-sk-mcan \ +" + +KERNEL_DEVICETREE = " \ + ti/k3-am62-lp-sk.dtb \ +" + +UBOOT_MACHINE = "am62x_lpsk_a53_defconfig" diff --git a/meta-ti-bsp/conf/machine/am62xxsip-evm-k3r5.conf b/meta-ti-bsp/conf/machine/am62xxsip-evm-k3r5.conf new file mode 100644 index 00000000..0daff2b9 --- /dev/null +++ b/meta-ti-bsp/conf/machine/am62xxsip-evm-k3r5.conf @@ -0,0 +1,16 @@ +#@TYPE: Machine +#@NAME: AM62XX SIP EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI AM62xx SIP EVM (R5F core) + +require conf/machine/include/k3r5.inc + +SYSFW_SOC = "am62x" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "hs-fs" + +UBOOT_MACHINE = "am62x_evm_r5_defconfig" + +# UBOOT_CONFIG_FRAGMENTS holds the list of u-boot config fragments which has to be build +# along with the base defconfig mentioned in UBOOT_MACHINE. Refer u-boot-mergeconfig.inc +# under meta-ti-bsp/recipes-bsp/u-boot/ for more details. +UBOOT_CONFIG_FRAGMENTS = "am62xsip_sk_r5.config" diff --git a/meta-ti-bsp/conf/machine/am62xxsip-evm.conf b/meta-ti-bsp/conf/machine/am62xxsip-evm.conf new file mode 100644 index 00000000..b5dd18f1 --- /dev/null +++ b/meta-ti-bsp/conf/machine/am62xxsip-evm.conf @@ -0,0 +1,16 @@ +#@TYPE: Machine +#@NAME: AM62XX SIP EVM +#@DESCRIPTION: Machine configuration for the TI AM62XX SIP EVM + +require conf/machine/include/am62xx.inc + +KERNEL_DEVICETREE_PREFIX = " \ + ti/k3-am625 \ + ti/k3-am62x-sk \ +" + +KERNEL_DEVICETREE = " \ + ti/k3-am625-sk.dtb \ +" + +UBOOT_MACHINE = "am62x_evm_a53_defconfig" diff --git a/meta-ti-bsp/conf/machine/am64xx-evm-k3r5.conf b/meta-ti-bsp/conf/machine/am64xx-evm-k3r5.conf new file mode 100644 index 00000000..e932928a --- /dev/null +++ b/meta-ti-bsp/conf/machine/am64xx-evm-k3r5.conf @@ -0,0 +1,11 @@ +#@TYPE: Machine +#@NAME: AM64xx EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI AM64xx EVM (R5F core) + +require conf/machine/include/k3r5.inc + +SYSFW_SOC = "am64x_sr2" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "hs-fs" + +UBOOT_MACHINE = "am64x_evm_r5_defconfig" diff --git a/meta-ti-bsp/conf/machine/am64xx-evm.conf b/meta-ti-bsp/conf/machine/am64xx-evm.conf new file mode 100644 index 00000000..c6ba2a87 --- /dev/null +++ b/meta-ti-bsp/conf/machine/am64xx-evm.conf @@ -0,0 +1,7 @@ +#@TYPE: Machine +#@NAME: AM64xx EVM +#@DESCRIPTION: Machine configuration for the TI AM64xx EVM + +require conf/machine/include/am64xx.inc + +UBOOT_MACHINE = "am64x_evm_a53_defconfig" diff --git a/meta-ti-bsp/conf/machine/am65xx-evm-k3r5.conf b/meta-ti-bsp/conf/machine/am65xx-evm-k3r5.conf new file mode 100644 index 00000000..8744ac3e --- /dev/null +++ b/meta-ti-bsp/conf/machine/am65xx-evm-k3r5.conf @@ -0,0 +1,11 @@ +#@TYPE: Machine +#@NAME: AM65xx EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI AM65xx EVM (R5F core) + +require conf/machine/include/k3r5.inc + +SYSFW_SOC = "am65x_sr2" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "gp" + +UBOOT_MACHINE = "am65x_evm_r5_defconfig" diff --git a/meta-ti-bsp/conf/machine/am65xx-evm.conf b/meta-ti-bsp/conf/machine/am65xx-evm.conf new file mode 100644 index 00000000..60eed90f --- /dev/null +++ b/meta-ti-bsp/conf/machine/am65xx-evm.conf @@ -0,0 +1,9 @@ +#@TYPE: Machine +#@NAME: AM65xx EVM +#@DESCRIPTION: Machine configuration for the TI AM65xx EVM + +require conf/machine/include/am65xx.inc + +UBOOT_MACHINE = "am65x_evm_a53_defconfig" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "prueth-fw pruhsr-fw prusw-fw" diff --git a/meta-ti-bsp/conf/machine/am65xx-hs-evm-k3r5.conf b/meta-ti-bsp/conf/machine/am65xx-hs-evm-k3r5.conf new file mode 100644 index 00000000..337c8413 --- /dev/null +++ b/meta-ti-bsp/conf/machine/am65xx-hs-evm-k3r5.conf @@ -0,0 +1,11 @@ +#@TYPE: Machine +#@NAME: AM65xx HS EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI AM65xx HS EVM (R5F core) + +require conf/machine/include/k3r5.inc + +SYSFW_SOC = "am65x_sr2" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "hs" + +UBOOT_MACHINE = "am65x_evm_r5_defconfig" diff --git a/meta-ti-bsp/conf/machine/am65xx-hs-evm.conf b/meta-ti-bsp/conf/machine/am65xx-hs-evm.conf new file mode 100644 index 00000000..f8221f31 --- /dev/null +++ b/meta-ti-bsp/conf/machine/am65xx-hs-evm.conf @@ -0,0 +1,7 @@ +#@TYPE: Machine +#@NAME: AM65xx HS EVM +#@DESCRIPTION: Machine configuration for the TI AM65xx HS EVM + +require conf/machine/include/am65xx.inc + +UBOOT_MACHINE = "am65x_evm_a53_defconfig" diff --git a/meta-ti-bsp/conf/machine/am69-sk-k3r5.conf b/meta-ti-bsp/conf/machine/am69-sk-k3r5.conf new file mode 100644 index 00000000..9d2b4cd6 --- /dev/null +++ b/meta-ti-bsp/conf/machine/am69-sk-k3r5.conf @@ -0,0 +1,11 @@ +#@TYPE: Machine +#@NAME: AM69 SK (R5F) +#@DESCRIPTION: Machine configuration for the TI AM69 SK (R5F core) + +require conf/machine/include/k3r5.inc + +SYSFW_SOC = "j784s4" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "hs-fs" + +UBOOT_MACHINE = "am69_sk_r5_defconfig" diff --git a/meta-ti-bsp/conf/machine/am69-sk.conf b/meta-ti-bsp/conf/machine/am69-sk.conf new file mode 100644 index 00000000..6341a6fa --- /dev/null +++ b/meta-ti-bsp/conf/machine/am69-sk.conf @@ -0,0 +1,20 @@ +#@TYPE: Machine +#@NAME: AM69 SK +#@DESCRIPTION: Machine configuration for the TI AM69 SK + +require conf/machine/include/am69.inc + +TFA_K3_USART = "0x8" +OPTEE_K3_USART = "0x8" + +KERNEL_DEVICETREE_PREFIX = " \ + ti/k3-am69-sk \ + ti/k3-fpdlink \ + ti/k3-v3link \ +" + +KERNEL_DEVICETREE = " \ + ti/k3-am69-sk.dtb \ +" + +UBOOT_MACHINE = "am69_sk_a72_defconfig" diff --git a/meta-ti-bsp/conf/machine/beagle-x15.conf b/meta-ti-bsp/conf/machine/beagle-x15.conf new file mode 100644 index 00000000..6fc7957c --- /dev/null +++ b/meta-ti-bsp/conf/machine/beagle-x15.conf @@ -0,0 +1,22 @@ +#@TYPE: Machine +#@NAME: BeagleBoard X15 +#@DESCRIPTION: Machine configuration for the BeagleBoard X15 + +require conf/machine/include/beagle.inc +require conf/machine/include/am57xx.inc + +KERNEL_DEVICETREE_PREFIX = "am57xx-beagle-x15" + +KERNEL_DEVICETREE = " \ +am57xx-beagle-x15.dtb \ +am57xx-beagle-x15-revb1.dtb \ +am57xx-beagle-x15-revc.dtb \ +am57xx-idk-lcd-osd101t2045.dtbo \ +am57xx-idk-lcd-osd101t2587.dtbo \ +" + +MACHINE_GUI_CLASS = "bigscreen" + +SERIAL_CONSOLES = "115200;ttyS2" + +UBOOT_MACHINE = "am57xx_evm_config" diff --git a/meta-ti-bsp/conf/machine/beaglebone-ai64-k3r5.conf b/meta-ti-bsp/conf/machine/beaglebone-ai64-k3r5.conf new file mode 100644 index 00000000..f57ae065 --- /dev/null +++ b/meta-ti-bsp/conf/machine/beaglebone-ai64-k3r5.conf @@ -0,0 +1,23 @@ +#@TYPE: Machine +#@NAME: BeagleBone AI-64 (R5F) +#@DESCRIPTION: Machine configuration for the BeagleBone AI-64 (R5F core) + +require conf/machine/include/k3r5.inc + +SYSFW_SOC = "j721e" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "gp" + +SPL_BINARY = "spl/u-boot-spl.${UBOOT_SUFFIX}" +SPL_SYMLINK = "u-boot-r5spl.${UBOOT_SUFFIX}" +UBOOT_BINARY = "tiboot3.${UBOOT_SUFFIX}" +UBOOT_IMAGE = "tiboot3-${MAINMACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}" +UBOOT_SYMLINK = "tiboot3-${MAINMACHINE}.${UBOOT_SUFFIX}" + +UBOOT_MACHINE = "j721e_evm_r5_defconfig" + + +# UBOOT_CONFIG_FRAGMENTS holds the list of u-boot config fragments which has to be build +# along with the base defconfig mentioned in UBOOT_MACHINE. Refer u-boot-mergeconfig.inc +# under meta-ti-bsp/recipes-bsp/u-boot/ for more details. +UBOOT_CONFIG_FRAGMENTS = "j721e_beagleboneai64_r5.config" diff --git a/meta-ti-bsp/conf/machine/beaglebone-ai64.conf b/meta-ti-bsp/conf/machine/beaglebone-ai64.conf new file mode 100644 index 00000000..a9be4d13 --- /dev/null +++ b/meta-ti-bsp/conf/machine/beaglebone-ai64.conf @@ -0,0 +1,37 @@ +#@TYPE: Machine +#@NAME: BeagleBone AI-64 (A72) +#@DESCRIPTION: Machine configuration for the BeagleBone AI-64 board (A72 core) + +require conf/machine/include/beagle.inc +require conf/machine/include/j721e.inc + +UBOOT_MACHINE = "j721e_evm_a72_config" + + +# UBOOT_CONFIG_FRAGMENTS holds the list of u-boot config fragments which has to be build +# along with the base defconfig mentioned in UBOOT_MACHINE. Refer u-boot-mergeconfig.inc +# under meta-ti-bsp/recipes-bsp/u-boot/ for more details. +UBOOT_CONFIG_FRAGMENTS = "j721e_beagleboneai64_a72.config" + +KERNEL_DEVICETREE_PREFIX = " \ + ti/k3-j721e \ +" + +KERNEL_DEVICETREE = " \ +ti/k3-j721e-beagleboneai64.dtb \ +ti/k3-j721e-common-proc-board.dtb \ +ti/k3-j721e-beagleboneai64-dsi-rpi-7inch-panel.dtbo \ +ti/k3-j721e-evm-csi2-ov5640.dtbo \ +ti/k3-j721e-evm-fusion.dtbo \ +ti/k3-j721e-evm-gesi-exp-board.dtbo \ +ti/k3-j721e-evm-pcie0-ep.dtbo \ +ti/k3-j721e-evm-quad-port-eth-exp.dtbo \ +ti/k3-j721e-evm-virt-mac-client.dtbo \ +ti/k3-j721e-sk.dtb \ +ti/k3-j721e-sk-csi2-ov5640.dtbo \ +ti/k3-j721e-sk-csi2-rpi-imx219.dtbo \ +ti/k3-j721e-sk-fusion.dtbo \ +ti/k3-j721e-sk-rpi-hdr-ehrpwm.dtbo \ +" + +MACHINE_GUI_CLASS = "bigscreen" diff --git a/meta-ti-bsp/conf/machine/beaglebone.conf b/meta-ti-bsp/conf/machine/beaglebone.conf new file mode 100644 index 00000000..8b8b9d29 --- /dev/null +++ b/meta-ti-bsp/conf/machine/beaglebone.conf @@ -0,0 +1,67 @@ +#@TYPE: Machine +#@NAME: BeagleBone machine +#@DESCRIPTION: Machine configuration for the http://beagleboard.org/bone board + +require conf/machine/include/beagle.inc +require conf/machine/include/ti33x.inc + +KERNEL_DEVICETREE_PREFIX = "am335x-bone" + +KERNEL_DEVICETREE = " \ +am335x-bone.dtb \ +am335x-boneblack.dtb \ +am335x-boneblack-pps.dtb \ +am335x-boneblack-uboot.dtb \ +am335x-boneblack-uboot-univ.dtb \ +am335x-boneblack-wireless.dtb \ +am335x-boneblue.dtb \ +am335x-bonegreen.dtb \ +am335x-bonegreen-gateway.dtb \ +am335x-bonegreen-wireless.dtb \ +am335x-bonegreen-wireless-uboot-univ.dtb \ +am335x-pocketbeagle.dtb \ +am335x-sancloud-bbe.dtb \ +am335x-sancloud-bbe-extended-wifi.dtb \ +am335x-sancloud-bbe-lite.dtb \ +" + +# Extra DT overlays/capes +KERNEL_DEVICETREE += " \ +AM335X-PRU-UIO-00A0.dtbo \ +BB-ADC-00A0.dtbo \ +BB-BBBW-WL1835-00A0.dtbo \ +BB-BBGG-WL1835-00A0.dtbo \ +BB-BBGW-WL1835-00A0.dtbo \ +BB-BONE-4D5R-01-00A1.dtbo \ +BB-BONE-eMMC1-01-00A0.dtbo \ +BB-BONE-LCD4-01-00A1.dtbo \ +BB-BONE-NH7C-01-A0.dtbo \ +BB-CAPE-DISP-CT4-00A0.dtbo \ +BB-HDMI-TDA998x-00A0.dtbo \ +BB-I2C1-MCP7940X-00A0.dtbo \ +BB-I2C1-RTC-DS3231.dtbo \ +BB-I2C1-RTC-PCF8563.dtbo \ +BB-I2C2-BME680.dtbo \ +BB-I2C2-MPU6050.dtbo \ +BB-LCD-ADAFRUIT-24-SPI1-00A0.dtbo \ +BB-NHDMI-TDA998x-00A0.dtbo \ +BBORG_COMMS-00A2.dtbo \ +BBORG_FAN-A000.dtbo \ +BBORG_RELAY-00A2.dtbo \ +BB-SPIDEV0-00A0.dtbo \ +BB-SPIDEV1-00A0.dtbo \ +BB-UART1-00A0.dtbo \ +BB-UART2-00A0.dtbo \ +BB-UART4-00A0.dtbo \ +BB-W1-P9.12-00A0.dtbo \ +BONE-ADC.dtbo \ +M-BB-BBG-00A0.dtbo \ +M-BB-BBGG-00A0.dtbo \ +PB-MIKROBUS-0.dtbo \ +PB-MIKROBUS-1.dtbo \ +" + +MACHINE_GUI_CLASS = "bigscreen" +MACHINE_FEATURES += "screen" + +SERIAL_CONSOLES = "115200;ttyS0" diff --git a/meta-ti-bsp/conf/machine/beagleplay-k3r5.conf b/meta-ti-bsp/conf/machine/beagleplay-k3r5.conf new file mode 100644 index 00000000..601cbbf7 --- /dev/null +++ b/meta-ti-bsp/conf/machine/beagleplay-k3r5.conf @@ -0,0 +1,19 @@ +#@TYPE: Machine +#@NAME: BeaglePlay (R5F) +#@DESCRIPTION: Machine configuration for the BeaglePlay (R5F core) + +require conf/machine/include/k3r5.inc + +PREFERRED_PROVIDER_virtual/bootloader = "u-boot-bb.org" +PREFERRED_PROVIDER_u-boot = "u-boot-bb.org" + +SYSFW_SOC = "am62x" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "gp" + +UBOOT_MACHINE = "am62x_evm_r5_defconfig" + +# UBOOT_CONFIG_FRAGMENTS holds the list of u-boot config fragments which has to be build +# along with the base defconfig mentioned in UBOOT_MACHINE. Refer u-boot-mergeconfig.inc +# under meta-ti-bsp/recipes-bsp/u-boot/ for more details. +UBOOT_CONFIG_FRAGMENTS = "am625_beagleplay_r5.config" diff --git a/meta-ti-bsp/conf/machine/beagleplay.conf b/meta-ti-bsp/conf/machine/beagleplay.conf new file mode 100644 index 00000000..65c14333 --- /dev/null +++ b/meta-ti-bsp/conf/machine/beagleplay.conf @@ -0,0 +1,60 @@ +#@TYPE: Machine +#@NAME: BeaglePlay (A53) +#@DESCRIPTION: Machine configuration for the BeaglePlay board (A53 core) + +require conf/machine//include/beagle.inc +require conf/machine/include/k3.inc +SOC_FAMILY:append = ":am62xx" + +MACHINE_FEATURES += "screen gpu" + +SERIAL_CONSOLES = "115200;ttyS2" + +require conf/machine/include/mesa-pvr.inc +PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" + +TFA_BOARD = "lite" +TFA_K3_SYSTEM_SUSPEND = "1" + +OPTEEMACHINE = "k3-am62x" + +UBOOT_MACHINE = "am62x_evm_a53_defconfig" + +# UBOOT_CONFIG_FRAGMENTS holds the list of u-boot config fragments which has to be build +# along with the base defconfig mentioned in UBOOT_MACHINE. Refer u-boot-mergeconfig.inc +# under meta-ti-bsp/recipes-bsp/u-boot/ for more details. +UBOOT_CONFIG_FRAGMENTS = "am625_beagleplay_a53.config" + +PREFERRED_PROVIDER_virtual/bootloader = "u-boot-bb.org" +PREFERRED_PROVIDER_u-boot = "u-boot-bb.org" + +KERNEL_DEVICETREE_PREFIX = " \ + ti/k3-am625 \ + ti/k3-am62x-sk \ +" + +KERNEL_DEVICETREE = " \ +ti/k3-am625-beagleplay.dtb \ +ti/k3-am625-beagleplay-csi2-ov5640.dtbo \ +ti/k3-am625-beagleplay-csi2-tevi-ov5640.dtbo \ +ti/k3-am625-beagleplay-lincolntech-lcd185-panel.dtbo \ +ti/k3-am625-sk.dtb \ +ti/k3-am625-sk-dmtimer-pwm.dtbo \ +ti/k3-am625-sk-ecap-capture.dtbo \ +ti/k3-am625-sk-lincolntech-lcd185-panel.dtbo \ +ti/k3-am625-sk-mcspi-loopback.dtbo \ +ti/k3-am625-sk-microtips-mf101hie-panel.dtbo \ +ti/k3-am625-sk-microtips-mf103hie-lcd2.dtbo \ +ti/k3-am625-sk-pwm.dtbo \ +ti/k3-am625-sk-rpi-hdr-ehrpwm.dtbo \ +ti/k3-am62x-sk-csi2-imx219.dtbo \ +ti/k3-am62x-sk-csi2-ov5640.dtbo \ +ti/k3-am62x-sk-csi2-tevi-ov5640.dtbo \ +ti/k3-am62x-sk-csi2-v3link-fusion.dtbo \ +ti/k3-am62x-sk-eqep.dtbo \ +ti/k3-am62x-sk-hdmi-audio.dtbo \ +ti/k3-am62x-sk-lpm-wkup-sources.dtbo \ +ti/k3-am62x-sk-mcan.dtbo \ +" + +MACHINE_GUI_CLASS = "bigscreen" diff --git a/meta-ti-bsp/conf/machine/dra7xx-evm.conf b/meta-ti-bsp/conf/machine/dra7xx-evm.conf new file mode 100644 index 00000000..f9a3dd0b --- /dev/null +++ b/meta-ti-bsp/conf/machine/dra7xx-evm.conf @@ -0,0 +1,47 @@ +#@TYPE: Machine +#@NAME: DRA7xx EVM +#@DESCRIPTION: Machine configuration for the TI DRA7xx EVM + +require conf/machine/include/dra7xx.inc + +MACHINE_FEATURES += "touchscreen" + +SERIAL_CONSOLES = "115200;ttyS0" + +KERNEL_DEVICETREE_PREFIX = " \ + dra7 \ + ti/dra7 \ + ti/lcd \ + ti/omap/dra7 \ +" + +KERNEL_DEVICETREE = " \ + ti/omap/dra7-evm.dtb \ + ti/omap/dra71-evm.dtb \ + ti/omap/dra72-evm.dtb \ + ti/omap/dra72-evm-revc.dtb \ + ti/omap/dra76-evm.dtb \ +" + +UBOOT_MACHINE = "dra7xx_evm_config" + +# UBI information. Note that this is board and kernel specific. Changes +# in your kernel port may require changes in these variables. For more +# details about this board please see +# http://processors.wiki.ti.com/index.php/UBIFS_Support + +# do ubiattach /dev/ubi_ctrl -m 7 -O 2048 +# From dmesg: +# UBI: smallest flash I/O unit: 2048 +# UBI: logical eraseblock size: 126976 bytes +# from ubiattach stdout: +# UBI device number 0, total 1988 LEBs +MKUBIFS_ARGS = "-F -m 2048 -e 126976 -c 8192" + +# do ubiattach /dev/ubi_ctrl -m 7 -O 2048 +# from dmesg: +# UBI: smallest flash I/O unit: 2048 +# UBI: physical eraseblock size: 131072 bytes (128 KiB) +# UBI: sub-page size: 512 +# UBI: VID header offset: 2048 (aligned 2048) +UBINIZE_ARGS = "-m 2048 -p 128KiB -s 512 -O 2048" diff --git a/meta-ti-bsp/conf/machine/dra7xx-hs-evm.conf b/meta-ti-bsp/conf/machine/dra7xx-hs-evm.conf new file mode 100644 index 00000000..8e57a154 --- /dev/null +++ b/meta-ti-bsp/conf/machine/dra7xx-hs-evm.conf @@ -0,0 +1,29 @@ +#@TYPE: Machine +#@NAME: DRA7xx HS EVM +#@DESCRIPTION: Machine configuration for the TI DRA7xx HS EVM + +require conf/machine/dra7xx-evm.conf + +UBOOT_MACHINE = "dra7xx_hs_evm_config" + +UBOOT_ENTRYPOINT = "0x82000000" +UBOOT_LOADADDRESS = "0x82000000" +UBOOT_RD_LOADADDRESS = "0x84000000" +UBOOT_RD_ENTRYPOINT = "0x84000000" + +OPTEEMACHINE = "ti-dra7xx" +OPTEEFLAVOR = "dra7xx" +OPTEEPAGER = "y" + +EXTRA_IMAGEDEPENDS += "optee-os" + +# FIT image for legacy secure devices +KERNEL_CLASSES += " kernel-fitimage-legacyhs" +KERNEL_IMAGETYPES += " fitImage" + +# FIT image settings +FITIMAGE_HASH_ALGO = "" +FITIMAGE_PACK_TEE = "1" +FITIMAGE_DTB_BY_NAME = "1" +FITIMAGE_TEE_BY_NAME = "1" +FITIMAGE_CONF_BY_NAME = "1" diff --git a/meta-ti-bsp/conf/machine/include/am57xx.inc b/meta-ti-bsp/conf/machine/include/am57xx.inc new file mode 100644 index 00000000..85290924 --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/am57xx.inc @@ -0,0 +1,7 @@ +require conf/machine/include/omap-a15.inc +SOC_FAMILY:append = ":dra7xx" +SOC_FAMILY:append = ":am57xx" + +MACHINE_FEATURES += "pci" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "prueth-fw prusw-fw pruhsr-fw pruprp-fw" diff --git a/meta-ti-bsp/conf/machine/include/am62axx.inc b/meta-ti-bsp/conf/machine/include/am62axx.inc new file mode 100644 index 00000000..93a41d8d --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/am62axx.inc @@ -0,0 +1,20 @@ +require conf/machine/include/k3.inc +SOC_FAMILY:append = ":am62axx" + +MACHINE_FEATURES += "screen touchscreen" + +TFA_K3_SYSTEM_SUSPEND = "1" + +# Default tiboot3.bin on AM62A is for HS-FS +IMAGE_BOOT_FILES += "tiboot3-am62ax-hs-fs-evm.bin" + +# Since default tiboot3.bin on AM62A is for HS-FS, add a version for GP +IMAGE_BOOT_FILES += "tiboot3-am62ax-gp-evm.bin" + +# Since default tiboot3.bin on AM62A is for HS-FS, add a version for HS-SE +IMAGE_BOOT_FILES += "tiboot3-am62ax-hs-evm.bin" + +TFA_BOARD = "lite" +OPTEEMACHINE = "k3-am62x" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "cnm-wave-fw" diff --git a/meta-ti-bsp/conf/machine/include/am62pxx.inc b/meta-ti-bsp/conf/machine/include/am62pxx.inc new file mode 100644 index 00000000..38e35851 --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/am62pxx.inc @@ -0,0 +1,22 @@ +require conf/machine/include/k3.inc +SOC_FAMILY:append = ":am62pxx" + +MACHINE_FEATURES += "screen gpu" + +require conf/machine/include/mesa-pvr.inc +PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" + +# Default tiboot3.bin on AM62Px is for HS-FS +IMAGE_BOOT_FILES += "tiboot3-am62px-hs-fs-evm.bin" + +TFA_BOARD = "lite" +TFA_K3_SYSTEM_SUSPEND = "1" + +OPTEEMACHINE = "k3-am62x" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "cnm-wave-fw" + +SERIAL_CONSOLES = "115200;ttyS2" + +# Bitmap image tarball for early splashscreen +IMAGE_BOOT_FILES += "ti_logo_414x97_32bpp.bmp.gz" diff --git a/meta-ti-bsp/conf/machine/include/am62xx.inc b/meta-ti-bsp/conf/machine/include/am62xx.inc new file mode 100644 index 00000000..a0ec944f --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/am62xx.inc @@ -0,0 +1,27 @@ +require conf/machine/include/k3.inc +SOC_FAMILY:append = ":am62xx" + +MACHINE_FEATURES += "screen gpu" + +require conf/machine/include/mesa-pvr.inc +PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" + +# Default tiboot3.bin on AM62x is for HS-FS +IMAGE_BOOT_FILES += "tiboot3-am62x-hs-fs-evm.bin" + +# Since default tiboot3.bin on AM62x is for HS-FS, add a version for GP +IMAGE_BOOT_FILES += "tiboot3-am62x-gp-evm.bin" + +# Since default tiboot3.bin on AM62x is for HS-FS, add a version for HS-SE +IMAGE_BOOT_FILES += "tiboot3-am62x-hs-evm.bin" + +# Bitmap image tarball for early splashscreen +IMAGE_BOOT_FILES += "ti_logo_414x97_32bpp.bmp.gz" + +TFA_BOARD = "lite" +TFA_K3_SYSTEM_SUSPEND = "1" + +OPTEEMACHINE = "k3-am62x" + +# Normally AM62 boards use ttyS2, but our Jailhouse inmate may use ttyS3, so try both +SERIAL_CONSOLES = "115200;ttyS2 115200;ttyS3" diff --git a/meta-ti-bsp/conf/machine/include/am64xx.inc b/meta-ti-bsp/conf/machine/include/am64xx.inc new file mode 100644 index 00000000..cfade2fa --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/am64xx.inc @@ -0,0 +1,24 @@ +require conf/machine/include/k3.inc +SOC_FAMILY:append = ":am64xx" + +KERNEL_DEVICETREE_PREFIX = "ti/k3-am642" + +KERNEL_DEVICETREE = " \ + ti/k3-am642-evm.dtb \ + ti/k3-am642-sk.dtb \ +" + +# Default tiboot3.bin on AM64x is for SR2.0 HS-FS +IMAGE_BOOT_FILES += "tiboot3-am64x_sr2-hs-fs-evm.bin" + +# Since default tiboot3.bin on AM64x is for SR2.0 HS-FS, add a version for GP +IMAGE_BOOT_FILES += "tiboot3-am64x-gp-evm.bin" + +# Since default tiboot3.bin on AM64x is for SR2.0 HS-FS, add a version for SR2.0 HS-SE +IMAGE_BOOT_FILES += "tiboot3-am64x_sr2-hs-evm.bin" + +TFA_BOARD = "lite" + +OPTEEMACHINE = "k3-am64x" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "prueth-fw pruhsr-fw prusw-fw" diff --git a/meta-ti-bsp/conf/machine/include/am65xx.inc b/meta-ti-bsp/conf/machine/include/am65xx.inc new file mode 100644 index 00000000..80a7744a --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/am65xx.inc @@ -0,0 +1,29 @@ +require conf/machine/include/k3.inc +SOC_FAMILY:append = ":am65xx" + +MACHINE_FEATURES += "screen touchscreen gpu" + +require conf/machine/include/mesa-pvr.inc +PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km" + +KERNEL_DEVICETREE_PREFIX = "ti/k3-am654" + +KERNEL_DEVICETREE = " \ + ti/k3-am654-base-board.dtb \ +" + +IMAGE_BOOT_FILES += "sysfw.itb" + +# Default on AM65x is for GP +IMAGE_BOOT_FILES += "tiboot3-am65x_sr2-gp-evm.bin" +IMAGE_BOOT_FILES += "sysfw-am65x_sr2-gp-evm.itb" + +# Since default on AM65x is for GP, add a version for HS-SE +IMAGE_BOOT_FILES += "tiboot3-am65x_sr2-hs-evm.bin" +IMAGE_BOOT_FILES += "sysfw-am65x_sr2-hs-evm.itb" + +TFA_BOARD = "generic" + +OPTEEMACHINE = "k3-am65x" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "prueth-fw" diff --git a/meta-ti-bsp/conf/machine/include/am69.inc b/meta-ti-bsp/conf/machine/include/am69.inc new file mode 100644 index 00000000..81be1397 --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/am69.inc @@ -0,0 +1,19 @@ +require conf/machine/include/k3.inc +SOC_FAMILY:append = ":j784s4" + +MACHINE_FEATURES += "screen gpu" + +require conf/machine/include/mesa-pvr.inc +PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" + +# Default tiboot3.bin on AM69 is for SR1.0 HS-FS +IMAGE_BOOT_FILES += "tiboot3-j784s4-hs-fs-evm.bin" + +# Since default tiboot3.bin on AM69 is for HS-FS, add a version for SR1.0 HS-SE +IMAGE_BOOT_FILES += "tiboot3-j784s4-hs-evm.bin" + +TFA_BOARD = "j784s4" + +OPTEEMACHINE = "k3-j784s4" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "cadence-mhdp-fw cnm-wave-fw ti-eth-fw" diff --git a/meta-ti-bsp/conf/machine/include/beagle.inc b/meta-ti-bsp/conf/machine/include/beagle.inc new file mode 100644 index 00000000..27e3298d --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/beagle.inc @@ -0,0 +1,3 @@ + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-bb.org" + diff --git a/meta-ti-bsp/conf/machine/include/dra7xx.inc b/meta-ti-bsp/conf/machine/include/dra7xx.inc new file mode 100644 index 00000000..a02421d9 --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/dra7xx.inc @@ -0,0 +1,4 @@ +require conf/machine/include/omap-a15.inc +SOC_FAMILY:append = ":dra7xx" + +MACHINE_FEATURES += "pci" diff --git a/meta-ti-bsp/conf/machine/include/j7200.inc b/meta-ti-bsp/conf/machine/include/j7200.inc new file mode 100644 index 00000000..caa79876 --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/j7200.inc @@ -0,0 +1,23 @@ +require conf/machine/include/k3.inc +SOC_FAMILY:append = ":j7200" + +# Default tiboot3.bin on J7200 is for GP +IMAGE_BOOT_FILES += "tiboot3-j7200-gp-evm.bin" + +# Since default tiboot3.bin on J7200 is for GP, add a version for SR1.0 HS-FS +IMAGE_BOOT_FILES += "tiboot3-j7200-hs-fs-evm.bin" + +# Since default tiboot3.bin on J7200 is for GP, add a version for SR1.0 HS-SE +IMAGE_BOOT_FILES += "tiboot3-j7200-hs-evm.bin" + +# Since default tiboot3.bin on J7200 is for GP, add a version for SR2.0 HS-FS +IMAGE_BOOT_FILES += "tiboot3-j7200_sr2-hs-fs-evm.bin" + +# Since default tiboot3.bin on J721e is for GP, add a version for SR2.0 HS-SE +IMAGE_BOOT_FILES += "tiboot3-j7200_sr2-hs-evm.bin" + +TFA_BOARD = "generic" + +OPTEEMACHINE = "k3-j721e" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "ti-eth-fw" diff --git a/meta-ti-bsp/conf/machine/include/j721e.inc b/meta-ti-bsp/conf/machine/include/j721e.inc new file mode 100644 index 00000000..6040feb0 --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/j721e.inc @@ -0,0 +1,35 @@ +require conf/machine/include/k3.inc +SOC_FAMILY:append = ":j721e" + +MACHINE_FEATURES += "screen gpu" + +require conf/machine/include/mesa-pvr.inc +PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" + +IMAGE_BOOT_FILES += "sysfw.itb" + +# Default on J721e is for GP +IMAGE_BOOT_FILES += "tiboot3-j721e-gp-evm.bin" +IMAGE_BOOT_FILES += "sysfw-j721e-gp-evm.itb" + +# Since default on J721e is for GP, add a version for SR1.1 HS-FS +IMAGE_BOOT_FILES += "tiboot3-j721e_sr1_1-hs-fs-evm.bin" +IMAGE_BOOT_FILES += "sysfw-j721e_sr1_1-hs-fs-evm.itb" + +# Since default on J721e is for GP, add a version for SR1.1 HS-SE +IMAGE_BOOT_FILES += "tiboot3-j721e_sr1_1-hs-evm.bin" +IMAGE_BOOT_FILES += "sysfw-j721e_sr1_1-hs-evm.itb" + +# Since default on J721e is for GP, add a version for SR2.0 HS-FS +IMAGE_BOOT_FILES += "tiboot3-j721e_sr2-hs-fs-evm.bin" +IMAGE_BOOT_FILES += "sysfw-j721e_sr2-hs-fs-evm.itb" + +# Since default on J721e is for GP, add a version for SR2.0 HS-SE +IMAGE_BOOT_FILES += "tiboot3-j721e_sr2-hs-evm.bin" +IMAGE_BOOT_FILES += "sysfw-j721e_sr2-hs-evm.itb" + +TFA_BOARD = "generic" + +OPTEEMACHINE = "k3-j721e" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "cadence-mhdp-fw vxd-dec-fw ti-eth-fw" diff --git a/meta-ti-bsp/conf/machine/include/j721s2.inc b/meta-ti-bsp/conf/machine/include/j721s2.inc new file mode 100644 index 00000000..5289ec5a --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/j721s2.inc @@ -0,0 +1,22 @@ +require conf/machine/include/k3.inc +SOC_FAMILY:append = ":j721s2" + +MACHINE_FEATURES += "screen gpu" + +require conf/machine/include/mesa-pvr.inc +PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" + +# Default tiboot3.bin on J721S2 is for GP +IMAGE_BOOT_FILES += "tiboot3-j721s2-gp-evm.bin" + +# Since default tiboot3.bin on J721S2 is for GP, add a version for SR1.0 HS-FS +IMAGE_BOOT_FILES += "tiboot3-j721s2-hs-fs-evm.bin" + +# Since default tiboot3.bin on J721S2 is for GP, add a version for SR1.0 HS-SE +IMAGE_BOOT_FILES += "tiboot3-j721s2-hs-evm.bin" + +TFA_BOARD = "generic" + +OPTEEMACHINE = "k3-j784s4" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "cadence-mhdp-fw cnm-wave-fw" diff --git a/meta-ti-bsp/conf/machine/include/j722s.inc b/meta-ti-bsp/conf/machine/include/j722s.inc new file mode 100644 index 00000000..3b051f1b --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/j722s.inc @@ -0,0 +1,22 @@ +require conf/machine/include/k3.inc +SOC_FAMILY:append = ":j722s" + +MACHINE_FEATURES += "screen gpu" + +require conf/machine/include/mesa-pvr.inc +PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" + +# Default tiboot3.bin on J722S is for HS-FS +IMAGE_BOOT_FILES += "tiboot3-j722s-hs-fs-evm.bin" + +# Since default tiboot3.bin on J722S is for HS-FS, add a version for HS-SE +IMAGE_BOOT_FILES += "tiboot3-j722s-hs-evm.bin" + +TFA_BOARD = "lite" +TFA_K3_SYSTEM_SUSPEND = "1" + +OPTEEMACHINE = "k3-am62x" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "cnm-wave-fw" + +SERIAL_CONSOLES = "115200;ttyS2" diff --git a/meta-ti-bsp/conf/machine/include/j784s4.inc b/meta-ti-bsp/conf/machine/include/j784s4.inc new file mode 100644 index 00000000..92062cdf --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/j784s4.inc @@ -0,0 +1,22 @@ +require conf/machine/include/k3.inc +SOC_FAMILY:append = ":j784s4" + +MACHINE_FEATURES += "screen gpu" + +require conf/machine/include/mesa-pvr.inc +PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" + +# Default tiboot3.bin on J784S4 is for GP +IMAGE_BOOT_FILES += "tiboot3-j784s4-gp-evm.bin" + +# Since default tiboot3.bin on J784S4 is for GP, add a version for SR1.0 HS-FS +IMAGE_BOOT_FILES += "tiboot3-j784s4-hs-fs-evm.bin" + +# Since default tiboot3.bin on J784S4 is for GP, add a version for SR1.0 HS-SE +IMAGE_BOOT_FILES += "tiboot3-j784s4-hs-evm.bin" + +TFA_BOARD = "j784s4" + +OPTEEMACHINE = "k3-j784s4" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "cadence-mhdp-fw cnm-wave-fw ti-eth-fw" diff --git a/meta-ti-bsp/conf/machine/include/k3.inc b/meta-ti-bsp/conf/machine/include/k3.inc new file mode 100644 index 00000000..e3da9e12 --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/k3.inc @@ -0,0 +1,67 @@ +# TI K3 Aarch64 profile for Cortex-A53/A72 cores + +require conf/machine/include/ti-soc.inc +SOC_FAMILY:append = ":k3" + +require conf/machine/include/arm/arch-arm64.inc + +BBMULTICONFIG += "k3r5" + +# Increase this everytime you change something in the kernel +MACHINE_KERNEL_PR = "r0" + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging" +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging" +PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging" + +KERNEL_IMAGETYPE = "Image" +KERNEL_IMAGETYPES = "Image fitImage" +KERNEL_CLASSES += "kernel-fitimage" + +UBOOT_ARCH = "arm" +UBOOT_ENTRYPOINT = "0x81000000" +UBOOT_LOADADDRESS = "0x81000000" +UBOOT_RD_LOADADDRESS = "0x84000000" +UBOOT_RD_ENTRYPOINT = "0x84000000" +UBOOT_DTB_LOADADDRESS = "0x83000000" +UBOOT_DTBO_LOADADDRESS = "0x83080000" +UBOOT_DTBO_OFFSET = "0x00010000" + +SPL_BINARY = "tispl.bin" +SPL_BINARYNAME = "tispl.bin" +UBOOT_SUFFIX = "img" + +UBOOT_SIGN_ENABLE = "1" +UBOOT_MKIMAGE_DTCOPTS = "-I dts -O dtb" +UBOOT_SIGN_KEYNAME ?= "custMpk" +UBOOT_SIGN_KEYDIR ?= "${TI_SECURE_DEV_PKG}/keys" +FIT_HASH_ALG ?= "sha512" +FIT_SIGN_ALG ?= "rsa4096" + +EXTRA_IMAGEDEPENDS += "virtual/bootloader" + +MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-image-image" + +TFA_PLATFORM = "k3" + +# Use the expected value of the ubifs filesystem's volume name in the kernel +# and u-boot. +UBI_VOLNAME = "rootfs" + +# List common SoC features, may need to add touchscreen for specific machines +MACHINE_FEATURES = "apm usbgadget usbhost vfat ext2 alsa pci" + +IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap" + +IMAGE_BOOT_FILES ?= "${SPL_BINARYNAME} u-boot.${UBOOT_SUFFIX} tiboot3.bin" +IMAGE_EFI_BOOT_FILES ?= "${IMAGE_BOOT_FILES}" + +EFI_PROVIDER ?= "grub-efi" +MACHINE_FEATURES += "efi" + +WKS_FILE ?= "${@bb.utils.contains("MACHINE_FEATURES", "efi", "sdimage-2part-efi.wks.in", "sdimage-2part.wks", d)}" + +do_image_wic[depends] += "virtual/bootloader:do_deploy" +do_image[mcdepends] += "mc::k3r5:virtual/bootloader:do_deploy" + +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS2" diff --git a/meta-ti-bsp/conf/machine/include/k3r5.inc b/meta-ti-bsp/conf/machine/include/k3r5.inc new file mode 100644 index 00000000..63267a5e --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/k3r5.inc @@ -0,0 +1,27 @@ +# TI K3 Armv7 profile for Cortex-R5F cores + +require conf/machine/include/ti-soc.inc +SOC_FAMILY:append = ":k3r5" + +# The closest of existing tunes for Cortex-R5F +DEFAULTTUNE = "armv7athf" +require conf/machine/include/arm/armv7a/tune-cortexa8.inc + +# R5 runs early bootloader and loads SYSFW +# https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/j721e_evm.rst +# https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/am62x_sk.rst +# https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/k3.rst +PREFERRED_PROVIDER_virtual/kernel = "linux-dummy" +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging" +PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging" + +SPL_SUFFIX = "bin" +SPL_BINARY = "tiboot3-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.${SPL_SUFFIX}" +SPL_SYMLINK = "tiboot3.${SPL_SUFFIX}" +UBOOT_SUFFIX = "bin" +UBOOT_BINARY = "u-boot-r5spl.${UBOOT_SUFFIX}" +UBOOT_IMAGE = "u-boot-r5spl-${MAINMACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}" +UBOOT_SYMLINK = "u-boot-r5spl-${MAINMACHINE}.${UBOOT_SUFFIX}" + +PACKAGECONFIG:pn-u-boot-ti-staging = "" +PACKAGECONFIG:pn-u-boot-ti-mainline = "" diff --git a/meta-ti-bsp/conf/machine/include/mesa-pvr.inc b/meta-ti-bsp/conf/machine/include/mesa-pvr.inc new file mode 100644 index 00000000..d5581315 --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/mesa-pvr.inc @@ -0,0 +1,8 @@ +PREFERRED_PROVIDER_virtual/mesa ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/egl ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgles3 ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgbm ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libglx ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgl ?= "mesa-pvr" diff --git a/meta-ti-bsp/conf/machine/include/omap-a15.inc b/meta-ti-bsp/conf/machine/include/omap-a15.inc new file mode 100644 index 00000000..a875713f --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/omap-a15.inc @@ -0,0 +1,57 @@ +require conf/machine/include/ti-soc.inc +SOC_FAMILY:append = ":omap-a15" + +DEFAULTTUNE ?= "armv7athf-neon" +require conf/machine/include/arm/armv7a/tune-cortexa15.inc + +# Increase this everytime you change something in the kernel +MACHINE_KERNEL_PR = "r7" + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging" +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging" +PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging" + +# Graphics providers and variables +require conf/machine/include/mesa-pvr.inc +PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km" +PVR_DISPLAY_CONTROLLER_ALIAS ?= "omapdrm" + +KERNEL_IMAGETYPE = "zImage" +KERNEL_IMAGETYPES = "zImage uImage" +KERNEL_CLASSES += "kernel-uimage" + +UBOOT_ARCH = "arm" +UBOOT_ENTRYPOINT = "0x80008000" +UBOOT_LOADADDRESS = "0x80008000" + +DEVICETREE_FILE = "${@(d.getVar('KERNEL_DEVICETREE') or "").replace("ti/omap/","").replace("ti/","")}" + +# Generate an extlinux.conf file +UBOOT_EXTLINUX = "1" +UBOOT_EXTLINUX_ROOT = "root=PARTUUID=${uuid}" +UBOOT_EXTLINUX_BOOT_FILES = " \ + extlinux.conf;extlinux/extlinux.conf \ + ${KERNEL_IMAGETYPE} \ + ${DEVICETREE_FILE} \ +" + +SPL_BINARY = "MLO" +UBOOT_SUFFIX = "img" + +EXTRA_IMAGEDEPENDS += "virtual/bootloader" + +MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-image-zimage" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "vpdma-fw goodix-fw" + +# Use the expected value of the ubifs filesystem's volume name in the kernel +# and u-boot. +UBI_VOLNAME = "rootfs" + +# List common SoC features, may need to add touchscreen for specific machines +MACHINE_FEATURES = "apm usbgadget usbhost vfat ext2 screen alsa gpu mmip dsp gc320" + +IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap" +WKS_FILE ?= "sdimage-2part.wks" +IMAGE_BOOT_FILES ?= "${SPL_BINARY} u-boot.${UBOOT_SUFFIX} ${UBOOT_EXTLINUX_BOOT_FILES}" +do_image_wic[depends] += "virtual/bootloader:do_deploy" diff --git a/meta-ti-bsp/conf/machine/include/omapl138.inc b/meta-ti-bsp/conf/machine/include/omapl138.inc new file mode 100644 index 00000000..7f8262a5 --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/omapl138.inc @@ -0,0 +1,16 @@ +require conf/machine/include/ti-soc.inc +SOC_FAMILY:append = ":omapl138" + +require conf/machine/include/arm/armv5/tune-arm926ejs.inc + +KERNEL_IMAGETYPE = "zImage" + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging" +PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging" +PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging" + +EXTRA_IMAGEDEPENDS += "virtual/bootloader" + +MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-image-zimage" + +MACHINE_FEATURES = "serial usbhost usbgadget alsa" diff --git a/meta-ti-bsp/conf/machine/include/ti-extras.inc b/meta-ti-bsp/conf/machine/include/ti-extras.inc new file mode 100644 index 00000000..4e62605c --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/ti-extras.inc @@ -0,0 +1,4 @@ +# Add TI_EXTRAS to machine overrides so we get access to e.g. 'jailhouse' + +TI_EXTRAS ??= "" +MACHINEOVERRIDES =. "${@ '${TI_EXTRAS}:' if d.getVar('TI_EXTRAS').startswith('tie-') else ''}" diff --git a/meta-ti-bsp/conf/machine/include/ti-soc.inc b/meta-ti-bsp/conf/machine/include/ti-soc.inc new file mode 100644 index 00000000..a1fd3cbf --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/ti-soc.inc @@ -0,0 +1,9 @@ +# This is a generic TI SOC family. It is a superset of all other SOCs +# and platforms defined in meta-ti to allow BSP-level overrides. +SOC_FAMILY = "ti-soc" + +# TI platforms all use devicetrees with overlays +MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-devicetree" +KERNEL_DTB_OVERLAY_SUPPORT ?= "1" + +require conf/machine/include/soc-family.inc diff --git a/meta-ti-bsp/conf/machine/include/ti33x.inc b/meta-ti-bsp/conf/machine/include/ti33x.inc new file mode 100644 index 00000000..b0ed1c69 --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/ti33x.inc @@ -0,0 +1,78 @@ +require conf/machine/include/ti-soc.inc +SOC_FAMILY:append = ":ti33x" + +DEFAULTTUNE ?= "armv7athf-neon" +require conf/machine/include/arm/armv7a/tune-cortexa8.inc + +# Increase this everytime you change something in the kernel +MACHINE_KERNEL_PR = "r22" + +# Default providers, may need to override for specific machines +PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging" +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging" +PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging" + +# Graphics providers and variables +require conf/machine/include/mesa-pvr.inc +PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km" +PVR_DISPLAY_CONTROLLER_ALIAS ?= "tilcdc" + +KERNEL_IMAGETYPE = "zImage" + +KERNEL_DEVICETREE_PREFIX = " \ + am335x \ + ti/omap/am335x \ +" + +KERNEL_DEVICETREE = " \ + ti/omap/am335x-evm.dtb \ + ti/omap/am335x-evmsk.dtb \ + ti/omap/am335x-icev2.dtb \ + ti/omap/am335x-pocketbeagle.dtb \ + ti/omap/am335x-bone.dtb \ + ti/omap/am335x-boneblue.dtb \ + ti/omap/am335x-bonegreen.dtb \ + ti/omap/am335x-bonegreen-wireless.dtb \ + ti/omap/am335x-boneblack.dtb \ + ti/omap/am335x-boneblack-wireless.dtb \ + ti/omap/am335x-sancloud-bbe.dtb \ +" + +UBOOT_ARCH = "arm" +UBOOT_MACHINE = "am335x_evm_config" + +UBOOT_ENTRYPOINT = "0x80008000" +UBOOT_LOADADDRESS = "0x80008000" + +DEVICETREE_FILE = "${@(d.getVar('KERNEL_DEVICETREE') or "").replace("ti/omap/","")}" + +# Generate an extlinux.conf file +UBOOT_EXTLINUX = "1" +UBOOT_EXTLINUX_ROOT = "root=PARTUUID=${uuid}" +UBOOT_EXTLINUX_KERNEL_ARGS = "rootwait rw earlycon" +UBOOT_EXTLINUX_BOOT_FILES = " \ + extlinux.conf;extlinux/extlinux.conf \ + ${KERNEL_IMAGETYPE} \ + ${DEVICETREE_FILE} \ +" + +SPL_BINARY = "MLO" +UBOOT_SUFFIX = "img" + +# Use the expected value of the ubifs filesystem's volume name in the kernel +# and u-boot. +UBI_VOLNAME = "rootfs" + +EXTRA_IMAGEDEPENDS += "virtual/bootloader" + +MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-image-zimage" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "amx3-cm3 prueth-fw pruhsr-fw pruprp-fw" + +# List common SoC features, may need to add touchscreen for specific machines +MACHINE_FEATURES = "apm usbgadget usbhost vfat ext2 alsa gpu" + +IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap" +WKS_FILE ?= "sdimage-2part.wks" +IMAGE_BOOT_FILES ?= "${SPL_BINARY} u-boot.${UBOOT_SUFFIX} ${UBOOT_EXTLINUX_BOOT_FILES}" +do_image_wic[depends] += "virtual/bootloader:do_deploy" diff --git a/meta-ti-bsp/conf/machine/include/ti43x.inc b/meta-ti-bsp/conf/machine/include/ti43x.inc new file mode 100644 index 00000000..17ca5240 --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/ti43x.inc @@ -0,0 +1,74 @@ +require conf/machine/include/ti-soc.inc +SOC_FAMILY:append = ":ti43x" + +DEFAULTTUNE ?= "armv7athf-neon" +require conf/machine/include/arm/armv7a/tune-cortexa9.inc + +# Increase this everytime you change something in the kernel +MACHINE_KERNEL_PR = "r3" + +# Default providers, may need to override for specific machines +PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging" +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging" +PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging" + +# Graphics providers and variables +require conf/machine/include/mesa-pvr.inc +PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km" +PVR_DISPLAY_CONTROLLER_ALIAS ?= "omapdrm" + +KERNEL_IMAGETYPE = "zImage" + +KERNEL_DEVICETREE_PREFIX = " \ + am437x \ + am43x \ + ti/omap/am437x \ + ti/omap/am43x \ +" + +KERNEL_DEVICETREE = " \ + ti/omap/am437x-gp-evm.dtb \ + ti/omap/am437x-sk-evm.dtb \ + ti/omap/am437x-idk-evm.dtb \ + ti/omap/am43x-epos-evm.dtb \ +" + +KERNEL_DEVICETREE += "${@oe.utils.conditional('ENABLE_TI_UIO_DEVICES', '1', 'am437x-idk-pru-excl-uio.dtb', '', d)}" + +UBOOT_ARCH = "arm" +UBOOT_MACHINE = "am43xx_evm_config" + +UBOOT_ENTRYPOINT = "0x80008000" +UBOOT_LOADADDRESS = "0x80008000" + +DEVICETREE_FILE = "${@(d.getVar('KERNEL_DEVICETREE') or "").replace("ti/omap/","")}" + +# Generate an extlinux.conf file +UBOOT_EXTLINUX = "1" +UBOOT_EXTLINUX_ROOT = "root=PARTUUID=${uuid}" +UBOOT_EXTLINUX_BOOT_FILES = " \ + extlinux.conf;extlinux/extlinux.conf \ + ${KERNEL_IMAGETYPE} \ + ${DEVICETREE_FILE} \ +" + +SPL_BINARY = "MLO" +UBOOT_SUFFIX = "img" + +# Use the expected value of the ubifs filesystem's volume name in the kernel +# and u-boot. +UBI_VOLNAME = "rootfs" + +EXTRA_IMAGEDEPENDS += "virtual/bootloader" + +MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-image-zimage" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "amx3-cm3 prueth-fw pruhsr-fw pruprp-fw" + +# List common SoC features, may need to add touchscreen for specific machines +MACHINE_FEATURES = "apm usbgadget usbhost vfat ext2 screen alsa gpu" + +IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap" +WKS_FILE ?= "sdimage-2part.wks" +IMAGE_BOOT_FILES ?= "${SPL_BINARY} u-boot.${UBOOT_SUFFIX} ${UBOOT_EXTLINUX_BOOT_FILES}" +do_image_wic[depends] += "virtual/bootloader:do_deploy" diff --git a/meta-ti-bsp/conf/machine/j7200-evm-k3r5.conf b/meta-ti-bsp/conf/machine/j7200-evm-k3r5.conf new file mode 100644 index 00000000..68061883 --- /dev/null +++ b/meta-ti-bsp/conf/machine/j7200-evm-k3r5.conf @@ -0,0 +1,11 @@ +#@TYPE: Machine +#@NAME: J7200 EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI J7200 EVM (R5F core) + +require conf/machine/include/k3r5.inc + +SYSFW_SOC = "j7200" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "gp" + +UBOOT_MACHINE = "j7200_evm_r5_defconfig" diff --git a/meta-ti-bsp/conf/machine/j7200-evm.conf b/meta-ti-bsp/conf/machine/j7200-evm.conf new file mode 100644 index 00000000..dff1da69 --- /dev/null +++ b/meta-ti-bsp/conf/machine/j7200-evm.conf @@ -0,0 +1,13 @@ +#@TYPE: Machine +#@NAME: J7200 EVM +#@DESCRIPTION: Machine configuration for the TI J7200 EVM + +require conf/machine/include/j7200.inc + +KERNEL_DEVICETREE_PREFIX = "ti/k3-j7200" + +KERNEL_DEVICETREE = " \ + ti/k3-j7200-common-proc-board.dtb \ +" + +UBOOT_MACHINE = "j7200_evm_a72_config" diff --git a/meta-ti-bsp/conf/machine/j7200-hs-evm-k3r5.conf b/meta-ti-bsp/conf/machine/j7200-hs-evm-k3r5.conf new file mode 100644 index 00000000..1922d5c8 --- /dev/null +++ b/meta-ti-bsp/conf/machine/j7200-hs-evm-k3r5.conf @@ -0,0 +1,11 @@ +#@TYPE: Machine +#@NAME: J7200 HS EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI J7200 HS EVM (R5F core) + +require conf/machine/include/k3r5.inc + +SYSFW_SOC = "j7200_sr2" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "hs" + +UBOOT_MACHINE = "j7200_evm_r5_defconfig" diff --git a/meta-ti-bsp/conf/machine/j7200-hs-evm.conf b/meta-ti-bsp/conf/machine/j7200-hs-evm.conf new file mode 100644 index 00000000..54fd2b4a --- /dev/null +++ b/meta-ti-bsp/conf/machine/j7200-hs-evm.conf @@ -0,0 +1,7 @@ +#@TYPE: Machine +#@NAME: J7200 HS EVM +#@DESCRIPTION: Machine configuration for the TI J7200 HS EVM + +require conf/machine/j7200-evm.conf + +UBOOT_MACHINE = "j7200_evm_a72_defconfig" diff --git a/meta-ti-bsp/conf/machine/j721e-evm-k3r5.conf b/meta-ti-bsp/conf/machine/j721e-evm-k3r5.conf new file mode 100644 index 00000000..070bf7aa --- /dev/null +++ b/meta-ti-bsp/conf/machine/j721e-evm-k3r5.conf @@ -0,0 +1,11 @@ +#@TYPE: Machine +#@NAME: J721e EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI J721e EVM (R5F core) + +require conf/machine/include/k3r5.inc + +SYSFW_SOC = "j721e" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "gp" + +UBOOT_MACHINE = "j721e_evm_r5_defconfig" diff --git a/meta-ti-bsp/conf/machine/j721e-evm.conf b/meta-ti-bsp/conf/machine/j721e-evm.conf new file mode 100644 index 00000000..5e1f6dca --- /dev/null +++ b/meta-ti-bsp/conf/machine/j721e-evm.conf @@ -0,0 +1,18 @@ +#@TYPE: Machine +#@NAME: J721e EVM +#@DESCRIPTION: Machine configuration for the TI J721e EVM + +require conf/machine/include/j721e.inc + +KERNEL_DEVICETREE_PREFIX = " \ + ti/k3-j721e \ + ti/k3-fpdlink \ + ti/k3-j7200-evm-mcspi-loopback \ +" + +KERNEL_DEVICETREE = " \ + ti/k3-j721e-common-proc-board.dtb \ + ti/k3-j721e-sk.dtb \ +" + +UBOOT_MACHINE = "j721e_evm_a72_config" diff --git a/meta-ti-bsp/conf/machine/j721e-hs-evm-k3r5.conf b/meta-ti-bsp/conf/machine/j721e-hs-evm-k3r5.conf new file mode 100644 index 00000000..7904c660 --- /dev/null +++ b/meta-ti-bsp/conf/machine/j721e-hs-evm-k3r5.conf @@ -0,0 +1,11 @@ +#@TYPE: Machine +#@NAME: J721e HS EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI J721e HS EVM (R5F core) + +require conf/machine/include/k3r5.inc + +SYSFW_SOC = "j721e_sr1_1" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "hs" + +UBOOT_MACHINE = "j721e_evm_r5_defconfig" diff --git a/meta-ti-bsp/conf/machine/j721e-hs-evm.conf b/meta-ti-bsp/conf/machine/j721e-hs-evm.conf new file mode 100644 index 00000000..441ca169 --- /dev/null +++ b/meta-ti-bsp/conf/machine/j721e-hs-evm.conf @@ -0,0 +1,7 @@ +#@TYPE: Machine +#@NAME: J721e HS EVM +#@DESCRIPTION: Machine configuration for the TI J721e HS EVM + +require conf/machine/j721e-evm.conf + +UBOOT_MACHINE = "j721e_evm_a72_defconfig" diff --git a/meta-ti-bsp/conf/machine/j721s2-evm-k3r5.conf b/meta-ti-bsp/conf/machine/j721s2-evm-k3r5.conf new file mode 100644 index 00000000..508e96e5 --- /dev/null +++ b/meta-ti-bsp/conf/machine/j721s2-evm-k3r5.conf @@ -0,0 +1,11 @@ +#@TYPE: Machine +#@NAME: J721S2 EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI J721S2 EVM (R5F core) + +require conf/machine/include/k3r5.inc + +SYSFW_SOC = "j721s2" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "gp" + +UBOOT_MACHINE = "j721s2_evm_r5_defconfig" diff --git a/meta-ti-bsp/conf/machine/j721s2-evm.conf b/meta-ti-bsp/conf/machine/j721s2-evm.conf new file mode 100644 index 00000000..c4e8af90 --- /dev/null +++ b/meta-ti-bsp/conf/machine/j721s2-evm.conf @@ -0,0 +1,22 @@ +#@TYPE: Machine +#@NAME: J721S2 EVM +#@DESCRIPTION: Machine configuration for the TI J721S2 EVM + +require conf/machine/include/j721s2.inc + +TFA_K3_USART = "0x8" +OPTEE_K3_USART = "0x8" + +KERNEL_DEVICETREE_PREFIX = " \ + ti/k3-j721s2 \ + ti/k3-fpdlink \ + ti/k3-j7200-evm-mcspi-loopback \ + ti/k3-am68-sk \ + ti/k3-v3link \ +" + +KERNEL_DEVICETREE = " \ + ti/k3-j721s2-common-proc-board.dtb \ +" + +UBOOT_MACHINE = "j721s2_evm_a72_defconfig" diff --git a/meta-ti-bsp/conf/machine/j721s2-hs-evm-k3r5.conf b/meta-ti-bsp/conf/machine/j721s2-hs-evm-k3r5.conf new file mode 100644 index 00000000..58cd92c4 --- /dev/null +++ b/meta-ti-bsp/conf/machine/j721s2-hs-evm-k3r5.conf @@ -0,0 +1,11 @@ +#@TYPE: Machine +#@NAME: J721S2 HS EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI J721S2 HS EVM (R5F core) + +require conf/machine/include/k3r5.inc + +SYSFW_SOC = "j721s2" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "hs" + +UBOOT_MACHINE = "j721s2_evm_r5_defconfig" diff --git a/meta-ti-bsp/conf/machine/j721s2-hs-evm.conf b/meta-ti-bsp/conf/machine/j721s2-hs-evm.conf new file mode 100644 index 00000000..4cf32a28 --- /dev/null +++ b/meta-ti-bsp/conf/machine/j721s2-hs-evm.conf @@ -0,0 +1,5 @@ +#@TYPE: Machine +#@NAME: J721S2 HS EVM +#@DESCRIPTION: Machine configuration for the TI J721S2 HS EVM + +require conf/machine/j721s2-evm.conf diff --git a/meta-ti-bsp/conf/machine/j722s-evm-k3r5.conf b/meta-ti-bsp/conf/machine/j722s-evm-k3r5.conf new file mode 100644 index 00000000..2c884ffd --- /dev/null +++ b/meta-ti-bsp/conf/machine/j722s-evm-k3r5.conf @@ -0,0 +1,11 @@ +#@TYPE: Machine +#@NAME: J722S EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI J722S EVM (R5F core) + +require conf/machine/include/k3r5.inc + +SYSFW_SOC = "j722s" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "hs-fs" + +UBOOT_MACHINE = "j722s_evm_r5_defconfig" diff --git a/meta-ti-bsp/conf/machine/j722s-evm.conf b/meta-ti-bsp/conf/machine/j722s-evm.conf new file mode 100644 index 00000000..74bcdfce --- /dev/null +++ b/meta-ti-bsp/conf/machine/j722s-evm.conf @@ -0,0 +1,15 @@ +#@TYPE: Machine +#@NAME: J722S EVM +#@DESCRIPTION: Machine configuration for the TI J722S EVM + +require conf/machine/include/j722s.inc + +KERNEL_DEVICETREE_PREFIX = " \ + ti/k3-j722s \ + ti/k3-fpdlink \ + ti/k3-v3link \ +" + +KERNEL_DEVICETREE = "" + +UBOOT_MACHINE = "j722s_evm_a53_defconfig" diff --git a/meta-ti-bsp/conf/machine/j784s4-evm-k3r5.conf b/meta-ti-bsp/conf/machine/j784s4-evm-k3r5.conf new file mode 100644 index 00000000..04feebc6 --- /dev/null +++ b/meta-ti-bsp/conf/machine/j784s4-evm-k3r5.conf @@ -0,0 +1,11 @@ +#@TYPE: Machine +#@NAME: J784S4 EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI J784S4 EVM (R5F core) + +require conf/machine/include/k3r5.inc + +SYSFW_SOC = "j784s4" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "gp" + +UBOOT_MACHINE = "j784s4_evm_r5_defconfig" diff --git a/meta-ti-bsp/conf/machine/j784s4-evm.conf b/meta-ti-bsp/conf/machine/j784s4-evm.conf new file mode 100644 index 00000000..e451bf47 --- /dev/null +++ b/meta-ti-bsp/conf/machine/j784s4-evm.conf @@ -0,0 +1,22 @@ +#@TYPE: Machine +#@NAME: J784S4 EVM +#@DESCRIPTION: Machine configuration for the TI J784S4 EVM + +require conf/machine/include/j784s4.inc + +TFA_K3_USART = "0x8" +OPTEE_K3_USART = "0x8" + +KERNEL_DEVICETREE_PREFIX = " \ + ti/k3-j784s4 \ + ti/k3-fpdlink \ + ti/k3-j7200-evm-mcspi-loopback \ + ti/k3-am69-sk \ + ti/k3-v3link \ +" + +KERNEL_DEVICETREE = " \ + ti/k3-j784s4-evm.dtb \ +" + +UBOOT_MACHINE = "j784s4_evm_a72_defconfig" diff --git a/meta-ti-bsp/conf/machine/j784s4-hs-evm-k3r5.conf b/meta-ti-bsp/conf/machine/j784s4-hs-evm-k3r5.conf new file mode 100644 index 00000000..80a228a0 --- /dev/null +++ b/meta-ti-bsp/conf/machine/j784s4-hs-evm-k3r5.conf @@ -0,0 +1,11 @@ +#@TYPE: Machine +#@NAME: J784S4 HS EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI J784S4 HS EVM (R5F core) + +require conf/machine/include/k3r5.inc + +SYSFW_SOC = "j784s4" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "hs" + +UBOOT_MACHINE = "j784s4_evm_r5_defconfig" diff --git a/meta-ti-bsp/conf/machine/j784s4-hs-evm.conf b/meta-ti-bsp/conf/machine/j784s4-hs-evm.conf new file mode 100644 index 00000000..8fa1c1fd --- /dev/null +++ b/meta-ti-bsp/conf/machine/j784s4-hs-evm.conf @@ -0,0 +1,5 @@ +#@TYPE: Machine +#@NAME: J784S4 HS EVM +#@DESCRIPTION: Machine configuration for the TI J784S4 HS EVM + +require conf/machine/j784s4-evm.conf diff --git a/meta-ti-bsp/conf/machine/omapl138-lcdk.conf b/meta-ti-bsp/conf/machine/omapl138-lcdk.conf new file mode 100644 index 00000000..fdbaffae --- /dev/null +++ b/meta-ti-bsp/conf/machine/omapl138-lcdk.conf @@ -0,0 +1,26 @@ +#@TYPE: Machine +#@NAME: OMAP-L138 LCDK +#@DESCRIPTION: Machine configuration for the TI OMAP-L138 LCDK board + +require conf/machine/include/omapl138.inc + +UBOOT_MACHINE = "omapl138_lcdk_config" +UBOOT_SUFFIX = "ais" +SPL_BINARY = "" + +UBOOT_ENTRYPOINT = "0xc0008000" +UBOOT_LOADADDRESS = "0xc0008000" + +IMAGE_FSTYPES += "tar.xz" + +SERIAL_CONSOLES = "115200;ttyS2" + +KERNEL_DEVICETREE_PREFIX = " \ + da850 \ + ti/davinci/da850 \ +" + +KERNEL_DEVICETREE = " \ + da850-evm.dtb \ + da850-lcdk.dtb \ +" diff --git a/meta-ti-bsp/conf/multiconfig/k3r5.conf b/meta-ti-bsp/conf/multiconfig/k3r5.conf new file mode 100644 index 00000000..936bce2f --- /dev/null +++ b/meta-ti-bsp/conf/multiconfig/k3r5.conf @@ -0,0 +1,10 @@ +MAINMACHINE := "${MACHINE}" + +DEPLOY_DIR_IMAGE:k3r5 = "${TI_COMMON_DEPLOY}/images/${MAINMACHINE}" + +MACHINE:append = "-k3r5" +TCLIBC = "baremetal" +TI_TMPDIR_APPEND ?= "-k3r5" +TMPDIR:append = "${TI_TMPDIR_APPEND}" + +SDKPKGSUFFIX = "k3r5-nativesdk" diff --git a/meta-ti-bsp/dynamic-layers/clang-layer/recipes-graphics/mesa/mesa-pvr_%.bbappend b/meta-ti-bsp/dynamic-layers/clang-layer/recipes-graphics/mesa/mesa-pvr_%.bbappend new file mode 100644 index 00000000..7e5c36fd --- /dev/null +++ b/meta-ti-bsp/dynamic-layers/clang-layer/recipes-graphics/mesa/mesa-pvr_%.bbappend @@ -0,0 +1,14 @@ +# This is a copy of meta-clang/recipes-graphics/mesa/mesa_%.bbappend required +# for llvmpipe when using pvr-mesa since we aren't caught by that glob. + +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +LDFLAGS:append:toolchain-clang = " -latomic -lm" +DEPENDS:append:toolchain-clang = " libatomic-ops" + +EXTRA_OEMASON:append:toolchain-clang:x86 = " -Dasm=false" +EXTRA_OEMASON:append:toolchain-clang:x86-64 = " -Dasm=false" + +export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm-config" + +PACKAGECONFIG[gallium-llvm] = "-Dllvm=true -Dshared-llvm=true -Ddraw-use-llvm=true,-Dllvm=false,clang clang-native elfutils" diff --git a/meta-ti-bsp/licenses/TI-IMG b/meta-ti-bsp/licenses/TI-IMG new file mode 100644 index 00000000..d4135576 --- /dev/null +++ b/meta-ti-bsp/licenses/TI-IMG @@ -0,0 +1,63 @@ +This license applies to the Imagination D5520 firmware image, pvdec_full_bin.fw. + +Copyright (C) 2019 Texas Instruments Incorporated + +All rights reserved not granted herein. + +Limited License. + +Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive +license under copyrights and patents it now or hereafter owns or controls to +make, have made, use, import, offer to sell and sell ("Utilize") this software +subject to the terms herein. With respect to the foregoing patent license, such +license is granted solely to the extent that any such patent is necessary to +Utilize the software alone. The patent license shall not apply to any +combinations which include this software, other than combinations with devices +manufactured by or for TI (âTI Devicesâ). No hardware patent is licensed +hereunder. + +Redistributions must preserve existing copyright notices and reproduce this +license (including the above copyright notice and the disclaimer and +(if applicable) source code license limitations below) in the documentation +and/or other materials provided with the distribution + +Redistribution and use in binary form, without modification, are permitted +provided that the following conditions are met: + + * No reverse engineering, decompilation, or disassembly of this + software is permitted with respect to any software provided in binary + form. + + * any redistribution and use are licensed by TI for use only with TI + Devices. + + * Nothing shall obligate TI to provide you with source code for the + software licensed and provided to you in object code. + +If software source code is provided to you, modification and redistribution of +the source code are permitted provided that the following conditions are met: + + * any redistribution and use of the source code, including any + resulting derivative works, are licensed by TI for use only with TI + Devices. + + * any redistribution and use of any object code compiled from the + source code and any resulting derivative works, are licensed by TI + for use only with TI Devices. + +Neither the name of Texas Instruments Incorporated nor the names of its +suppliers may be used to endorse or promote products derived from this +software without specific prior written permission. + +DISCLAIMER. + +THIS SOFTWARE IS PROVIDED BY TI AND TIâS LICENSORS "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +EVENT SHALL TI AND TIâS LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/meta-ti-bsp/licenses/TI-TFL b/meta-ti-bsp/licenses/TI-TFL new file mode 100644 index 00000000..264692b7 --- /dev/null +++ b/meta-ti-bsp/licenses/TI-TFL @@ -0,0 +1,62 @@ +TEXAS INSTRUMENTS TEXT FILE LICENSE + +Copyright (c) [earliest year] - [latest year] Texas Instruments Incorporated + +All rights reserved not granted herein. + +Limited License. + +Texas Instruments Incorporated grants a world-wide, royalty-free, +non-exclusive license under copyrights and patents it now or hereafter owns +or controls to make, have made, use, import, offer to sell and sell +("Utilize") this software subject to the terms herein. With respect to the +foregoing patent license, such license is granted solely to the extent that +any such patent is necessary to Utilize the software alone. The patent +license shall not apply to any combinations which include this software, +other than combinations with devices manufactured by or for TI ("TI +Devices"). No hardware patent is licensed hereunder. + +Redistributions must preserve existing copyright notices and reproduce this +license (including the above copyright notice and the disclaimer and (if +applicable) source code license limitations below) in the documentation +and/or other materials provided with the distribution + +Redistribution and use in binary form, without modification, are permitted +provided that the following conditions are met: + +* No reverse engineering, decompilation, or disassembly of this software is +permitted with respect to any software provided in binary form. + +* any redistribution and use are licensed by TI for use only with TI +Devices. + +* Nothing shall obligate TI to provide you with source code for the software +licensed and provided to you in object code. + +If software source code is provided to you, modification and redistribution +of the source code are permitted provided that the following conditions are +met: + +* any redistribution and use of the source code, including any resulting +derivative works, are licensed by TI for use only with TI Devices. + +* any redistribution and use of any object code compiled from the source +code and any resulting derivative works, are licensed by TI for use only +with TI Devices. + +Neither the name of Texas Instruments Incorporated nor the names of its +suppliers may be used to endorse or promote products derived from this +software without specific prior written permission. + +DISCLAIMER. + +THIS SOFTWARE IS PROVIDED BY TI AND TI'S LICENSORS "AS IS" AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN +NO EVENT SHALL TI AND TI'S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/meta-ti-bsp/licenses/TI-TSPA b/meta-ti-bsp/licenses/TI-TSPA new file mode 100644 index 00000000..fd87c2ac --- /dev/null +++ b/meta-ti-bsp/licenses/TI-TSPA @@ -0,0 +1,206 @@ +Texas Instruments Incorporated +Technology and Software Publicly Available +Software License Agreement + + +Important - Please read the following license agreement carefully. This is +a legally binding agreement. Do not click "i have read and agree" or use +(as applicable) the Licensed Materials unless: (1) you are authorized to +accept and agree to the terms of this license agreement on behalf of +yourself or your company (as applicable) and (2) you intend to be bound by +the terms of this license agreement on behalf of yourself or your company +(as applicable). + +This Software License Agreement ("Agreement") is a legal agreement between +you (either an individual or entity) and Texas Instruments Incorporated +("TI"), 12500 TI Boulevard, Dallas, Texas 75243. The "Licensed Materials" +subject to this Agreement include the software programs (in whole or in +part), that accompany this Agreement and set forth in the applicable +software manifest and which you access "on-line" and/or electronic +documentation (in whole or in part) associated and provided with these +software programs. By installing, copying or otherwise using the Licensed +Materials you agree to abide by the terms of this Agreement. If you choose +not to accept or agree with these terms, do not download or install the +Licensed Materials. + +Note Regarding Possible Access to Open Source Software: The Licensed +Materials may be bundled with Open Source Software. "Open Source Software" +means any software licensed under terms requiring that (A) other software +("Proprietary Software") incorporated, combined or distributed with such +software or developed using such software: (i) be disclosed or distributed +in source code form; or (ii) otherwise be licensed on terms inconsistent +with the terms of this Agreement, including but not limited to permitting +use of the Proprietary Software on or with devices other than TI Devices, or +(B) require the owner of Proprietary Software to license any of its patents +to users of the Open Source Software and/or Proprietary Software +incorporated, combined or distributed with such Open Source Software or +developed using such Open Source Software. + +You may gain access to Open Source Software, in which case such Open Source +Software will be listed in the applicable software manifest (in whole or in +part, the "Open Source Materials"). Your use of the Open Source Materials +is subject to the separate licensing terms applicable to such Open Source +Materials as specified in the applicable software manifest. For +clarification, this Agreement does not limit your rights under, or grant you +rights that supersede, the license terms of any applicable Open Source +Materials license agreement. If any of the Open Source Materials have been +provided to you in object code only, TI will provide to you or show you +where can access the source code versions of such Open Source Materials if +you contact TI at Texas Instruments Incorporated, 12500 TI Boulevard, Mail +Station 8638, Dallas, Texas 75243, Attention: Contracts Manager. You may +terminate this Agreement in the event you choose not to accept or agree with +the terms in any applicable Open Source Materials license agreement, +provided that such termination occurs within five (5) calendar days of +acceptance of this Agreement and you abide by all applicable license terms +in this Agreement until such termination. + +1. License. + +a. Source Code License. For the Licensed Materials provided in source code +format, TI hereby grants to you a limited, non-exclusive license to +reproduce, use, and create modified or derivative works of the Licensed +Materials provided to you in source code format and to distribute an +unlimited number of copies of such source code Licensed Materials, or any +derivatives thereof, in any format. + +b. Object Code License. For the Licensed Materials provided in object code +format, TI hereby grants to you a limited, non-exclusive license to +reproduce and use the Licensed Materials provided to you in object code +format and to distribute an unlimited number of object or executable copies +of such object code Licensed Materials. + +2. Termination. This Agreement is effective until terminated. Without +prejudice to any other rights, TI may terminate your right to use the +Licensed Materials under this Agreement if you fail to comply with the terms +of this Agreement. In such event, you shall destroy all copies of the +Licensed Materials, including all portions and derivatives thereof. + +3. Intellectual Property Rights. + +a. The Licensed Materials being provided to you hereunder are being made +publicly available by TI, even though they contain copyrighted material of +TI and its licensors, if applicable. In no event may you alter, remove or +destroy any copyright notice included in the Licensed Materials. To the +extent that any of the Licensed Materials are provided in binary or object +code only, you may not unlock, decompile, reverse engineer, disassemble or +otherwise translate such binary or object code to human-perceivable form. +The source code of such reverse engineered code may contain TI trade secret +and other proprietary information. TI reserves all rights not specifically +granted under this Agreement. + +b. Certain Licensed Materials may (i) require patent licenses from third +parties claiming patent rights covering implementation of the Licensed +Materials or (ii) be based on industry recognized standards or software +programs published by industry recognized standards bodies and certain third +parties may claim to own patents or copyrights that cover implementation of +those standards. You acknowledge and agree that this Agreement does not +convey a license to any such third party patents and copyrights. + +c. YOU ACKNOWLEDGE AND AGREE THAT TI SHALL NOT BE LIABLE FOR AND SHALL NOT +DEFEND OR INDEMNIFY YOU AGAINST ANY THIRD PARTY INFRINGEMENT CLAIM THAT +RELATES TO OR IS BASED ON YOUR MANUFACTURE, USE, OR DISTRIBUTION OF THE +LICENSED MATERIALS OR YOUR MANUFACTURE, USE, OFFER FOR SALE, SALE, +IMPORTATION OR DISTRIBUTION OF YOUR PRODUCTS THAT INCLUDE OR INCORPORATE THE +LICENSED MATERIALS. + +d. You acknowledge and agree that you are responsible for any fees or +royalties that may be payable to any third party based on such third party's +interests in the Licensed Materials described in Section 3(b) above (the +"Third Party Payment Obligations"). You agree to indemnify TI against any +Third Party Payment Obligations and will defend any claim, suit or +proceeding brought against TI insofar as such claim, suit or proceeding is +based on your failure to pay any Third Party Payment Obligations. + +4. Warranties and Limitations. THE LICENSED MATERIALS ARE PROVIDED "AS IS". +TI AND ITS LICENSORS MAKE NO WARRANTY OR REPRESENTATION, EXPRESS, IMPLIED OR +STATUTORY, INCLUDING ANY IMPLIED WARRANTIES OF MERCHANTIBILITY, FITNESS FOR +A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS OF +RESPONSES, RESULTS AND LACK OF NEGLIGENCE. TI DISCLAIMS ANY WARRANTY OF +TITLE, QUIET ENJOYMENT, QUIET POSESSION, AND NON-INFRINGEMENT OF ANY THIRD +PARTY INTELLECTUAL PROPERTY RIGHTS WITH REGARD TO THE LICENSED MATERIALS OR +USE OF THOSE MATERIALS. + +YOU ACKNOWLEDGE AND AGREE THAT THE LICENSED MATERIALS MAY NOT BE INTENDED +FOR PRODUCTION APPLICATIONS AND MAY CONTAIN IRREGULARITIES AND DEFECTS NOT +FOUND IN PRODUCTION SOFTWARE. FURTHERMORE, YOU ACKNOWLEDGE AND AGREE THAT +THE LICENSED MATERIALS HAVE NOT BEEN TESTED OR CERTIFIED BY ANY GOVERNMENT +AGENCY OR INDUSTRY REGULATORY ORGANIZATION OR ANY OTHER THIRD PARTY +ORGANIZATION. YOU AGREE THAT PRIOR TO USING, INCORPORATING OR DISTRIBUTING +THE LICENSED MATERIALS IN OR WITH ANY COMMERCIAL PRODUCT THAT YOU WILL +THOROUGHLY TEST THE PRODUCT AND THE FUNCTIONALITY OF THE LICENSED MATERIALS +IN OR WITH THAT PRODUCT AND BE SOLELY RESPONSIBLE FOR ANY PROBLEMS OR +FAILURES. + +IN NO EVENT SHALL TI OR ITS LICENSORS BE LIABLE FOR ANY SPECIAL, INDIRECT, +INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED ON ANY THEORY +OF LIABILITY, ARISING IN ANY WAY OUT OF THIS AGREEMENT, OR YOUR USE OF THE +LICENSED MATERIALS, WHETHER OR NOT TI HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. EXCLUDED DAMAGES INCLUDE, BUT ARE NOT LIMITED TO, COST OF +REMOVAL OR REINSTALLATION, OUTSIDE COMPUTER TIME, LABOR COSTS, LOSS OR +CORRUPTION OF DATA, LOSS OF GOODWILL, LOSS OF PROFITS, LOSS OF SAVINGS, OR +LOSS OF USE OR INTERRUPTION OF BUSINESS OR ANY OTHER ECONOMIC LOSS. IN NO +EVENT WILL TI'S AGGREGATE LIABILITY UNDER THIS AGREEMENT OR ARISING OUT OF +YOUR USE OF THE LICENSED MATERIALS EXCEED FIVE HUNDRED U.S. DOLLARS +(US$500). + +Because some jurisdictions do not allow the exclusion or limitation of +incidental or consequential damages or limitation on how long an implied +warranty lasts, the above limitations or exclusions may not apply to you. + +5. Export Control. The Licensed Materials may be subject to the export or +import regulations of certain countries. You agree to comply with all such +regulations and acknowledge that you have the responsibility to obtain any +licenses or other authorizations that may be required to export, re-export +or import the Licensed Materials. + +6. Governing Law, Jurisdiction and Severability. This Agreement will be +governed by and interpreted in accordance with the laws of the State of +Texas, without reference to conflict of laws principles. If for any reason +a court of competent jurisdiction finds any provision of the Agreement to be +unenforceable, that provision will be enforced to the maximum extent +possible to effectuate the intent of the parties and the remainder of the +Agreement shall continue in full force and effect. This Agreement shall not +be governed by the United Nations Convention on Contracts for the +International Sale of Goods, or by the Uniform Computer Information +Transactions Act (UCITA). The parties agree that non-exclusive jurisdiction +for any dispute arising out of or relating to this Agreement lies within the +courts located in the State of Texas. Notwithstanding the foregoing, any +judgment may be enforced in any United States or foreign court, and either +party may seek injunctive relief in any United States or foreign court. +Failure by TI to enforce any provision of this Agreement shall not be deemed +a waiver of future enforcement of that or any other provision in this +Agreement or any other agreement that may be in place between the parties. + +7. PRC Provisions. If you are located in the People's Republic of China +("PRC") or if the Licensed Materials will be sent to the PRC, the following +provisions shall apply: + +a. Registration Requirements. You shall be solely responsible for +performing all acts and obtaining all approvals that may be required in +connection with this Agreement by the government of the PRC, including but +not limited to registering pursuant to, and otherwise complying with, the +PRC Measures on the Administration of Software Products, Management +Regulations on Technology Import-Export, and Technology Import and Export +Contract Registration Management Rules. Upon receipt of such approvals from +the government authorities, you shall forward evidence of all such approvals +to TI for its records. In the event that you fail to obtain any such +approval or registration, you shall be solely responsible for any and all +losses, damages or costs resulting therefrom, and shall indemnify TI for all +such losses, damages or costs. + +b. Governing Language. This Agreement is written and executed in the +English language. If a translation of this Agreement is required for any +purpose, including but not limited to registration of the Agreement pursuant +to any governmental laws, regulations or rules, you shall be solely +responsible for creating such translation. Any translation of this +Agreement into a language other than English is intended solely in order to +comply with such laws or for reference purposes, and the English language +version shall be authoritative and controlling. + +8. Entire Agreement. This is the entire agreement between you and TI and +supersedes any prior agreement between the parties related to the subject +matter of this Agreement. No amendment or modification of this Agreement +will be effective unless in writing and signed by a duly authorized +representative of TI. You hereby warrant and represent that you have +obtained all authorizations and other applicable consents required +empowering you to enter into this Agreement. diff --git a/meta-ti-bsp/recipes-bsp/cadence-mhdp-fw/cadence-mhdp-fw_git.bb b/meta-ti-bsp/recipes-bsp/cadence-mhdp-fw/cadence-mhdp-fw_git.bb new file mode 100644 index 00000000..ed1c7817 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/cadence-mhdp-fw/cadence-mhdp-fw_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "Cadence MHDP DP bridge firmware" + +require recipes-bsp/ti-linux-fw/ti-linux-fw.inc + +LICENSE = "BSD-3-Clause | Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENCE.cadence;md5=009f46816f6956cfb75ede13d3e1cee0" + +PV = "${CADENCE_MHDP_FW_VERSION}" +PR = "${INC_PR}.0" + +COMPATIBLE_MACHINE = "j721e|j721s2|j784s4" + +TARGET = "mhdp8546.bin" + +do_install() { + install -d ${D}${nonarch_base_libdir}/firmware/cadence + install -m 0644 ${S}/cadence/${TARGET} ${D}${nonarch_base_libdir}/firmware/cadence/${TARGET} +} diff --git a/meta-ti-bsp/recipes-bsp/cm3-pm-firmware/amx3-cm3_git.bb b/meta-ti-bsp/recipes-bsp/cm3-pm-firmware/amx3-cm3_git.bb new file mode 100644 index 00000000..ecdae123 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/cm3-pm-firmware/amx3-cm3_git.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "Cortex-M3 binary blob for suspend-resume" + +LICENSE = "TI-TSPA" +LIC_FILES_CHKSUM = "file://License.txt;md5=7bdc54a749ab7a7dea999d25d99a41b8" + +PV = "1.9.2" +PR = "r0" + +SRCREV = "fb484c5e54f2e31cf0a338d2927a06a2870bcc2c" +BRANCH ?= "ti-v4.1.y" + +SRC_URI = "git://git.ti.com/git/processor-firmware/ti-amx3-cm3-pm-firmware.git;protocol=https;branch=${BRANCH}" + +S = "${WORKDIR}/git" + +do_compile() { + make CROSS_COMPILE="${TARGET_PREFIX}" CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${SECURITY_NOPIE_CFLAGS} ${DEBUG_PREFIX_MAP}" +} + +do_install() { + install -d ${D}${nonarch_base_libdir}/firmware + install -m 0644 bin/am335x-pm-firmware.elf ${D}${nonarch_base_libdir}/firmware/ + install -m 0644 bin/*-scale-data.bin ${D}${nonarch_base_libdir}/firmware/ +} + +FILES:${PN} += "${nonarch_base_libdir}/firmware" + +COMPATIBLE_MACHINE = "(ti-soc)" +TOOLCHAIN = "gcc" diff --git a/meta-ti-bsp/recipes-bsp/cmem/cmem.inc b/meta-ti-bsp/recipes-bsp/cmem/cmem.inc new file mode 100644 index 00000000..e8dbbe8f --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/cmem/cmem.inc @@ -0,0 +1,16 @@ +HOMEPAGE = "http://processors.wiki.ti.com/index.php/Category:CMEM" + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://include/ti/cmem.h;beginline=1;endline=30;md5=26be509e4bb413905bda8309e338e2b1" + +BRANCH = "master" +# This corresponds to version 4.20.00.01 +SRCREV = "86269258a48e0a9008dd9d5ebfae9da7ce843393" + +PV = "4.20.00.01+git" + +SRC_URI = "git://git.ti.com/git/ipc/ludev.git;protocol=https;branch=${BRANCH}" + +S = "${WORKDIR}/git" +COMPATIBLE_HOST ?= "null" +COMPATIBLE_HOST:ti-soc = "(.*)" diff --git a/meta-ti-bsp/recipes-bsp/cmem/cmem_git.bb b/meta-ti-bsp/recipes-bsp/cmem/cmem_git.bb new file mode 100644 index 00000000..2042b08a --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/cmem/cmem_git.bb @@ -0,0 +1,11 @@ +DESCRIPTION = "The cmem component supports contiguous memory allocation from userspace" + +include cmem.inc + +PR = "r0" + +PACKAGES =+ "${PN}-test" + +FILES:${PN}-test = "${bindir}/*" + +inherit autotools diff --git a/meta-ti-bsp/recipes-bsp/cnm-wave-fw/cnm-wave-fw_git.bb b/meta-ti-bsp/recipes-bsp/cnm-wave-fw/cnm-wave-fw_git.bb new file mode 100644 index 00000000..b28bea92 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/cnm-wave-fw/cnm-wave-fw_git.bb @@ -0,0 +1,29 @@ +SUMMARY = "Chips&Media codec firmware files" + +require recipes-bsp/ti-linux-fw/ti-linux-fw.inc + +inherit update-alternatives + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENCE.cnm;md5=93b67e6bac7f8fec22b96b8ad0a1a9d0" + +PV = "${CNM_WAVE521_FW_VERSION}" +PR = "${INC_PR}.1" + +COMPATIBLE_MACHINE = "j721s2|j784s4|j722s|am62axx|am62pxx" + +TARGET_WAVE521C = "wave521c_k3_codec_fw.bin" + +SOURCE_WAVE521C = "wave521c_k3_codec_fw.bin" + +ALTERNATIVE_LINK_NAME[wave521c_codec_fw.bin] = "${nonarch_base_libdir}/firmware/${TARGET_WAVE521C}" +ALTERNATIVE_TARGET[wave521c_codec_fw.bin] = "${nonarch_base_libdir}/firmware/cnm/${TARGET_WAVE521C}" +ALTERNATIVE_PRIORITY = "10" + +# Set up names for the firmwares +ALTERNATIVE:${PN} = "wave521c_codec_fw.bin" + +do_install() { + install -d ${D}${nonarch_base_libdir}/firmware/cnm + install -m 0644 ${S}/cnm/${SOURCE_WAVE521C} ${D}${nonarch_base_libdir}/firmware/cnm/${TARGET_WAVE521C} +} diff --git a/meta-ti-bsp/recipes-bsp/cpsw9g-eth-fw/cpsw9g-eth-fw_git.bb b/meta-ti-bsp/recipes-bsp/cpsw9g-eth-fw/cpsw9g-eth-fw_git.bb new file mode 100755 index 00000000..95ba1e2d --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/cpsw9g-eth-fw/cpsw9g-eth-fw_git.bb @@ -0,0 +1,41 @@ +SUMMARY = "R5 PSDK CPSW9G Ethernet Switch Firmware" + +LICENSE = "TI-TFL" +LIC_FILES_CHKSUM = "file://LICENSE.ti;md5=04ad0a015d4bb63c2b9e7b112debf3db" + +PV = "6.2+git" + +inherit update-alternatives + +PROTOCOL = "https" +BRANCH = "master" +SRCREV = "91f1628507bf7f8716f0bc7cafe88ad7f14c94f5" + +SRC_URI = "git://git.ti.com/git/glsdk/ti-eth-fw.git;protocol=${PROTOCOL};branch=${BRANCH}" + +S = "${WORKDIR}/git" + +CPSW9G_FW_DIR = "${S}/ethfw" +CPSW9G_FW_FILENAME = "app_remoteswitchcfg_server_pdk_mem_map_strip.xer5f" + +# make sure that lib/firmware, and all its contents are part of the package +FILES:${PN} += "${nonarch_base_libdir}/firmware" + +do_install() { + install -d ${D}${nonarch_base_libdir}/firmware +# Ethernet firmware to be loaded on Main R5 core(needs read permission) + install -m 0644 ${CPSW9G_FW_DIR}/${CPSW9G_FW_FILENAME} ${D}${nonarch_base_libdir}/firmware +} + +TARGET_MAIN_R5FSS0_0 = "j7-main-r5f0_0-fw" +ALTERNATIVE:${PN} = "j7-main-r5f0_0-fw" +ALTERNATIVE_LINK_NAME[j7-main-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/${TARGET_MAIN_R5FSS0_0}" +ALTERNATIVE_TARGET[j7-main-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/${CPSW9G_FW_FILENAME}" +ALTERNATIVE_PRIORITY = "17" + +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +INSANE_SKIP:${PN} += "arch" + +do_compile[noexec] = "1" +do_configure[noexec] = "1" diff --git a/meta-ti-bsp/recipes-bsp/gc320-drivers/ti-gc320-driver_5.0.11.p7.bb b/meta-ti-bsp/recipes-bsp/gc320-drivers/ti-gc320-driver_5.0.11.p7.bb new file mode 100644 index 00000000..a56810d4 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/gc320-drivers/ti-gc320-driver_5.0.11.p7.bb @@ -0,0 +1,30 @@ +DESCRIPTION = "Kernel drivers for the Vivante GC320 chipset found in TI SoCs" +HOMEPAGE = "https://git.ti.com/graphics/ti-gc320-driver" +LICENSE = "MIT | GPL-2.0-only" +LIC_FILES_CHKSUM = "file://../LICENSE;md5=78d9818a51b9a8e9bb89dea418bac297" + +inherit module features_check + +REQUIRED_MACHINE_FEATURES = "gc320" + +MACHINE_KERNEL_PR:append = "i" +PR = "${MACHINE_KERNEL_PR}" + +# Need to branch out with ${PV} var +BRANCH = "ti-${PV}-k5.10" + +SRCREV = "e2a10f31e255a65ec30a6e10b890e77d7e9cb107" + +SRC_URI = "git://git.ti.com/git/graphics/ti-gc320-driver.git;protocol=https;branch=${BRANCH}" + +S = "${WORKDIR}/git/src" + +EXTRA_OEMAKE += "-f Kbuild AQROOT=${S} KERNEL_DIR=${STAGING_KERNEL_DIR} TOOLCHAIN_PATH=${TOOLCHAIN_PATH} CROSS_COMPILE=${TARGET_PREFIX} ARCH_TYPE=${TARGET_ARCH}" + +do_install() { + install -d ${D}/${base_libdir}/modules/${KERNEL_VERSION}/extra + install -m 644 ${S}/galcore.ko ${D}/${base_libdir}/modules/${KERNEL_VERSION}/extra +} + +COMPATIBLE_HOST ?= "null" +COMPATIBLE_HOST:ti-soc = "(.*)" diff --git a/meta-ti-bsp/recipes-bsp/goodix-fw/goodix-fw_git.bb b/meta-ti-bsp/recipes-bsp/goodix-fw/goodix-fw_git.bb new file mode 100644 index 00000000..ee3a94dc --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/goodix-fw/goodix-fw_git.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "Goodix GT9271 config firmware" + +require recipes-bsp/ti-linux-fw/ti-linux-fw.inc + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENCE.Spectrum-GT9271;md5=2a6de6be7af1fe46370c684daf27c852" + +PV = "${GOODIX_FW_VERSION}" +PR = "${INC_PR}.0" + +COMPATIBLE_MACHINE = "dra7xx" + +ORIGIN = "DRA71x-RevA-GT9271_SpecDig_Config.bin" +TARGET = "goodix_9271_cfg.bin" + +do_install() { + install -d ${D}${nonarch_base_libdir}/firmware + install -m 0644 ${S}/ti-evm/${ORIGIN} ${D}${nonarch_base_libdir}/firmware/${TARGET} +} diff --git a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_23.3.6512818.bb b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_23.3.6512818.bb new file mode 100644 index 00000000..02ec9fe9 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_23.3.6512818.bb @@ -0,0 +1,42 @@ +DESCRIPTION = "Kernel drivers for the PowerVR Rogue GPU found in the TI SoCs" +HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-driver" +LICENSE = "MIT | GPL-2.0-only" +LIC_FILES_CHKSUM = "file://README;beginline=14;endline=19;md5=0403c7dea01a2b8232261e805325fac2" + +inherit module + +PROVIDES = "virtual/gpudriver" + +MACHINE_KERNEL_PR:append = "b" +PR = "${MACHINE_KERNEL_PR}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx|am62pxx|j722s" + +DEPENDS = "virtual/kernel" + +BRANCH = "linuxws/scarthgap/k6.6/${PV}" + +SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-driver.git;protocol=https;branch=${BRANCH}" + +S = "${WORKDIR}/git" + +SRCREV = "2f409b4dd2540e896b54bff02219d4fc51129b81" + +TARGET_PRODUCT:j721e = "j721e_linux" +TARGET_PRODUCT:j721s2 = "j721s2_linux" +TARGET_PRODUCT:j784s4 = "j784s4_linux" +TARGET_PRODUCT:am62xx = "am62_linux" +TARGET_PRODUCT:am62pxx = "am62p_linux" +TARGET_PRODUCT:j722s = "j722s_linux" +PVR_BUILD = "release" +PVR_WS = "lws-generic" + +EXTRA_OEMAKE += 'KERNELDIR="${STAGING_KERNEL_DIR}" BUILD=${PVR_BUILD} PVR_BUILD_DIR=${TARGET_PRODUCT} WINDOW_SYSTEM=${PVR_WS}' + +do_install() { + make -C ${STAGING_KERNEL_DIR} M=${B}/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/target_aarch64/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install +} + +RRECOMMENDS:${PN} += "ti-img-rogue-umlibs" diff --git a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb new file mode 100644 index 00000000..a1b76d27 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb @@ -0,0 +1,44 @@ +DESCRIPTION = "Kernel drivers for the PowerVR Rogue GPU found in the TI SoCs" +HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-driver" +LICENSE = "MIT | GPL-2.0-only" +LIC_FILES_CHKSUM = "file://README;beginline=14;endline=19;md5=0403c7dea01a2b8232261e805325fac2" + +DEFAULT_PREFERENCE = "-1" + +inherit module + +PROVIDES = "virtual/gpudriver" + +MACHINE_KERNEL_PR:append = "b" +PR = "${MACHINE_KERNEL_PR}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx|am62pxx|j722s" + +DEPENDS = "virtual/kernel" + +BRANCH = "linuxws/scarthgap/k6.6/${PV}" + +SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-driver.git;protocol=https;branch=${BRANCH}" + +S = "${WORKDIR}/git" + +SRCREV = "e2dfdfee991dadc18175f27fe9e8676e910a2f8d" + +TARGET_PRODUCT:j721e = "j721e_linux" +TARGET_PRODUCT:j721s2 = "j721s2_linux" +TARGET_PRODUCT:j784s4 = "j784s4_linux" +TARGET_PRODUCT:am62xx = "am62_linux" +TARGET_PRODUCT:am62pxx = "am62p_linux" +TARGET_PRODUCT:j722s = "j722s_linux" +PVR_BUILD = "release" +PVR_WS = "lws-generic" + +EXTRA_OEMAKE += 'KERNELDIR="${STAGING_KERNEL_DIR}" BUILD=${PVR_BUILD} PVR_BUILD_DIR=${TARGET_PRODUCT} WINDOW_SYSTEM=${PVR_WS}' + +do_install() { + make -C ${STAGING_KERNEL_DIR} M=${B}/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/target_aarch64/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install +} + +RRECOMMENDS:${PN} += "ti-img-rogue-umlibs" diff --git a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb new file mode 100644 index 00000000..ca28ae76 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb @@ -0,0 +1,45 @@ +DESCRIPTION = "Kernel drivers for the PowerVR SGX chipset found in the TI SoCs" +HOMEPAGE = "https://git.ti.com/graphics/omap5-sgx-ddk-linux" +LICENSE = "MIT | GPL-2.0-only" +LIC_FILES_CHKSUM = "file://GPL-COPYING;md5=60422928ba677faaa13d6ab5f5baaa1e" + +inherit module + +PROVIDES = "virtual/gpudriver" + +COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|am65xx" + +MACHINE_KERNEL_PR:append = "x" +PR = "${MACHINE_KERNEL_PR}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +DEPENDS = "virtual/kernel" + +BRANCH = "${PV}/mesa/k6.1" + +SRC_URI = "git://git.ti.com/git/graphics/omap5-sgx-ddk-linux.git;protocol=https;branch=${BRANCH}" + +S = "${WORKDIR}/git" + +SRCREV = "2cb2c9609b7740cb2c348e669a96f26e1cc858da" + +TARGET_PRODUCT:omap-a15 = "ti572x_linux" +TARGET_PRODUCT:ti33x = "ti335x_linux" +TARGET_PRODUCT:ti43x = "ti437x_linux" +TARGET_PRODUCT:am65xx = "ti654x_linux" +PVR_BUILD = "release" +PVR_WS = "lws-generic" + +EXTRA_OEMAKE += 'KERNELDIR="${STAGING_KERNEL_DIR}" BUILD=${PVR_BUILD} \ +WINDOW_SYSTEM=${PVR_WS} PVR_BUILD_DIR=${TARGET_PRODUCT}' + +do_install() { + make -C ${STAGING_KERNEL_DIR} M=${B}/eurasiacon/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/target_armhf/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install +} + +do_install:am65xx() { + make -C ${STAGING_KERNEL_DIR} M=${B}/eurasiacon/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/target_aarch64/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install +} + +RRECOMMENDS:${PN} += "ti-sgx-ddk-um" diff --git a/meta-ti-bsp/recipes-bsp/prueth-fw/prueth-fw_5.6.15.bb b/meta-ti-bsp/recipes-bsp/prueth-fw/prueth-fw_5.6.15.bb new file mode 100644 index 00000000..b85355e4 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/prueth-fw/prueth-fw_5.6.15.bb @@ -0,0 +1,33 @@ +SUMMARY = "PRU Ethernet firmware" + +require recipes-bsp/ti-linux-fw/ti-linux-fw.inc + +PR = "${INC_PR}.0" + +COMPATIBLE_MACHINE = "ti33x|ti43x|am57xx|am65xx|am64xx" + +TARGET = " \ + am335x-pru0-prueth-fw.elf \ + am335x-pru1-prueth-fw.elf \ + am437x-pru0-prueth-fw.elf \ + am437x-pru1-prueth-fw.elf \ + am57xx-pru0-prueth-fw.elf \ + am57xx-pru1-prueth-fw.elf \ + am65x-pru0-prueth-fw.elf \ + am65x-pru1-prueth-fw.elf \ + am65x-rtu0-prueth-fw.elf \ + am65x-rtu1-prueth-fw.elf \ + am65x-sr2-pru0-prueth-fw.elf \ + am65x-sr2-pru1-prueth-fw.elf \ + am65x-sr2-rtu0-prueth-fw.elf \ + am65x-sr2-rtu1-prueth-fw.elf \ + am65x-sr2-txpru0-prueth-fw.elf \ + am65x-sr2-txpru1-prueth-fw.elf \ +" + +do_install() { + install -d ${D}${nonarch_base_libdir}/firmware/ti-pruss + for f in ${TARGET}; do + install -m 0644 ${S}/ti-pruss/$f ${D}${nonarch_base_libdir}/firmware/ti-pruss/$f + done +} diff --git a/meta-ti-bsp/recipes-bsp/pruhsr-fw/pruhsr-fw_2.17.25.bb b/meta-ti-bsp/recipes-bsp/pruhsr-fw/pruhsr-fw_2.17.25.bb new file mode 100644 index 00000000..3b06de9c --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/pruhsr-fw/pruhsr-fw_2.17.25.bb @@ -0,0 +1,30 @@ +SUMMARY = "PRU HSR firmware" + +require recipes-bsp/ti-linux-fw/ti-linux-fw.inc + +PE = "1" +PR = "${INC_PR}.0" + +COMPATIBLE_MACHINE = "ti33x|ti43x|am57xx|am65xx|am64xx" + +TARGET = " \ + am335x-pru0-pruhsr-fw.elf \ + am335x-pru1-pruhsr-fw.elf \ + am437x-pru0-pruhsr-fw.elf \ + am437x-pru1-pruhsr-fw.elf \ + am57xx-pru0-pruhsr-fw.elf \ + am57xx-pru1-pruhsr-fw.elf \ + am65x-sr2-pru0-pruhsr-fw.elf \ + am65x-sr2-pru1-pruhsr-fw.elf \ + am65x-sr2-rtu0-pruhsr-fw.elf \ + am65x-sr2-rtu1-pruhsr-fw.elf \ + am65x-sr2-txpru0-pruhsr-fw.elf \ + am65x-sr2-txpru1-pruhsr-fw.elf \ +" + +do_install() { + install -d ${D}${nonarch_base_libdir}/firmware/ti-pruss + for f in ${TARGET}; do + install -m 0644 ${S}/ti-pruss/$f ${D}${nonarch_base_libdir}/firmware/ti-pruss/$f + done +} diff --git a/meta-ti-bsp/recipes-bsp/pruprp-fw/pruprp-fw_2.17.25.bb b/meta-ti-bsp/recipes-bsp/pruprp-fw/pruprp-fw_2.17.25.bb new file mode 100644 index 00000000..9d5136c2 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/pruprp-fw/pruprp-fw_2.17.25.bb @@ -0,0 +1,24 @@ +SUMMARY = "PRU PRP firmware for AM335x/AM437x/AM57xx" + +require recipes-bsp/ti-linux-fw/ti-linux-fw.inc + +PE = "1" +PR = "${INC_PR}.0" + +COMPATIBLE_MACHINE = "ti33x|ti43x|am57xx" + +TARGET = " \ + am335x-pru0-pruprp-fw.elf \ + am335x-pru1-pruprp-fw.elf \ + am437x-pru0-pruprp-fw.elf \ + am437x-pru1-pruprp-fw.elf \ + am57xx-pru0-pruprp-fw.elf \ + am57xx-pru1-pruprp-fw.elf \ +" + +do_install() { + install -d ${D}${nonarch_base_libdir}/firmware/ti-pruss + for f in ${TARGET}; do + install -m 0644 ${S}/ti-pruss/$f ${D}${nonarch_base_libdir}/firmware/ti-pruss/$f + done +} diff --git a/meta-ti-bsp/recipes-bsp/prusw-fw/prusw-fw_3.2.9.bb b/meta-ti-bsp/recipes-bsp/prusw-fw/prusw-fw_3.2.9.bb new file mode 100644 index 00000000..be407363 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/prusw-fw/prusw-fw_3.2.9.bb @@ -0,0 +1,29 @@ +SUMMARY = "PRU Switch firmware" + +require recipes-bsp/ti-linux-fw/ti-linux-fw.inc + +PR = "${INC_PR}.0" + +COMPATIBLE_MACHINE = "ti33x|ti43x|am57xx|am65xx|am64xx" + +TARGET = " \ + am335x-pru0-prusw-fw.elf \ + am335x-pru1-prusw-fw.elf \ + am437x-pru0-prusw-fw.elf \ + am437x-pru1-prusw-fw.elf \ + am57xx-pru0-prusw-fw.elf \ + am57xx-pru1-prusw-fw.elf \ + am65x-sr2-pru0-prusw-fw.elf \ + am65x-sr2-pru1-prusw-fw.elf \ + am65x-sr2-rtu0-prusw-fw.elf \ + am65x-sr2-rtu1-prusw-fw.elf \ + am65x-sr2-txpru0-prusw-fw.elf \ + am65x-sr2-txpru1-prusw-fw.elf \ +" + +do_install() { + install -d ${D}${nonarch_base_libdir}/firmware/ti-pruss + for f in ${TARGET}; do + install -m 0644 ${S}/ti-pruss/$f ${D}${nonarch_base_libdir}/firmware/ti-pruss/$f + done +} diff --git a/meta-ti-bsp/recipes-bsp/ti-dm-fw/ti-dm-fw.bb b/meta-ti-bsp/recipes-bsp/ti-dm-fw/ti-dm-fw.bb new file mode 100644 index 00000000..1ad236ce --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/ti-dm-fw/ti-dm-fw.bb @@ -0,0 +1,112 @@ +SUMMARY = "TI DM prebuilt binary firmware images" + +LICENSE = "TI-TFL" +LIC_FILES_CHKSUM = "file://${THISDIR}/../../licenses/TI-TFL;md5=a1b59cb7ba626b9dbbcbf00f3fbc438a" + +COMPATIBLE_MACHINE = "k3" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +INHIBIT_DEFAULT_DEPS = "1" + +inherit deploy +inherit update-alternatives + +require recipes-bsp/ti-linux-fw/ti-linux-fw.inc + +PV = "${TI_DM_FW_VERSION}" +PR = "${INC_PR}.0" + +# Secure Build +inherit ti-secdev + +PLAT_SFX = "" +PLAT_SFX:j721e = "j721e" +PLAT_SFX:j7200 = "j7200" +PLAT_SFX:j721s2 = "j721s2" +PLAT_SFX:j784s4 = "j784s4" +PLAT_SFX:j722s = "j722s" +PLAT_SFX:am65xx = "am65xx" +PLAT_SFX:am64xx = "am64xx" +PLAT_SFX:am62xx = "am62xx" +PLAT_SFX:am62axx = "am62axx" +PLAT_SFX:am62pxx = "am62pxx" + +DM_FW_DIR = "ti-dm/${PLAT_SFX}" + +INSTALL_DM_FW_DIR = "${nonarch_base_libdir}/firmware/${DM_FW_DIR}" + +DM_FIRMWARE = "ipc_echo_testb_mcu1_0_release_strip.xer5f" + +DM_FW_LIST = "" +DM_FW_LIST:j721e = "${DM_FIRMWARE}" +DM_FW_LIST:j7200 = "${DM_FIRMWARE}" +DM_FW_LIST:j721s2 = "${DM_FIRMWARE}" +DM_FW_LIST:j784s4 = "${DM_FIRMWARE}" +DM_FW_LIST:j722s = "${DM_FIRMWARE}" +DM_FW_LIST:am65xx = "" +DM_FW_LIST:am64xx = "" +DM_FW_LIST:am62xx = "${DM_FIRMWARE}" +DM_FW_LIST:am62axx = "${DM_FIRMWARE}" +DM_FW_LIST:am62pxx = "${DM_FIRMWARE}" + +do_install() { + # Sign the firmware + # DM Firmware + for FW_NAME in ${DM_FW_LIST} + do + ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${S}/${DM_FW_DIR}/${FW_NAME} ${S}/${DM_FW_DIR}/${FW_NAME}.signed + done + + # DM Firmware + install -d ${D}${INSTALL_DM_FW_DIR} + for FW_NAME in ${DM_FW_LIST} + do + install -m 0644 ${S}/${DM_FW_DIR}/${FW_NAME} ${D}${INSTALL_DM_FW_DIR}/ + install -m 0644 ${S}/${DM_FW_DIR}/${FW_NAME}.signed ${D}${INSTALL_DM_FW_DIR}/ + done +} + +do_deploy() { + # DM Firmware is needed for rebuilding U-Boot + install -d ${DEPLOYDIR}/${DM_FW_DIR} + for FW_NAME in ${DM_FW_LIST} + do + install -m 0644 ${S}/${DM_FW_DIR}/${FW_NAME} ${DEPLOYDIR}/${DM_FW_DIR} + install -m 0644 ${S}/${DM_FW_DIR}/${FW_NAME}.signed ${DEPLOYDIR}/${DM_FW_DIR} + done +} + +# Set up names for the firmwares +ALTERNATIVE:${PN}:am62xx = "am62-main-r5f0_0-fw" +ALTERNATIVE:${PN}:am62pxx = "am62p-main-r5f0_0-fw" +ALTERNATIVE:${PN}:am62axx = "am62a-main-r5f0_0-fw" +ALTERNATIVE:${PN}:j721e = "j7-mcu-r5f0_0-fw" +ALTERNATIVE:${PN}:j7200 = "j7200-mcu-r5f0_0-fw" +ALTERNATIVE:${PN}:j721s2 = "j721s2-mcu-r5f0_0-fw" +ALTERNATIVE:${PN}:j784s4 = "j784s4-mcu-r5f0_0-fw" +ALTERNATIVE:${PN}:j722s = "j722s-wkup-r5f0_0-fw" + +# Set up link names for the firmwares +ALTERNATIVE_LINK_NAME[am62-main-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/am62-main-r5f0_0-fw" +ALTERNATIVE_LINK_NAME[am62p-main-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/am62p-main-r5f0_0-fw" +ALTERNATIVE_LINK_NAME[am62a-main-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/am62a-main-r5f0_0-fw" +ALTERNATIVE_LINK_NAME[j7-mcu-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/j7-mcu-r5f0_0-fw" +ALTERNATIVE_LINK_NAME[j7200-mcu-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/j7200-mcu-r5f0_0-fw" +ALTERNATIVE_LINK_NAME[j721s2-mcu-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/j721s2-mcu-r5f0_0-fw" +ALTERNATIVE_LINK_NAME[j784s4-mcu-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/j784s4-mcu-r5f0_0-fw" +ALTERNATIVE_LINK_NAME[j722s-wkup-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/j722s-wkup-r5f0_0-fw" + +# Create the firmware alternatives +ALTERNATIVE_TARGET[am62-main-r5f0_0-fw] = "${INSTALL_DM_FW_DIR}/${DM_FIRMWARE}" +ALTERNATIVE_TARGET[am62p-main-r5f0_0-fw] = "${INSTALL_DM_FW_DIR}/${DM_FIRMWARE}" +ALTERNATIVE_TARGET[am62a-main-r5f0_0-fw] = "${INSTALL_DM_FW_DIR}/${DM_FIRMWARE}" +ALTERNATIVE_TARGET[j7-mcu-r5f0_0-fw] = "${INSTALL_DM_FW_DIR}/${DM_FIRMWARE}" +ALTERNATIVE_TARGET[j7200-mcu-r5f0_0-fw] = "${INSTALL_DM_FW_DIR}/${DM_FIRMWARE}" +ALTERNATIVE_TARGET[j721s2-mcu-r5f0_0-fw] = "${INSTALL_DM_FW_DIR}/${DM_FIRMWARE}" +ALTERNATIVE_TARGET[j784s4-mcu-r5f0_0-fw] = "${INSTALL_DM_FW_DIR}/${DM_FIRMWARE}" +ALTERNATIVE_TARGET[j722s-wkup-r5f0_0-fw] = "${INSTALL_DM_FW_DIR}/${DM_FIRMWARE}" + +ALTERNATIVE_PRIORITY = "10" + +addtask deploy after do_install diff --git a/meta-ti-bsp/recipes-bsp/ti-eth-fw/ti-eth-fw.bb b/meta-ti-bsp/recipes-bsp/ti-eth-fw/ti-eth-fw.bb new file mode 100644 index 00000000..6bcc824b --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/ti-eth-fw/ti-eth-fw.bb @@ -0,0 +1,104 @@ +SUMMARY = "TI Ethernet prebuilt binary firmware images" + +LICENSE = "TI-TFL" +LIC_FILES_CHKSUM = "file://${THISDIR}/../../licenses/TI-TFL;md5=a1b59cb7ba626b9dbbcbf00f3fbc438a" + +COMPATIBLE_MACHINE = "k3" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +INHIBIT_DEFAULT_DEPS = "1" + +inherit update-alternatives + +require recipes-bsp/ti-linux-fw/ti-linux-fw.inc + +PV = "${CORESDK_RTOS_VERSION}" +PR = "${INC_PR}.0" + +# Secure Build +inherit ti-secdev + +PLAT_SFX = "" +PLAT_SFX:j721e = "j721e" +PLAT_SFX:j7200 = "j7200" +PLAT_SFX:j721s2 = "j721s2" +PLAT_SFX:j784s4 = "j784s4" +PLAT_SFX:j722s = "j722s" +PLAT_SFX:am65xx = "am65xx" +PLAT_SFX:am64xx = "am64xx" +PLAT_SFX:am62xx = "am62xx" +PLAT_SFX:am62pxx = "am62pxx" +PLAT_SFX:am62axx = "am62axx" + +ETH_FW_DIR = "ti-eth/${PLAT_SFX}" + +INSTALL_ETH_FW_DIR = "${nonarch_base_libdir}/firmware/${ETH_FW_DIR}" + +ETH_FW = "app_remoteswitchcfg_server_strip.xer5f" + +ETH_FW_LIST = "" +ETH_FW_LIST:j721e = "${ETH_FW}" +ETH_FW_LIST:j7200 = "${ETH_FW}" +ETH_FW_LIST:j721s2 = "" +ETH_FW_LIST:j784s4 = "${ETH_FW}" +ETH_FW_LIST:j722s = "" +ETH_FW_LIST:am65xx = "" +ETH_FW_LIST:am64xx = "" +ETH_FW_LIST:am62xx = "" +ETH_FW_LIST:am62pxx = "" +ETH_FW_LIST:am62axx = "" + +do_install() { + # ETH firmware + for FW_NAME in ${ETH_FW_LIST} + do + ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${S}/${ETH_FW_DIR}/${FW_NAME} ${S}/${ETH_FW_DIR}/${FW_NAME}.signed + done + + # ETH firmware + install -d ${D}${INSTALL_ETH_FW_DIR} + for FW_NAME in ${ETH_FW_LIST} + do + install -m 0644 ${S}/${ETH_FW_DIR}/${FW_NAME} ${D}${INSTALL_ETH_FW_DIR} + install -m 0644 ${S}/${ETH_FW_DIR}/${FW_NAME}.signed ${D}${INSTALL_ETH_FW_DIR} + done +} + +# Set up names for the firmwares +ALTERNATIVE:${PN}:j721e = "\ + j7-main-r5f0_0-fw \ + j7-main-r5f0_0-fw-sec \ + " + +ALTERNATIVE:${PN}:j7200 = "\ + j7200-main-r5f0_0-fw \ + j7200-main-r5f0_0-fw-sec \ + " + +ALTERNATIVE:${PN}:j784s4 = "\ + j784s4-main-r5f0_0-fw \ + j784s4-main-r5f0_0-fw-sec \ + " + +# Set up link names for the firmwares +ALTERNATIVE_LINK_NAME[j7-main-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/j7-main-r5f0_0-fw" +ALTERNATIVE_LINK_NAME[j7-main-r5f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/j7-main-r5f0_0-fw-sec" + +ALTERNATIVE_LINK_NAME[j7200-main-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/j7200-main-r5f0_0-fw" +ALTERNATIVE_LINK_NAME[j7200-main-r5f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/j7200-main-r5f0_0-fw-sec" + +ALTERNATIVE_LINK_NAME[j784s4-main-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/j784s4-main-r5f0_0-fw" +ALTERNATIVE_LINK_NAME[j784s4-main-r5f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/j784s4-main-r5f0_0-fw-sec" + +# Create the firmware alternatives +ALTERNATIVE_TARGET[j7-main-r5f0_0-fw] = "${INSTALL_ETH_FW_DIR}/${ETH_FW}" +ALTERNATIVE_TARGET[j7-main-r5f0_0-fw-sec] = "${INSTALL_ETH_FW_DIR}/${ETH_FW}.signed" + +ALTERNATIVE_TARGET[j7200-main-r5f0_0-fw] = "${INSTALL_ETH_FW_DIR}/${ETH_FW}" +ALTERNATIVE_TARGET[j7200-main-r5f0_0-fw-sec] = "${INSTALL_ETH_FW_DIR}/${ETH_FW}.signed" + +ALTERNATIVE_TARGET[j784s4-main-r5f0_0-fw] = "${INSTALL_ETH_FW_DIR}/${ETH_FW}" +ALTERNATIVE_TARGET[j784s4-main-r5f0_0-fw-sec] = "${INSTALL_ETH_FW_DIR}/${ETH_FW}.signed" + +ALTERNATIVE_PRIORITY = "5" diff --git a/meta-ti-bsp/recipes-bsp/ti-img-encode-decode/viddec-test-app_1.0.0.bb b/meta-ti-bsp/recipes-bsp/ti-img-encode-decode/viddec-test-app_1.0.0.bb new file mode 100644 index 00000000..29af4863 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/ti-img-encode-decode/viddec-test-app_1.0.0.bb @@ -0,0 +1,20 @@ +SUMMARY = "Test applications for TI DEC (v4l2 decoder for IMG D5520)" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://main.c;beginline=1;endline=14;md5=f17e17d664f72942124e4fcf06c178ee" + +DEPENDS = "libdrm ffmpeg" + +inherit autotools pkgconfig + +COMPATIBLE_MACHINE = "j721e" + +PR = "r1" +SRCREV = "94a80c8c090dbfdc7fafd4e5bb78c2091e715af2" + +EXTRA_OEMAKE = "CC="${CC}"" +TARGET_CC_ARCH += "${LDFLAGS}" + +BRANCH = "master" +SRC_URI = "git://git.ti.com/git/jacinto7_multimedia/viddec-test-app.git;protocol=https;branch=${BRANCH}" + +S = "${WORKDIR}/git" diff --git a/meta-ti-bsp/recipes-bsp/ti-img-encode-decode/videnc-test-app_1.0.0.bb b/meta-ti-bsp/recipes-bsp/ti-img-encode-decode/videnc-test-app_1.0.0.bb new file mode 100644 index 00000000..b674c764 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/ti-img-encode-decode/videnc-test-app_1.0.0.bb @@ -0,0 +1,20 @@ +SUMMARY = "Test applications for TI ENC (v4l2 encoder for IMG VXE384)" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://main.c;beginline=1;endline=14;md5=3545dd5bdf513840937d38c10b866605" + +DEPENDS = "libdrm" + +inherit autotools pkgconfig + +COMPATIBLE_MACHINE = "j721e" + +PR = "r0" +SRCREV = "a5e7d820bea1be24f25a8369d4d4521c784f869a" + +EXTRA_OEMAKE = "CC="${CC}"" +TARGET_CC_ARCH += "${LDFLAGS}" + +BRANCH = "master" +SRC_URI = "git://git.ti.com/git/jacinto7_multimedia/videnc-test-app.git;protocol=https;branch=${BRANCH}" + +S = "${WORKDIR}/git" diff --git a/meta-ti-bsp/recipes-bsp/ti-img-encode-decode/vxd-dec-fw_git.bb b/meta-ti-bsp/recipes-bsp/ti-img-encode-decode/vxd-dec-fw_git.bb new file mode 100644 index 00000000..74729c16 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/ti-img-encode-decode/vxd-dec-fw_git.bb @@ -0,0 +1,17 @@ +SUMMARY = "Video Decoding Firmware" +LICENSE = "TI-IMG" +LIC_FILES_CHKSUM = "file://LICENSE.ti-img;md5=84ca7278930db001870686ad997d6bb1" + +require recipes-bsp/ti-linux-fw/ti-linux-fw.inc + +PV = "${IMG_DEC_FW_VERSION}" +PR = "${INC_PR}.0" + +COMPATIBLE_MACHINE = "j721e" + +TARGET = "pvdec_full_bin.fw" + +do_install() { + install -d ${D}${nonarch_base_libdir}/firmware + install -m 0644 ${S}/ti-img/${TARGET} ${D}${nonarch_base_libdir}/firmware/${TARGET} +} diff --git a/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc b/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc new file mode 100644 index 00000000..adf8e698 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc @@ -0,0 +1,46 @@ +SUMMARY = "Common include for TI Linux firmware" + +LICENSE = "TI-TFL" +LIC_FILES_CHKSUM = "file://LICENSE.ti;md5=b5aebf0668bdf95621259288c4a46d76" + +PV = "2022.01" +INC_PR = "r4" + +# Firmware versions +CORESDK_RTOS_VERSION = "08.02.00.04" +PRUETH_FW_AM65X_VERSION = "08.00.00.20" +PRUETH_FW_AM65X_SR2_VERSION = "02.02.13.00" +GOODIX_FW_VERSION = "1.0.0.0" +CADENCE_MHDP_FW_VERSION = "2.1.0" +IMG_DEC_FW_VERSION = "1.0" +CNM_WAVE521_FW_VERSION = "1.0.3" +TI_DM_FW_VERSION = "09.02.04" +TI_SYSFW_VERSION = "09.02.08" + +TI_LINUX_FW_SRCREV ?= "3987d170fc522565c5e4a9293aba1db75951b8c0" +SRCREV = "${TI_LINUX_FW_SRCREV}" + +BRANCH ?= "ti-linux-firmware" + +SRC_URI = "git://git.ti.com/git/processor-firmware/ti-linux-firmware.git;protocol=https;branch=${BRANCH}" + +S = "${WORKDIR}/git" + +CLEANBROKEN = "1" + +# Make sure that lib/firmware, and all its contents are part of the package +FILES:${PN} = "${nonarch_base_libdir}/firmware" + +# This is used to prevent the build system from stripping the firmwares +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_SYSROOT_STRIP = "1" + +# This is used to prevent the build system from splitting out the firmware debug info into a separate file +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + +# Disable arch checking as firmware is likely to be a different arch from the Yocto build +INSANE_SKIP:${PN} += "arch" + +# Firmware in Linux Firmware has no configure nor build steps +do_compile[noexec] = "1" +do_configure[noexec] = "1" diff --git a/meta-ti-bsp/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb b/meta-ti-bsp/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb new file mode 100644 index 00000000..12292c88 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb @@ -0,0 +1,29 @@ +SUMMARY = "TI SYSFW/TIFS Firmware" + +inherit deploy + +require recipes-bsp/ti-linux-fw/ti-linux-fw.inc + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +PV = "${TI_SYSFW_VERSION}" +PR = "${INC_PR}.0" + +do_install() { + install -d ${D}${nonarch_base_libdir}/firmware/ti-sysfw + install -m 644 ${S}/ti-sysfw/ti-sci-firmware-* ${D}${nonarch_base_libdir}/firmware/ti-sysfw + install -m 644 ${S}/ti-sysfw/ti-fs-firmware-* ${D}${nonarch_base_libdir}/firmware/ti-sysfw + install -m 644 ${S}/ti-sysfw/ti-fs-stub-firmware-* ${D}${nonarch_base_libdir}/firmware/ti-sysfw +} + +do_deploy(){ +} + +do_deploy:k3r5() { + install -d ${DEPLOYDIR}/ti-sysfw + install -m 644 ${S}/ti-sysfw/ti-sci-firmware-* ${DEPLOYDIR}/ti-sysfw + install -m 644 ${S}/ti-sysfw/ti-fs-firmware-* ${DEPLOYDIR}/ti-sysfw + install -m 644 ${S}/ti-sysfw/ti-fs-stub-firmware-* ${DEPLOYDIR}/ti-sysfw +} + +addtask deploy before do_build after do_compile diff --git a/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ti.inc b/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ti.inc new file mode 100644 index 00000000..291259c0 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ti.inc @@ -0,0 +1,10 @@ +PV:k3 = "2.10+git" +SRCREV_tfa:k3 = "00f1ec6b8740ccd403e641131e294aabacf2a48b" +SRC_URI:k3 = "git://git.trustedfirmware.org/TF-A/trusted-firmware-a.git;protocol=https;name=tfa;branch=master" +COMPATIBLE_MACHINE:k3 = "k3" +TFA_BUILD_TARGET:k3 = "all" +TFA_INSTALL_TARGET:k3 = "bl31" +TFA_SPD:k3 = "opteed" + +EXTRA_OEMAKE:append:k3 = "${@ ' K3_USART=' + d.getVar('TFA_K3_USART') if d.getVar('TFA_K3_USART') else ''}" +EXTRA_OEMAKE:append:k3 = "${@ ' K3_PM_SYSTEM_SUSPEND=' + d.getVar('TFA_K3_SYSTEM_SUSPEND') if d.getVar('TFA_K3_SYSTEM_SUSPEND') else ''}" diff --git a/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend b/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend new file mode 100644 index 00000000..00d08a51 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend @@ -0,0 +1,4 @@ +TFA_TI = "" +TFA_TI:k3 = "trusted-firmware-a-ti.inc" + +require ${TFA_TI} diff --git a/meta-ti-bsp/recipes-bsp/u-boot/ti-extras.inc b/meta-ti-bsp/recipes-bsp/u-boot/ti-extras.inc new file mode 100644 index 00000000..d32c6529 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/u-boot/ti-extras.inc @@ -0,0 +1,12 @@ + +# This will have priority over generic uboot path + +COMPATIBLE_MACHINE = "am62xx|am62pxx" + +BRANCH = "ti-u-boot-2023.04" +BRANCH:tie-jailhouse = "ti-u-boot-2023.04-jailhouse" + +SRCREV = "b0d868ee086eb5c96a3d32f72a7cb9670abf5b90" +SRCREV:tie-jailhouse = "765cab112d16fcf68a3266738073663dae67a55d" + +UBOOT_GIT_URI = "git://git.ti.com/git/processor-sdk/u-boot.git" diff --git a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-bb.org_git.bb b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-bb.org_git.bb new file mode 100644 index 00000000..13286564 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-bb.org_git.bb @@ -0,0 +1,17 @@ +require u-boot-ti.inc + +SUMMARY = "BeagleBoard.org U-Boot" + +COMPATIBLE_MACHINE = "beagle.*" + +PV = "2023.04" + +UBOOT_GIT_URI = "git://github.com/beagleboard/u-boot.git" +UBOOT_GIT_PROTOCOL = "https" +BRANCH = "v2023.04-ti-09.01.00.008" +SRCREV = "b0d717b732ee28e446baf94522b3491e590f7fbb" + +BRANCH:beagleplay = "v2023.04-ti-09.01.00.008-BeaglePlay" +BRANCH:beagleplay-k3r5 = "v2023.04-ti-09.01.00.008-BeaglePlay" +SRCREV:beagleplay = "43791d945f4e5c25bcc19b9c778e8f9d194dc16e" +SRCREV:beagleplay-k3r5 = "43791d945f4e5c25bcc19b9c778e8f9d194dc16e" diff --git a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-mergeconfig.inc b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-mergeconfig.inc new file mode 100644 index 00000000..c7ce5047 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-mergeconfig.inc @@ -0,0 +1,7 @@ +do_configure:append () { + if [ -n "${UBOOT_CONFIG_FRAGMENTS}" ] && [ -n "${UBOOT_MACHINE}" ] + then + oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE} ${UBOOT_CONFIG_FRAGMENTS} + oe_runmake -C ${S} O=${B} olddefconfig + fi +} diff --git a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-mainline_git.bb b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-mainline_git.bb new file mode 100644 index 00000000..f497054c --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-mainline_git.bb @@ -0,0 +1,16 @@ +require u-boot-ti.inc + +PR = "r0" + +PV = "2024.01" + +# For the un-initiated: +# The actual URL you'd use with a git clone for example would be: +# https://source.denx.de/u-boot/u-boot.git/ +# However, in the context of OE, we have to explicitly split things up: +# a) we want it to use git fetcher - hence git:// prefix in GIT_URI (if we +# used https here, we'd endup attempting wget instead of git) +# b) and we want git fetcher to use https protocol, hence GIT_PROTOCOL as https +UBOOT_GIT_URI = "git://source.denx.de/u-boot/u-boot.git" +UBOOT_GIT_PROTOCOL = "https" +SRCREV = "866ca972d6c3cabeaf6dbac431e8e08bb30b3c8e" diff --git a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging_2023.04.bb b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging_2023.04.bb new file mode 100644 index 00000000..199b44f4 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging_2023.04.bb @@ -0,0 +1,9 @@ +require u-boot-ti.inc + +include ${@ 'recipes-bsp/u-boot/ti-extras.inc' if d.getVar('TI_EXTRAS') else ''} + +PR = "r0" + +BRANCH = "ti-u-boot-2023.04" + +SRCREV = "83660642085462346fbeb410f83bc99448ec7042" diff --git a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging_2024.04.bb b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging_2024.04.bb new file mode 100644 index 00000000..d268c8a5 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging_2024.04.bb @@ -0,0 +1,11 @@ +require u-boot-ti.inc + +DEFAULT_PREFERENCE = "-1" + +include ${@ 'recipes-bsp/u-boot/ti-extras.inc' if d.getVar('TI_EXTRAS') else ''} + +PR = "r0" + +BRANCH = "ti-u-boot-2024.04" + +SRCREV = "919b5bb5e9eea5324b6d8b469ae69ff1dae45b75" diff --git a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc new file mode 100644 index 00000000..bad8371f --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc @@ -0,0 +1,357 @@ +do_compile:prepend () { + scm_version=$(printf '%s%s' -ti-g $(git -C ${S} rev-parse --verify HEAD 2>/dev/null | cut -c1-12)) + + echo ${scm_version} > ${B}/.scmversion + echo ${scm_version} > ${S}/.scmversion +} + +UBOOT_SUFFIX ?= "img" +SPL_BINARY ?= "MLO" + +require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot-common.inc +require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc +require u-boot-mergeconfig.inc + +FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot:" + +SUMMARY = "u-boot bootloader for TI devices" + +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://Licenses/README;md5=2ca5f2c35c8cc335f0a19756634782f1" + +BRANCH ?= "master" +UBOOT_GIT_URI ?= "git://git.ti.com/git/ti-u-boot/ti-u-boot.git" +UBOOT_GIT_PROTOCOL = "https" +SRC_URI = "${UBOOT_GIT_URI};protocol=${UBOOT_GIT_PROTOCOL};branch=${BRANCH}" + +PV:append = "+git" + +# u-boot needs devtree compiler to parse dts files +DEPENDS += "dtc-native bc-native flex-native bison-native python3-setuptools-native" + +# u-boot needs these for binman +DEPENDS += "python3-pyelftools-native python3-pyyaml-native python3-jsonschema-native python3-yamllint-native" + +# SYSFW/TIFS Firmware +DEPENDS:append:k3 = " ti-sci-fw" +DEPENDS:append:k3r5 = " ti-sci-fw" + +DM_FIRMWARE = "ipc_echo_testb_mcu1_0_release_strip.xer5f" + +PLAT_SFX = "" +PLAT_SFX:j721e = "j721e" +PLAT_SFX:j7200 = "j7200" +PLAT_SFX:j721s2 = "j721s2" +PLAT_SFX:j784s4 = "j784s4" +PLAT_SFX:j722s = "j722s" +PLAT_SFX:am65xx = "am65xx" +PLAT_SFX:am64xx = "am64xx" +PLAT_SFX:am62xx = "am62xx" +PLAT_SFX:am62axx = "am62axx" +PLAT_SFX:am62pxx = "am62pxx" + +PACKAGECONFIG[atf] = "BL31=${STAGING_DIR_HOST}/firmware/bl31.bin,,trusted-firmware-a" +PACKAGECONFIG[optee] = "TEE=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/bl32.bin,,optee-os" +PACKAGECONFIG[dm] = "DM=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/ti-dm/${PLAT_SFX}/${DM_FIRMWARE},,ti-dm-fw" + +PACKAGECONFIG:append:aarch64 = " atf optee" +PACKAGECONFIG:append:j721e = " dm" +PACKAGECONFIG:append:j7200 = " dm" +PACKAGECONFIG:append:j721s2 = " dm" +PACKAGECONFIG:append:j784s4 = " dm" +PACKAGECONFIG:append:j722s = " dm" +PACKAGECONFIG:append:am62xx = " dm" +PACKAGECONFIG:append:am62axx = " dm" +PACKAGECONFIG:append:am62pxx = " dm" + +COMPATIBLE_MACHINE = "(ti-soc)" + +BINMAN_INDIRS="${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware" + +EXTRA_OEMAKE += "${PACKAGECONFIG_CONFARGS} BINMAN_INDIRS=${BINMAN_INDIRS}" + +PROVIDES += "u-boot" +PKG:${PN} = "u-boot" +PKG:${PN}-dev = "u-boot-dev" +PKG:${PN}-dbg = "u-boot-dbg" + +S = "${WORKDIR}/git" + +# Support for secure devices - detailed info is in doc/README.ti-secure +inherit ti-secdev + +SYSROOT_DIRS += "/boot" + +# SPL (Second Program Loader) to be loaded over UART +SPL_UART_BINARY = "u-boot-spl.bin" +SPL_UART_BINARY:k3r5 = "" + +SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}" +SPL_UART_SYMLINK ?= "${SPL_UART_BINARY}-${MACHINE}" + +SPL_HS_MLO_BINARY = "u-boot-spl_HS_MLO" +SPL_HS_MLO_IMAGE = "u-boot-spl_HS_MLO-${MACHINE}-${PV}-${PR}" +SPL_HS_MLO_SYMLINK = "u-boot-spl_HS_MLO-${MACHINE}" + +# HS XLD +UBOOT_HS_XLD_BINARY = "u-boot-spl_HS_X-LOADER" +UBOOT_HS_XLD_IMAGE = "u-boot-spl_HS_X-LOADER-${MACHINE}-${PV}-${PR}" +UBOOT_HS_XLD_SYMLINK = "u-boot-spl_HS_X-LOADER-${MACHINE}" + +# HS MLO +UBOOT_HS_MLO_BINARY = "u-boot_HS_MLO" +UBOOT_HS_MLO_IMAGE = "u-boot_HS_MLO-${MACHINE}-${PV}-${PR}" +UBOOT_HS_MLO_SYMLINK = "u-boot_HS_MLO-${MACHINE}" + +# HS ISSW +UBOOT_HS_ISSW_BINARY = "u-boot-spl_HS_ISSW" +UBOOT_HS_ISSW_IMAGE = "u-boot-spl_HS_ISSW-${MACHINE}-${PV}-${PR}" +UBOOT_HS_ISSW_SYMLINK = "u-boot-spl_HS_ISSW-${MACHINE}" + +# HS 2ND +UBOOT_HS_2ND_BINARY = "u-boot-spl_HS_2ND" +UBOOT_HS_2ND_IMAGE = "u-boot-spl_HS_2ND-${MACHINE}-${PV}-${PR}" +UBOOT_HS_2ND_SYMLINK = "u-boot-spl_HS_2ND-${MACHINE}" + +do_compile:append:k3r5 () { + if [ -n "${UBOOT_CONFIG}" ]; + then + for config in ${UBOOT_MACHINE}; do + i=$(expr $i + 1); + for type in ${UBOOT_CONFIG}; do + j=$(expr $j + 1); + if [ $j -eq $i ]; + then + if ! [ -L ${B}/${config}/${UBOOT_BINARY} ] && ! [ -f ${B}/${config}/${UBOOT_BINARY} ]; then + ln -s ${B}/${config}/spl/u-boot-spl.${UBOOT_SUFFIX} ${B}/${config}/${UBOOT_BINARY} + fi + fi + done + unset j + done + unset i + else + if ! [ -f ${B}/${UBOOT_BINARY} ]; then + ln -s spl/u-boot-spl.${UBOOT_SUFFIX} ${B}/${UBOOT_BINARY} + fi + fi +} + +do_install:append () { + if [ -n "${UBOOT_CONFIG}" ] + then + for config in ${UBOOT_MACHINE}; do + i=$(expr $i + 1); + for type in ${UBOOT_CONFIG}; do + j=$(expr $j + 1); + if [ $j -eq $i ] + then + if [ "x${SPL_UART_BINARY}" != "x" ]; then + install ${B}/${config}/spl/${SPL_UART_BINARY} ${D}/boot/${SPL_UART_IMAGE}-${type} + ln -sf ${SPL_UART_IMAGE}-${type} ${D}/boot/${SPL_UART_BINARY}-${type} + ln -sf ${SPL_UART_IMAGE}-${type} ${D}/boot/${SPL_UART_BINARY} + fi + if [ -f ${B}/${config}/${SPL_HS_MLO_BINARY} ]; then + install ${B}/${config}/${SPL_HS_MLO_BINARY} ${D}/boot/${SPL_HS_MLO_IMAGE}-${type} + ln -sf ${SPL_HS_MLO_IMAGE}-${type} ${D}/boot/${SPL_HS_MLO_BINARY}-${type} + ln -sf ${SPL_HS_MLO_IMAGE}-${type} ${D}/boot/${SPL_HS_MLO_BINARY} + fi + if [ -f ${B}/${config}/${UBOOT_HS_XLD_BINARY} ]; then + install ${B}/${config}/${UBOOT_HS_XLD_BINARY} ${D}/boot/${UBOOT_HS_XLD_IMAGE}-${type} + ln -sf ${UBOOT_HS_XLD_IMAGE}-${type} ${D}/boot/${UBOOT_HS_XLD_BINARY}-${type} + ln -sf ${UBOOT_HS_XLD_IMAGE}-${type} ${D}/boot/${UBOOT_HS_XLD_BINARY} + fi + if [ -f ${B}/${config}/${UBOOT_HS_MLO_BINARY} ]; then + install ${B}/${config}/${UBOOT_HS_MLO_BINARY} ${D}/boot/${UBOOT_HS_MLO_IMAGE}-${type} + ln -sf ${UBOOT_HS_MLO_IMAGE}-${type} ${D}/boot/${UBOOT_HS_MLO_BINARY}-${type} + ln -sf ${UBOOT_HS_MLO_IMAGE}-${type} ${D}/boot/${UBOOT_HS_MLO_BINARY} + fi + if [ -f ${B}/${config}/${UBOOT_HS_ISSW_BINARY} ]; then + install ${B}/${config}/${UBOOT_HS_ISSW_BINARY} ${D}/boot/${UBOOT_HS_ISSW_IMAGE}-${type} + ln -sf ${UBOOT_HS_ISSW_IMAGE}-${type} ${D}/boot/${UBOOT_HS_ISSW_BINARY}-${type} + ln -sf ${UBOOT_HS_ISSW_IMAGE}-${type} ${D}/boot/${UBOOT_HS_ISSW_BINARY} + fi + if [ -f ${B}/${config}/${UBOOT_HS_2ND_BINARY} ]; then + install ${B}/${config}/${UBOOT_HS_2ND_BINARY} ${D}/boot/${UBOOT_HS_2ND_IMAGE}-${type} + ln -sf ${UBOOT_HS_2ND_IMAGE}-${type} ${D}/boot/${UBOOT_HS_2ND_BINARY}-${type} + ln -sf ${UBOOT_HS_2ND_IMAGE}-${type} ${D}/boot/${UBOOT_HS_2ND_BINARY} + fi + fi + done + unset j + done + unset i + else + if [ "x${SPL_UART_BINARY}" != "x" ]; then + install ${B}/spl/${SPL_UART_BINARY} ${D}/boot/${SPL_UART_IMAGE} + ln -sf ${SPL_UART_IMAGE} ${D}/boot/${SPL_UART_BINARY} + fi + if [ -f ${B}/${SPL_HS_MLO_BINARY} ]; then + install ${B}/${SPL_HS_MLO_BINARY} ${D}/boot/${SPL_HS_MLO_IMAGE} + ln -sf ${SPL_HS_MLO_IMAGE} ${D}/boot/${SPL_HS_MLO_BINARY} + fi + if [ -f ${B}/${UBOOT_HS_XLD_BINARY} ]; then + install ${B}/${UBOOT_HS_XLD_BINARY} ${D}/boot/${UBOOT_HS_XLD_IMAGE} + ln -sf ${UBOOT_HS_XLD_IMAGE} ${D}/boot/${UBOOT_HS_XLD_BINARY} + fi + if [ -f ${B}/${UBOOT_HS_MLO_BINARY} ]; then + install ${B}/${UBOOT_HS_MLO_BINARY} ${D}/boot/${UBOOT_HS_MLO_IMAGE} + ln -sf ${UBOOT_HS_MLO_IMAGE} ${D}/boot/${UBOOT_HS_MLO_BINARY} + fi + if [ -f ${B}/${UBOOT_HS_ISSW_BINARY} ]; then + install ${B}/${UBOOT_HS_ISSW_BINARY} ${D}/boot/${UBOOT_HS_ISSW_IMAGE} + ln -sf ${UBOOT_HS_ISSW_IMAGE} ${D}/boot/${UBOOT_HS_ISSW_BINARY} + fi + if [ -f ${B}/${UBOOT_HS_2ND_BINARY} ]; then + install ${B}/${UBOOT_HS_2ND_BINARY} ${D}/boot/${UBOOT_HS_2ND_IMAGE} + ln -sf ${UBOOT_HS_2ND_IMAGE} ${D}/boot/${UBOOT_HS_2ND_BINARY} + fi + fi +} + +do_deploy:append:k3r5 () { + for f in ${B}/tiboot3-*.bin; do + if [ -f "$f" ]; then + install -m 644 $f ${DEPLOYDIR}/ + fi + done + + for f in ${B}/sysfw*.itb; do + if [ -f "$f" ]; then + install -m 644 $f ${DEPLOYDIR}/ + fi + done + + rm ${DEPLOYDIR}/u-boot-initial-env || true + rm ${DEPLOYDIR}/${PN}-initial-env || true + rm ${DEPLOYDIR}/u-boot-initial-env-${MACHINE} || true + rm ${DEPLOYDIR}/${PN}-initial-env-${MACHINE} || true + rm ${DEPLOYDIR}/u-boot-initial-env-${MACHINE}-${PV}-${PR} || true + rm ${DEPLOYDIR}/${PN}-initial-env-${MACHINE}-${PV}-${PR} || true +} + +do_deploy:append () { + if [ -n "${UBOOT_CONFIG}" ] + then + for config in ${UBOOT_MACHINE}; do + i=$(expr $i + 1); + for type in ${UBOOT_CONFIG}; do + j=$(expr $j + 1); + if [ $j -eq $i ] + then + cd ${DEPLOYDIR} + if [ "x${SPL_UART_BINARY}" != "x" ]; then + install ${B}/${config}/spl/${SPL_UART_BINARY} ${SPL_UART_IMAGE}-${type} + rm -f ${SPL_UART_BINARY} ${SPL_UART_SYMLINK} + ln -sf ${SPL_UART_IMAGE}-${type} ${SPL_UART_BINARY}-${type} + ln -sf ${SPL_UART_IMAGE}-${type} ${SPL_UART_BINARY} + ln -sf ${SPL_UART_IMAGE}-${type} ${SPL_UART_SYMLINK}-${type} + ln -sf ${SPL_UART_IMAGE}-${type} ${SPL_UART_SYMLINK} + fi + if [ -f ${B}/${config}/${SPL_HS_MLO_BINARY} ]; then + install ${B}/${config}/${SPL_HS_MLO_BINARY} ${SPL_HS_MLO_IMAGE}-${type} + rm -f ${SPL_HS_MLO_BINARY} ${SPL_HS_MLO_SYMLINK} + ln -sf ${SPL_HS_MLO_IMAGE}-${type} ${SPL_HS_MLO_SYMLINK}-${type} + ln -sf ${SPL_HS_MLO_IMAGE}-${type} ${SPL_HS_MLO_SYMLINK} + ln -sf ${SPL_HS_MLO_IMAGE}-${type} ${SPL_HS_MLO_BINARY}-${type} + ln -sf ${SPL_HS_MLO_IMAGE}-${type} ${SPL_HS_MLO_BINARY} + fi + if [ -f ${B}/${config}/${UBOOT_HS_XLD_BINARY} ]; then + install ${B}/${config}/${UBOOT_HS_XLD_BINARY} ${UBOOT_HS_XLD_IMAGE}-${type} + rm -f ${UBOOT_HS_XLD_BINARY} ${UBOOT_HS_XLD_SYMLINK} + ln -sf ${UBOOT_HS_XLD_IMAGE}-${type} ${UBOOT_HS_XLD_SYMLINK}-${type} + ln -sf ${UBOOT_HS_XLD_IMAGE}-${type} ${UBOOT_HS_XLD_SYMLINK} + ln -sf ${UBOOT_HS_XLD_IMAGE}-${type} ${UBOOT_HS_XLD_BINARY}-${type} + ln -sf ${UBOOT_HS_XLD_IMAGE}-${type} ${UBOOT_HS_XLD_BINARY} + fi + if [ -f ${B}/${config}/${UBOOT_HS_MLO_BINARY} ]; then + install ${B}/${config}/${UBOOT_HS_MLO_BINARY} ${UBOOT_HS_MLO_IMAGE}-${type} + rm -f ${UBOOT_HS_MLO_BINARY} ${UBOOT_HS_MLO_SYMLINK} + ln -sf ${UBOOT_HS_MLO_IMAGE}-${type} ${UBOOT_HS_MLO_SYMLINK}-${type} + ln -sf ${UBOOT_HS_MLO_IMAGE}-${type} ${UBOOT_HS_MLO_SYMLINK} + ln -sf ${UBOOT_HS_MLO_IMAGE}-${type} ${UBOOT_HS_MLO_BINARY}-${type} + ln -sf ${UBOOT_HS_MLO_IMAGE}-${type} ${UBOOT_HS_MLO_BINARY} + fi + if [ -f ${B}/${config}/${UBOOT_HS_ISSW_BINARY} ]; then + install ${B}/${config}/${UBOOT_HS_ISSW_BINARY} ${UBOOT_HS_ISSW_IMAGE}-${type} + rm -f ${UBOOT_HS_ISSW_BINARY} ${UBOOT_HS_ISSW_SYMLINK} + ln -sf ${UBOOT_HS_ISSW_IMAGE}-${type} ${UBOOT_HS_ISSW_SYMLINK}-${type} + ln -sf ${UBOOT_HS_ISSW_IMAGE}-${type} ${UBOOT_HS_ISSW_SYMLINK} + ln -sf ${UBOOT_HS_ISSW_IMAGE}-${type} ${UBOOT_HS_ISSW_BINARY}-${type} + ln -sf ${UBOOT_HS_ISSW_IMAGE}-${type} ${UBOOT_HS_ISSW_BINARY} + fi + if [ -f ${B}/${config}/${UBOOT_HS_2ND_BINARY} ]; then + install ${B}/${config}/${UBOOT_HS_2ND_BINARY} ${UBOOT_HS_2ND_IMAGE}-${type} + rm -f ${UBOOT_HS_2ND_BINARY} ${UBOOT_HS_2ND_SYMLINK} + ln -sf ${UBOOT_HS_2ND_IMAGE}-${type} ${UBOOT_HS_2ND_SYMLINK}-${type} + ln -sf ${UBOOT_HS_2ND_IMAGE}-${type} ${UBOOT_HS_2ND_SYMLINK} + ln -sf ${UBOOT_HS_2ND_IMAGE}-${type} ${UBOOT_HS_2ND_BINARY}-${type} + ln -sf ${UBOOT_HS_2ND_IMAGE}-${type} ${UBOOT_HS_2ND_BINARY} + fi + fi + done + unset j + done + unset i + else + cd ${DEPLOYDIR} + if [ "x${SPL_UART_BINARY}" != "x" ]; then + install ${B}/spl/${SPL_UART_BINARY} ${SPL_UART_IMAGE} + rm -f ${SPL_UART_BINARY} ${SPL_UART_SYMLINK} + ln -sf ${SPL_UART_IMAGE} ${SPL_UART_BINARY} + ln -sf ${SPL_UART_IMAGE} ${SPL_UART_SYMLINK} + fi + if [ -f ${B}/${SPL_HS_MLO_BINARY} ]; then + install ${B}/${SPL_HS_MLO_BINARY} ${SPL_HS_MLO_IMAGE} + rm -f ${SPL_HS_MLO_BINARY} ${SPL_HS_MLO_SYMLINK} + ln -sf ${SPL_HS_MLO_IMAGE} ${SPL_HS_MLO_SYMLINK} + ln -sf ${SPL_HS_MLO_IMAGE} ${SPL_HS_MLO_BINARY} + fi + if [ -f ${B}/${UBOOT_HS_XLD_BINARY} ]; then + install ${B}/${UBOOT_HS_XLD_BINARY} ${UBOOT_HS_XLD_IMAGE} + rm -f ${UBOOT_HS_XLD_BINARY} ${UBOOT_HS_XLD_SYMLINK} + ln -sf ${UBOOT_HS_XLD_IMAGE} ${UBOOT_HS_XLD_SYMLINK} + ln -sf ${UBOOT_HS_XLD_IMAGE} ${UBOOT_HS_XLD_BINARY} + fi + if [ -f ${B}/${UBOOT_HS_MLO_BINARY} ]; then + install ${B}/${UBOOT_HS_MLO_BINARY} ${UBOOT_HS_MLO_IMAGE} + rm -f ${UBOOT_HS_MLO_BINARY} ${UBOOT_HS_MLO_SYMLINK} + ln -sf ${UBOOT_HS_MLO_IMAGE} ${UBOOT_HS_MLO_SYMLINK} + ln -sf ${UBOOT_HS_MLO_IMAGE} ${UBOOT_HS_MLO_BINARY} + fi + if [ -f ${B}/${UBOOT_HS_ISSW_BINARY} ]; then + install ${B}/${UBOOT_HS_ISSW_BINARY} ${UBOOT_HS_ISSW_IMAGE} + rm -f ${UBOOT_HS_ISSW_BINARY} ${UBOOT_HS_ISSW_SYMLINK} + ln -sf ${UBOOT_HS_ISSW_IMAGE} ${UBOOT_HS_ISSW_SYMLINK} + ln -sf ${UBOOT_HS_ISSW_IMAGE} ${UBOOT_HS_ISSW_BINARY} + fi + if [ -f ${B}/${UBOOT_HS_2ND_BINARY} ]; then + install ${B}/${UBOOT_HS_2ND_BINARY} ${UBOOT_HS_2ND_IMAGE} + rm -f ${UBOOT_HS_2ND_BINARY} ${UBOOT_HS_2ND_SYMLINK} + ln -sf ${UBOOT_HS_2ND_IMAGE} ${UBOOT_HS_2ND_SYMLINK} + ln -sf ${UBOOT_HS_2ND_IMAGE} ${UBOOT_HS_2ND_BINARY} + fi + fi +} + +do_install:append:am62xx() { + install -d ${D}/boot + install -m 0644 ${S}/tools/logos/ti_logo_414x97_32bpp.bmp.gz ${D}/boot +} + +do_deploy:append:am62xx() { + install -d ${DEPLOYDIR} + install -m 0644 ${S}/tools/logos/ti_logo_414x97_32bpp.bmp.gz ${DEPLOYDIR} +} + +do_install:append:am62pxx() { + install -d ${D}/boot + install -m 0644 ${S}/tools/logos/ti_logo_414x97_32bpp.bmp.gz ${D}/boot +} + +do_deploy:append:am62pxx() { + install -d ${DEPLOYDIR} + install -m 0644 ${S}/tools/logos/ti_logo_414x97_32bpp.bmp.gz ${DEPLOYDIR} +} + +TOOLCHAIN = "gcc" diff --git a/meta-ti-bsp/recipes-bsp/vis-fw/vis_01.50.07.15.bb b/meta-ti-bsp/recipes-bsp/vis-fw/vis_01.50.07.15.bb new file mode 100644 index 00000000..c0e2595a --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/vis-fw/vis_01.50.07.15.bb @@ -0,0 +1,36 @@ +DESCRIPTION = "Radio Application Firmware" +LICENSE = "TI-TSPA" +LIC_FILES_CHKSUM = "file://${S}/J6_VIS_DEMO_LINUX_BINARY_01.50.07.15-Manifest.html;md5=a59aa54b9470f555cf086b91dca0afa3" + +COMPATIBLE_MACHINE = "dra7xx" + +PR = "r1" + +SRC_URI = "http://downloads.ti.com/dsps/dsps_public_sw/glsdk/vis/01_50_07_15/exports/vis-dra7xx-evm-01.50.07.15.tar.gz;protocol=http" + +SRC_URI[md5sum] = "fe8b00e398fb3b7ada0c15b601867acb" +SRC_URI[sha256sum] = "6e2aa47ae892910616ebdc96646af778af9a59ca0657716ab4fa4b24a9afae69" + +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + +DSPAPP = "dra7-dsp1-fw-radio.xe66" +GPPAPP = "RadioApp" + +do_install() { + install -d ${D}${nonarch_base_libdir}/firmware + install -d ${D}${bindir} + install ${S}/prebuilt/${DSPAPP} ${D}${nonarch_base_libdir}/firmware/${DSPAPP} + install -m 0755 ${S}/prebuilt/${GPPAPP} ${D}${bindir}/${GPPAPP} +} + +PACKAGES += "${PN}-fw" +RDEPENDS:${PN} += "${PN}-fw" + +FILES:${PN}-fw += "${nonarch_base_libdir}/firmware/${DSPAPP}" + +INSANE_SKIP:${PN} = "ldflags" +INSANE_SKIP:${PN}-fw = "arch" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_SYSROOT_STRIP = "1" diff --git a/meta-ti-bsp/recipes-bsp/vpdma-fw/vpdma-fw_03-2012.bb b/meta-ti-bsp/recipes-bsp/vpdma-fw/vpdma-fw_03-2012.bb new file mode 100644 index 00000000..8af49577 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/vpdma-fw/vpdma-fw_03-2012.bb @@ -0,0 +1,22 @@ +DESCRIPTION = "VPDMA firmware for Video Input Port and Video Processing Engine" + +LICENSE = "TI-TSPA" +LIC_FILES_CHKSUM = "file://COPYING;md5=fd463c9500441ed91d07a0331baa635c" + +COMPATIBLE_MACHINE = "dra7xx" + +SRC_URI = "http://downloads.ti.com/dsps/dsps_public_sw/glsdk/vpdma-fw/03-2012/exports/vpdma-fw_03-2012.tar.gz;protocol=http;name=dra7xx-evm" +SRC_URI[dra7xx-evm.md5sum] = "80176df1350c21d9efa90171789c546e" +SRC_URI[dra7xx-evm.sha256sum] = "a0b254ffd0c7f481cb3989e632088f5e4a233c73a1c676faa3061721ea60dc90" + +S = "${WORKDIR}/vpdma-fw-${PV}" +TARGET = "vpdma-1b8.bin" + +do_install() { + mkdir -p ${D}${nonarch_base_libdir}/firmware + cp ${S}/${TARGET} ${D}${nonarch_base_libdir}/firmware/${TARGET} +} + +FILES:${PN} += "${nonarch_base_libdir}/firmware/${TARGET}" + +PR = "r1" diff --git a/meta-ti-bsp/recipes-bsp/vpe-tests/vpe-tests_git.bb b/meta-ti-bsp/recipes-bsp/vpe-tests/vpe-tests_git.bb new file mode 100644 index 00000000..7f4e8b77 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/vpe-tests/vpe-tests_git.bb @@ -0,0 +1,30 @@ +DESCRIPTION = "VPE test program" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=74d2f71d8898c54e3d1c9d0058c484aa" + +DEPENDS = "virtual/kernel vpdma-fw" + +PR = "r3" + +COMPATIBLE_MACHINE = "dra7xx" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +SRCREV = "e3d8db1aa935775f9d196ad7428e0cd9864a36ca" +BRANCH ?= "master" + +SRC_URI = "git://git.ti.com/git/vpe_tests/vpe_tests.git;protocol=https;branch=${BRANCH}" + +S = "${WORKDIR}/git" + +FLOATABI = "${@bb.utils.contains("TUNE_FEATURES", "vfp", bb.utils.contains("TUNE_FEATURES", "callconvention-hard", " -mfloat-abi=hard", " -mfloat-abi=softfp", d), "" ,d)}" + +# The test application needs additional include headers from the kernel +EXTRA_OEMAKE = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${TARGET_PREFIX}gcc ${FLOATABI}" KDIR="${STAGING_KERNEL_DIR}/include/uapi -I${STAGING_KERNEL_DIR}/include"' + +do_install() { + oe_runmake DESTDIR="${D}" install + rm -rf ${D}${nonarch_base_libdir}/firmware/vpdma-*.bin + rmdir -p ${D}${nonarch_base_libdir}/firmware || true +} diff --git a/meta-ti-bsp/recipes-bsp/zephyr-fw/zephyr-openamp-rsc-table-fw.bb b/meta-ti-bsp/recipes-bsp/zephyr-fw/zephyr-openamp-rsc-table-fw.bb new file mode 100644 index 00000000..4efc99ac --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/zephyr-fw/zephyr-openamp-rsc-table-fw.bb @@ -0,0 +1,83 @@ +SUMMARY = "Precompiled Zephyr OpenAMP example firmware for TI K3 devices" + +# Name of this demo's firmware +FW_NAME = "zephyr_openamp_rsc_table.elf" + +# List of cores for which this demo has a build +FW_CORES = "" +FW_CORES:am62xx = "mcu-m4f0_0" + +# Note: Everything below is common to all our Zephyr firmwares and can be +# factored out to a common include file once we have more than one demo + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +COMPATIBLE_MACHINE = "k3" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +SRC_URI = "git://github.com/glneo/zephyr-firmware.git;protocol=https;branch=main" +SRCREV = "146d4f9b3930722d73685d600958f0b10ea97de2" +PV = "3.6.0" +#PR = "r1" + +S = "${WORKDIR}/git" + +FW_PLAT = "" +FW_PLAT:am62xx = "am62" + +FW_INSTALL_DIR = "${nonarch_base_libdir}/firmware/zephyr/${FW_PLAT}" + +do_install() { + for FW_CORE in ${FW_CORES} + do + install -d ${D}${FW_INSTALL_DIR}/${FW_CORE} + install -m 0644 ${S}/${FW_PLAT}/${FW_CORE}/${FW_NAME} ${D}${FW_INSTALL_DIR}/${FW_CORE} + done +} + +# Make sure that lib/firmware, and all its contents are part of the package +FILES:${PN} = "${nonarch_base_libdir}/firmware" + +# This is used to prevent the build system from stripping the firmwares +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_SYSROOT_STRIP = "1" + +# This is used to prevent the build system from splitting out the firmware debug info into a separate file +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + +# This is a prebuilt with no external dependencies +INHIBIT_DEFAULT_DEPS = "1" + +# Disable arch checking as firmware is likely to be a different arch from the Yocto build +INSANE_SKIP:${PN} += "arch" + +# Zephyr-Firmware has no configure, compile, nor clean steps +do_configure[noexec] = "1" +do_compile[noexec] = "1" +CLEANBROKEN = "1" + +inherit update-alternatives + +python fw_generate_alternatives() { + for fw_core_name in d.getVar('FW_CORES').split(): + fw_plat = d.getVar('FW_PLAT') + fw_pkg_name = d.getVar('PN') + fw_core_name_full = (fw_plat + "-" + fw_core_name + "-fw") + + # Create the firmware alternatives + d.appendVar('ALTERNATIVE:%s' % fw_pkg_name, (fw_core_name_full + " ")) + + # Set up firmware alternatives link names + fw_alt_link = ("${nonarch_base_libdir}/firmware/" + fw_core_name_full) + d.setVarFlag('ALTERNATIVE_LINK_NAME', fw_core_name_full, fw_alt_link) + + # Set up firmware alternatives link targets + fw_alt_target_rename = "${FW_INSTALL_DIR}/" + fw_core_name + "/${FW_NAME}" + d.setVarFlag('ALTERNATIVE_TARGET_%s' % fw_pkg_name, fw_core_name_full, fw_alt_target_rename) +} + +do_package[prefuncs] += "fw_generate_alternatives" + +ALTERNATIVE_PRIORITY = "20" diff --git a/meta-ti-bsp/recipes-core/udev/eudev/firmware.rules b/meta-ti-bsp/recipes-core/udev/eudev/firmware.rules new file mode 100644 index 00000000..f7a08ce9 --- /dev/null +++ b/meta-ti-bsp/recipes-core/udev/eudev/firmware.rules @@ -0,0 +1,3 @@ +# stub for immediately telling the kernel that userspace firmware loading +# failed; necessary to avoid long timeouts with CONFIG_FW_LOADER_USER_HELPER=y +SUBSYSTEM=="firmware", ACTION=="add", ATTR{loading}="-1" diff --git a/meta-ti-bsp/recipes-core/udev/eudev/omap-tty.rules b/meta-ti-bsp/recipes-core/udev/eudev/omap-tty.rules new file mode 100644 index 00000000..989d60f8 --- /dev/null +++ b/meta-ti-bsp/recipes-core/udev/eudev/omap-tty.rules @@ -0,0 +1,17 @@ +# There are a number of modifiers that are allowed to be used in some +# of the different fields. They provide the following subsitutions: +# +# %n the "kernel number" of the device. +# For example, 'sda3' has a "kernel number" of '3' +# %e the smallest number for that name which does not matches an existing node +# %k the kernel name for the device +# %M the kernel major number for the device +# %m the kernel minor number for the device +# %b the bus id for the device +# %c the string returned by the PROGRAM +# %s{filename} the content of a sysfs attribute +# %% the '%' char itself +# + +# Backward compatibility with old OMAP UART-style ttyO0 naming +SUBSYSTEM=="tty", ATTR{uartclk}!="0", KERNEL=="ttyS[0-9]", SYMLINK+="ttyO%n" diff --git a/meta-ti-bsp/recipes-core/udev/eudev_%.bbappend b/meta-ti-bsp/recipes-core/udev/eudev_%.bbappend new file mode 100644 index 00000000..dee46cda --- /dev/null +++ b/meta-ti-bsp/recipes-core/udev/eudev_%.bbappend @@ -0,0 +1,13 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI:append:ti-soc = " \ + file://omap-tty.rules \ + file://firmware.rules \ +" + +PR:append:ti-soc = ".3" + +do_install:append:ti-soc() { + install -m 0644 ${UNPACKDIR}/omap-tty.rules ${D}${sysconfdir}/udev/rules.d/ + install -m 0644 ${UNPACKDIR}/firmware.rules ${D}${sysconfdir}/udev/rules.d/ +} diff --git a/meta-ti-bsp/recipes-devtools/binutils/binutils-cross-canadian_%.bbappend b/meta-ti-bsp/recipes-devtools/binutils/binutils-cross-canadian_%.bbappend new file mode 100644 index 00000000..c18bbe7a --- /dev/null +++ b/meta-ti-bsp/recipes-devtools/binutils/binutils-cross-canadian_%.bbappend @@ -0,0 +1 @@ +FILES:${PN}-staticdev:append:ti-soc = " ${libdir}/gprofng/*.a" diff --git a/meta-ti-bsp/recipes-devtools/k3conf/k3conf_git.bb b/meta-ti-bsp/recipes-devtools/k3conf/k3conf_git.bb new file mode 100644 index 00000000..c8da6674 --- /dev/null +++ b/meta-ti-bsp/recipes-devtools/k3conf/k3conf_git.bb @@ -0,0 +1,17 @@ +SUMMARY = "Diagnostic tool for TI K3 processors" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a56bddef00b39fb0f45488fdc4ce108f" + +inherit cmake + +PV = "0.3+git" + +COMPATIBLE_MACHINE = "k3" + +BRANCH ?= "master" +SRCREV = "85a7433202aafafbccea8a7b2491f4df8b1ecd80" + +SRC_URI = "git://git.ti.com/git/k3conf/k3conf.git;protocol=https;branch=${BRANCH}" + +S = "${WORKDIR}/git" diff --git a/meta-ti-bsp/recipes-graphics/libgal/ti-gc320-libs_5.0.11.p7.bb b/meta-ti-bsp/recipes-graphics/libgal/ti-gc320-libs_5.0.11.p7.bb new file mode 100644 index 00000000..807f421c --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/libgal/ti-gc320-libs_5.0.11.p7.bb @@ -0,0 +1,46 @@ +DESCRIPTION = "Userspace libraries for GC320 chipset on TI SoCs" +HOMEPAGE = "https://git.ti.com/graphics/ti-gc320-libs" +LICENSE = "TI-TSPA" +LIC_FILES_CHKSUM = "file://Manifest.html;md5=a9121e8936ace09820d23f7626daaca5" + +inherit features_check + +REQUIRED_MACHINE_FEATURES = "gc320" + +COMPATIBLE_MACHINE = "omap-a15" + +CLEANBROKEN = "1" + +BRANCH = "ti-${PV}" + +SRC_URI = "git://git.ti.com/git/graphics/ti-gc320-libs.git;protocol=https;branch=${BRANCH}" +SRCREV = "c0afab259de59909cfe74c01f3f7fbaa147f94b5" + +RRECOMMENDS:${PN} = "ti-gc320-driver" + +# There's only hardfp version available +python __anonymous() { + tunes = d.getVar("TUNE_FEATURES") + if not tunes: + return + pkgn = d.getVar("PN") + pkgv = d.getVar("PV") + if "callconvention-hard" not in tunes: + bb.warn("%s-%s ONLY supports hardfp mode for now" % (pkgn, pkgv)) + raise bb.parse.SkipPackage("%s-%s ONLY supports hardfp mode for now" % (pkgn, pkgv)) +} + +TARGET_PRODUCT = "jacinto6evm" + +PR = "r3" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE += "DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT} LIBDIR=${libdir}" + +do_install() { + oe_runmake install + chown -R root:root ${D} +} + +INSANE_SKIP:${PN} += "ldflags" diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-fix-gallivm-limit-usage-of-LLVMContextSetOpaquePoint.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-fix-gallivm-limit-usage-of-LLVMContextSetOpaquePoint.patch new file mode 100644 index 00000000..905fad04 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-fix-gallivm-limit-usage-of-LLVMContextSetOpaquePoint.patch @@ -0,0 +1,128 @@ +From 1a894699354f5f984f31e5d3418b651edf486df9 Mon Sep 17 00:00:00 2001 +From: Ryan Eatmon <reatmon@ti.com> +Date: Fri, 22 Sep 2023 22:32:41 -0500 +Subject: [PATCH] fix: gallivm: limit usage of LLVMContextSetOpaquePointers() + to LLVM 15 + +LLVMContextSetOpaquePointers() was a temporary workaround offered to +allow transitioning to opaque pointers. Mesa is ready for this now with +recent versions of LLVM (16+). Therefore we limit the workaround of +using LLVMContextSetOpaquePointers() to LLVM 15 now, that this C +interface was removed in LLVM 17. + +Reference: https://github.com/llvm/llvm-project/commit/1270879376025457e266572c7cccc51eb5de9276 + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21124] +Signed-off-by: Ryan Eatmon <reatmon@ti.com> +--- + src/gallium/auxiliary/draw/draw_llvm.c | 2 +- + src/gallium/drivers/llvmpipe/lp_context.c | 2 +- + src/gallium/drivers/llvmpipe/lp_test_arit.c | 2 +- + src/gallium/drivers/llvmpipe/lp_test_blend.c | 2 +- + src/gallium/drivers/llvmpipe/lp_test_conv.c | 2 +- + src/gallium/drivers/llvmpipe/lp_test_format.c | 4 ++-- + src/gallium/drivers/llvmpipe/lp_test_printf.c | 2 +- + 7 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c +index 50c157bc3cc..8b3a1522725 100644 +--- a/src/gallium/auxiliary/draw/draw_llvm.c ++++ b/src/gallium/auxiliary/draw/draw_llvm.c +@@ -784,7 +784,7 @@ draw_llvm_create(struct draw_context *draw, LLVMContextRef context) + if (!llvm->context) { + llvm->context = LLVMContextCreate(); + +-#if LLVM_VERSION_MAJOR >= 15 ++#if LLVM_VERSION_MAJOR == 15 + LLVMContextSetOpaquePointers(llvm->context, false); + #endif + +diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c +index 8309335aebc..0ef4317fc76 100644 +--- a/src/gallium/drivers/llvmpipe/lp_context.c ++++ b/src/gallium/drivers/llvmpipe/lp_context.c +@@ -263,7 +263,7 @@ llvmpipe_create_context(struct pipe_screen *screen, void *priv, + if (!llvmpipe->context) + goto fail; + +-#if LLVM_VERSION_MAJOR >= 15 ++#if LLVM_VERSION_MAJOR == 15 + LLVMContextSetOpaquePointers(llvmpipe->context, false); + #endif + +diff --git a/src/gallium/drivers/llvmpipe/lp_test_arit.c b/src/gallium/drivers/llvmpipe/lp_test_arit.c +index 4118928d52e..565b1c47753 100644 +--- a/src/gallium/drivers/llvmpipe/lp_test_arit.c ++++ b/src/gallium/drivers/llvmpipe/lp_test_arit.c +@@ -434,7 +434,7 @@ test_unary(unsigned verbose, FILE *fp, const struct unary_test_t *test, unsigned + } + + context = LLVMContextCreate(); +-#if LLVM_VERSION_MAJOR >= 15 ++#if LLVM_VERSION_MAJOR == 15 + LLVMContextSetOpaquePointers(context, false); + #endif + gallivm = gallivm_create("test_module", context, NULL); +diff --git a/src/gallium/drivers/llvmpipe/lp_test_blend.c b/src/gallium/drivers/llvmpipe/lp_test_blend.c +index 37c3f731eaf..3d2899a78d4 100644 +--- a/src/gallium/drivers/llvmpipe/lp_test_blend.c ++++ b/src/gallium/drivers/llvmpipe/lp_test_blend.c +@@ -452,7 +452,7 @@ test_one(unsigned verbose, + dump_blend_type(stdout, blend, type); + + context = LLVMContextCreate(); +-#if LLVM_VERSION_MAJOR >= 15 ++#if LLVM_VERSION_MAJOR == 15 + LLVMContextSetOpaquePointers(context, false); + #endif + gallivm = gallivm_create("test_module", context, NULL); +diff --git a/src/gallium/drivers/llvmpipe/lp_test_conv.c b/src/gallium/drivers/llvmpipe/lp_test_conv.c +index c7ea9efc12d..83236f0c0ba 100644 +--- a/src/gallium/drivers/llvmpipe/lp_test_conv.c ++++ b/src/gallium/drivers/llvmpipe/lp_test_conv.c +@@ -223,7 +223,7 @@ test_one(unsigned verbose, + } + + context = LLVMContextCreate(); +-#if LLVM_VERSION_MAJOR >= 15 ++#if LLVM_VERSION_MAJOR == 15 + LLVMContextSetOpaquePointers(context, false); + #endif + gallivm = gallivm_create("test_module", context, NULL); +diff --git a/src/gallium/drivers/llvmpipe/lp_test_format.c b/src/gallium/drivers/llvmpipe/lp_test_format.c +index 0a2a1e449e8..89f7d5dec1a 100644 +--- a/src/gallium/drivers/llvmpipe/lp_test_format.c ++++ b/src/gallium/drivers/llvmpipe/lp_test_format.c +@@ -150,7 +150,7 @@ test_format_float(unsigned verbose, FILE *fp, + unsigned i, j, k, l; + + context = LLVMContextCreate(); +-#if LLVM_VERSION_MAJOR >= 15 ++#if LLVM_VERSION_MAJOR == 15 + LLVMContextSetOpaquePointers(context, false); + #endif + gallivm = gallivm_create("test_module_float", context, NULL); +@@ -254,7 +254,7 @@ test_format_unorm8(unsigned verbose, FILE *fp, + unsigned i, j, k, l; + + context = LLVMContextCreate(); +-#if LLVM_VERSION_MAJOR >= 15 ++#if LLVM_VERSION_MAJOR == 15 + LLVMContextSetOpaquePointers(context, false); + #endif + gallivm = gallivm_create("test_module_unorm8", context, NULL); +diff --git a/src/gallium/drivers/llvmpipe/lp_test_printf.c b/src/gallium/drivers/llvmpipe/lp_test_printf.c +index b3de9cb9e8b..850c0abfe22 100644 +--- a/src/gallium/drivers/llvmpipe/lp_test_printf.c ++++ b/src/gallium/drivers/llvmpipe/lp_test_printf.c +@@ -96,7 +96,7 @@ test_printf(unsigned verbose, FILE *fp, + boolean success = TRUE; + + context = LLVMContextCreate(); +-#if LLVM_VERSION_MAJOR >= 15 ++#if LLVM_VERSION_MAJOR == 15 + LLVMContextSetOpaquePointers(context, false); + #endif + gallivm = gallivm_create("test_module", context, NULL); +-- +2.17.1 diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch new file mode 100644 index 00000000..f0775176 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch @@ -0,0 +1,43 @@ +From 8a5de0b6cf1090d7f29f3974ec79c32776cf2745 Mon Sep 17 00:00:00 2001 +From: Jami Kettunen <jami.kettunen@protonmail.com> +Date: Tue, 31 Aug 2021 00:15:58 +0300 +Subject: [PATCH] freedreno/pm4: Use unsigned instead of uint to fix musl build + +Upstream-Status: Backport + +Fixes the following error I noticed when building against aarch64 with +musl libc: + + In file included from ../src/freedreno/decode/crashdec.h:38, + from ../src/freedreno/decode/crashdec.c:40: + ../src/freedreno/common/freedreno_pm4.h:104:15: error: unknown type name 'uint' + 104 | static inline uint + | ^~~~ + ../src/freedreno/common/freedreno_pm4.h:105:25: error: unknown type name 'uint'; did you mean 'int'? + 105 | pm4_calc_odd_parity_bit(uint val) + | ^~~~ + | int + +Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com> +Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19665> +--- + src/freedreno/common/freedreno_pm4.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/freedreno/common/freedreno_pm4.h b/src/freedreno/common/freedreno_pm4.h +index 8f958953d693..091247e709a0 100644 +--- a/src/freedreno/common/freedreno_pm4.h ++++ b/src/freedreno/common/freedreno_pm4.h +@@ -105,8 +105,8 @@ pm4_pkt7_hdr(uint8_t opcode, uint16_t cnt) + #define cp_type3_opcode(pkt) (((pkt) >> 8) & 0xFF) + #define type3_pkt_size(pkt) ((((pkt) >> 16) & 0x3FFF) + 1) + +-static inline uint +-pm4_calc_odd_parity_bit(uint val) ++static inline unsigned ++pm4_calc_odd_parity_bit(unsigned val) + { + return (0x9669 >> (0xf & ((val) ^ ((val) >> 4) ^ ((val) >> 8) ^ + ((val) >> 12) ^ ((val) >> 16) ^ ((val) >> 20) ^ +-- +2.39.2 diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch new file mode 100644 index 00000000..bdfe7bb8 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch @@ -0,0 +1,58 @@ +From 2dfe0f899aeb415a5491b8c67e208673d2a2914f Mon Sep 17 00:00:00 2001 +From: Ryan Eatmon <reatmon@ti.com> +Date: Fri, 22 Sep 2023 21:50:08 -0500 +Subject: [PATCH] gallium: Fix build with llvm 17 + +These headers are not available for C files in llvm 17+ +and they seem to be not needed to compile after all with llvm 17 +so add conditions to exclude them for llvm >= 17 + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21262] +Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22980] +Signed-off-by: Ryan Eatmon <reatmon@ti.com> +--- + src/gallium/auxiliary/gallivm/lp_bld_init.c | 8 ++++---- + src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 4 ++++ + 2 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c +index 584ea738668..fe8bb2b11af 100644 +--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c ++++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c +@@ -42,14 +42,14 @@ + + #include <llvm/Config/llvm-config.h> + #include <llvm-c/Analysis.h> +-#include <llvm-c/Transforms/Scalar.h> +-#if LLVM_VERSION_MAJOR >= 7 +-#include <llvm-c/Transforms/Utils.h> +-#endif + #include <llvm-c/BitWriter.h> + #if GALLIVM_USE_NEW_PASS == 1 + #include <llvm-c/Transforms/PassBuilder.h> + #elif GALLIVM_HAVE_CORO == 1 ++#include <llvm-c/Transforms/Scalar.h> ++#if LLVM_VERSION_MAJOR >= 7 ++#include <llvm-c/Transforms/Utils.h> ++#endif + #if LLVM_VERSION_MAJOR <= 8 && (defined(PIPE_ARCH_AARCH64) || defined (PIPE_ARCH_ARM) || defined(PIPE_ARCH_S390) || defined(PIPE_ARCH_MIPS64)) + #include <llvm-c/Transforms/IPO.h> + #endif +diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +index 2279e5acb28..0caeaf94263 100644 +--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp ++++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +@@ -56,7 +56,11 @@ + #include <llvm-c/ExecutionEngine.h> + #include <llvm/Target/TargetOptions.h> + #include <llvm/ExecutionEngine/ExecutionEngine.h> ++#if LLVM_VERSION_MAJOR >= 17 ++#include <llvm/TargetParser/Triple.h> ++#else + #include <llvm/ADT/Triple.h> ++#endif + #include <llvm/Analysis/TargetLibraryInfo.h> + #include <llvm/ExecutionEngine/SectionMemoryManager.h> + #include <llvm/Support/CommandLine.h> +-- +2.17.1 diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch new file mode 100644 index 00000000..289ff032 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch @@ -0,0 +1,64 @@ +From 25946100e21cf2095bea334e8d7096798561d0b7 Mon Sep 17 00:00:00 2001 +From: Vincent Davis Jr <vince@underview.tech> +Date: Wed, 28 Dec 2022 16:28:01 -0600 +Subject: [PATCH] gbm/backend: fix gbm compile without dri + +Upstream-Status: Backport + +https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20447 +https://gitlab.freedesktop.org/mesa/mesa/-/commit/842ca284650f066e58706741a7d22d67b5088e60 + +At mesa version 22.2.3 patch wasn't introduced until after. + +Commit introduces a fix that allows for gbm to be built with an empty +backend. There are situation especially in a Yocto/OE cross compilation +environment where you want to build with an empty backend. The particular +situation is as such: + +The mesa-gl recipe is the preferred provider for virtual/libgbm, virtual/libgl, +virtual/mesa, etc... But the x11 DISTRO_FEATURE in't included this leads to build +errors such as: + +| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o: in function `find_backend': +| backend.c:(.text.find_backend+0xa4): undefined reference to `gbm_dri_backend' +| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o:(.data.rel.ro.builtin_backends+0x4): + undefined reference to `gbm_dri_backend' +| collect2: error: ld returned 1 exit status + +Issue should be replicable by setting -Ddri3=disabled and -Dgbm=enabled + +Add fix to bypasses compilation issue by excluding gbm dri backend. If +HAVE_DRI || HAVE_DRIX not specified. + +Acked-by: David Heidelberg <david.heidelberg@collabora.com> +Signed-off-by: Vincent Davis Jr <vince@underview.tech> +--- + src/gbm/main/backend.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/gbm/main/backend.c b/src/gbm/main/backend.c +index 974d0a76a4e..feee0703495 100644 +--- a/src/gbm/main/backend.c ++++ b/src/gbm/main/backend.c +@@ -42,7 +42,9 @@ + #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0])) + #define VER_MIN(a, b) ((a) < (b) ? (a) : (b)) + ++#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3) + extern const struct gbm_backend gbm_dri_backend; ++#endif + + struct gbm_backend_desc { + const char *name; +@@ -51,7 +53,9 @@ struct gbm_backend_desc { + }; + + static const struct gbm_backend_desc builtin_backends[] = { ++#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3) + { "dri", &gbm_dri_backend }, ++#endif + }; + + #define BACKEND_LIB_SUFFIX "_gbm" +-- +2.34.1 diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch new file mode 100644 index 00000000..35bd0ea1 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch @@ -0,0 +1,25 @@ +From 3ef37c63f03ad6f2af407de350486fdd25e9132a Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 13 Jan 2020 15:23:47 -0800 +Subject: [PATCH] meson misdetects 64bit atomics on mips/clang + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- + src/util/u_atomic.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/util/u_atomic.c b/src/util/u_atomic.c +index 5a5eab4..e499516 100644 +--- a/src/util/u_atomic.c ++++ b/src/util/u_atomic.c +@@ -21,7 +21,7 @@ + * IN THE SOFTWARE. + */ + +-#if defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD) ++#if !defined(__clang__) && defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD) + + #include <stdint.h> + #include <pthread.h> diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch new file mode 100644 index 00000000..f0c1de46 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch @@ -0,0 +1,43 @@ +From 3b4d6b89f644b43e507c08181fef06db4326f9da Mon Sep 17 00:00:00 2001 +From: Alistair Francis <alistair@alistair23.me> +Date: Thu, 14 Nov 2019 13:04:49 -0800 +Subject: [PATCH] meson.build: check for all linux host_os combinations + +Make sure that we are also looking for our host_os combinations like +linux-musl etc. when assuming support for DRM/KMS. + +Also delete a duplicate line. + +Upstream-Status: Pending + +Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> +Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> +Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> +Signed-off-by: Alistair Francis <alistair@alistair23.me> + +--- + meson.build | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index 172c64a..9b5294c 100644 +--- a/meson.build ++++ b/meson.build +@@ -173,7 +173,7 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2 + # Only build shared_glapi if at least one OpenGL API is enabled + with_shared_glapi = with_shared_glapi and with_any_opengl + +-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android'].contains(host_machine.system()) ++system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android'].contains(host_machine.system()) or host_machine.system().startswith('linux') + + with_freedreno_kgsl = get_option('freedreno-kgsl') + if with_freedreno_kgsl +@@ -1076,7 +1076,7 @@ if cc.has_function('reallocarray') + endif + + # TODO: this is very incomplete +-if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku', 'android'].contains(host_machine.system()) ++if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku'].contains(host_machine.system()) or host_machine.system().startswith('linux') + pre_args += '-D_GNU_SOURCE' + elif host_machine.system() == 'sunos' + pre_args += '-D__EXTENSIONS__' diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch new file mode 100644 index 00000000..6eea5ed8 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch @@ -0,0 +1,47 @@ +From f17e836ef9b1bbc6056790596420b699e48128c2 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 2 Dec 2021 19:57:42 -0800 +Subject: [PATCH] util/format: Check for NEON before using it + +This fixes build on rpi0-w and any other machine which does not have +neon unit and is not used as FPU unit + +Fixes errors e.g. + +In file included from ../mesa-21.3.0/src/util/format/u_format_unpack_neon.c:35: +/mnt/b/yoe/master/build/tmp/work/arm1176jzfshf-vfp-yoe-linux-gnueabi/mesa/2_21.3.0-r0/recipe-sysroot-native/usr/lib/clang/13.0.1/include/arm_neon.h:32:2: error: "NEON support not enabled" + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14032] +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- + src/util/format/u_format.c | 2 +- + src/util/format/u_format_unpack_neon.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/util/format/u_format.c b/src/util/format/u_format.c +index c071250..0880984 100644 +--- a/src/util/format/u_format.c ++++ b/src/util/format/u_format.c +@@ -1184,7 +1184,7 @@ static void + util_format_unpack_table_init(void) + { + for (enum pipe_format format = PIPE_FORMAT_NONE; format < PIPE_FORMAT_COUNT; format++) { +-#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__) ++#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM) + const struct util_format_unpack_description *unpack = util_format_unpack_description_neon(format); + if (unpack) { + util_format_unpack_table[format] = unpack; +diff --git a/src/util/format/u_format_unpack_neon.c b/src/util/format/u_format_unpack_neon.c +index a4a5cb1..1e4f794 100644 +--- a/src/util/format/u_format_unpack_neon.c ++++ b/src/util/format/u_format_unpack_neon.c +@@ -23,7 +23,7 @@ + + #include <u_format.h> + +-#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__) ++#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM) + + /* armhf builds default to vfp, not neon, and refuses to compile neon intrinsics + * unless you tell it "no really". diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-gallium-Fix-build-with-llvm-17.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-gallium-Fix-build-with-llvm-17.patch new file mode 100644 index 00000000..738ff267 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-gallium-Fix-build-with-llvm-17.patch @@ -0,0 +1,40 @@ +From 6d07f6aa7f92f40d78a2db645f16f0f3e7d3c2e8 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 23 Jun 2023 01:20:38 -0700 +Subject: [PATCH] gallium: Fix build with llvm 17 + +These headers are not available for C files in llvm 17+ +and they seem to be not needed to compile after all with llvm 17 +so add conditions to exclude them for llvm >= 17 + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23827] +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- + src/gallium/auxiliary/gallivm/lp_bld_init.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c +index cd2108f..b1a4d03 100644 +--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c ++++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c +@@ -46,15 +46,19 @@ + #if GALLIVM_USE_NEW_PASS == 1 + #include <llvm-c/Transforms/PassBuilder.h> + #elif GALLIVM_HAVE_CORO == 1 ++#if LLVM_VERSION_MAJOR < 17 + #include <llvm-c/Transforms/Scalar.h> +-#if LLVM_VERSION_MAJOR >= 7 ++#endif ++#if LLVM_VERSION_MAJOR >= 7 && LLVM_VERSION_MAJOR < 17 + #include <llvm-c/Transforms/Utils.h> + #endif + #if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64) + #include <llvm-c/Transforms/IPO.h> + #endif ++#if LLVM_VERSION_MAJOR < 17 + #include <llvm-c/Transforms/Coroutines.h> + #endif ++#endif + + unsigned gallivm_perf = 0; diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson-Disable-cmake-dependency-detector-for-llvm.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson-Disable-cmake-dependency-detector-for-llvm.patch new file mode 100644 index 00000000..4cded054 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson-Disable-cmake-dependency-detector-for-llvm.patch @@ -0,0 +1,42 @@ +From 00d41cd5aa3f4b494dc276c9b4ccdc096310c91f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 28 Sep 2023 15:34:22 -0700 +Subject: [PATCH] meson: use llvm-config instead of cmake to fix linking errors with meson 1.2.1 + +meson dependency auto dependency detection uses cmake and then +config-tool to process dependencies, in mesa the logic to detect llvm is +using auto detection which means if it finds cmake then it will try to +use cmake method. Cmake method works ok except a case when llvm-dev +package is installed on the build host then it generates its own +native.meson file and ignores OE supplied meson.native file which has +correct llvm-config tool specified which is pointing to llvm-config from +native sysroot. The generated meson.native file points to one found in +/usr/bin and there onwards detector finds native install of llvm and +configures that into building native mesa package. + +Since cmake detector does not always work, disable it by default and use +config-tool which works in all cases. This is suggested in below issues +too + +A similar issue is open in meson upstream [1] and mesa [2] + +[1] https://github.com/mesonbuild/meson/issues/10483 +[2] https://gitlab.freedesktop.org/mesa/mesa/-/issues/6738 + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25438] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + meson.build | 1 + + 1 file changed, 1 insertion(+) + +--- a/meson.build ++++ b/meson.build +@@ -1659,6 +1659,7 @@ with_llvm = false + if _llvm.allowed() + dep_llvm = dependency( + 'llvm', ++ method : host_machine.system() == 'windows' ? 'auto' : 'config-tool', + version : _llvm_version, + modules : llvm_modules, + optional_modules : llvm_optional_modules, diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch new file mode 100644 index 00000000..35bd0ea1 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch @@ -0,0 +1,25 @@ +From 3ef37c63f03ad6f2af407de350486fdd25e9132a Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 13 Jan 2020 15:23:47 -0800 +Subject: [PATCH] meson misdetects 64bit atomics on mips/clang + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- + src/util/u_atomic.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/util/u_atomic.c b/src/util/u_atomic.c +index 5a5eab4..e499516 100644 +--- a/src/util/u_atomic.c ++++ b/src/util/u_atomic.c +@@ -21,7 +21,7 @@ + * IN THE SOFTWARE. + */ + +-#if defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD) ++#if !defined(__clang__) && defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD) + + #include <stdint.h> + #include <pthread.h> diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson.build-check-for-all-linux-host_os-combinations.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson.build-check-for-all-linux-host_os-combinations.patch new file mode 100644 index 00000000..e9a6fd3f --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson.build-check-for-all-linux-host_os-combinations.patch @@ -0,0 +1,43 @@ +From b251af67df5a6840d2e9cc06edae2c387f8778f1 Mon Sep 17 00:00:00 2001 +From: Alistair Francis <alistair@alistair23.me> +Date: Thu, 14 Nov 2019 13:04:49 -0800 +Subject: [PATCH] meson.build: check for all linux host_os combinations + +Make sure that we are also looking for our host_os combinations like +linux-musl etc. when assuming support for DRM/KMS. + +Also delete a duplicate line. + +Upstream-Status: Pending + +Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> +Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> +Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> +Signed-off-by: Alistair Francis <alistair@alistair23.me> + +--- + meson.build | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index 22385d8..15f48a6 100644 +--- a/meson.build ++++ b/meson.build +@@ -121,7 +121,7 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2 + # Only build shared_glapi if at least one OpenGL API is enabled + with_shared_glapi = with_shared_glapi and with_any_opengl + +-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android'].contains(host_machine.system()) ++system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android'].contains(host_machine.system()) or host_machine.system().startswith('linux') + + gallium_drivers = get_option('gallium-drivers') + if gallium_drivers.contains('auto') +@@ -909,7 +909,7 @@ if cc.has_function('fmemopen') + endif + + # TODO: this is very incomplete +-if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku', 'android'].contains(host_machine.system()) ++if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku'].contains(host_machine.system()) or host_machine.system().startswith('linux') + pre_args += '-D_GNU_SOURCE' + elif host_machine.system() == 'sunos' + pre_args += '-D__EXTENSIONS__' diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb new file mode 100644 index 00000000..5abd0793 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb @@ -0,0 +1,59 @@ +# PowerVR Graphics require several patches that have not made their way +# upstream yet. This allows us to build the shims we need without completely +# clobbering mesa. + +require recipes-graphics/mesa/mesa.inc + +SUMMARY += " (with PowerVR support for TI platforms)" + +LIC_FILES_CHKSUM = "file://docs/license.rst;md5=63779ec98d78d823a9dc533a0735ef10" + +BRANCH = "powervr/kirkstone/${PV}" + +SRC_URI = " \ + git://gitlab.freedesktop.org/StaticRocket/mesa.git;protocol=https;branch=${BRANCH} \ + file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \ + file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ + file://0001-util-format-Check-for-NEON-before-using-it.patch \ + file://0001-gbm-backend-fix-gbm-compile-without-dri.patch \ + file://0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch \ + file://0001-gallium-Fix-build-with-llvm-17.patch \ + file://0001-fix-gallivm-limit-usage-of-LLVMContextSetOpaquePoint.patch \ +" + +S = "${WORKDIR}/git" + +PACKAGECONFIG:append = " \ + ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver', 'pvr', '', d)} \ + ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-sgx-ddk-km', 'sgx', '', d)} \ +" + +SRCREV = "1be98ba80452ebe38546a7fca26b5a70f2629083" + +PVR_DISPLAY_CONTROLLER_ALIAS ??= "tidss" +PACKAGECONFIG[pvr] = "-Dgallium-pvr-alias=${PVR_DISPLAY_CONTROLLER_ALIAS}," +PACKAGECONFIG[sgx] = "-Dgallium-sgx-alias=${PVR_DISPLAY_CONTROLLER_ALIAS}," + +PACKAGECONFIG:remove = "video-codecs" +PACKAGECONFIG[video-codecs] = "" +PACKAGECONFIG:remove = "elf-tls" +PACKAGECONFIG[elf-tls] = "" +PACKAGECONFIG:remove = "xvmc" +PACKAGECONFIG[xvmc] = "" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}" +GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'sgx', ',sgx', '', d)}" + +VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}" + +do_install:append () { + # remove pvr custom pkgconfig + rm -rf ${D}${datadir}/pkgconfig +} + +FILES:${PN}-dev += "${datadir}/mesa/wayland-drm.xml" +FILES:mesa-vulkan-drivers += "${libdir}/libpvr_mesa_wsi.so" + +RRECOMMENDS:mesa-megadriver:append:class-target = " ${@d.getVar('PREFERRED_PROVIDER_virtual/gpudriver')}" diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_23.2.1.bb b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_23.2.1.bb new file mode 100644 index 00000000..1e66acd2 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_23.2.1.bb @@ -0,0 +1,58 @@ +# PowerVR Graphics require several patches that have not made their way +# upstream yet. This allows us to build the shims we need without completely +# clobbering mesa. + +DEFAULT_PREFERENCE = "-1" + +require recipes-graphics/mesa/mesa.inc + +SUMMARY += " (with PowerVR support for TI platforms)" + +LIC_FILES_CHKSUM = "file://docs/license.rst;md5=63779ec98d78d823a9dc533a0735ef10" + +BRANCH = "powervr/${PV}" + +SRC_URI = " \ + git://gitlab.freedesktop.org/StaticRocket/mesa.git;protocol=https;branch=${BRANCH} \ + file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \ + file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ + file://0001-gallium-Fix-build-with-llvm-17.patch \ + file://0001-meson-Disable-cmake-dependency-detector-for-llvm.patch \ +" + +S = "${WORKDIR}/git" + +PACKAGECONFIG:append = " \ + ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver', 'pvr', '', d)} \ + ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-sgx-ddk-km', 'sgx', '', d)} \ +" + +SRCREV = "b12290126ba6a154f0e8b0a8c8b2b0d64f98e427" + +PVR_DISPLAY_CONTROLLER_ALIAS ??= "tidss" +PACKAGECONFIG[pvr] = "-Dgallium-pvr-alias=${PVR_DISPLAY_CONTROLLER_ALIAS}," +PACKAGECONFIG[sgx] = "-Dgallium-sgx-alias=${PVR_DISPLAY_CONTROLLER_ALIAS}," + +PACKAGECONFIG:remove = "video-codecs" +PACKAGECONFIG[video-codecs] = "" +PACKAGECONFIG:remove = "elf-tls" +PACKAGECONFIG[elf-tls] = "" +PACKAGECONFIG:remove = "xvmc" +PACKAGECONFIG[xvmc] = "" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}" +GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'sgx', ',sgx', '', d)}" + +VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}" + +do_install:append () { + # remove pvr custom pkgconfig + rm -rf ${D}${datadir}/pkgconfig +} + +FILES:${PN}-dev += "${datadir}/mesa/wayland-drm.xml" +FILES:mesa-vulkan-drivers += "${libdir}/libpvr_mesa_wsi.so" + +RRECOMMENDS:mesa-megadriver:append:class-target = " ${@d.getVar('PREFERRED_PROVIDER_virtual/gpudriver')}" diff --git a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.3.6512818.bb b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.3.6512818.bb new file mode 100644 index 00000000..a0a9a295 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.3.6512818.bb @@ -0,0 +1,145 @@ +DESCRIPTION = "Userspace libraries for PowerVR Rogue GPU on TI SoCs" +HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-umlibs" +LICENSE = "TI-TFL" +LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f" + +inherit bin_package + +INHIBIT_DEFAULT_DEPS = "" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx|am62pxx|j722s" + +PR = "r3" + +BRANCH = "linuxws/scarthgap/k6.6/${PV}" +SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}" +SRCREV = "0b9e64254269be2fa95c4f3e1dd925d6e4d58199" +S = "${WORKDIR}/git/targetfs/${TARGET_PRODUCT}/${PVR_WS}/${PVR_BUILD}" + +TARGET_PRODUCT:j721e = "j721e_linux" +TARGET_PRODUCT:j721s2 = "j721s2_linux" +TARGET_PRODUCT:j784s4 = "j784s4_linux" +TARGET_PRODUCT:am62xx = "am62_linux" +TARGET_PRODUCT:am62pxx = "am62p_linux" +TARGET_PRODUCT:j722s = "j722s_linux" +PVR_BUILD = "release" +PVR_WS = "lws-generic" + +RDEPENDS:${PN} = " \ + libdrm \ + ti-img-rogue-driver \ + ${PN}-firmware \ +" + +PACKAGECONFIG ?= " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan wayland', 'vulkan', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'opengl opencl', d)} \ +" + +PACKAGECONFIG[opengl] = ",,,,${GLES_PACKAGES}" +PACKAGECONFIG[vulkan] = ",,,,${VULKAN_PACKAGES}" +PACKAGECONFIG[opencl] = ",,,,${OPENCL_PACKAGES}" + +def get_file_list(package_list_var, d): + file_list = [] + package_list = d.getVar(package_list_var) + prefix = f"{d.getVar('S')}/" + if package_list: + for package in package_list.split(): + package_file_string = d.getVar(f"FILES:{package}") + if package_file_string: + for package_file in package_file_string.split(): + file_list.append(f"{prefix}{package_file}") + return " ".join(file_list) + +do_install:prepend() { + if ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'false', 'true', d)}; then + for file in ${@get_file_list('GLES_PACKAGES', d)}; do + rm -rf ${file} + done + fi + if ${@bb.utils.contains('PACKAGECONFIG', 'vulkan', 'false', 'true', d)}; then + for file in ${@get_file_list('VULKAN_PACKAGES', d)}; do + rm -rf ${file} + done + fi + if ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'false', 'true', d)}; then + for file in ${@get_file_list('OPENCL_PACKAGES', d)}; do + rm -rf ${file} + done + fi + if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then + if [ -e ${S}/lib/firmware ]; then + mv ${S}/lib/firmware ${S}${nonarch_base_libdir} + fi + fi + + # clean up any empty directories + find "${S}" -empty -type d -delete +} + +GLES_PACKAGES = "libgles1-rogue libgles2-rogue libgles3-rogue" +VULKAN_PACKAGES = "libvk-rogue" +OPENCL_PACKAGES = "libopencl-rogue libopencl-rogue-tools" + +PACKAGES = " \ + ${@bb.utils.contains('PACKAGECONFIG', 'opengl', d.getVar('GLES_PACKAGES'), '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'vulkan', d.getVar('VULKAN_PACKAGES'), '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'opencl', d.getVar('OPENCL_PACKAGES'), '', d)} \ + ${PN}-tools \ + ${PN}-firmware \ + ${PN} \ +" + +# Inject variables so that packages don't get Debian-renamed (which would +# remove the -rogue suffix), but don't RPROVIDEs/RCONFLICTs on the generic +# libgl name to prevent colliding with swrast libs +python __anonymous() { + suffix = "" + if "-native" in d.getVar("PN"): + suffix = "-native" + for p in (("vulkan", "libvk",), + ("gles", "libgles1", "libglesv1-cm1"), + ("gles", "libgles2", "libglesv2-2"), + ("gles", "libgles3",), + ("opencl", "libopencl",)): + mlprefix = d.getVar("MLPREFIX") + fullp = mlprefix + p[1] + "-rogue" + suffix + mlprefix = d.getVar("MLPREFIX") + pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:]) + d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1") + d.setVar("INSANE_SKIP:" + fullp, "dev-so") + d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}ti-img-rogue-umlibs" + suffix) +} + +# gles specific shared objects +FILES:libgles1-rogue = "${libdir}/libGLESv1*.so*" +FILES:libgles2-rogue = "${libdir}/libGLESv2*.so*" +RDEPENDS:libgles1-rogue += "mesa-megadriver" +RDEPENDS:libgles2-rogue += "mesa-megadriver" + +# vulkan specific shared objects and configs +FILES:libvk-rogue = "${libdir}/libVK_IMG.so* ${datadir}/vulkan" +RDEPENDS:libvk-rogue += "vulkan-loader wayland libdrm" + +# opencl specific shared objects and configs +FILES:libopencl-rogue = "${libdir}/libPVROCL.so* ${sysconfdir}/OpenCL" +RDEPENDS:libopencl-rogue += "opencl-icd-loader" +RRECOMMENDS:libopencl-rogue += "libopencl-rogue-tools" +FILES:libopencl-rogue-tools += "${bindir}/ocl*" +DEBIAN_NOAUTONAME:libopencl-rogue-tools = "1" + +# optional tools and tests +FILES:${PN}-tools = "${bindir}/" +RDEPENDS:${PN}-tools = "python3-core ${PN}" + +# required firmware +FILES:${PN}-firmware = "${base_libdir}/firmware/*" +INSANE_SKIP:${PN}-firmware += "arch" + +RRECOMMENDS:${PN} += " \ + ${PN}-tools \ +" + +INSANE_SKIP:${PN} += "already-stripped dev-so" diff --git a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb new file mode 100644 index 00000000..d43d1635 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb @@ -0,0 +1,148 @@ +DESCRIPTION = "Userspace libraries for PowerVR Rogue GPU on TI SoCs" +HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-umlibs" +LICENSE = "TI-TFL" +LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f" + +DEFAULT_PREFERENCE = "-1" + +inherit bin_package + +INHIBIT_DEFAULT_DEPS = "" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx|am62pxx|j722s" + +PR = "r3" + +BRANCH = "linuxws/scarthgap/k6.6/${PV}" +SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}" +SRCREV = "e473234158c736248cf71a60080b7faf76fca561" +S = "${WORKDIR}/git/targetfs/${TARGET_PRODUCT}/${PVR_WS}/${PVR_BUILD}" + +TARGET_PRODUCT:j721e = "j721e_linux" +TARGET_PRODUCT:j721s2 = "j721s2_linux" +TARGET_PRODUCT:j784s4 = "j784s4_linux" +TARGET_PRODUCT:am62xx = "am62_linux" +TARGET_PRODUCT:am62pxx = "am62p_linux" +TARGET_PRODUCT:j722s = "j722s_linux" +PVR_BUILD = "release" +PVR_WS = "lws-generic" + +RDEPENDS:${PN} = " \ + libdrm \ + ti-img-rogue-driver \ + ${PN}-firmware \ +" + +PACKAGECONFIG ?= " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan wayland', 'vulkan', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'opengl opencl', d)} \ +" + +PACKAGECONFIG[opengl] = ",,,,${GLES_PACKAGES}" +PACKAGECONFIG[vulkan] = ",,,,${VULKAN_PACKAGES}" +PACKAGECONFIG[opencl] = ",,,,${OPENCL_PACKAGES}" + +def get_file_list(package_list_var, d): + file_list = [] + package_list = d.getVar(package_list_var) + prefix = f"{d.getVar('S')}/" + if package_list: + for package in package_list.split(): + package_file_string = d.getVar(f"FILES:{package}") + if package_file_string: + for package_file in package_file_string.split(): + file_list.append(f"{prefix}{package_file}") + return " ".join(file_list) + +do_install:prepend() { + if ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'false', 'true', d)}; then + for file in ${@get_file_list('GLES_PACKAGES', d)}; do + rm -rf ${file} + done + fi + if ${@bb.utils.contains('PACKAGECONFIG', 'vulkan', 'false', 'true', d)}; then + for file in ${@get_file_list('VULKAN_PACKAGES', d)}; do + rm -rf ${file} + done + fi + if ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'false', 'true', d)}; then + for file in ${@get_file_list('OPENCL_PACKAGES', d)}; do + rm -rf ${file} + done + fi + if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then + if [ -e ${S}/lib/firmware ]; then + mv ${S}/lib/firmware ${S}${nonarch_base_libdir} + fi + fi + + # clean up any empty directories + find "${S}" -empty -type d -delete +} + +GLES_PACKAGES = "libgles1-rogue libgles2-rogue libgles3-rogue" +VULKAN_PACKAGES = "libvk-rogue" +OPENCL_PACKAGES = "libopencl-rogue libopencl-rogue-tools" + +PACKAGES = " \ + ${@bb.utils.contains('PACKAGECONFIG', 'opengl', d.getVar('GLES_PACKAGES'), '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'vulkan', d.getVar('VULKAN_PACKAGES'), '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'opencl', d.getVar('OPENCL_PACKAGES'), '', d)} \ + ${PN}-tools \ + ${PN}-firmware \ + ${PN} \ +" + +# Inject variables so that packages don't get Debian-renamed (which would +# remove the -rogue suffix), but don't RPROVIDEs/RCONFLICTs on the generic +# libgl name to prevent colliding with swrast libs +python __anonymous() { + suffix = "" + if "-native" in d.getVar("PN"): + suffix = "-native" + for p in (("vulkan", "libvk",), + ("gles", "libgles1", "libglesv1-cm1"), + ("gles", "libgles2", "libglesv2-2"), + ("gles", "libgles3",), + ("opencl", "libopencl",)): + mlprefix = d.getVar("MLPREFIX") + fullp = mlprefix + p[1] + "-rogue" + suffix + mlprefix = d.getVar("MLPREFIX") + pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:]) + d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1") + d.setVar("INSANE_SKIP:" + fullp, "dev-so ldflags") + d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}ti-img-rogue-umlibs" + suffix) +} + +# gles specific shared objects +FILES:libgles1-rogue = "${libdir}/libGLESv1*.so*" +FILES:libgles2-rogue = "${libdir}/libGLESv2*.so*" +RDEPENDS:libgles1-rogue += "mesa-megadriver" +RDEPENDS:libgles2-rogue += "mesa-megadriver" + +# vulkan specific shared objects and configs +FILES:libvk-rogue = "${libdir}/libVK_IMG.so* ${datadir}/vulkan" +RDEPENDS:libvk-rogue += "vulkan-loader wayland libdrm" + +# opencl specific shared objects and configs +FILES:libopencl-rogue = "${libdir}/libPVROCL.so* ${sysconfdir}/OpenCL" +RDEPENDS:libopencl-rogue += "opencl-icd-loader" +RRECOMMENDS:libopencl-rogue += "libopencl-rogue-tools" +FILES:libopencl-rogue-tools += "${bindir}/ocl*" +DEBIAN_NOAUTONAME:libopencl-rogue-tools = "1" + +# optional tools and tests +FILES:${PN}-tools = "${bindir}/" +RDEPENDS:${PN}-tools = "python3-core libdrm ${PN}" +INSANE_SKIP:${PN}-tools = "ldflags" + +# required firmware +FILES:${PN}-firmware = "${base_libdir}/firmware/*" +INSANE_SKIP:${PN}-firmware += "arch" + +RRECOMMENDS:${PN} += " \ + ${PN}-tools \ +" + +INSANE_SKIP:${PN} += "already-stripped dev-so ldflags" diff --git a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-sgx-ddk-um_1.17.4948957.bb b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-sgx-ddk-um_1.17.4948957.bb new file mode 100644 index 00000000..d2565318 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-sgx-ddk-um_1.17.4948957.bb @@ -0,0 +1,58 @@ +DESCRIPTION = "Userspace libraries for PowerVR SGX chipset on TI SoCs" +HOMEPAGE = "https://git.ti.com/graphics/omap5-sgx-ddk-um-linux" +LICENSE = "TI-TSPA" +LIC_FILES_CHKSUM = "file://LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|am65xx" + +PR = "r38" + +BRANCH = "${PV}/mesa/glibc-2.35" + +SRC_URI = " \ + git://git.ti.com/git/graphics/omap5-sgx-ddk-um-linux.git;protocol=https;branch=${BRANCH} \ +" +SRCREV = "70364424dd496833fad5b243c9e6cc8b077f04ac" + +INITSCRIPT_NAME = "rc.pvr" +INITSCRIPT_PARAMS = "defaults 8" + +PACKAGECONFIG ??= "udev" +PACKAGECONFIG[udev] = "UDEV=true,,,udev" + +def use_sysvinit(d): + return d.getVar('VIRTUAL-RUNTIME_init_manager') == 'sysvinit' + +inherit ${@oe.utils.ifelse(use_sysvinit(d), 'update-rc.d', '')} + +TARGET_PRODUCT:ti33x = "ti335x_linux" +TARGET_PRODUCT:ti43x = "ti437x_linux" +TARGET_PRODUCT:omap-a15 = "ti572x_linux" +TARGET_PRODUCT:am65xx = "ti654x_linux" + +RDEPENDS:${PN} += "libdrm" + +RRECOMMENDS:${PN} += "ti-sgx-ddk-km" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE += "DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT} ${PACKAGECONFIG_CONFARGS}" + +do_install() { + oe_runmake install +} + +FILES:${PN} = "${bindir}/*" +FILES:${PN} += " ${libdir}/*" +FILES:${PN} += "${includedir}/*" +FILES:${PN} += "${sysconfdir}/*" +FILES:${PN} += "${datadir}/*" +FILES:${PN} += "${nonarch_base_libdir}/udev/rules.d" +FILES:${PN} += "${nonarch_base_libdir}/systemd/system" + +# No debug or dev packages for this recipe +PACKAGES = "${PN}" + +INSANE_SKIP:${PN} += "ldflags" +INSANE_SKIP:${PN} += "already-stripped dev-so" diff --git a/meta-ti-bsp/recipes-kernel/linux/files/0001-gcc-plugins-Fix-build-for-upcoming-GCC-release.patch b/meta-ti-bsp/recipes-kernel/linux/files/0001-gcc-plugins-Fix-build-for-upcoming-GCC-release.patch new file mode 100644 index 00000000..3dfa31a1 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/files/0001-gcc-plugins-Fix-build-for-upcoming-GCC-release.patch @@ -0,0 +1,46 @@ +From 3cd29a3d7c25cca9989e7d8966141f725fa99c68 Mon Sep 17 00:00:00 2001 +From: Palmer Dabbelt <palmer@rivosinc.com> +Date: Fri, 13 Jan 2023 09:30:33 -0800 +Subject: [PATCH] gcc-plugins: Fix build for upcoming GCC release + +The upcoming GCC release has refactored the gimple plugin interface a +bit and unless gimple-iterator.h is included before gimple-fold.h I end +up with a bunch of missing declarations when building the stack +protector plugin. + +Upstream-Status: Backport [https://lore.kernel.org/all/20230113173033.4380-1-palmer@rivosinc.com/] +Reported-by: Palmer Dabbelt <palmer@rivosinc.com> +Acked-by: Palmer Dabbelt <palmer@rivosinc.com> +Link: https://lore.kernel.org/all/20230113173033.4380-1-palmer@rivosinc.com/ +Cc: linux-hardening@vger.kernel.org +Signed-off-by: Kees Cook <keescook@chromium.org> +--- + scripts/gcc-plugins/gcc-common.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/scripts/gcc-plugins/gcc-common.h ++++ b/scripts/gcc-plugins/gcc-common.h +@@ -108,7 +108,9 @@ + #include "varasm.h" + #include "stor-layout.h" + #include "internal-fn.h" ++#include "gimple.h" + #include "gimple-expr.h" ++#include "gimple-iterator.h" + #include "gimple-fold.h" + #include "context.h" + #include "tree-ssa-alias.h" +@@ -124,13 +126,10 @@ + #include "gimplify.h" + #endif + +-#include "gimple.h" +- + #if BUILDING_GCC_VERSION >= 4009 + #include "tree-ssa-operands.h" + #include "tree-phinodes.h" + #include "tree-cfg.h" +-#include "gimple-iterator.h" + #include "gimple-ssa.h" + #include "ssa-iterators.h" + #endif diff --git a/meta-ti-bsp/recipes-kernel/linux/files/configs/empty b/meta-ti-bsp/recipes-kernel/linux/files/configs/empty new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/files/configs/empty diff --git a/meta-ti-bsp/recipes-kernel/linux/files/init_disassemble_info-signature-changes-causes-compile-failures.patch b/meta-ti-bsp/recipes-kernel/linux/files/init_disassemble_info-signature-changes-causes-compile-failures.patch new file mode 100644 index 00000000..e1e04c34 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/files/init_disassemble_info-signature-changes-causes-compile-failures.patch @@ -0,0 +1,111 @@ + +Adaption of a patch [A] applied to meta-arm for the kernel. But since TI has it's own +kernel we have to "adjust" the patch to match our files. + +[A] https://patchwork.yoctoproject.org/project/arm/patch/20220824025819.4888-1-jon.mason@arm.com/#5104 + +Upstream-Status: Pending + +Signed-off-by: Ryan Eatmon <reatmon@ti.com> + + + +From 1b2013986271de39360cf79e62ed9b7d2cc59f9b Mon Sep 17 00:00:00 2001 +From: Andres Freund <andres@anarazel.de> +Date: Wed, 22 Jun 2022 11:19:18 -0700 +Subject: [PATCH] init_disassemble_info() signature changes causes compile + failures +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Hi, + +binutils changed the signature of init_disassemble_info(), which now causes +perf and bpftool to fail to compile (e.g. on debian unstable). + +Relevant binutils commit: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=60a3da00bd5407f07d64dff82a4dae98230dfaac + +util/annotate.c: In function ?symbol__disassemble_bpf?: +util/annotate.c:1765:9: error: too few arguments to function ?init_disassemble_info? + 1765 | init_disassemble_info(&info, s, + | ^~~~~~~~~~~~~~~~~~~~~ +In file included from util/annotate.c:1718: +/usr/include/dis-asm.h:472:13: note: declared here + 472 | extern void init_disassemble_info (struct disassemble_info *dinfo, void *stream, + | ^~~~~~~~~~~~~~~~~~~~~ + +with equivalent failures in + +tools/bpf/bpf_jit_disasm.c +tools/bpf/bpftool/jit_disasm.c + +The fix is easy enough, add a wrapper around fprintf() that conforms to the +new signature. + +However I assume the necessary feature test and wrapper should only be added +once? I don't know the kernel stuff well enough to choose the right structure +here. + +Attached is my local fix for perf. Obviously would need work to be a real +solution. + +Greetings, + +Andres Freund +--- + +binutils 2.39 changed the signature of init_disassemble_info(), +which now causes perf and bpftool to fail to compile. + +Relevant binutils commit: [1] + +There is a proper fix in development upstream[2]. +This is a work-around for older kernels. + +[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=60a3da00bd5407f07d64dff82a4dae98230dfaac +[2] https://patchwork.kernel.org/project/netdevbpf/cover/20220801013834.156015-1-andres@anarazel.de/ + +Upstream-Status: Pending +Signed-off-by: Anton Antonov <Anton.Antonov@arm.com> + + + tools/perf/util/annotate.c | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c +index 308189454788..6573d2b07548 100644 +--- a/tools/perf/util/annotate.c ++++ b/tools/perf/util/annotate.c +@@ -1685,6 +1685,18 @@ + #include <bfd.h> + #include <dis-asm.h> + ++static int fprintf_styled(void *, enum disassembler_style, const char* fmt, ...) ++{ ++ va_list args; ++ int r; ++ ++ va_start(args, fmt); ++ r = vprintf(fmt, args); ++ va_end(args); ++ ++ return r; ++} ++ + static int symbol__disassemble_bpf(struct symbol *sym, + struct annotate_args *args) + { +@@ -1727,7 +1739,8 @@ static int symbol__disassemble_bpf(struct symbol *sym, + goto out; + } + init_disassemble_info(&info, s, +- (fprintf_ftype) fprintf); ++ (fprintf_ftype) fprintf, ++ fprintf_styled); + + info.arch = bfd_get_arch(bfdf); + info.mach = bfd_get_mach(bfdf); +-- +2.17.1 + diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-bb.org/0001-blk-iocost-avoid-64-bit-division-in-ioc_timer_fn.patch b/meta-ti-bsp/recipes-kernel/linux/linux-bb.org/0001-blk-iocost-avoid-64-bit-division-in-ioc_timer_fn.patch new file mode 100644 index 00000000..a7806c22 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-bb.org/0001-blk-iocost-avoid-64-bit-division-in-ioc_timer_fn.patch @@ -0,0 +1,56 @@ +From 5f2779dfa7b8cc7dfd4a1b6586d86e0d193266f3 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann <arnd@arndb.de> +Date: Wed, 18 Jan 2023 09:07:01 +0100 +Subject: [PATCH] blk-iocost: avoid 64-bit division in ioc_timer_fn + +The behavior of 'enum' types has changed in gcc-13, so now the +UNBUSY_THR_PCT constant is interpreted as a 64-bit number because +it is defined as part of the same enum definition as some other +constants that do not fit within a 32-bit integer. This in turn +leads to some inefficient code on 32-bit architectures as well +as a link error: + +arm-linux-gnueabi/bin/arm-linux-gnueabi-ld: block/blk-iocost.o: in function `ioc_timer_fn': +blk-iocost.c:(.text+0x68e8): undefined reference to `__aeabi_uldivmod' +arm-linux-gnueabi-ld: blk-iocost.c:(.text+0x6908): undefined reference to `__aeabi_uldivmod' + +Split the enum definition to keep the 64-bit timing constants in +a separate enum type from those constants that can clearly fit +within a smaller type. + +Signed-off-by: Arnd Bergmann <arnd@arndb.de> +Acked-by: Tejun Heo <tj@kernel.org> +Link: https://lore.kernel.org/r/20230118080706.3303186-1-arnd@kernel.org +Signed-off-by: Jens Axboe <axboe@kernel.dk> +--- + block/blk-iocost.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/block/blk-iocost.c b/block/blk-iocost.c +index 6955605629e4..b691b6bb498f 100644 +--- a/block/blk-iocost.c ++++ b/block/blk-iocost.c +@@ -258,6 +258,11 @@ enum { + VRATE_MIN = VTIME_PER_USEC * VRATE_MIN_PPM / MILLION, + VRATE_CLAMP_ADJ_PCT = 4, + ++ /* switch iff the conditions are met for longer than this */ ++ AUTOP_CYCLE_NSEC = 10LLU * NSEC_PER_SEC, ++}; ++ ++enum { + /* if IOs end up waiting for requests, issue less */ + RQ_WAIT_BUSY_PCT = 5, + +@@ -296,9 +301,6 @@ enum { + /* don't let cmds which take a very long time pin lagging for too long */ + MAX_LAGGING_PERIODS = 10, + +- /* switch iff the conditions are met for longer than this */ +- AUTOP_CYCLE_NSEC = 10LLU * NSEC_PER_SEC, +- + /* + * Count IO size in 4k pages. The 12bit shift helps keeping + * size-proportional components of cost calculation in closer +-- +2.40.1 diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-bb.org/0001-block-blk-iocost-gcc13-keep-large-values-in-a-new-en.patch b/meta-ti-bsp/recipes-kernel/linux/linux-bb.org/0001-block-blk-iocost-gcc13-keep-large-values-in-a-new-en.patch new file mode 100644 index 00000000..f5d0f476 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-bb.org/0001-block-blk-iocost-gcc13-keep-large-values-in-a-new-en.patch @@ -0,0 +1,54 @@ +From ff1cc97b1f4c10db224f276d9615b22835b8c424 Mon Sep 17 00:00:00 2001 +From: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> +Date: Tue, 13 Dec 2022 13:08:26 +0100 +Subject: [PATCH] block/blk-iocost (gcc13): keep large values in a new enum + +Since gcc13, each member of an enum has the same type as the enum [1]. And +that is inherited from its members. Provided: + VTIME_PER_SEC_SHIFT = 37, + VTIME_PER_SEC = 1LLU << VTIME_PER_SEC_SHIFT, + ... + AUTOP_CYCLE_NSEC = 10LLU * NSEC_PER_SEC, +the named type is unsigned long. + +This generates warnings with gcc-13: + block/blk-iocost.c: In function 'ioc_weight_prfill': + block/blk-iocost.c:3037:37: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' + + block/blk-iocost.c: In function 'ioc_weight_show': + block/blk-iocost.c:3047:34: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' + +So split the anonymous enum with large values to a separate enum, so +that they don't affect other members. + +[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36113 + +Cc: Martin Liska <mliska@suse.cz> +Cc: Tejun Heo <tj@kernel.org> +Cc: Josef Bacik <josef@toxicpanda.com> +Cc: Jens Axboe <axboe@kernel.dk> +Cc: cgroups@vger.kernel.org +Cc: linux-block@vger.kernel.org +Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> +Link: https://lore.kernel.org/r/20221213120826.17446-1-jirislaby@kernel.org +Signed-off-by: Jens Axboe <axboe@kernel.dk> +--- + block/blk-iocost.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/block/blk-iocost.c b/block/blk-iocost.c +index d1bdc12deaa7..549ddc9e0c6f 100644 +--- a/block/blk-iocost.c ++++ b/block/blk-iocost.c +@@ -232,7 +232,9 @@ enum { + + /* 1/64k is granular enough and can easily be handled w/ u32 */ + WEIGHT_ONE = 1 << 16, ++}; + ++enum { + /* + * As vtime is used to calculate the cost of each IO, it needs to + * be fairly high precision. For example, it should be able to +-- +2.40.1 diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-bb.org/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-bb.org/defconfig new file mode 100644 index 00000000..a5de2e24 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-bb.org/defconfig @@ -0,0 +1 @@ +use-kernel-config=bb.org_defconfig diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-bb.org_git.bb b/meta-ti-bsp/recipes-kernel/linux/linux-bb.org_git.bb new file mode 100644 index 00000000..144028e5 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-bb.org_git.bb @@ -0,0 +1,35 @@ +SECTION = "kernel" +SUMMARY = "BeagleBoard.org Linux kernel" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" + +COMPATIBLE_MACHINE = "beagle.*" + +inherit kernel + +require recipes-kernel/linux/setup-defconfig.inc +require recipes-kernel/linux/ti-kernel.inc + +# BB.org hasn't switched to "vendored" DTB layout by default yet +KERNEL_DTBVENDORED = "0" + +DEPENDS += "gmp-native libmpc-native" + +KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT} ${EXTRA_DTC_ARGS}" + +S = "${WORKDIR}/git" + +# 6.1.69 version for 32-bit +SRCREV:armv7a = "a1f26a19581970f76220c68c438981796ce5b767" +PV:armv7a = "6.1.69+git" +BRANCH:armv7a = "v6.1.69-ti-r22" + +# 6.1.69 version for 64-bit +SRCREV:aarch64 = "bc76b5d278271f66a6faeb2d09cb09fc6c57dd3c" +PV:aarch64 = "6.1.69+git" +BRANCH:aarch64 = "v6.1.69-ti-arm64-r24" + +SRC_URI = " \ + git://github.com/beagleboard/linux.git;protocol=https;branch=${BRANCH} \ + file://defconfig \ +" diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-mainline_git.bb b/meta-ti-bsp/recipes-kernel/linux/linux-ti-mainline_git.bb new file mode 100644 index 00000000..5c495d46 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-mainline_git.bb @@ -0,0 +1,42 @@ +SECTION = "kernel" +SUMMARY = "Mainline Linux kernel for TI devices" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" + +inherit kernel + +require recipes-kernel/linux/ti-kernel.inc + +DEPENDS += "gmp-native libmpc-native" + +KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT} \ + ${EXTRA_DTC_ARGS}" + +S = "${WORKDIR}/git" + +# 6.6 Mainline version +SRCREV = "ffc253263a1375a65fa6c9f62a893e9767fbebfa" +PV = "6.6+git" + +# Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild +MACHINE_KERNEL_PR:append = "b" +PR = "${MACHINE_KERNEL_PR}" + +KERNEL_GIT_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git" +KERNEL_GIT_PROTOCOL = "https" +KERNEL_GIT_BRANCH = "master" +SRC_URI += " \ + ${KERNEL_GIT_URI};protocol=${KERNEL_GIT_PROTOCOL};branch=${KERNEL_GIT_BRANCH} \ +" + +DEFCONFIG_NAME = "multi_v7_defconfig" +DEFCONFIG_NAME:omapl138 = "davinci_all_defconfig" +DEFCONFIG_NAME:k3 = "defconfig" +KERNEL_CONFIG_COMMAND = "oe_runmake -C ${S} O=${B} ${DEFCONFIG_NAME}" + +do_shared_workdir:prepend() { + cd ${B} + echo >> Module.symvers +} + +FILES:${KERNEL_PACKAGE_NAME}-devicetree += "/${KERNEL_IMAGEDEST}/*.itb" diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-next_git.bb b/meta-ti-bsp/recipes-kernel/linux/linux-ti-next_git.bb new file mode 100644 index 00000000..f1a14ab1 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-next_git.bb @@ -0,0 +1,26 @@ +SECTION = "kernel" +SUMMARY = "Linux-next kernel for TI devices" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" + +inherit kernel + +require recipes-kernel/linux/ti-kernel.inc +include ${@ 'recipes-kernel/linux/ti-kernel-devicetree-prefix.inc' if d.getVar('KERNEL_DEVICETREE_PREFIX') else ''} + +DEPENDS += "gmp-native libmpc-native" + +KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT} ${EXTRA_DTC_ARGS}" + +S = "${WORKDIR}/git" + +# 6.6.0-rc3+ version +SRCREV = "6465e260f48790807eef06b583b38ca9789b6072" +PV = "6.6.0-rc3+git" + +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git;protocol=https;branch=master" + +DEFCONFIG_NAME = "multi_v7_defconfig" +DEFCONFIG_NAME:omapl138 = "davinci_all_defconfig" +DEFCONFIG_NAME:k3 = "defconfig" +KERNEL_CONFIG_COMMAND = "oe_runmake -C ${S} O=${B} ${DEFCONFIG_NAME}" diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.1/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.1/defconfig new file mode 100644 index 00000000..24b53cf7 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.1/defconfig @@ -0,0 +1,2 @@ +use-kernel-config=multi_v7_defconfig +config-fragment=kernel/configs/ti_multi_v7_prune.config diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.1/k3/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.1/k3/defconfig new file mode 100644 index 00000000..ef1d3efd --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.1/k3/defconfig @@ -0,0 +1,2 @@ +use-kernel-config=defconfig +config-fragment=kernel/configs/ti_arm64_prune.config diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.1/omapl138/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.1/omapl138/defconfig new file mode 100644 index 00000000..099493af --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.1/omapl138/defconfig @@ -0,0 +1 @@ +use-kernel-config=davinci_all_defconfig diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.1/ti33x/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.1/ti33x/defconfig new file mode 100644 index 00000000..e6a967e1 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.1/ti33x/defconfig @@ -0,0 +1,2 @@ +use-kernel-config=multi_v7_defconfig +config-fragment=kernel/configs/ti_multi_v7_prune.config kernel/configs/no_smp.config diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.1/ti43x/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.1/ti43x/defconfig new file mode 100644 index 00000000..e6a967e1 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.1/ti43x/defconfig @@ -0,0 +1,2 @@ +use-kernel-config=multi_v7_defconfig +config-fragment=kernel/configs/ti_multi_v7_prune.config kernel/configs/no_smp.config diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/defconfig new file mode 100644 index 00000000..24b53cf7 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/defconfig @@ -0,0 +1,2 @@ +use-kernel-config=multi_v7_defconfig +config-fragment=kernel/configs/ti_multi_v7_prune.config diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/k3/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/k3/defconfig new file mode 100644 index 00000000..ef1d3efd --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/k3/defconfig @@ -0,0 +1,2 @@ +use-kernel-config=defconfig +config-fragment=kernel/configs/ti_arm64_prune.config diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/omapl138/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/omapl138/defconfig new file mode 100644 index 00000000..099493af --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/omapl138/defconfig @@ -0,0 +1 @@ +use-kernel-config=davinci_all_defconfig diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/ti33x/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/ti33x/defconfig new file mode 100644 index 00000000..e6a967e1 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/ti33x/defconfig @@ -0,0 +1,2 @@ +use-kernel-config=multi_v7_defconfig +config-fragment=kernel/configs/ti_multi_v7_prune.config kernel/configs/no_smp.config diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/ti43x/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/ti43x/defconfig new file mode 100644 index 00000000..e6a967e1 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/ti43x/defconfig @@ -0,0 +1,2 @@ +use-kernel-config=multi_v7_defconfig +config-fragment=kernel/configs/ti_multi_v7_prune.config kernel/configs/no_smp.config diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.1/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.1/defconfig new file mode 100644 index 00000000..43089dc8 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.1/defconfig @@ -0,0 +1,2 @@ +use-kernel-config=multi_v7_defconfig +config-fragment=kernel/configs/ti_multi_v7_prune.config kernel/configs/ti_rt.config diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.1/k3/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.1/k3/defconfig new file mode 100644 index 00000000..47d78664 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.1/k3/defconfig @@ -0,0 +1,2 @@ +use-kernel-config=defconfig +config-fragment=kernel/configs/ti_arm64_prune.config kernel/configs/ti_rt.config diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.1/omapl138/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.1/omapl138/defconfig new file mode 100644 index 00000000..2c829c0b --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.1/omapl138/defconfig @@ -0,0 +1,2 @@ +use-kernel-config=davinci_all_defconfig +config-fragment=kernel/configs/ti_rt.config diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.1/ti33x/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.1/ti33x/defconfig new file mode 100644 index 00000000..5de2b229 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.1/ti33x/defconfig @@ -0,0 +1,2 @@ +use-kernel-config=multi_v7_defconfig +config-fragment=kernel/configs/ti_multi_v7_prune.config kernel/configs/ti_rt.config kernel/configs/no_smp.config diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.1/ti43x/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.1/ti43x/defconfig new file mode 100644 index 00000000..5de2b229 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.1/ti43x/defconfig @@ -0,0 +1,2 @@ +use-kernel-config=multi_v7_defconfig +config-fragment=kernel/configs/ti_multi_v7_prune.config kernel/configs/ti_rt.config kernel/configs/no_smp.config diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.6/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.6/defconfig new file mode 100644 index 00000000..43089dc8 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.6/defconfig @@ -0,0 +1,2 @@ +use-kernel-config=multi_v7_defconfig +config-fragment=kernel/configs/ti_multi_v7_prune.config kernel/configs/ti_rt.config diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.6/k3/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.6/k3/defconfig new file mode 100644 index 00000000..47d78664 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.6/k3/defconfig @@ -0,0 +1,2 @@ +use-kernel-config=defconfig +config-fragment=kernel/configs/ti_arm64_prune.config kernel/configs/ti_rt.config diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.6/omapl138/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.6/omapl138/defconfig new file mode 100644 index 00000000..2c829c0b --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.6/omapl138/defconfig @@ -0,0 +1,2 @@ +use-kernel-config=davinci_all_defconfig +config-fragment=kernel/configs/ti_rt.config diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.6/ti33x/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.6/ti33x/defconfig new file mode 100644 index 00000000..5de2b229 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.6/ti33x/defconfig @@ -0,0 +1,2 @@ +use-kernel-config=multi_v7_defconfig +config-fragment=kernel/configs/ti_multi_v7_prune.config kernel/configs/ti_rt.config kernel/configs/no_smp.config diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.6/ti43x/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.6/ti43x/defconfig new file mode 100644 index 00000000..5de2b229 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-6.6/ti43x/defconfig @@ -0,0 +1,2 @@ +use-kernel-config=multi_v7_defconfig +config-fragment=kernel/configs/ti_multi_v7_prune.config kernel/configs/ti_rt.config kernel/configs/no_smp.config diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb new file mode 100644 index 00000000..80277aac --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb @@ -0,0 +1,15 @@ +require linux-ti-staging_6.1.bb + +KERNEL_LOCALVERSION:append = "-rt" + +# Look in the generic major.minor directory for files +# This will have priority over generic non-rt path +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-6.1:" + +BRANCH = "ti-rt-linux-6.1.y" + +SRCREV = "96b0ebd82722d16e9ab646cd3a73080e6f790747" + +include ${@ 'recipes-kernel/linux/ti-extras-rt.inc' if d.getVar('TI_EXTRAS') else ''} + +PV = "6.1.83+git" diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.6.bb b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.6.bb new file mode 100644 index 00000000..bccd856c --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.6.bb @@ -0,0 +1,17 @@ +require linux-ti-staging_6.6.bb + +DEFAULT_PREFERENCE = "-1" + +KERNEL_LOCALVERSION:append = "-rt" + +# Look in the generic major.minor directory for files +# This will have priority over generic non-rt path +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-6.6:" + +BRANCH = "ti-rt-linux-6.6.y" + +SRCREV = "7cceac93947da35755935827cd675925400d0102" + +include ${@ 'recipes-kernel/linux/ti-extras-rt.inc' if d.getVar('TI_EXTRAS') else ''} + +PV = "6.6.25+git" diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-6.1/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-6.1/defconfig new file mode 100644 index 00000000..24b53cf7 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-6.1/defconfig @@ -0,0 +1,2 @@ +use-kernel-config=multi_v7_defconfig +config-fragment=kernel/configs/ti_multi_v7_prune.config diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-6.1/k3/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-6.1/k3/defconfig new file mode 100644 index 00000000..ef1d3efd --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-6.1/k3/defconfig @@ -0,0 +1,2 @@ +use-kernel-config=defconfig +config-fragment=kernel/configs/ti_arm64_prune.config diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-6.1/omapl138/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-6.1/omapl138/defconfig new file mode 100644 index 00000000..099493af --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-6.1/omapl138/defconfig @@ -0,0 +1 @@ +use-kernel-config=davinci_all_defconfig diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-6.6/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-6.6/defconfig new file mode 100644 index 00000000..24b53cf7 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-6.6/defconfig @@ -0,0 +1,2 @@ +use-kernel-config=multi_v7_defconfig +config-fragment=kernel/configs/ti_multi_v7_prune.config diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-6.6/k3/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-6.6/k3/defconfig new file mode 100644 index 00000000..ef1d3efd --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-6.6/k3/defconfig @@ -0,0 +1,2 @@ +use-kernel-config=defconfig +config-fragment=kernel/configs/ti_arm64_prune.config diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-6.6/omapl138/defconfig b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-6.6/omapl138/defconfig new file mode 100644 index 00000000..099493af --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-6.6/omapl138/defconfig @@ -0,0 +1 @@ +use-kernel-config=davinci_all_defconfig diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest_6.1.bb b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest_6.1.bb new file mode 100644 index 00000000..9c170e65 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest_6.1.bb @@ -0,0 +1,5 @@ +require linux-ti-staging_6.1.bb + +# Look in the generic major.minor directory for files +# This will have priority over generic non-rt path +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-6.1:" diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest_6.6.bb b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest_6.6.bb new file mode 100644 index 00000000..21090904 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest_6.6.bb @@ -0,0 +1,7 @@ +require linux-ti-staging_6.6.bb + +DEFAULT_PREFERENCE = "-1" + +# Look in the generic major.minor directory for files +# This will have priority over generic non-rt path +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-6.6:" diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_6.1.bb b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_6.1.bb new file mode 100644 index 00000000..51d0a6a5 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_6.1.bb @@ -0,0 +1,42 @@ +SECTION = "kernel" +SUMMARY = "Linux kernel for TI devices" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" + +inherit ti-secdev +inherit kernel + +require recipes-kernel/linux/setup-defconfig.inc +require recipes-kernel/linux/ti-kernel.inc +include ${@ 'recipes-kernel/linux/ti-kernel-devicetree-prefix.inc' if d.getVar('KERNEL_DEVICETREE_PREFIX') else ''} +include ${@ 'recipes-kernel/linux/ti-extras.inc' if d.getVar('TI_EXTRAS') else ''} + +DEPENDS += "gmp-native libmpc-native" + +# Look in the generic major.minor directory for files +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-6.1:" + +KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT} \ + ${EXTRA_DTC_ARGS}" + +S = "${WORKDIR}/git" + +BRANCH ?= "ti-linux-6.1.y" + +SRCREV ?= "c1c2f1971fbf6ddad93a8c94314fe8221e7aa6be" +PV = "6.1.83+git" + +# Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild +MACHINE_KERNEL_PR:append = "b" +PR = "${MACHINE_KERNEL_PR}" + +KERNEL_GIT_URI ?= "git://git.ti.com/git/ti-linux-kernel/ti-linux-kernel.git" +KERNEL_GIT_PROTOCOL = "https" +SRC_URI += "${KERNEL_GIT_URI};protocol=${KERNEL_GIT_PROTOCOL};branch=${BRANCH} \ + file://defconfig" + +# Special configuration for remoteproc/rpmsg IPC modules +module_conf_rpmsg_client_sample = "blacklist rpmsg_client_sample" +module_conf_ti_k3_r5_remoteproc = "softdep ti_k3_r5_remoteproc pre: virtio_rpmsg_bus" +module_conf_ti_k3_dsp_remoteproc = "softdep ti_k3_dsp_remoteproc pre: virtio_rpmsg_bus" +KERNEL_MODULE_PROBECONF += "rpmsg_client_sample ti_k3_r5_remoteproc ti_k3_dsp_remoteproc" diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_6.6.bb b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_6.6.bb new file mode 100644 index 00000000..14fabb81 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_6.6.bb @@ -0,0 +1,44 @@ +SECTION = "kernel" +SUMMARY = "Linux kernel for TI devices" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" + +inherit ti-secdev +inherit kernel + +DEFAULT_PREFERENCE = "-1" + +require recipes-kernel/linux/setup-defconfig.inc +require recipes-kernel/linux/ti-kernel.inc +include ${@ 'recipes-kernel/linux/ti-kernel-devicetree-prefix.inc' if d.getVar('KERNEL_DEVICETREE_PREFIX') else ''} +include ${@ 'recipes-kernel/linux/ti-extras.inc' if d.getVar('TI_EXTRAS') else ''} + +DEPENDS += "gmp-native libmpc-native" + +# Look in the generic major.minor directory for files +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-6.6:" + +KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT} \ + ${EXTRA_DTC_ARGS}" + +S = "${WORKDIR}/git" + +BRANCH ?= "ti-linux-6.6.y" + +SRCREV ?= "f7f73d9d344c89081db499a2968d9033d7cac45c" +PV = "6.6.25+git" + +# Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild +MACHINE_KERNEL_PR:append = "b" +PR = "${MACHINE_KERNEL_PR}" + +KERNEL_GIT_URI ?= "git://git.ti.com/git/ti-linux-kernel/ti-linux-kernel.git" +KERNEL_GIT_PROTOCOL = "https" +SRC_URI += "${KERNEL_GIT_URI};protocol=${KERNEL_GIT_PROTOCOL};branch=${BRANCH} \ + file://defconfig" + +# Special configuration for remoteproc/rpmsg IPC modules +module_conf_rpmsg_client_sample = "blacklist rpmsg_client_sample" +module_conf_ti_k3_r5_remoteproc = "softdep ti_k3_r5_remoteproc pre: virtio_rpmsg_bus" +module_conf_ti_k3_dsp_remoteproc = "softdep ti_k3_dsp_remoteproc pre: virtio_rpmsg_bus" +KERNEL_MODULE_PROBECONF += "rpmsg_client_sample ti_k3_r5_remoteproc ti_k3_dsp_remoteproc" diff --git a/meta-ti-bsp/recipes-kernel/linux/setup-defconfig.inc b/meta-ti-bsp/recipes-kernel/linux/setup-defconfig.inc new file mode 100644 index 00000000..213f6871 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/setup-defconfig.inc @@ -0,0 +1,84 @@ +KERNEL_LOCALVERSION = "-ti" + +# Check the defconfig file and see if it points to an in kernel +# defconfig that should be used, or if it is a complete config file +# Or if it points to a combined defconfig that lists both in kernel +# defconfig and associated config fragments. + +do_configure() { + # Always copy the defconfig file to .config to keep consistency + # between the case where there is a real config and the in kernel + # tree config + cp ${UNPACKDIR}/defconfig ${B}/.config + + scm_version=$(printf '%s%s' -g $(git -C ${S} rev-parse --verify HEAD 2>/dev/null | cut -c1-12)) + + echo ${scm_version} > ${B}/.scmversion + echo ${scm_version} > ${S}/.scmversion + + # Zero, when using "tisdk" configs, pass control to defconfig_builder + config=`cat ${B}/.config | grep use-tisdk-config | cut -d= -f2` + if [ -n "$config" ] + then + ${DEFCONFIG_BUILDER} -w ${S} -t $config + oe_runmake -C ${S} O=${B} "$config"_defconfig + else + # First, check if pointing to a combined config with config fragments + config=`cat ${B}/.config | grep use-combined-config | cut -d= -f2` + if [ -n "$config" ] + then + cp ${S}/$config ${B}/.config + fi + + # Second, extract any config fragments listed in the defconfig + config=`cat ${B}/.config | grep config-fragment | cut -d= -f2` + if [ -n "$config" ] + then + configfrags="" + for f in $config + do + # Check if the config fragment is available + if [ ! -e "${S}/$f" ] + then + echo "Could not find kernel config fragment $f" + exit 1 + else + # Sanitize config fragment files to be relative to sources + configfrags="$configfrags ${S}/$f" + fi + done + fi + + # Third, check if pointing to a known in kernel defconfig + config=`cat ${B}/.config | grep use-kernel-config | cut -d= -f2` + if [ -n "$config" ] + then + oe_runmake -C ${S} O=${B} $config + else + yes '' | oe_runmake -C ${S} O=${B} oldconfig + fi + fi + + # Fourth, handle config fragments specified in the recipe + # The assumption is that the config fragment will be specified with the absolute path. + # E.g. ${WORKDIR}/config1.cfg or ${S}/config2.cfg + if [ -n "${KERNEL_CONFIG_FRAGMENTS}" ] + then + for f in ${KERNEL_CONFIG_FRAGMENTS} + do + # Check if the config fragment is available + if [ ! -e "$f" ] + then + echo "Could not find kernel config fragment $f" + exit 1 + fi + done + fi + + # Now that all the fragments are located merge them + if [ -n "${KERNEL_CONFIG_FRAGMENTS}" -o -n "$configfrags" ] + then + ( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${B} ${B}/.config $configfrags ${KERNEL_CONFIG_FRAGMENTS} 1>&2 ) + yes '' | oe_runmake -C ${S} O=${B} oldconfig + fi +} diff --git a/meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc b/meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc new file mode 100644 index 00000000..530a1783 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc @@ -0,0 +1,11 @@ + +# Use different commit, repo and branch for TI extras build +# This will have priority over generic rt path + +COMPATIBLE_MACHINE = "am62xx|am62pxx" + +BRANCH = "ti-rt-linux-6.1.y" +BRANCH:tie-jailhouse = "ti-rt-linux-6.1.y-jailhouse" + +SRCREV = "685e77152461bd6b791500f717bec62d17c1b36d" +SRCREV:tie-jailhouse = "a74088b40b4d27478a2af5c20cdc0b4ec8ed9470" diff --git a/meta-ti-bsp/recipes-kernel/linux/ti-extras.inc b/meta-ti-bsp/recipes-kernel/linux/ti-extras.inc new file mode 100644 index 00000000..0b22aca9 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/ti-extras.inc @@ -0,0 +1,14 @@ + +# Use different commit, repo and branch for TI extras build +# This will have priority over generic rt path + +COMPATIBLE_MACHINE = "am62xx|am62pxx" + +BRANCH = "ti-linux-6.1.y" +BRANCH:tie-jailhouse = "ti-linux-6.1.y-jailhouse" + +SRCREV = "ec058c3ddc5377c629e988a95ef84826b14a3307" +SRCREV:tie-jailhouse = "d035e0cc72399f1c087a63c4210d29e79a7a66e4" + +KERNEL_GIT_URI = "git://git.ti.com/git/processor-sdk/linux.git" + diff --git a/meta-ti-bsp/recipes-kernel/linux/ti-kernel-devicetree-prefix.inc b/meta-ti-bsp/recipes-kernel/linux/ti-kernel-devicetree-prefix.inc new file mode 100644 index 00000000..04c91004 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/ti-kernel-devicetree-prefix.inc @@ -0,0 +1,42 @@ + +def get_dtbs_from_kernel(dts_dir, dts_prefix): + import os + import glob + matches = [] + + for prefix in dts_prefix.split(): + filenames = glob.glob(dts_dir + prefix + '*.dts') + filenames += glob.glob(dts_dir + prefix + '*.dtso') + for filename in filenames: + # Before v6.2 kernels DTB Overlays shared the same name as DTB files + # so we need to search the file to find the type + with open(filename) as f: + file_postfix = '.dtbo' if '/plugin/;' in f.read() else '.dtb' + filename = os.path.split(filename)[1] + filename = os.path.splitext(filename)[0] + file_postfix + filename = os.path.join(os.path.split(prefix)[0], filename) + matches.append(filename) + return ' '.join(matches) + +def get_merge_dtbs_from_kernel(dts_dir, dts_pattern): + import os + matches = [] + if dts_dir == "": + return ' ' + for pattern in dts_pattern.split(): + pattern_dir = os.path.split(pattern)[0] + pattern_target = os.path.split(pattern)[1].replace(".","-") + "s" + makefile = dts_dir + "/" + pattern_dir + "/Makefile" + if os.path.exists(makefile): + with open(makefile) as f: + if pattern_target in f.read(): + matches.append(pattern) + return ' '.join(matches) + +KERNEL_DEVICETREE_DTBMERGE ?= "" + +KERNEL_DEVICETREE = " \ + ${@get_dtbs_from_kernel('${S}/arch/${ARCH}/boot/dts/', '${KERNEL_DEVICETREE_PREFIX}')} \ + ${@get_merge_dtbs_from_kernel('${S}/arch/${ARCH}/boot/dts/', '${KERNEL_DEVICETREE_DTBMERGE}')} \ +" + diff --git a/meta-ti-bsp/recipes-kernel/linux/ti-kernel.inc b/meta-ti-bsp/recipes-kernel/linux/ti-kernel.inc new file mode 100644 index 00000000..dd5578f5 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/ti-kernel.inc @@ -0,0 +1,14 @@ +# Add DTC FLAGS -@ when KERNEL_DTB_OVERLAY_SUPPORT is enabled + +def get_extra_dtc_args(d): + if d.getVar('KERNEL_DTB_OVERLAY_SUPPORT') == "1": + return "DTC_FLAGS=-@" + else: + return "" + +EXTRA_DTC_ARGS += "${@get_extra_dtc_args(d)}" + +# Tell the kernel class to install the DTBs in the same directory structure as +# the kernel. +KERNEL_DTBDEST = "${KERNEL_IMAGEDEST}/dtb" +KERNEL_DTBVENDORED = "1" diff --git a/meta-ti-bsp/recipes-security/optee/optee-%.bbappend b/meta-ti-bsp/recipes-security/optee/optee-%.bbappend new file mode 100644 index 00000000..bc590bfd --- /dev/null +++ b/meta-ti-bsp/recipes-security/optee/optee-%.bbappend @@ -0,0 +1 @@ +COMPATIBLE_MACHINE:ti-soc = "ti-soc" diff --git a/meta-ti-bsp/recipes-security/optee/optee-client-ti-version.inc b/meta-ti-bsp/recipes-security/optee/optee-client-ti-version.inc new file mode 100644 index 00000000..16fbd6c5 --- /dev/null +++ b/meta-ti-bsp/recipes-security/optee/optee-client-ti-version.inc @@ -0,0 +1,2 @@ +PV = "4.1.0+git" +SRCREV = "f7e4ced15d1fefd073bbfc484fe0e1f74afe96c2" diff --git a/meta-ti-bsp/recipes-security/optee/optee-client_%.bbappend b/meta-ti-bsp/recipes-security/optee/optee-client_%.bbappend new file mode 100644 index 00000000..f193e78b --- /dev/null +++ b/meta-ti-bsp/recipes-security/optee/optee-client_%.bbappend @@ -0,0 +1,4 @@ +OPTEE_TI_VERSION = "" +OPTEE_TI_VERSION:ti-soc = "${BPN}-ti-version.inc" + +require ${OPTEE_TI_VERSION} diff --git a/meta-ti-bsp/recipes-security/optee/optee-examples-ti-version.inc b/meta-ti-bsp/recipes-security/optee/optee-examples-ti-version.inc new file mode 100644 index 00000000..23cd7580 --- /dev/null +++ b/meta-ti-bsp/recipes-security/optee/optee-examples-ti-version.inc @@ -0,0 +1,2 @@ +PV = "4.0.0+git" +SRCREV = "378dc0db2d5dd279f58a3b6cb3f78ffd6b165035" diff --git a/meta-ti-bsp/recipes-security/optee/optee-examples_%.bbappend b/meta-ti-bsp/recipes-security/optee/optee-examples_%.bbappend new file mode 100644 index 00000000..f193e78b --- /dev/null +++ b/meta-ti-bsp/recipes-security/optee/optee-examples_%.bbappend @@ -0,0 +1,4 @@ +OPTEE_TI_VERSION = "" +OPTEE_TI_VERSION:ti-soc = "${BPN}-ti-version.inc" + +require ${OPTEE_TI_VERSION} diff --git a/meta-ti-bsp/recipes-security/optee/optee-os-4.0.0/0002ti-core-Define-section-attributes-for-clang.patch b/meta-ti-bsp/recipes-security/optee/optee-os-4.0.0/0002ti-core-Define-section-attributes-for-clang.patch new file mode 100644 index 00000000..06a8ff60 --- /dev/null +++ b/meta-ti-bsp/recipes-security/optee/optee-os-4.0.0/0002ti-core-Define-section-attributes-for-clang.patch @@ -0,0 +1,249 @@ + +This is a fixup of the patch in meta-arm. The file: + core/arch/arm/mm/pgt_cache.c +was moved to: + core/mm/pgt_cache.c + +Ryan Eatmon <reatmon@ti.com> + + +From 6f588813a170a671ebf1d6b51cebc7bc761295dc Mon Sep 17 00:00:00 2001 +From: Emekcan Aras <emekcan.aras@arm.com> +Date: Wed, 21 Dec 2022 10:55:58 +0000 +Subject: [PATCH] core: Define section attributes for clang + +Clang's attribute section is not same as gcc, here we need to add flags +to sections so they can be eventually collected by linker into final +output segments. Only way to do so with clang is to use + +pragma clang section ... + +The behavious is described here [1], this allows us to define names bss +sections. This was not an issue until clang-15 where LLD linker starts +to detect the section flags before merging them and throws the following +errors + +| ld.lld: error: section type mismatch for .nozi.kdata_page +| >>> /mnt/b/yoe/master/build/tmp/work/qemuarm64-yoe-linux/optee-os-tadevkit/3.17.0-r0/build/core/arch/arm/kernel/thread.o:(.nozi.kdata_page): SHT_PROGBITS +| >>> output section .nozi: SHT_NOBITS +| +| ld.lld: error: section type mismatch for .nozi.mmu.l2 +| >>> /mnt/b/yoe/master/build/tmp/work/qemuarm64-yoe-linux/optee-os-tadevkit/3.17.0-r0/build/core/arch/arm/mm/core_mmu_lpae.o:(.nozi.mmu.l2): SHT_PROGBITS +| >>> output section .nozi: SHT_NOBITS + +These sections should be carrying SHT_NOBITS but so far it was not +possible to do so, this patch tries to use clangs pragma to get this +going and match the functionality with gcc. + +[1] https://intel.github.io/llvm-docs/clang/LanguageExtensions.html#specifying-section-names-for-global-objects-pragma-clang-section + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + core/arch/arm/kernel/thread.c | 19 +++++++++++++++-- + core/arch/arm/mm/core_mmu_lpae.c | 35 +++++++++++++++++++++++++++---- + core/arch/arm/mm/core_mmu_v7.c | 36 +++++++++++++++++++++++++++++--- + core/arch/arm/mm/pgt_cache.c | 12 ++++++++++- + core/kernel/thread.c | 13 +++++++++++- + 5 files changed, 104 insertions(+), 11 deletions(-) + +diff --git a/core/arch/arm/kernel/thread.c b/core/arch/arm/kernel/thread.c +index 4487ef026df9..f3624389611b 100644 +--- a/core/arch/arm/kernel/thread.c ++++ b/core/arch/arm/kernel/thread.c +@@ -44,15 +44,30 @@ static size_t thread_user_kcode_size __nex_bss; + #if defined(CFG_CORE_UNMAP_CORE_AT_EL0) && \ + defined(CFG_CORE_WORKAROUND_SPECTRE_BP_SEC) && defined(ARM64) + long thread_user_kdata_sp_offset __nex_bss; ++#ifdef __clang__ ++#ifndef CFG_VIRTUALIZATION ++#pragma clang section bss=".nozi.kdata_page" ++#else ++#pragma clang section bss=".nex_nozi.kdata_page" ++#endif ++#endif + static uint8_t thread_user_kdata_page[ + ROUNDUP(sizeof(struct thread_core_local) * CFG_TEE_CORE_NB_CORE, + SMALL_PAGE_SIZE)] + __aligned(SMALL_PAGE_SIZE) ++#ifndef __clang__ + #ifndef CFG_NS_VIRTUALIZATION +- __section(".nozi.kdata_page"); ++ __section(".nozi.kdata_page") + #else +- __section(".nex_nozi.kdata_page"); ++ __section(".nex_nozi.kdata_page") + #endif ++#endif ++ ; ++#endif ++ ++/* reset BSS section to default ( .bss ) */ ++#ifdef __clang__ ++#pragma clang section bss="" + #endif + + #ifdef ARM32 +diff --git a/core/arch/arm/mm/core_mmu_lpae.c b/core/arch/arm/mm/core_mmu_lpae.c +index 7e79f780ad28..ec4db9dc98c5 100644 +--- a/core/arch/arm/mm/core_mmu_lpae.c ++++ b/core/arch/arm/mm/core_mmu_lpae.c +@@ -233,19 +233,46 @@ typedef uint16_t l1_idx_t; + typedef uint64_t base_xlat_tbls_t[CFG_TEE_CORE_NB_CORE][NUM_BASE_LEVEL_ENTRIES]; + typedef uint64_t xlat_tbl_t[XLAT_TABLE_ENTRIES]; + ++#ifdef __clang__ ++#pragma clang section bss=".nozi.mmu.base_table" ++#endif + static base_xlat_tbls_t base_xlation_table[NUM_BASE_TABLES] + __aligned(NUM_BASE_LEVEL_ENTRIES * XLAT_ENTRY_SIZE) +- __section(".nozi.mmu.base_table"); ++#ifndef __clang__ ++ __section(".nozi.mmu.base_table") ++#endif ++; ++#ifdef __clang__ ++#pragma clang section bss="" ++#endif + ++#ifdef __clang__ ++#pragma clang section bss=".nozi.mmu.l2" ++#endif + static xlat_tbl_t xlat_tables[MAX_XLAT_TABLES] +- __aligned(XLAT_TABLE_SIZE) __section(".nozi.mmu.l2"); ++ __aligned(XLAT_TABLE_SIZE) ++#ifndef __clang__ ++ __section(".nozi.mmu.l2") ++#endif ++; ++#ifdef __clang__ ++#pragma clang section bss="" ++#endif + + #define XLAT_TABLES_SIZE (sizeof(xlat_tbl_t) * MAX_XLAT_TABLES) + ++#ifdef __clang__ ++#pragma clang section bss=".nozi.mmu.l2" ++#endif + /* MMU L2 table for TAs, one for each thread */ + static xlat_tbl_t xlat_tables_ul1[CFG_NUM_THREADS] +- __aligned(XLAT_TABLE_SIZE) __section(".nozi.mmu.l2"); +- ++#ifndef __clang__ ++ __aligned(XLAT_TABLE_SIZE) __section(".nozi.mmu.l2") ++#endif ++; ++#ifdef __clang__ ++#pragma clang section bss="" ++#endif + /* + * TAs page table entry inside a level 1 page table. + * +diff --git a/core/arch/arm/mm/core_mmu_v7.c b/core/arch/arm/mm/core_mmu_v7.c +index 61e703da89c8..1960c08ca688 100644 +--- a/core/arch/arm/mm/core_mmu_v7.c ++++ b/core/arch/arm/mm/core_mmu_v7.c +@@ -204,16 +204,46 @@ typedef uint32_t l1_xlat_tbl_t[NUM_L1_ENTRIES]; + typedef uint32_t l2_xlat_tbl_t[NUM_L2_ENTRIES]; + typedef uint32_t ul1_xlat_tbl_t[NUM_UL1_ENTRIES]; + ++#ifdef __clang__ ++#pragma clang section bss=".nozi.mmu.l1" ++#endif + static l1_xlat_tbl_t main_mmu_l1_ttb +- __aligned(L1_ALIGNMENT) __section(".nozi.mmu.l1"); ++ __aligned(L1_ALIGNMENT) ++#ifndef __clang__ ++ __section(".nozi.mmu.l1") ++#endif ++; ++#ifdef __clang__ ++#pragma clang section bss="" ++#endif + + /* L2 MMU tables */ ++#ifdef __clang__ ++#pragma clang section bss=".nozi.mmu.l2" ++#endif + static l2_xlat_tbl_t main_mmu_l2_ttb[MAX_XLAT_TABLES] +- __aligned(L2_ALIGNMENT) __section(".nozi.mmu.l2"); ++ __aligned(L2_ALIGNMENT) ++#ifndef __clang__ ++ __section(".nozi.mmu.l2") ++#endif ++; ++#ifdef __clang__ ++#pragma clang section bss="" ++#endif + + /* MMU L1 table for TAs, one for each thread */ ++#ifdef __clang__ ++#pragma clang section bss=".nozi.mmu.ul1" ++#endif + static ul1_xlat_tbl_t main_mmu_ul1_ttb[CFG_NUM_THREADS] +- __aligned(UL1_ALIGNMENT) __section(".nozi.mmu.ul1"); ++ __aligned(UL1_ALIGNMENT) ++#ifndef __clang__ ++ __section(".nozi.mmu.ul1") ++#endif ++; ++#ifdef __clang__ ++#pragma clang section bss="" ++#endif + + struct mmu_partition { + l1_xlat_tbl_t *l1_table; +diff --git a/core/mm/pgt_cache.c b/core/mm/pgt_cache.c +index 79553c6d2183..b9efdf42780b 100644 +--- a/core/mm/pgt_cache.c ++++ b/core/mm/pgt_cache.c +@@ -410,8 +410,18 @@ void pgt_init(void) + * has a large alignment, while .bss has a small alignment. The current + * link script is optimized for small alignment in .bss + */ ++#ifdef __clang__ ++#pragma clang section bss=".nozi.mmu.l2" ++#endif + static uint8_t pgt_tables[PGT_CACHE_SIZE][PGT_SIZE] +- __aligned(PGT_SIZE) __section(".nozi.pgt_cache"); ++ __aligned(PGT_SIZE) ++#ifndef __clang__ ++ __section(".nozi.pgt_cache") ++#endif ++ ; ++#ifdef __clang__ ++#pragma clang section bss="" ++#endif + size_t n; + + for (n = 0; n < ARRAY_SIZE(pgt_tables); n++) { +diff --git a/core/kernel/thread.c b/core/kernel/thread.c +index 2a1f22dce635..5516b677141a 100644 +--- a/core/kernel/thread.c ++++ b/core/kernel/thread.c +@@ -39,13 +39,24 @@ static uint32_t end_canary_value = 0xababab00; + name[stack_num][sizeof(name[stack_num]) / sizeof(uint32_t) - 1] + #endif + ++#define DO_PRAGMA(x) _Pragma (#x) ++ ++#ifdef __clang__ ++#define DECLARE_STACK(name, num_stacks, stack_size, linkage) \ ++DO_PRAGMA (clang section bss=".nozi_stack." #name) \ ++linkage uint32_t name[num_stacks] \ ++ [ROUNDUP(stack_size + STACK_CANARY_SIZE + STACK_CHECK_EXTRA, \ ++ STACK_ALIGNMENT) / sizeof(uint32_t)] \ ++ __attribute__((aligned(STACK_ALIGNMENT))); \ ++DO_PRAGMA(clang section bss="") ++#else + #define DECLARE_STACK(name, num_stacks, stack_size, linkage) \ + linkage uint32_t name[num_stacks] \ + [ROUNDUP(stack_size + STACK_CANARY_SIZE + STACK_CHECK_EXTRA, \ + STACK_ALIGNMENT) / sizeof(uint32_t)] \ + __attribute__((section(".nozi_stack." # name), \ + aligned(STACK_ALIGNMENT))) +- ++#endif + #define GET_STACK(stack) ((vaddr_t)(stack) + STACK_SIZE(stack)) + + DECLARE_STACK(stack_tmp, CFG_TEE_CORE_NB_CORE, STACK_TMP_SIZE, diff --git a/meta-ti-bsp/recipes-security/optee/optee-os-tadevkit-ti-overrides.inc b/meta-ti-bsp/recipes-security/optee/optee-os-tadevkit-ti-overrides.inc new file mode 100644 index 00000000..df46e243 --- /dev/null +++ b/meta-ti-bsp/recipes-security/optee/optee-os-tadevkit-ti-overrides.inc @@ -0,0 +1 @@ +EXTRA_OEMAKE:remove = "CFG_MAP_EXT_DT_SECURE=y" diff --git a/meta-ti-bsp/recipes-security/optee/optee-os-tadevkit_%.bbappend b/meta-ti-bsp/recipes-security/optee/optee-os-tadevkit_%.bbappend new file mode 100644 index 00000000..980f7a4b --- /dev/null +++ b/meta-ti-bsp/recipes-security/optee/optee-os-tadevkit_%.bbappend @@ -0,0 +1,9 @@ +OPTEE_TI_VERSION = "" +OPTEE_TI_VERSION:ti-soc = "optee-os-ti-version.inc" + +require ${OPTEE_TI_VERSION} + +OPTEE_TI_OVERRIDES = "" +OPTEE_TI_OVERRIDES:ti-soc = "${BPN}-ti-overrides.inc" + +require ${OPTEE_TI_OVERRIDES} diff --git a/meta-ti-bsp/recipes-security/optee/optee-os-ti-overrides.inc b/meta-ti-bsp/recipes-security/optee/optee-os-ti-overrides.inc new file mode 100644 index 00000000..0ea30907 --- /dev/null +++ b/meta-ti-bsp/recipes-security/optee/optee-os-ti-overrides.inc @@ -0,0 +1,78 @@ +# Use TI SECDEV for signing +inherit ti-secdev + +EXTRA_OEMAKE:remove = "CFG_MAP_EXT_DT_SECURE=y" + +EXTRA_OEMAKE:append:k3 = "${@ ' CFG_CONSOLE_UART='+ d.getVar('OPTEE_K3_USART') if d.getVar('OPTEE_K3_USART') else ''}" + +EXTRA_OEMAKE:append:am62xx = " CFG_TEE_CORE_LOG_LEVEL=1" +EXTRA_OEMAKE:append:am62pxx = " CFG_WITH_SOFTWARE_PRNG=y CFG_TEE_CORE_LOG_LEVEL=1" +EXTRA_OEMAKE:append:am62axx = " CFG_TEE_CORE_LOG_LEVEL=1" +EXTRA_OEMAKE:append:j722s = " CFG_WITH_SOFTWARE_PRNG=y CFG_TEE_CORE_LOG_LEVEL=1" + +do_compile:append:k3() { + cp ${B}/core/tee-pager_v2.bin ${B}/bl32.bin + cp ${B}/core/tee.elf ${B}/bl32.elf +} + +# Signing procedure for legacy HS devices +optee_sign_legacyhs() { + ( cd ${B}/core/; \ + ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh tee.bin tee.bin.signed; \ + normfl=`echo ${OPTEEFLAVOR} | tr "_" "-"` + mv tee.bin.signed ${B}/$normfl.optee; \ + ) + + if [ "${OPTEEPAGER}" = "y" ]; then + oe_runmake -C ${S} clean + oe_runmake -C ${S} all CFG_TEE_TA_LOG_LEVEL=0 CFG_WITH_PAGER=y + ( cd ${B}/core/; \ + ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh tee.bin tee.bin.signed; \ + normfl=`echo ${OPTEEFLAVOR} | tr "_" "-"` + mv tee.bin.signed ${B}/$normfl-pager.optee; \ + ) + fi +} + +do_compile:append:ti43x() { + optee_sign_legacyhs +} + +do_compile:append:dra7xx() { + optee_sign_legacyhs +} + +do_install:append() { + install -m 644 ${B}/*.optee ${D}${nonarch_base_libdir}/firmware/ || true + install -m 644 ${B}/bl32.bin ${D}${nonarch_base_libdir}/firmware/ || true + install -m 644 ${B}/bl32.elf ${D}${nonarch_base_libdir}/firmware/ || true + + # Install embedded TAs + mkdir -p ${D}${nonarch_base_libdir}/optee_armtz/ + install -D -p -m0444 ${B}/ta/*/*.ta ${D}${nonarch_base_libdir}/optee_armtz/ +} + +optee_deploy_legacyhs() { + cd ${DEPLOYDIR}/ + for f in optee/*.optee; do + ln -sf $f ${DEPLOYDIR}/ + done +} + +do_deploy:append:ti43x() { + optee_deploy_legacyhs +} + +do_deploy:append:dra7xx() { + optee_deploy_legacyhs +} + +do_deploy:append:k3() { + ln -sf optee/bl32.bin ${DEPLOYDIR}/ + ln -sf optee/bl32.elf ${DEPLOYDIR}/ +} + +FILES:${PN} += "${nonarch_base_libdir}/optee_armtz/" + +# This is needed for bl32.elf +INSANE_SKIP:${PN}:append:k3 = " textrel" diff --git a/meta-ti-bsp/recipes-security/optee/optee-os-ti-version.inc b/meta-ti-bsp/recipes-security/optee/optee-os-ti-version.inc new file mode 100644 index 00000000..9db67567 --- /dev/null +++ b/meta-ti-bsp/recipes-security/optee/optee-os-ti-version.inc @@ -0,0 +1,7 @@ +PV = "4.1.0+git" +SRCREV = "012cdca49db398693903e05c42a254a3a0c0d8f2" + +# Fixes for pointing to 4.0.0 before upstream meta-arm +FILESEXTRAPATHS:prepend := "${THISDIR}/optee-os-4.0.0:" +SRC_URI:remove = "file://0002-core-Define-section-attributes-for-clang.patch" +SRC_URI:append = " file://0002ti-core-Define-section-attributes-for-clang.patch" diff --git a/meta-ti-bsp/recipes-security/optee/optee-os_%.bbappend b/meta-ti-bsp/recipes-security/optee/optee-os_%.bbappend new file mode 100644 index 00000000..0cee127f --- /dev/null +++ b/meta-ti-bsp/recipes-security/optee/optee-os_%.bbappend @@ -0,0 +1,9 @@ +OPTEE_TI_VERSION = "" +OPTEE_TI_VERSION:ti-soc = "${BPN}-ti-version.inc" + +require ${OPTEE_TI_VERSION} + +OPTEE_TI_OVERRIDES = "" +OPTEE_TI_OVERRIDES:ti-soc = "${BPN}-ti-overrides.inc" + +require ${OPTEE_TI_OVERRIDES} diff --git a/meta-ti-bsp/recipes-security/optee/optee-test-ti-version.inc b/meta-ti-bsp/recipes-security/optee/optee-test-ti-version.inc new file mode 100644 index 00000000..16b2dfc3 --- /dev/null +++ b/meta-ti-bsp/recipes-security/optee/optee-test-ti-version.inc @@ -0,0 +1,6 @@ +PV = "4.1.0+git" +SRCREV = "2e1e7a9c9d659585566a75fc8802f4758c42bcb2" + +# Fixes for pointing to 4.0.0 before upstream meta-arm +SRC_URI:remove = "file://0001-xtest-regression_1000-remove-unneeded-stat.h-include.patch" + diff --git a/meta-ti-bsp/recipes-security/optee/optee-test_%.bbappend b/meta-ti-bsp/recipes-security/optee/optee-test_%.bbappend new file mode 100644 index 00000000..f193e78b --- /dev/null +++ b/meta-ti-bsp/recipes-security/optee/optee-test_%.bbappend @@ -0,0 +1,4 @@ +OPTEE_TI_VERSION = "" +OPTEE_TI_VERSION:ti-soc = "${BPN}-ti-version.inc" + +require ${OPTEE_TI_VERSION} diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-ipc-common.inc b/meta-ti-bsp/recipes-ti/ipc/ti-ipc-common.inc new file mode 100644 index 00000000..ec1e71be --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-ipc-common.inc @@ -0,0 +1,12 @@ +PV = "3.51.00.00" +INC_PR = "r0" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_HOST ?= "null" +COMPATIBLE_HOST:ti-soc = "(.*)" + +PLATFORM = "UNKNOWN" +PLATFORM:dra7xx = "DRA7XX" +PLATFORM:omapl138 = "OMAPL138" + +ALT_PLATFORM:am57xx = "AM572X AM571X" diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-ipc.inc b/meta-ti-bsp/recipes-ti/ipc/ti-ipc.inc new file mode 100644 index 00000000..44be2466 --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-ipc.inc @@ -0,0 +1,20 @@ +DESCRIPTION = "TI Inter Process Communication (IPC) Mechanisms (for Uni- and Multi- Processor Configurations)" +HOMEPAGE="http://processors.wiki.ti.com/index.php/Category:IPC" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://${S}/ipc-linux.mak;beginline=1;endline=30;md5=7b327f9b710fd7c95e545b91cec79255" + +TI_IPC_GIT_URI = "git://git.ti.com/git/ipc/ipcdev.git" +TI_IPC_GIT_PROTOCOL = "https" +TI_IPC_GIT_BRANCH = "master" + +#Corresponds to 3.51.00.00A +TI_IPC_SRCREV = "7a6e343a208d2849139b7272a67abc01db806e00" + +BRANCH = "${TI_IPC_GIT_BRANCH}" +SRC_URI = "${TI_IPC_GIT_URI};protocol=${TI_IPC_GIT_PROTOCOL};branch=${BRANCH};name=ipcdev" +SRCREV = "${TI_IPC_SRCREV}" + +CFLAGS += "-fcommon" + +S = "${WORKDIR}/git" diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-ipc/0001-Add-kernel-build-dir.patch b/meta-ti-bsp/recipes-ti/ipc/ti-ipc/0001-Add-kernel-build-dir.patch new file mode 100644 index 00000000..cb178ee6 --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-ipc/0001-Add-kernel-build-dir.patch @@ -0,0 +1,114 @@ +From c3ada6bf49e6fcf7bc49e5bf09754f384838ca6a Mon Sep 17 00:00:00 2001 +From: Denys Dmytriyenko <denys@ti.com> +Date: Mon, 27 Jul 2015 11:51:52 -0400 +Subject: [PATCH] Add kernel build dir + +We build kernel outside of the source directory and the generated version.h +file ends up being in a separate directory from the rest of kernel headers. +Use another variable to point to the kernel build artifacts. + +Upstream-Status: Inappropriate [OE-specific] + +Signed-off-by: Denys Dmytriyenko <denys@ti.com> + +--- + configure.ac | 6 ++++++ + ipc-linux.mak | 3 +++ + linux/src/mm/Makefile.am | 2 +- + packages/ti/ipc/mm/MmRpc.c | 4 ++++ + 4 files changed, 14 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 4d4a559..84ac78b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -71,6 +71,7 @@ AC_SUBST([AM_LDFLAGS]) + AC_ARG_VAR(PLATFORM, Platform to build. Options are: 'OMAPL138' 'OMAP54XX' '66AK2E' 'TCI6630' 'TCI6636' 'TCI6638' '66AK2G' 'DRA7XX' and 'AM65XX'. If not defined all platforms will be built.) + AC_ARG_VAR(CMEM_INSTALL_DIR, Installation path directory to the CMEM libraries) + AC_ARG_VAR(KERNEL_INSTALL_DIR, Installation path to the Linux kernel.) ++AC_ARG_VAR(KERNEL_BUILD_DIR, Path to the Linux kernel build artifacts.) + AC_ARG_VAR(AF_RPMSG, Address Family used by the RPMSG driver) + AC_ARG_VAR(DRM_PREFIX, Installation location to the DRM library.) + +@@ -113,6 +114,7 @@ AS_IF([test "x$PLATFORM" = "x"], [CMEM_INSTALL_DIR=]) + AC_SUBST([PLATFORM]) + AC_SUBST([CMEM_INSTALL_DIR]) + AC_SUBST([KERNEL_INSTALL_DIR]) ++AC_SUBST([KERNEL_BUILD_DIR]) + AC_SUBST([AF_RPMSG]) + AC_SUBST([DRM_PREFIX]) + +@@ -130,6 +132,7 @@ AM_CONDITIONAL([AM65XX], [test "x$PLATFORM" = "xAM65XX"]) + AM_CONDITIONAL([CMEM], [test "x$CMEM_INSTALL_DIR" != "x"]) + AM_CONDITIONAL([KDIR], [test "x$KERNEL_INSTALL_DIR" != "x"]) + AM_CONDITIONAL([KERNEL_INSTALL_DIR], [test -n "$KERNEL_INSTALL_DIR"]) ++AM_CONDITIONAL([KERNEL_BUILD_DIR], [test -n "$KERNEL_BUILD_DIR"]) + AM_CONDITIONAL([DRM], [test "x$DRM_PREFIX" != "x"]) + AM_CONDITIONAL([AF_RPMSG], [test -n "$AF_RPMSG"]) + +@@ -160,6 +163,9 @@ You have configured to build for the '${PLATFORM}' platform + Your KERNEL installation directory is set to: + '${KERNEL_INSTALL_DIR}' + ++Your KERNEL build artifacts directory is set to: ++ '${KERNEL_BUILD_DIR}' ++ + Your DRM installation directory is set to: + '${DRM_PREFIX}' + +diff --git a/ipc-linux.mak b/ipc-linux.mak +index 58a9cea..4e543ff 100644 +--- a/ipc-linux.mak ++++ b/ipc-linux.mak +@@ -60,6 +60,7 @@ config: + PLATFORM=$(PLATFORM) \ + CMEM_INSTALL_DIR=$(CMEM_INSTALL_DIR) \ + KERNEL_INSTALL_DIR=$(KERNEL_INSTALL_DIR) \ ++ KERNEL_BUILD_DIR=$(KERNEL_BUILD_DIR) \ + DRM_PREFIX=$(DRM_PREFIX) \ + AF_RPMSG=$(AF_RPMSG) + +@@ -72,6 +73,7 @@ config-static: + PLATFORM=$(PLATFORM) \ + CMEM_INSTALL_DIR=$(CMEM_INSTALL_DIR) \ + KERNEL_INSTALL_DIR=$(KERNEL_INSTALL_DIR) \ ++ KERNEL_BUILD_DIR=$(KERNEL_BUILD_DIR) \ + DRM_PREFIX=$(DRM_PREFIX) \ + AF_RPMSG=$(AF_RPMSG) + +@@ -84,5 +86,6 @@ config-shared: + PLATFORM=$(PLATFORM) \ + CMEM_INSTALL_DIR=$(CMEM_INSTALL_DIR) \ + KERNEL_INSTALL_DIR=$(KERNEL_INSTALL_DIR) \ ++ KERNEL_BUILD_DIR=$(KERNEL_BUILD_DIR) \ + DRM_PREFIX=$(DRM_PREFIX) \ + AF_RPMSG=$(AF_RPMSG) +diff --git a/linux/src/mm/Makefile.am b/linux/src/mm/Makefile.am +index 59aa312..8fb51a3 100644 +--- a/linux/src/mm/Makefile.am ++++ b/linux/src/mm/Makefile.am +@@ -32,7 +32,7 @@ + ## + + # additional include paths necessary to compile the library +-AM_CFLAGS = -Wall @AM_CFLAGS@ -DKERNEL_INSTALL_DIR="$(KERNEL_INSTALL_DIR)" ++AM_CFLAGS = -Wall @AM_CFLAGS@ -DKERNEL_INSTALL_DIR="$(KERNEL_INSTALL_DIR)" -DKERNEL_BUILD_DIR="$(KERNEL_BUILD_DIR)" + + ############################################################################### + # THE LIBRARIES TO BUILD +diff --git a/packages/ti/ipc/mm/MmRpc.c b/packages/ti/ipc/mm/MmRpc.c +index 2df7420..797e100 100644 +--- a/packages/ti/ipc/mm/MmRpc.c ++++ b/packages/ti/ipc/mm/MmRpc.c +@@ -56,7 +56,11 @@ + #endif + + #define linux_version_include(kd) <kd/include/generated/uapi/linux/version.h> ++#if defined(KERNEL_BUILD_DIR) ++#include linux_version_include(KERNEL_BUILD_DIR) ++#else + #include linux_version_include(KERNEL_INSTALL_DIR) ++#endif + + #if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0) + #define linux_include(kd,m) <kd/include/linux/m.h> diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-ipc/0001-MmRpc-Stop-looking-for-rpmsg_rpc.h-in-the-kernel.patch b/meta-ti-bsp/recipes-ti/ipc/ti-ipc/0001-MmRpc-Stop-looking-for-rpmsg_rpc.h-in-the-kernel.patch new file mode 100644 index 00000000..522ad5e4 --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-ipc/0001-MmRpc-Stop-looking-for-rpmsg_rpc.h-in-the-kernel.patch @@ -0,0 +1,34 @@ +From 66ca0e732c2e287814d4fc5082b818554ee42398 Mon Sep 17 00:00:00 2001 +From: Ryan Eatmon <reatmon@ti.com> +Date: Fri, 28 Apr 2023 14:30:59 -0500 +Subject: [PATCH] MmRpc: Stop looking for rpmsg_rpc.h in the kernel + +Stop looking for the rpmsg_rpc.h in the kernel. While we are doing the +LTS migration for kirkstone, this file is not going to be in the kernel +for a bit. This patch works in conjunction with a recipe change that +downloads the header and adds a -I to the CFLAGS to pick it up. This +will be removed once the 6.1 kernel has been updated. + +Signed-off-by: Ryan Eatmon <reatmon@ti.com> + +Upstream-Status: Inappropriate [other] + +--- + packages/ti/ipc/mm/MmRpc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/packages/ti/ipc/mm/MmRpc.c b/packages/ti/ipc/mm/MmRpc.c +index 2df7420..10f496b 100644 +--- a/packages/ti/ipc/mm/MmRpc.c ++++ b/packages/ti/ipc/mm/MmRpc.c +@@ -64,7 +64,7 @@ + #define linux_include(kd,m) <kd/include/uapi/linux/m.h> + #endif + +-#include linux_include(KERNEL_INSTALL_DIR,rpmsg_rpc) ++#include "linux/rpmsg_rpc.h" + + #ifdef _linux_ + #define linux _linux +-- +2.17.1 diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-ipc/omap_remoteproc.conf b/meta-ti-bsp/recipes-ti/ipc/ti-ipc/omap_remoteproc.conf new file mode 100644 index 00000000..6b5034cd --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-ipc/omap_remoteproc.conf @@ -0,0 +1 @@ +softdep omap_remoteproc pre: virtio_rpmsg_bus diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-ipc/tiipclad-daemon.service b/meta-ti-bsp/recipes-ti/ipc/ti-ipc/tiipclad-daemon.service new file mode 100644 index 00000000..ea26845e --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-ipc/tiipclad-daemon.service @@ -0,0 +1,9 @@ +[Unit] +Description=TI IPC Daemon + +[Service] +Type=forking +ExecStart=/usr/bin/__LAD_DAEMON__ -g -l lad.txt + +[Install] +WantedBy=basic.target diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-ipc/tiipclad-daemon.sh b/meta-ti-bsp/recipes-ti/ipc/ti-ipc/tiipclad-daemon.sh new file mode 100644 index 00000000..9ebfa35a --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-ipc/tiipclad-daemon.sh @@ -0,0 +1,25 @@ +#! /bin/sh + +tiipclad_daemon=/usr/bin/__LAD_DAEMON__ +tiipclad_params="-g -l lad.txt" + +test -x "$tiipclad_daemon" || exit 0 + +case "$1" in + start) + echo -n "Starting tiipclad daemon" + start-stop-daemon --start --quiet \ + --exec $tiipclad_daemon -- $tiipclad_params + echo "." + ;; + stop) + echo -n "Stopping tiipclad daemon" + start-stop-daemon --stop --quiet --pidfile /var/run/tiipclad.pid + echo "." + ;; + *) + echo "Usage: /etc/init.d/tiipclad-daemon.sh {start|stop}" + exit 1 +esac + +exit 0 diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-ipc_git.bb b/meta-ti-bsp/recipes-ti/ipc/ti-ipc_git.bb new file mode 100644 index 00000000..11be09ea --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-ipc_git.bb @@ -0,0 +1,69 @@ +DESCRIPTION = "TI Inter Process Communication (IPC) Mechanisms (for Uni- and Multi- Processor Configurations)" +HOMEPAGE="http://processors.wiki.ti.com/index.php/Category:IPC" + +require ti-ipc.inc +require ti-ipc-common.inc + +PR = "${INC_PR}.2" + +DEPENDS += "virtual/kernel" + +SRC_URI:append = " https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/plain/include/uapi/linux/rpmsg_rpc.h?h=ti-linux-5.10.y;name=rpmsg_rpc;subdir=linux;downloadfilename=rpmsg_rpc.h" +SRC_URI[rpmsg_rpc.sha256sum] = "cd237f40a37520a1f2df19fbfeefd00c0a5ad68efeaba9ba0fba60ca16ea09be" + +SRC_URI += "file://tiipclad-daemon.sh \ + file://omap_remoteproc.conf \ + file://tiipclad-daemon.service \ + file://0001-Add-kernel-build-dir.patch \ + file://0001-MmRpc-Stop-looking-for-rpmsg_rpc.h-in-the-kernel.patch \ + " + +CFLAGS += "-I${UNPACKDIR}" + +DAEMON = "UNKNOWN" +DAEMON:dra7xx = "lad_dra7xx" +DAEMON:omapl138 = "lad_omapl138" + +inherit autotools-brokensep pkgconfig update-rc.d systemd + +INITSCRIPT_NAME = "tiipclad-daemon.sh" +INITSCRIPT_PARAMS = "defaults 10" + +SYSTEMD_SERVICE:${PN} = "tiipclad-daemon.service" + +EXTRA_OECONF += "PLATFORM=${PLATFORM} KERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR} KERNEL_BUILD_DIR=${STAGING_KERNEL_BUILDDIR}" + +do_compile[depends] += "virtual/kernel:do_shared_workdir" + +do_configure() { + ( cd ${S}; autoreconf -f -i -s ) + oe_runconf +} + +do_install:append() { + install -d ${D}${sysconfdir}/init.d/ + + # Modify the startup scripts to point to the right + # lad daemon executable. + sed -i -e "s/__LAD_DAEMON__/${DAEMON}/" ${UNPACKDIR}/tiipclad-daemon.sh + sed -i -e "s/__LAD_DAEMON__/${DAEMON}/" ${UNPACKDIR}/tiipclad-daemon.service + + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/tiipclad-daemon.service ${D}${systemd_system_unitdir} + install -d ${D}${sysconfdir}/init.d/ + install -c -m 755 ${UNPACKDIR}/tiipclad-daemon.sh ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} +} + +do_install:append:dra7xx() { + install -d ${D}${sysconfdir}/modprobe.d/ + install -c -m 644 ${UNPACKDIR}/omap_remoteproc.conf ${D}${sysconfdir}/modprobe.d/ +} + +PACKAGES =+ "${PN}-test" +RDEPENDS:${PN}-test += "${PN}" + +FILES:${PN}-test = " \ + ${bindir}/NameServerApp \ + ${bindir}/MessageQApp \ + ${bindir}/MessageQMulti \ + ${bindir}/ping_rpmsg" diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char-examples/0001-examples-Remove-use-of-includedir-and-libdir.patch b/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char-examples/0001-examples-Remove-use-of-includedir-and-libdir.patch new file mode 100644 index 00000000..71fca1b0 --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char-examples/0001-examples-Remove-use-of-includedir-and-libdir.patch @@ -0,0 +1,38 @@ +From 1a26cb577ba54dd9214eeb94fed0ce3a0f4603b6 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 24 Oct 2020 23:46:39 -0700 +Subject: [PATCH] examples: Remove use of includedir and libdir + +These point to standard include and library paths which already are used +from sysroot relative paths secondly, they use absolute paths which +means we are asking to add -I/usr/include which might be ok in a native +build but not in cross build. This helps mitigate QA errors found with +OE build system since it finds it adding host include and library search +paths to linker/compiler commandline + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + examples/Makefile.am | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/examples/Makefile.am b/examples/Makefile.am +index 5a9bedb..d547e41 100644 +--- a/examples/Makefile.am ++++ b/examples/Makefile.am +@@ -1,6 +1,4 @@ +-INCLUDE = -I${includedir} +- +-AM_CFLAGS = -Wall -g -O2 $(INCLUDE) ++AM_CFLAGS = -Wall -g -O2 + + bin_PROGRAMS = rpmsg_char_simple + +@@ -8,4 +6,3 @@ bin_PROGRAMS = rpmsg_char_simple + rpmsg_char_simple_SOURCES = rpmsg_char_simple.c + rpmsg_char_simple_CPPFLAGS = $(AM_CFLAGS) + rpmsg_char_simple_LDADD = -lpthread -lti_rpmsg_char +-rpmsg_char_simple_LDFLAGS = -L${libdir} +-- +2.29.1 + diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char-examples_git.bb b/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char-examples_git.bb new file mode 100644 index 00000000..cbe4d7fd --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char-examples_git.bb @@ -0,0 +1,13 @@ +SUMMARY = "TI RPMsg Char Sample Applications and Tests" + +require ti-rpmsg-char.inc + +SRC_URI += "file://0001-examples-Remove-use-of-includedir-and-libdir.patch" + +DEPENDS = "ti-rpmsg-char" + +inherit autotools pkgconfig + +EXTRA_OEMAKE = "-C ${B}/examples" + +PR = "r0" diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char.inc b/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char.inc new file mode 100644 index 00000000..4710be09 --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char.inc @@ -0,0 +1,18 @@ +SUMMARY = "TI RPMsg Char Utility Library" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://${S}/src/rpmsg_char.c;beginline=1;endline=31;md5=71987db43a2159cff5ea00505c6fce58" + +PROTOCOL = "https" +BRANCH = "master" +SRC_URI = "git://git.ti.com/git/rpmsg/ti-rpmsg-char.git;protocol=${PROTOCOL};branch=${BRANCH};" + +# 0.6.6 release +SRCREV = "55a6f4032246631a309f8608af5e822024664b59" + +PV = "0.6.6+git" + +S = "${WORKDIR}/git" + +COMPATIBLE_HOST ?= "null" +COMPATIBLE_HOST:ti-soc = "(.*)" diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char_git.bb b/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char_git.bb new file mode 100644 index 00000000..63711a3b --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char_git.bb @@ -0,0 +1,7 @@ +SUMMARY = "TI RPMsg Char Utility Library" + +require ti-rpmsg-char.inc + +inherit autotools pkgconfig + +PR = "r0" diff --git a/meta-ti-bsp/recipes-ti/secdev/ti-k3-secdev_git.bb b/meta-ti-bsp/recipes-ti/secdev/ti-k3-secdev_git.bb new file mode 100644 index 00000000..e3267a23 --- /dev/null +++ b/meta-ti-bsp/recipes-ti/secdev/ti-k3-secdev_git.bb @@ -0,0 +1,39 @@ +DESCRIPTION = "Security development tools for High-Security(HS) TI K3 processors." +HOMEPAGE = "https://git.ti.com/cgit/security-development-tools/core-secdev-k3" +SECTION = "devel" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://manifest/k3-secdev-0.2-manifest.html;md5=f632a78870cc64550078d7b3cbac0892" + +# set a default install location +TI_K3_SECDEV_INSTALL_DIR_RECIPE = "${datadir}/ti/ti-k3-secdev" + +# Native host tool only +COMPATIBLE_MACHINE = "null" +COMPATIBLE_MACHINE:class-native = "(.*)" +COMPATIBLE_MACHINE:class-nativesdk = "(.*)" + +GIT_URI = "git://git.ti.com/git/security-development-tools/core-secdev-k3.git" +GIT_PROTOCOL = "https" +GIT_BRANCH = "master" +GIT_SRCREV = "ed6951fd3877c6cac7f1237311f7278ac21634f3" + +SRC_URI = "${GIT_URI};protocol=${GIT_PROTOCOL};branch=${GIT_BRANCH}" +SRCREV = "${GIT_SRCREV}" + +S = "${WORKDIR}/git" + +do_install() { + CP_ARGS="-Prf --preserve=mode,links,timestamps --no-preserve=ownership" + install -d ${D}${TI_K3_SECDEV_INSTALL_DIR_RECIPE} + cp ${CP_ARGS} ${S}/* ${D}${TI_K3_SECDEV_INSTALL_DIR_RECIPE} +} + +FILES:${PN} += "${TI_K3_SECDEV_INSTALL_DIR_RECIPE}" + +INSANE_SKIP:${PN} = "arch ldflags file-rdeps" + +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_SYSROOT_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-ti-bsp/recipes-ti/ti-rtos-bin/files/empty b/meta-ti-bsp/recipes-ti/ti-rtos-bin/files/empty new file mode 100644 index 00000000..c6cac692 --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ti-rtos-bin/files/empty @@ -0,0 +1 @@ +empty diff --git a/meta-ti-bsp/recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb b/meta-ti-bsp/recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb new file mode 100644 index 00000000..7bf5030a --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb @@ -0,0 +1,394 @@ +SUMMARY = "TI Echo Test prebuilt binary firmware images" + +LICENSE = "TI-TFL" +LIC_FILES_CHKSUM = "file://${THISDIR}/../../licenses/TI-TFL;md5=a1b59cb7ba626b9dbbcbf00f3fbc438a" + +COMPATIBLE_MACHINE = "k3" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +INHIBIT_DEFAULT_DEPS = "1" + +inherit update-alternatives + +PLAT_SFX = "" +PLAT_SFX:j721e = "j721e" +PLAT_SFX:j7200 = "j7200" +PLAT_SFX:j721s2 = "j721s2" +PLAT_SFX:j784s4 = "j784s4" +PLAT_SFX:j722s = "j722s" +PLAT_SFX:am65xx = "am65xx" +PLAT_SFX:am64xx = "am64xx" +PLAT_SFX:am62xx = "am62xx" +PLAT_SFX:am62axx = "am62axx" +PLAT_SFX:am62pxx = "am62pxx" + +FILESEXTRAPATHS:prepend := "${METATIBASE}/recipes-bsp/ti-sci-fw/files/:" +require recipes-bsp/ti-linux-fw/ti-linux-fw.inc + +PV = "${CORESDK_RTOS_VERSION}" +PR = "${INC_PR}.1" + +# Secure Build +inherit ti-secdev + +IPC_FW_DIR = "ti-ipc/${PLAT_SFX}" + +INSTALL_IPC_FW_DIR = "${nonarch_base_libdir}/firmware/${IPC_FW_DIR}" + +MCU_1_0_FW = "ipc_echo_test_mcu1_0_release_strip.xer5f" +MCU_1_1_FW = "ipc_echo_test_mcu1_1_release_strip.xer5f" +MCU_2_0_FW = "ipc_echo_test_mcu2_0_release_strip.xer5f" +MCU_2_1_FW = "ipc_echo_test_mcu2_1_release_strip.xer5f" +MCU_3_0_FW = "ipc_echo_test_mcu3_0_release_strip.xer5f" +MCU_3_1_FW = "ipc_echo_test_mcu3_1_release_strip.xer5f" +MCU_4_0_FW = "ipc_echo_test_mcu4_0_release_strip.xer5f" +MCU_4_1_FW = "ipc_echo_test_mcu4_1_release_strip.xer5f" +C66_1_FW = "ipc_echo_test_c66xdsp_1_release_strip.xe66" +C66_2_FW = "ipc_echo_test_c66xdsp_2_release_strip.xe66" +C7X_1_FW = "ipc_echo_test_c7x_1_release_strip.xe71" +C7X_2_FW = "ipc_echo_test_c7x_2_release_strip.xe71" +C7X_3_FW = "ipc_echo_test_c7x_3_release_strip.xe71" +C7X_4_FW = "ipc_echo_test_c7x_4_release_strip.xe71" + +IPC_FW_LIST = "" +IPC_FW_LIST:am65xx = "${MCU_1_0_FW} ${MCU_1_1_FW}" +IPC_FW_LIST:am64xx = "${MCU_1_0_FW} ${MCU_1_1_FW} ${MCU_2_0_FW} ${MCU_2_1_FW} ${MCU_3_0_FW}" +IPC_FW_LIST:am62xx = " ${MCU_2_0_FW}" +IPC_FW_LIST:am62pxx = " ${MCU_2_0_FW}" +IPC_FW_LIST:am62axx = " ${MCU_2_0_FW} ${C7X_1_FW}" +IPC_FW_LIST:j721e = " ${MCU_1_1_FW} ${MCU_2_0_FW} ${MCU_2_1_FW} ${MCU_3_0_FW} ${MCU_3_1_FW} ${C66_1_FW} ${C66_2_FW} ${C7X_1_FW}" +IPC_FW_LIST:j7200 = " ${MCU_1_1_FW} ${MCU_2_0_FW} ${MCU_2_1_FW}" +IPC_FW_LIST:j721s2 = " ${MCU_1_1_FW} ${MCU_2_0_FW} ${MCU_2_1_FW} ${MCU_3_0_FW} ${MCU_3_1_FW} ${C7X_1_FW} ${C7X_2_FW}" +IPC_FW_LIST:j784s4 = " ${MCU_1_1_FW} ${MCU_2_0_FW} ${MCU_2_1_FW} ${MCU_3_0_FW} ${MCU_3_1_FW} ${MCU_4_0_FW} ${MCU_4_1_FW} ${C7X_1_FW} ${C7X_2_FW} ${C7X_3_FW} ${C7X_4_FW}" +IPC_FW_LIST:j722s = " ${MCU_2_0_FW} ${MCU_3_0_FW} ${C7X_1_FW} ${C7X_2_FW}" + +# Update the am64xx ipc binaries to be consistent with other platforms +do_install:prepend:am64xx() { + ( cd ${S}/${IPC_FW_DIR}; \ + ln -sf am64-main-r5f0_0-fw ${MCU_1_0_FW}; \ + ln -sf am64-main-r5f0_1-fw ${MCU_1_1_FW}; \ + ln -sf am64-main-r5f1_0-fw ${MCU_2_0_FW}; \ + ln -sf am64-main-r5f1_1-fw ${MCU_2_1_FW}; \ + ln -sf am64-mcu-m4f0_0-fw ${MCU_3_0_FW}; \ + ) +} + +# Update the am62xx ipc binaries to be consistent with other platforms +do_install:prepend:am62xx() { + ( cd ${S}/${IPC_FW_DIR}; \ + ln -sf am62-mcu-m4f0_0-fw ${MCU_2_0_FW}; \ + ) +} + +# Update the am62pxx ipc binaries to be consistent with other platforms +do_install:prepend:am62pxx() { + ( cd ${S}/${IPC_FW_DIR}; \ + ln -sf am62p-mcu-r5f0_0-fw ${MCU_2_0_FW}; \ + ) +} + +# Update the am62axx ipc binaries to be consistent with other platforms +do_install:prepend:am62axx() { + ( cd ${S}/${IPC_FW_DIR}; \ + ln -sf am62a-mcu-r5f0_0-fw ${MCU_2_0_FW}; \ + ) +} + +do_install() { + # IPC Firmware + for FW_NAME in ${IPC_FW_LIST} + do + ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${S}/${IPC_FW_DIR}/${FW_NAME} ${S}/${IPC_FW_DIR}/${FW_NAME}.signed + done + + # IPC Firmware + install -d ${D}${INSTALL_IPC_FW_DIR} + for FW_NAME in ${IPC_FW_LIST} + do + install -m 0644 ${S}/${IPC_FW_DIR}/${FW_NAME} ${D}${INSTALL_IPC_FW_DIR} + install -m 0644 ${S}/${IPC_FW_DIR}/${FW_NAME}.signed ${D}${INSTALL_IPC_FW_DIR} + done +} + +# Set up names for the firmwares +ALTERNATIVE:${PN}:am65xx = "\ + am65x-mcu-r5f0_0-fw am65x-mcu-r5f0_0-fw-sec \ + am65x-mcu-r5f0_1-fw am65x-mcu-r5f0_1-fw-sec \ + " + +ALTERNATIVE:${PN}:am64xx = "\ + am64-main-r5f0_0-fw am64-main-r5f0_0-fw-sec \ + am64-main-r5f0_1-fw am64-main-r5f0_1-fw-sec \ + am64-main-r5f1_0-fw am64-main-r5f1_0-fw-sec \ + am64-main-r5f1_1-fw am64-main-r5f1_1-fw-sec \ + am64-mcu-m4f0_0-fw am64-mcu-m4f0_0-fw-sec \ + " + +ALTERNATIVE:${PN}:am62xx = "\ + am62-mcu-m4f0_0-fw am62-mcu-m4f0_0-fw-sec \ + am62-main-r5f0_0-fw am62-main-r5f0_0-fw-sec \ + " + +ALTERNATIVE:${PN}:am62pxx = "\ + am62p-mcu-r5f0_0-fw am62p-mcu-r5f0_0-fw-sec \ + " + +ALTERNATIVE:${PN}:am62axx = "\ + am62a-mcu-r5f0_0-fw am62a-mcu-r5f0_0-fw-sec \ + am62a-c71_0-fw am62a-c71_0-fw-sec \ + " + +ALTERNATIVE:${PN}:j721e = "\ + j7-mcu-r5f0_1-fw j7-mcu-r5f0_1-fw-sec \ + j7-main-r5f0_0-fw j7-main-r5f0_0-fw-sec \ + j7-main-r5f0_1-fw j7-main-r5f0_1-fw-sec \ + j7-main-r5f1_0-fw j7-main-r5f1_0-fw-sec \ + j7-main-r5f1_1-fw j7-main-r5f1_1-fw-sec \ + j7-c66_0-fw j7-c66_0-fw-sec \ + j7-c66_1-fw j7-c66_1-fw-sec \ + j7-c71_0-fw j7-c71_0-fw-sec \ + " + +ALTERNATIVE:${PN}:j7200 = "\ + j7200-mcu-r5f0_1-fw j7200-mcu-r5f0_1-fw-sec \ + j7200-main-r5f0_0-fw j7200-main-r5f0_0-fw-sec \ + j7200-main-r5f0_1-fw j7200-main-r5f0_1-fw-sec \ + " + +ALTERNATIVE:${PN}:j721s2 = "\ + j721s2-mcu-r5f0_1-fw j721s2-mcu-r5f0_1-fw-sec \ + j721s2-main-r5f0_0-fw j721s2-main-r5f0_0-fw-sec \ + j721s2-main-r5f0_1-fw j721s2-main-r5f0_1-fw-sec \ + j721s2-main-r5f1_0-fw j721s2-main-r5f1_0-fw-sec \ + j721s2-main-r5f1_1-fw j721s2-main-r5f1_1-fw-sec \ + j721s2-c71_0-fw j721s2-c71_0-fw-sec \ + j721s2-c71_1-fw j721s2-c71_1-fw-sec \ + " + +ALTERNATIVE:${PN}:j784s4 = "\ + j784s4-mcu-r5f0_1-fw j784s4-mcu-r5f0_1-fw-sec \ + j784s4-main-r5f0_0-fw j784s4-main-r5f0_0-fw-sec \ + j784s4-main-r5f0_1-fw j784s4-main-r5f0_1-fw-sec \ + j784s4-main-r5f1_0-fw j784s4-main-r5f1_0-fw-sec \ + j784s4-main-r5f1_1-fw j784s4-main-r5f1_1-fw-sec \ + j784s4-main-r5f2_0-fw j784s4-main-r5f2_0-fw-sec \ + j784s4-main-r5f2_1-fw j784s4-main-r5f2_1-fw-sec \ + j784s4-c71_0-fw j784s4-c71_0-fw-sec \ + j784s4-c71_1-fw j784s4-c71_1-fw-sec \ + j784s4-c71_2-fw j784s4-c71_2-fw-sec \ + j784s4-c71_3-fw j784s4-c71_3-fw-sec \ + " + +ALTERNATIVE:${PN}:j722s = "\ + j722s-mcu-r5f0_0-fw j722s-mcu-r5f0_0-fw-sec \ + j722s-main-r5f0_0-fw j722s-main-r5f0_0-fw-sec \ + j722s-c71_0-fw j722s-c71_0-fw-sec \ + j722s-c71_1-fw j722s-c71_1-fw-sec \ + " + +# Set up link names for the firmwares + +ALTERNATIVE_LINK_NAME[am65x-mcu-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/am65x-mcu-r5f0_0-fw" +ALTERNATIVE_LINK_NAME[am65x-mcu-r5f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/am65x-mcu-r5f0_0-fw-sec" +ALTERNATIVE_LINK_NAME[am65x-mcu-r5f0_1-fw] = "${nonarch_base_libdir}/firmware/am65x-mcu-r5f0_1-fw" +ALTERNATIVE_LINK_NAME[am65x-mcu-r5f0_1-fw-sec] = "${nonarch_base_libdir}/firmware/am65x-mcu-r5f0_1-fw-sec" + +ALTERNATIVE_LINK_NAME[am64-main-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/am64-main-r5f0_0-fw" +ALTERNATIVE_LINK_NAME[am64-main-r5f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/am64-main-r5f0_0-fw-sec" +ALTERNATIVE_LINK_NAME[am64-main-r5f0_1-fw] = "${nonarch_base_libdir}/firmware/am64-main-r5f0_1-fw" +ALTERNATIVE_LINK_NAME[am64-main-r5f0_1-fw-sec] = "${nonarch_base_libdir}/firmware/am64-main-r5f0_1-fw-sec" +ALTERNATIVE_LINK_NAME[am64-main-r5f1_0-fw] = "${nonarch_base_libdir}/firmware/am64-main-r5f1_0-fw" +ALTERNATIVE_LINK_NAME[am64-main-r5f1_0-fw-sec] = "${nonarch_base_libdir}/firmware/am64-main-r5f1_0-fw-sec" +ALTERNATIVE_LINK_NAME[am64-main-r5f1_1-fw] = "${nonarch_base_libdir}/firmware/am64-main-r5f1_1-fw" +ALTERNATIVE_LINK_NAME[am64-main-r5f1_1-fw-sec] = "${nonarch_base_libdir}/firmware/am64-main-r5f1_1-fw-sec" +ALTERNATIVE_LINK_NAME[am64-mcu-m4f0_0-fw] = "${nonarch_base_libdir}/firmware/am64-mcu-m4f0_0-fw" +ALTERNATIVE_LINK_NAME[am64-mcu-m4f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/am64-mcu-m4f0_0-fw-sec" + +ALTERNATIVE_LINK_NAME[am62-mcu-m4f0_0-fw] = "${nonarch_base_libdir}/firmware/am62-mcu-m4f0_0-fw" +ALTERNATIVE_LINK_NAME[am62-mcu-m4f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/am62-mcu-m4f0_0-fw-sec" +ALTERNATIVE_LINK_NAME[am62-main-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/am62-main-r5f0_0-fw" +ALTERNATIVE_LINK_NAME[am62-main-r5f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/am62-main-r5f0_0-fw-sec" + +ALTERNATIVE_LINK_NAME[am62p-mcu-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/am62p-mcu-r5f0_0-fw" +ALTERNATIVE_LINK_NAME[am62p-mcu-r5f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/am62p-mcu-r5f0_0-fw-sec" + +ALTERNATIVE_LINK_NAME[am62a-mcu-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/am62a-mcu-r5f0_0-fw" +ALTERNATIVE_LINK_NAME[am62a-mcu-r5f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/am62a-mcu-r5f0_0-fw-sec" +ALTERNATIVE_LINK_NAME[am62a-c71_0-fw] = "${nonarch_base_libdir}/firmware/am62a-c71_0-fw" +ALTERNATIVE_LINK_NAME[am62a-c71_0-fw-sec] = "${nonarch_base_libdir}/firmware/am62a-c71_0-fw-sec" + +ALTERNATIVE_LINK_NAME[j7-mcu-r5f0_1-fw] = "${nonarch_base_libdir}/firmware/j7-mcu-r5f0_1-fw" +ALTERNATIVE_LINK_NAME[j7-mcu-r5f0_1-fw-sec] = "${nonarch_base_libdir}/firmware/j7-mcu-r5f0_1-fw-sec" +ALTERNATIVE_LINK_NAME[j7-main-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/j7-main-r5f0_0-fw" +ALTERNATIVE_LINK_NAME[j7-main-r5f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/j7-main-r5f0_0-fw-sec" +ALTERNATIVE_LINK_NAME[j7-main-r5f0_1-fw] = "${nonarch_base_libdir}/firmware/j7-main-r5f0_1-fw" +ALTERNATIVE_LINK_NAME[j7-main-r5f0_1-fw-sec] = "${nonarch_base_libdir}/firmware/j7-main-r5f0_1-fw-sec" +ALTERNATIVE_LINK_NAME[j7-main-r5f1_0-fw] = "${nonarch_base_libdir}/firmware/j7-main-r5f1_0-fw" +ALTERNATIVE_LINK_NAME[j7-main-r5f1_0-fw-sec] = "${nonarch_base_libdir}/firmware/j7-main-r5f1_0-fw-sec" +ALTERNATIVE_LINK_NAME[j7-main-r5f1_1-fw] = "${nonarch_base_libdir}/firmware/j7-main-r5f1_1-fw" +ALTERNATIVE_LINK_NAME[j7-main-r5f1_1-fw-sec] = "${nonarch_base_libdir}/firmware/j7-main-r5f1_1-fw-sec" +ALTERNATIVE_LINK_NAME[j7-c66_0-fw] = "${nonarch_base_libdir}/firmware/j7-c66_0-fw" +ALTERNATIVE_LINK_NAME[j7-c66_0-fw-sec] = "${nonarch_base_libdir}/firmware/j7-c66_0-fw-sec" +ALTERNATIVE_LINK_NAME[j7-c66_1-fw] = "${nonarch_base_libdir}/firmware/j7-c66_1-fw" +ALTERNATIVE_LINK_NAME[j7-c66_1-fw-sec] = "${nonarch_base_libdir}/firmware/j7-c66_1-fw-sec" +ALTERNATIVE_LINK_NAME[j7-c71_0-fw] = "${nonarch_base_libdir}/firmware/j7-c71_0-fw" +ALTERNATIVE_LINK_NAME[j7-c71_0-fw-sec] = "${nonarch_base_libdir}/firmware/j7-c71_0-fw-sec" + +ALTERNATIVE_LINK_NAME[j7200-mcu-r5f0_1-fw] = "${nonarch_base_libdir}/firmware/j7200-mcu-r5f0_1-fw" +ALTERNATIVE_LINK_NAME[j7200-mcu-r5f0_1-fw-sec] = "${nonarch_base_libdir}/firmware/j7200-mcu-r5f0_1-fw-sec" +ALTERNATIVE_LINK_NAME[j7200-main-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/j7200-main-r5f0_0-fw" +ALTERNATIVE_LINK_NAME[j7200-main-r5f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/j7200-main-r5f0_0-fw-sec" +ALTERNATIVE_LINK_NAME[j7200-main-r5f0_1-fw] = "${nonarch_base_libdir}/firmware/j7200-main-r5f0_1-fw" +ALTERNATIVE_LINK_NAME[j7200-main-r5f0_1-fw-sec] = "${nonarch_base_libdir}/firmware/j7200-main-r5f0_1-fw-sec" + +ALTERNATIVE_LINK_NAME[j721s2-mcu-r5f0_1-fw] = "${nonarch_base_libdir}/firmware/j721s2-mcu-r5f0_1-fw" +ALTERNATIVE_LINK_NAME[j721s2-mcu-r5f0_1-fw-sec] = "${nonarch_base_libdir}/firmware/j721s2-mcu-r5f0_1-fw-sec" +ALTERNATIVE_LINK_NAME[j721s2-main-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/j721s2-main-r5f0_0-fw" +ALTERNATIVE_LINK_NAME[j721s2-main-r5f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/j721s2-main-r5f0_0-fw-sec" +ALTERNATIVE_LINK_NAME[j721s2-main-r5f0_1-fw] = "${nonarch_base_libdir}/firmware/j721s2-main-r5f0_1-fw" +ALTERNATIVE_LINK_NAME[j721s2-main-r5f0_1-fw-sec] = "${nonarch_base_libdir}/firmware/j721s2-main-r5f0_1-fw-sec" +ALTERNATIVE_LINK_NAME[j721s2-main-r5f1_0-fw] = "${nonarch_base_libdir}/firmware/j721s2-main-r5f1_0-fw" +ALTERNATIVE_LINK_NAME[j721s2-main-r5f1_0-fw-sec] = "${nonarch_base_libdir}/firmware/j721s2-main-r5f1_0-fw-sec" +ALTERNATIVE_LINK_NAME[j721s2-main-r5f1_1-fw] = "${nonarch_base_libdir}/firmware/j721s2-main-r5f1_1-fw" +ALTERNATIVE_LINK_NAME[j721s2-main-r5f1_1-fw-sec] = "${nonarch_base_libdir}/firmware/j721s2-main-r5f1_1-fw-sec" +ALTERNATIVE_LINK_NAME[j721s2-c71_0-fw] = "${nonarch_base_libdir}/firmware/j721s2-c71_0-fw" +ALTERNATIVE_LINK_NAME[j721s2-c71_0-fw-sec] = "${nonarch_base_libdir}/firmware/j721s2-c71_0-fw-sec" +ALTERNATIVE_LINK_NAME[j721s2-c71_1-fw] = "${nonarch_base_libdir}/firmware/j721s2-c71_1-fw" +ALTERNATIVE_LINK_NAME[j721s2-c71_1-fw-sec] = "${nonarch_base_libdir}/firmware/j721s2-c71_1-fw-sec" + +ALTERNATIVE_LINK_NAME[j784s4-mcu-r5f0_1-fw] = "${nonarch_base_libdir}/firmware/j784s4-mcu-r5f0_1-fw" +ALTERNATIVE_LINK_NAME[j784s4-mcu-r5f0_1-fw-sec] = "${nonarch_base_libdir}/firmware/j784s4-mcu-r5f0_1-fw-sec" +ALTERNATIVE_LINK_NAME[j784s4-main-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/j784s4-main-r5f0_0-fw" +ALTERNATIVE_LINK_NAME[j784s4-main-r5f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/j784s4-main-r5f0_0-fw-sec" +ALTERNATIVE_LINK_NAME[j784s4-main-r5f0_1-fw] = "${nonarch_base_libdir}/firmware/j784s4-main-r5f0_1-fw" +ALTERNATIVE_LINK_NAME[j784s4-main-r5f0_1-fw-sec] = "${nonarch_base_libdir}/firmware/j784s4-main-r5f0_1-fw-sec" +ALTERNATIVE_LINK_NAME[j784s4-main-r5f1_0-fw] = "${nonarch_base_libdir}/firmware/j784s4-main-r5f1_0-fw" +ALTERNATIVE_LINK_NAME[j784s4-main-r5f1_0-fw-sec] = "${nonarch_base_libdir}/firmware/j784s4-main-r5f1_0-fw-sec" +ALTERNATIVE_LINK_NAME[j784s4-main-r5f1_1-fw] = "${nonarch_base_libdir}/firmware/j784s4-main-r5f1_1-fw" +ALTERNATIVE_LINK_NAME[j784s4-main-r5f1_1-fw-sec] = "${nonarch_base_libdir}/firmware/j784s4-main-r5f1_1-fw-sec" +ALTERNATIVE_LINK_NAME[j784s4-main-r5f2_0-fw] = "${nonarch_base_libdir}/firmware/j784s4-main-r5f2_0-fw" +ALTERNATIVE_LINK_NAME[j784s4-main-r5f2_0-fw-sec] = "${nonarch_base_libdir}/firmware/j784s4-main-r5f2_0-fw-sec" +ALTERNATIVE_LINK_NAME[j784s4-main-r5f2_1-fw] = "${nonarch_base_libdir}/firmware/j784s4-main-r5f2_1-fw" +ALTERNATIVE_LINK_NAME[j784s4-main-r5f2_1-fw-sec] = "${nonarch_base_libdir}/firmware/j784s4-main-r5f2_1-fw-sec" +ALTERNATIVE_LINK_NAME[j784s4-c71_0-fw] = "${nonarch_base_libdir}/firmware/j784s4-c71_0-fw" +ALTERNATIVE_LINK_NAME[j784s4-c71_0-fw-sec] = "${nonarch_base_libdir}/firmware/j784s4-c71_0-fw-sec" +ALTERNATIVE_LINK_NAME[j784s4-c71_1-fw] = "${nonarch_base_libdir}/firmware/j784s4-c71_1-fw" +ALTERNATIVE_LINK_NAME[j784s4-c71_1-fw-sec] = "${nonarch_base_libdir}/firmware/j784s4-c71_1-fw-sec" +ALTERNATIVE_LINK_NAME[j784s4-c71_2-fw] = "${nonarch_base_libdir}/firmware/j784s4-c71_2-fw" +ALTERNATIVE_LINK_NAME[j784s4-c71_2-fw-sec] = "${nonarch_base_libdir}/firmware/j784s4-c71_2-fw-sec" +ALTERNATIVE_LINK_NAME[j784s4-c71_3-fw] = "${nonarch_base_libdir}/firmware/j784s4-c71_3-fw" +ALTERNATIVE_LINK_NAME[j784s4-c71_3-fw-sec] = "${nonarch_base_libdir}/firmware/j784s4-c71_3-fw-sec" + +ALTERNATIVE_LINK_NAME[j722s-mcu-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/j722s-mcu-r5f0_0-fw" +ALTERNATIVE_LINK_NAME[j722s-mcu-r5f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/j722s-mcu-r5f0_0-fw-sec" +ALTERNATIVE_LINK_NAME[j722s-main-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/j722s-main-r5f0_0-fw" +ALTERNATIVE_LINK_NAME[j722s-main-r5f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/j722s-main-r5f0_0-fw-sec" +ALTERNATIVE_LINK_NAME[j722s-c71_0-fw] = "${nonarch_base_libdir}/firmware/j722s-c71_0-fw" +ALTERNATIVE_LINK_NAME[j722s-c71_0-fw-sec] = "${nonarch_base_libdir}/firmware/j722s-c71_0-fw-sec" +ALTERNATIVE_LINK_NAME[j722s-c71_1-fw] = "${nonarch_base_libdir}/firmware/j722s-c71_1-fw" +ALTERNATIVE_LINK_NAME[j722s-c71_1-fw-sec] = "${nonarch_base_libdir}/firmware/j722s-c71_1-fw-sec" + +# Create the firmware alternatives + +ALTERNATIVE_TARGET[am65x-mcu-r5f0_0-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_1_0_FW}" +ALTERNATIVE_TARGET[am65x-mcu-r5f0_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_1_0_FW}.signed" +ALTERNATIVE_TARGET[am65x-mcu-r5f0_1-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_1_1_FW}" +ALTERNATIVE_TARGET[am65x-mcu-r5f0_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_1_1_FW}.signed" + +ALTERNATIVE_TARGET[am64-main-r5f0_0-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_1_0_FW}" +ALTERNATIVE_TARGET[am64-main-r5f0_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_1_0_FW}.signed" +ALTERNATIVE_TARGET[am64-main-r5f0_1-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_1_1_FW}" +ALTERNATIVE_TARGET[am64-main-r5f0_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_1_1_FW}.signed" +ALTERNATIVE_TARGET[am64-main-r5f1_0-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}" +ALTERNATIVE_TARGET[am64-main-r5f1_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}.signed" +ALTERNATIVE_TARGET[am64-main-r5f1_1-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_2_1_FW}" +ALTERNATIVE_TARGET[am64-main-r5f1_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_2_1_FW}.signed" +ALTERNATIVE_TARGET[am64-mcu-m4f0_0-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_3_0_FW}" +ALTERNATIVE_TARGET[am64-mcu-m4f0_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_3_0_FW}.signed" + +ALTERNATIVE_TARGET[am62-mcu-m4f0_0-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}" +ALTERNATIVE_TARGET[am62-mcu-m4f0_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}.signed" +ALTERNATIVE_TARGET[am62-main-r5f0_0-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}" +ALTERNATIVE_TARGET[am62-main-r5f0_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}.signed" + +ALTERNATIVE_TARGET[am62p-mcu-r5f0_0-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}" +ALTERNATIVE_TARGET[am62p-mcu-r5f0_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}.signed" + +ALTERNATIVE_TARGET[am62a-mcu-r5f0_0-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}" +ALTERNATIVE_TARGET[am62a-mcu-r5f0_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}.signed" +ALTERNATIVE_TARGET[am62a-c71_0-fw] = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}" +ALTERNATIVE_TARGET[am62a-c71_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}.signed" + +ALTERNATIVE_TARGET[j7-mcu-r5f0_1-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_1_1_FW}" +ALTERNATIVE_TARGET[j7-mcu-r5f0_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_1_1_FW}.signed" +ALTERNATIVE_TARGET[j7-main-r5f0_0-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}" +ALTERNATIVE_TARGET[j7-main-r5f0_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}.signed" +ALTERNATIVE_TARGET[j7-main-r5f0_1-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_2_1_FW}" +ALTERNATIVE_TARGET[j7-main-r5f0_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_2_1_FW}.signed" +ALTERNATIVE_TARGET[j7-main-r5f1_0-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_3_0_FW}" +ALTERNATIVE_TARGET[j7-main-r5f1_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_3_0_FW}.signed" +ALTERNATIVE_TARGET[j7-main-r5f1_1-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_3_1_FW}" +ALTERNATIVE_TARGET[j7-main-r5f1_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_3_1_FW}.signed" +ALTERNATIVE_TARGET[j7-c66_0-fw] = "${INSTALL_IPC_FW_DIR}/${C66_1_FW}" +ALTERNATIVE_TARGET[j7-c66_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${C66_1_FW}.signed" +ALTERNATIVE_TARGET[j7-c66_1-fw] = "${INSTALL_IPC_FW_DIR}/${C66_2_FW}" +ALTERNATIVE_TARGET[j7-c66_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${C66_2_FW}.signed" +ALTERNATIVE_TARGET[j7-c71_0-fw] = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}" +ALTERNATIVE_TARGET[j7-c71_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}.signed" + +ALTERNATIVE_TARGET[j7200-mcu-r5f0_1-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_1_1_FW}" +ALTERNATIVE_TARGET[j7200-mcu-r5f0_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_1_1_FW}.signed" +ALTERNATIVE_TARGET[j7200-main-r5f0_0-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}" +ALTERNATIVE_TARGET[j7200-main-r5f0_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}.signed" +ALTERNATIVE_TARGET[j7200-main-r5f0_1-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_2_1_FW}" +ALTERNATIVE_TARGET[j7200-main-r5f0_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_2_1_FW}.signed" + +ALTERNATIVE_TARGET[j721s2-mcu-r5f0_1-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_1_1_FW}" +ALTERNATIVE_TARGET[j721s2-mcu-r5f0_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_1_1_FW}.signed" +ALTERNATIVE_TARGET[j721s2-main-r5f0_0-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}" +ALTERNATIVE_TARGET[j721s2-main-r5f0_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}.signed" +ALTERNATIVE_TARGET[j721s2-main-r5f0_1-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_2_1_FW}" +ALTERNATIVE_TARGET[j721s2-main-r5f0_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_2_1_FW}.signed" +ALTERNATIVE_TARGET[j721s2-main-r5f1_0-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_3_0_FW}" +ALTERNATIVE_TARGET[j721s2-main-r5f1_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_3_0_FW}.signed" +ALTERNATIVE_TARGET[j721s2-main-r5f1_1-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_3_1_FW}" +ALTERNATIVE_TARGET[j721s2-main-r5f1_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_3_1_FW}.signed" +ALTERNATIVE_TARGET[j721s2-c71_0-fw] = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}" +ALTERNATIVE_TARGET[j721s2-c71_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}.signed" +ALTERNATIVE_TARGET[j721s2-c71_1-fw] = "${INSTALL_IPC_FW_DIR}/${C7X_2_FW}" +ALTERNATIVE_TARGET[j721s2-c71_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${C7X_2_FW}.signed" + +ALTERNATIVE_TARGET[j784s4-mcu-r5f0_1-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_1_1_FW}" +ALTERNATIVE_TARGET[j784s4-mcu-r5f0_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_1_1_FW}.signed" +ALTERNATIVE_TARGET[j784s4-main-r5f0_0-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}" +ALTERNATIVE_TARGET[j784s4-main-r5f0_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}.signed" +ALTERNATIVE_TARGET[j784s4-main-r5f0_1-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_2_1_FW}" +ALTERNATIVE_TARGET[j784s4-main-r5f0_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_2_1_FW}.signed" +ALTERNATIVE_TARGET[j784s4-main-r5f1_0-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_3_0_FW}" +ALTERNATIVE_TARGET[j784s4-main-r5f1_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_3_0_FW}.signed" +ALTERNATIVE_TARGET[j784s4-main-r5f1_1-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_3_1_FW}" +ALTERNATIVE_TARGET[j784s4-main-r5f1_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_3_1_FW}.signed" +ALTERNATIVE_TARGET[j784s4-main-r5f2_0-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_4_0_FW}" +ALTERNATIVE_TARGET[j784s4-main-r5f2_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_4_0_FW}.signed" +ALTERNATIVE_TARGET[j784s4-main-r5f2_1-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_4_1_FW}" +ALTERNATIVE_TARGET[j784s4-main-r5f2_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_4_1_FW}.signed" +ALTERNATIVE_TARGET[j784s4-c71_0-fw] = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}" +ALTERNATIVE_TARGET[j784s4-c71_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}.signed" +ALTERNATIVE_TARGET[j784s4-c71_1-fw] = "${INSTALL_IPC_FW_DIR}/${C7X_2_FW}" +ALTERNATIVE_TARGET[j784s4-c71_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${C7X_2_FW}.signed" +ALTERNATIVE_TARGET[j784s4-c71_2-fw] = "${INSTALL_IPC_FW_DIR}/${C7X_3_FW}" +ALTERNATIVE_TARGET[j784s4-c71_2-fw-sec] = "${INSTALL_IPC_FW_DIR}/${C7X_3_FW}.signed" +ALTERNATIVE_TARGET[j784s4-c71_3-fw] = "${INSTALL_IPC_FW_DIR}/${C7X_4_FW}" +ALTERNATIVE_TARGET[j784s4-c71_3-fw-sec] = "${INSTALL_IPC_FW_DIR}/${C7X_4_FW}.signed" + +ALTERNATIVE_TARGET[j722s-mcu-r5f0_0-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}" +ALTERNATIVE_TARGET[j722s-mcu-r5f0_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}.signed" +ALTERNATIVE_TARGET[j722s-main-r5f0_0-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_3_0_FW}" +ALTERNATIVE_TARGET[j722s-main-r5f0_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_3_0_FW}.signed" +ALTERNATIVE_TARGET[j722s-c71_0-fw] = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}" +ALTERNATIVE_TARGET[j722s-c71_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}.signed" +ALTERNATIVE_TARGET[j722s-c71_1-fw] = "${INSTALL_IPC_FW_DIR}/${C7X_2_FW}" +ALTERNATIVE_TARGET[j722s-c71_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${C7X_2_FW}.signed" + +ALTERNATIVE_PRIORITY = "10" diff --git a/meta-ti-bsp/recipes-ti/ti-rtos-bin/ti-rtos-metadata.bb b/meta-ti-bsp/recipes-ti/ti-rtos-bin/ti-rtos-metadata.bb new file mode 100644 index 00000000..feee1cf9 --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ti-rtos-bin/ti-rtos-metadata.bb @@ -0,0 +1,47 @@ +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9" + +COMPATIBLE_MACHINE = "j721e|j7200|am65xx|am64xx" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +INHIBIT_DEFAULT_DEPS = "1" + +inherit nopackages deploy + +PLAT_SFX = "" +PLAT_SFX:j721e = "/j721e" +PLAT_SFX:j7200 = "/j7200" +PLAT_SFX:am65xx = "/am65xx" +PLAT_SFX:am64xx = "/am64x" + +# Use weak assignment to set defaults to TI_RTOS_METADATA_* variables +TI_RTOS_METADATA_URI ?= "git://git.ti.com/git/processor-sdk/coresdk_rtos_releases.git" +TI_RTOS_METADATA_PROTOCOL ?= "https" +TI_RTOS_METADATA_SRCREV ?= "2ecbf45af64bc47806623cc5bf7ab493489acaf9" +TI_RTOS_METADATA_BRANCH ?= "master" +TI_RTOS_METADATA_DIR ?= "${PLAT_SFX}" +TI_RTOS_METADATA_FILE ?= "${S}${TI_RTOS_METADATA_DIR}/metadata.inc" +TI_RTOS_METADATA_FILE:am64xx ?= "${S}${TI_RTOS_METADATA_DIR}/mcusdk_metadata.inc" + +PV = "1.0.0+git" + +S = "${WORKDIR}/git" + +SRC_URI = "${TI_RTOS_METADATA_URI};branch=${TI_RTOS_METADATA_BRANCH};protocol=${TI_RTOS_METADATA_PROTOCOL}" +SRCREV = "${TI_RTOS_METADATA_SRCREV}" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" +do_install[noexec] = "1" + +do_deploy () { + : +} + +do_deploy:k3 () { + install -d ${DEPLOYDIR} + install -m 0644 ${TI_RTOS_METADATA_FILE} ${DEPLOYDIR}/ +} + +addtask deploy before do_build after do_compile diff --git a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in b/meta-ti-bsp/wic/sdimage-2part-efi.wks.in new file mode 100644 index 00000000..ca042be1 --- /dev/null +++ b/meta-ti-bsp/wic/sdimage-2part-efi.wks.in @@ -0,0 +1,8 @@ +# short-description: Create SD card image with 2 partitions and EFI support +# long-description: Creates a partitioned SD card image for TI platforms that +# supports EFI. Boot files are located in the first vfat partition with extra +# reserved space. We cannot use a GPT here. + +bootloader --timeout=3 --append="rootfstype=ext4" +part --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}" --fstype=vfat --label boot --active --align 1024 --use-uuid --fixed-size 128M +part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid diff --git a/meta-ti-bsp/wic/sdimage-2part.wks b/meta-ti-bsp/wic/sdimage-2part.wks new file mode 100644 index 00000000..5073176e --- /dev/null +++ b/meta-ti-bsp/wic/sdimage-2part.wks @@ -0,0 +1,6 @@ +# short-description: Create SD card image with 2 partitions +# long-description: Creates a partitioned SD card image for TI platforms. +# Boot files are located in the first vfat partition with extra reserved space. + +part --source bootimg-partition --fstype=vfat --label boot --active --align 1024 --use-uuid --fixed-size 128M +part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid |