Merge branch 'dey-4.0/master' into dey-4.0/maint
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit is contained in:
commit
53b9fd076d
46
README.md
46
README.md
|
|
@ -1,5 +1,5 @@
|
|||
# Digi Embedded Yocto (DEY) 4.0
|
||||
## Release 4.0-r6
|
||||
## Release 4.0-r7
|
||||
|
||||
This document provides information about Digi Embedded Yocto,
|
||||
Digi International's professional embedded Yocto development environment.
|
||||
|
|
@ -21,6 +21,18 @@ OS versions:
|
|||
|
||||
Software for the following hardware platforms is in production support:
|
||||
|
||||
## ConnectCore MP25
|
||||
* ConnectCore MP25 System-on-Module (SOM)
|
||||
* [CC-WST-J17D-NK](https://www.digi.com/products/models/cc-wst-j17d-nk)
|
||||
* [CC-ST-J17D-ZK](https://www.digi.com/products/models/cc-st-j17d-zk)
|
||||
* ConnectCore MP25 Development Kit (DVK)
|
||||
* [CC-WMP255-KIT](https://www.digi.com/products/models/cc-wmp255-kit) ([Get Started](https://www.digi.com/resources/documentation/digidocs/embedded/dey/4.0/ccmp25/yocto-gs_index))
|
||||
|
||||
## ConnectCore 91
|
||||
* ConnectCore 91 System-on-Module (SOM)
|
||||
* [CC-WMX-F26D-L1](https://www.digi.com/products/models/cc-wmx-f26d-l1)
|
||||
* [CC-MX-F26D-Z1](https://www.digi.com/products/models/cc-mx-f26d-z1)
|
||||
|
||||
## ConnectCore 93
|
||||
* ConnectCore 93 System-on-Module (SOM)
|
||||
* [CC-WMX-YC7D-KN](https://www.digi.com/products/models/cc-wmx-yc7d-kn)
|
||||
|
|
@ -125,11 +137,31 @@ Documentation is available online at https://www.digi.com/resources/documentatio
|
|||
|
||||
# Downloads
|
||||
|
||||
* Demo images: https://ftp1.digi.com/support/digiembeddedyocto/4.0/r6/images/
|
||||
* Software Development Kit (SDK): https://ftp1.digi.com/support/digiembeddedyocto/4.0/r6/sdk/
|
||||
* Demo images: https://ftp1.digi.com/support/digiembeddedyocto/4.0/r7/images/
|
||||
* Software Development Kit (SDK): https://ftp1.digi.com/support/digiembeddedyocto/4.0/r7/sdk/
|
||||
|
||||
# Release Changelog
|
||||
|
||||
## 4.0-r7
|
||||
|
||||
* ST-based platforms
|
||||
* Added support to ConnectCore MP25
|
||||
* Trusted Firmware ARM v2.8 (based on tag 'v2.8-stm32mp25-beta-r2' by ST)
|
||||
* OP-TEE v3.19.0 (based on tag '3.19.0-stm32mp25-beta-r1' by ST)
|
||||
* U-Boot v2022.10 (based on tag 'v2020.10-stm32mp25-beta-r1' by ST)
|
||||
* Linux kernel v6.1.28 (based on tag 'stm32mp25-beta-r1' by ST)
|
||||
* Added support to create signed SDcard image for ConnectCore MP15/MP13
|
||||
* Added support to program and use hardware unique key (HUK) on OTP bits as derivative for encryption key on ConnectCore MP15
|
||||
* Enable spread-spectrum on PLL2 to mitigate emission on 533MHz frequency on ConnectCore MP15
|
||||
* NXP-based platforms
|
||||
* Added support to ConnectCore 91
|
||||
* U-Boot v2024.04
|
||||
* Linux kernel v6.6.23 (based on tag 'lf-6.6.23-2.0.0' by NXP)
|
||||
* Improved SWU package generation and support:
|
||||
* Added software update (SWU) authentication when Trustfence is enabled
|
||||
* Added support to fix Y2K38 problem on 32-bit platforms
|
||||
* General bug fixing and improvements
|
||||
|
||||
## 4.0-r6
|
||||
|
||||
* ST-based platforms
|
||||
|
|
@ -311,6 +343,14 @@ updated list can be found on the online documentation.
|
|||
devices (ConnectCore 6UL, ConnectCore 6 Plus, and ConnectCore 8M Nano) fail
|
||||
to join autonomous groups.
|
||||
|
||||
## ConnectCore MP25
|
||||
|
||||
* ConnectCore MP2 System-on-Module (SOM)
|
||||
* Power management
|
||||
* Power management support is not yet implemented.
|
||||
* Firmware update
|
||||
* Update single file and update with rdiff don't currently work.
|
||||
|
||||
## ConnectCore MP15/MP13
|
||||
|
||||
* ConnectCore MP1 System-on-Module (SOM)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,567 @@
|
|||
inherit sign-stm32mp2
|
||||
|
||||
DEPENDS += "tf-a-tools-native util-linux-native"
|
||||
|
||||
# Configure new package to provide fiptool wrapper for SDK usage
|
||||
PACKAGES =+ "${FIPTOOL_WRAPPER}"
|
||||
|
||||
BBCLASSEXTEND:append = " nativesdk"
|
||||
|
||||
RRECOMMENDS:${FIPTOOL_WRAPPER}:append:class-nativesdk = " nativesdk-tf-a-tools"
|
||||
|
||||
# Define default TF-A FIP namings
|
||||
FIP_BASENAME ?= "fip"
|
||||
FIP_SUFFIX ?= "bin"
|
||||
|
||||
# Set default TF-A FIP config
|
||||
FIP_CONFIG ?= ""
|
||||
|
||||
# Default FIP config:
|
||||
# There are two options implemented to select two different firmware and each
|
||||
# FIP_CONFIG should configure one: 'tfa' or 'optee'
|
||||
FIP_CONFIG_FW_TFA = "tfa"
|
||||
FIP_CONFIG_FW_TEE = "optee"
|
||||
|
||||
# Init BL31 config
|
||||
FIP_BL31_ENABLE ?= ""
|
||||
|
||||
# Set CERTTOOL binary name to use
|
||||
CERTTOOL ?= "cert_create"
|
||||
# Set ENCTOOL binary name to use
|
||||
ENCTOOL ?= "encrypt_fw"
|
||||
# Set FIPTOOL binary name to use
|
||||
FIPTOOL ?= "fiptool"
|
||||
# Set STM32MP fiptool wrapper
|
||||
FIPTOOL_WRAPPER ?= "fiptool-stm32mp"
|
||||
|
||||
# Default FIP file names and suffixes
|
||||
FIP_BL31 ?= "tf-a-bl31"
|
||||
FIP_BL31_SUFFIX ?= "bin"
|
||||
FIP_BL31_DTB ?= "bl31"
|
||||
FIP_BL31_DTB_SUFFIX ?= "dtb"
|
||||
FIP_TFA ?= "tf-a-bl32"
|
||||
FIP_TFA_SUFFIX ?= "bin"
|
||||
FIP_TFA_DTB ?= "bl32"
|
||||
FIP_TFA_DTB_SUFFIX ?= "dtb"
|
||||
FIP_FW_CONFIG ?= "fw-config"
|
||||
FIP_FW_CONFIG_SUFFIX ?= "dtb"
|
||||
FIP_FW_DDR ?= "ddr_pmu"
|
||||
FIP_FW_DDR_SUFFIX ?= "bin"
|
||||
FIP_OPTEE_HEADER ?= "tee-header_v2"
|
||||
FIP_OPTEE_PAGER ?= "tee-pager_v2"
|
||||
FIP_OPTEE_PAGEABLE ?= "tee-pageable_v2"
|
||||
FIP_OPTEE_SUFFIX ?= "bin"
|
||||
FIP_UBOOT ?= "u-boot-nodtb"
|
||||
FIP_UBOOT_SUFFIX ?= "bin"
|
||||
FIP_UBOOT_DTB ?= "u-boot"
|
||||
FIP_UBOOT_DTB_SUFFIX ?= "dtb"
|
||||
|
||||
# Configure default folder path for binaries to package
|
||||
FIP_DEPLOYDIR_FIP ?= "${DEPLOYDIR}/fip"
|
||||
FIP_DEPLOYDIR_BL31 ?= "${DEPLOYDIR}/arm-trusted-firmware/bl31"
|
||||
FIP_DEPLOYDIR_TFA ?= "${DEPLOYDIR}/arm-trusted-firmware/bl32"
|
||||
FIP_DEPLOYDIR_FWCONF ?= "${DEPLOYDIR}/arm-trusted-firmware/fwconfig"
|
||||
FIP_DEPLOYDIR_FWDDR ?= "${DEPLOYDIR}/arm-trusted-firmware/ddr"
|
||||
FIP_DEPLOYDIR_OPTEE ?= "${DEPLOY_DIR}/images/${MACHINE}/optee"
|
||||
FIP_DEPLOYDIR_UBOOT ?= "${DEPLOY_DIR}/images/${MACHINE}/u-boot"
|
||||
|
||||
# Set default configuration to allow FIP signing
|
||||
FIP_ENCRYPT_SUFFIX ??= "${@bb.utils.contains('ENCRYPT_ENABLE', '1', '${ENCRYPT_SUFFIX}', '', d)}"
|
||||
FIP_ENCRYPT_NONCE ??= "1234567890abcdef12345678"
|
||||
FIP_SIGN_SUFFIX ??= "${@bb.utils.contains('SIGN_ENABLE', '1', '${SIGN_SUFFIX}', '', d)}"
|
||||
|
||||
# Define FIP dependency build
|
||||
FIP_DEPENDS += "virtual/bootloader"
|
||||
FIP_DEPENDS += "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'virtual/optee-os', '', d)}"
|
||||
FIP_DEPENDS:class-nativesdk = ""
|
||||
|
||||
# -----------------------------------------------
|
||||
# Handle FIP config and set internal vars
|
||||
# FIP_BL32_CONF
|
||||
python () {
|
||||
import re
|
||||
|
||||
# Make sure that deploy class is configured
|
||||
if not bb.data.inherits_class('deploy', d):
|
||||
bb.fatal("The st-fip-utils class needs the deploy class to be configured on recipe side.")
|
||||
|
||||
# Manage FIP binary dependencies
|
||||
fip_depends = (d.getVar('FIP_DEPENDS') or "").split()
|
||||
if len(fip_depends) > 0:
|
||||
for depend in fip_depends:
|
||||
d.appendVarFlag('do_deploy', 'depends', ' %s:do_deploy' % depend)
|
||||
|
||||
# Manage FIP config settings
|
||||
fipconfigflags = d.getVarFlags('FIP_CONFIG')
|
||||
if fipconfigflags is not None:
|
||||
# The "doc" varflag is special, we don't want to see it here
|
||||
fipconfigflags.pop('doc', None)
|
||||
fipconfig = (d.getVar('FIP_CONFIG') or "").split()
|
||||
if not fipconfig:
|
||||
raise bb.parse.SkipRecipe("FIP_CONFIG must be set in the %s machine configuration." % d.getVar("MACHINE"))
|
||||
if (d.getVar('FIP_BL32_CONF') or "").split():
|
||||
raise bb.parse.SkipRecipe("You cannot use FIP_BL32_CONF as it is internal to FIP_CONFIG var expansion.")
|
||||
if (d.getVar('FIP_DEVICETREE') or "").split():
|
||||
raise bb.parse.SkipRecipe("You cannot use FIP_DEVICETREE as it is internal to FIP_CONFIG var expansion.")
|
||||
if len(fipconfig) > 0:
|
||||
# Init internal fip firmware config
|
||||
fip_config_fw_tfa = d.getVar('FIP_CONFIG_FW_TFA') or ""
|
||||
fip_config_fw_tee = d.getVar('FIP_CONFIG_FW_TEE') or ""
|
||||
for config in fipconfig:
|
||||
for f, v in fipconfigflags.items():
|
||||
if config == f:
|
||||
# Make sure to get var flag properly expanded
|
||||
v = d.getVarFlag('FIP_CONFIG', config)
|
||||
if not v.strip():
|
||||
bb.fatal('[FIP_CONFIG] Missing configuration for %s config' % config)
|
||||
items = v.split(',')
|
||||
if items[0] and len(items) > 2:
|
||||
raise bb.parse.SkipRecipe('Only <BL32_CONF> and <DT_CONFIG> can be specified!')
|
||||
# Set internal vars
|
||||
if items[0] == fip_config_fw_tfa or items[0] == fip_config_fw_tee:
|
||||
bb.debug(1, "Appending '%s' to FIP_BL32_CONF" % items[0])
|
||||
d.appendVar('FIP_BL32_CONF', items[0] + ',')
|
||||
else:
|
||||
bb.fatal('[FIP_CONFIG] Wrong configuration for %s config: %s should be one of %s or %s' % (config,items[0],fip_config_fw_tfa,fip_config_fw_tee))
|
||||
bb.debug(1, "Appending '%s' to FIP_DEVICETREE" % items[1])
|
||||
d.appendVar('FIP_DEVICETREE', items[1] + ',')
|
||||
break
|
||||
}
|
||||
|
||||
# Deploy the fip binary for current target
|
||||
do_deploy:append:class-target() {
|
||||
install -d ${DEPLOYDIR}
|
||||
install -d ${FIP_DEPLOYDIR_FIP}
|
||||
|
||||
unset i
|
||||
for config in ${FIP_CONFIG}; do
|
||||
i=$(expr $i + 1)
|
||||
bl32_conf=$(echo ${FIP_BL32_CONF} | cut -d',' -f${i})
|
||||
dt_config=$(echo ${FIP_DEVICETREE} | cut -d',' -f${i})
|
||||
for dt in ${dt_config}; do
|
||||
# Init soc suffix
|
||||
soc_suffix=""
|
||||
if [ -n "${STM32MP_SOC_NAME}" ]; then
|
||||
for soc in ${STM32MP_SOC_NAME}; do
|
||||
[ "$(echo ${dt} | grep -c ${soc})" -eq 1 ] && soc_suffix="-${soc}"
|
||||
done
|
||||
fi
|
||||
# Init FIP fw-config settings
|
||||
[ -f "${FIP_DEPLOYDIR_FWCONF}/${dt}-${FIP_FW_CONFIG}-${config}.${FIP_FW_CONFIG_SUFFIX}" ] || bbfatal "Missing ${dt}-${FIP_FW_CONFIG}-${config}.${FIP_FW_CONFIG_SUFFIX} file in folder: ${FIP_DEPLOYDIR_FWCONF}"
|
||||
FIP_FWCONFIG="--fw-config ${FIP_DEPLOYDIR_FWCONF}/${dt}-${FIP_FW_CONFIG}-${config}.${FIP_FW_CONFIG_SUFFIX}"
|
||||
# Init FIP hw-config settings
|
||||
[ -f "${FIP_DEPLOYDIR_UBOOT}/${FIP_UBOOT_DTB}-${dt}.${FIP_UBOOT_DTB_SUFFIX}" ] || bbfatal "Missing ${FIP_UBOOT_DTB}-${dt}.${FIP_UBOOT_DTB_SUFFIX} file in folder: ${FIP_DEPLOYDIR_UBOOT}"
|
||||
FIP_HWCONFIG="--hw-config ${FIP_DEPLOYDIR_UBOOT}/${FIP_UBOOT_DTB}-${dt}.${FIP_UBOOT_DTB_SUFFIX}"
|
||||
# Init FIP nt-fw config
|
||||
[ -f "${FIP_DEPLOYDIR_UBOOT}/${FIP_UBOOT}${soc_suffix}.${FIP_UBOOT_SUFFIX}" ] || bbfatal "Missing ${FIP_UBOOT}${soc_suffix}.${FIP_UBOOT_SUFFIX} file in folder: ${FIP_DEPLOYDIR_UBOOT}"
|
||||
FIP_NTFW="--nt-fw ${FIP_DEPLOYDIR_UBOOT}/${FIP_UBOOT}${soc_suffix}.${FIP_UBOOT_SUFFIX}"
|
||||
# Init FIP bl31 settings
|
||||
if [ "${FIP_BL31_ENABLE}" = "1" ]; then
|
||||
# Check for files
|
||||
[ -f "${FIP_DEPLOYDIR_BL31}/${FIP_BL31}${soc_suffix}.${FIP_BL31_SUFFIX}" ] || bbfatal "Missing ${FIP_BL31}${soc_suffix}.${FIP_BL31_SUFFIX} file in folder: ${FIP_DEPLOYDIR_BL31}"
|
||||
[ -f "${FIP_DEPLOYDIR_BL31}/${dt}-${FIP_BL31_DTB}.${FIP_BL31_DTB_SUFFIX}" ] || bbfatal "Missing ${dt}-${FIP_BL31_DTB}.${FIP_BL31_DTB_SUFFIX} file in folder: ${FIP_DEPLOYDIR_BL31}"
|
||||
# Set CERT_BL31CONF
|
||||
CERT_BL31CONF=" \
|
||||
--soc-fw ${FIP_DEPLOYDIR_BL31}/${FIP_BL31}${soc_suffix}.${FIP_BL31_SUFFIX} \
|
||||
--soc-fw-config ${FIP_DEPLOYDIR_BL31}/${dt}-${FIP_BL31_DTB}.${FIP_BL31_DTB_SUFFIX} \
|
||||
"
|
||||
if [ "${ENCRYPT_ENABLE}" = "1" ]; then
|
||||
encrypt_key="${ENCRYPT_FIP_KEY_PATH_LIST}"
|
||||
if [ -n "${STM32MP_ENCRYPT_SOC_NAME}" ]; then
|
||||
unset k
|
||||
for soc in ${STM32MP_ENCRYPT_SOC_NAME}; do
|
||||
k=$(expr $k + 1)
|
||||
[ "$(echo ${dt} | grep -c ${soc})" -eq 1 ] && encrypt_key=$(echo ${ENCRYPT_FIP_KEY_PATH_LIST} | cut -d',' -f${k})
|
||||
done
|
||||
fi
|
||||
encrypt_key="$(hexdump -e '/1 "%02x"' ${encrypt_key})"
|
||||
|
||||
# encrypt bl31 binary
|
||||
bbnote "${ENCTOOL} --key ${encrypt_key} --nonce ${FIP_ENCRYPT_NONCE} --fw-enc-status 0 \
|
||||
--in \"${FIP_DEPLOYDIR_BL31}/${FIP_BL31}${soc_suffix}.${FIP_BL31_SUFFIX}\" \
|
||||
--out \"${FIP_DEPLOYDIR_BL31}/${FIP_BL31}${soc_suffix}${FIP_ENCRYPT_SUFFIX}.${FIP_BL31_SUFFIX}\" "
|
||||
${ENCTOOL} --key ${encrypt_key} --nonce ${FIP_ENCRYPT_NONCE} --fw-enc-status 0 \
|
||||
--in "${FIP_DEPLOYDIR_BL31}/${FIP_BL31}${soc_suffix}.${FIP_BL31_SUFFIX}" \
|
||||
--out "${FIP_DEPLOYDIR_BL31}/${FIP_BL31}${soc_suffix}${FIP_ENCRYPT_SUFFIX}.${FIP_BL31_SUFFIX}"
|
||||
# encrypt bl31 devicetree
|
||||
bbnote "${ENCTOOL} --key ${encrypt_key} --nonce ${FIP_ENCRYPT_NONCE} --fw-enc-status 0 \
|
||||
--in \"${FIP_DEPLOYDIR_BL31}/${dt}-${FIP_BL31_DTB}.${FIP_BL31_DTB_SUFFIX}\" \
|
||||
--out \"${FIP_DEPLOYDIR_BL31}/${dt}-${FIP_BL31_DTB}${FIP_ENCRYPT_SUFFIX}.${FIP_BL31_DTB_SUFFIX} \" "
|
||||
${ENCTOOL} --key ${encrypt_key} --nonce ${FIP_ENCRYPT_NONCE} --fw-enc-status 0 \
|
||||
--in "${FIP_DEPLOYDIR_BL31}/${dt}-${FIP_BL31_DTB}.${FIP_BL31_DTB_SUFFIX}" \
|
||||
--out "${FIP_DEPLOYDIR_BL31}/${dt}-${FIP_BL31_DTB}${FIP_ENCRYPT_SUFFIX}.${FIP_BL31_DTB_SUFFIX}"
|
||||
fi
|
||||
# Set FIP_BL31CONF
|
||||
FIP_BL31CONF="\
|
||||
--soc-fw ${FIP_DEPLOYDIR_BL31}/${FIP_BL31}${soc_suffix}${FIP_ENCRYPT_SUFFIX}.${FIP_BL31_SUFFIX} \
|
||||
--soc-fw-config ${FIP_DEPLOYDIR_BL31}/${dt}-${FIP_BL31_DTB}${FIP_ENCRYPT_SUFFIX}.${FIP_BL31_DTB_SUFFIX} \
|
||||
"
|
||||
else
|
||||
CERT_BL31CONF=""
|
||||
FIP_BL31CONF=""
|
||||
fi
|
||||
# Init FIP extra conf settings
|
||||
if [ "${bl32_conf}" = "${FIP_CONFIG_FW_TFA}" ]; then
|
||||
# Check for files
|
||||
[ -f "${FIP_DEPLOYDIR_TFA}/${FIP_TFA}${soc_suffix}.${FIP_TFA_SUFFIX}" ] || bbfatal "Missing ${FIP_TFA}${soc_suffix}.${FIP_TFA_SUFFIX} file in folder: ${FIP_DEPLOYDIR_TFA}"
|
||||
[ -f "${FIP_DEPLOYDIR_TFA}/${dt}-${FIP_TFA_DTB}.${FIP_TFA_DTB_SUFFIX}" ] || bbfatal "Missing ${dt}-${FIP_TFA_DTB}.${FIP_TFA_DTB_SUFFIX} file in folder: ${FIP_DEPLOYDIR_TFA}"
|
||||
# Set FIP_EXTRACONF
|
||||
FIP_EXTRACONF="\
|
||||
--tos-fw ${FIP_DEPLOYDIR_TFA}/${FIP_TFA}${soc_suffix}.${FIP_TFA_SUFFIX} \
|
||||
--tos-fw-config ${FIP_DEPLOYDIR_TFA}/${dt}-${FIP_TFA_DTB}.${FIP_TFA_DTB_SUFFIX} \
|
||||
"
|
||||
elif [ "${bl32_conf}" = "${FIP_CONFIG_FW_TEE}" ]; then
|
||||
# Check for files
|
||||
[ -f "${FIP_DEPLOYDIR_OPTEE}/${FIP_OPTEE_HEADER}-${dt}.${FIP_OPTEE_SUFFIX}" ] || bbfatal "Missing ${FIP_OPTEE_HEADER}-${dt}.${FIP_OPTEE_SUFFIX} file in folder: ${FIP_DEPLOYDIR_OPTEE}"
|
||||
[ -f "${FIP_DEPLOYDIR_OPTEE}/${FIP_OPTEE_PAGER}-${dt}.${FIP_OPTEE_SUFFIX}" ] || bbfatal "Missing ${FIP_OPTEE_PAGER}-${dt}.${FIP_OPTEE_SUFFIX} file in folder: ${FIP_DEPLOYDIR_OPTEE}"
|
||||
[ -f "${FIP_DEPLOYDIR_OPTEE}/${FIP_OPTEE_PAGEABLE}-${dt}.${FIP_OPTEE_SUFFIX}" ] || bbfatal "Missing ${FIP_OPTEE_PAGEABLE}-${dt}.${FIP_OPTEE_SUFFIX} file in folder: ${FIP_DEPLOYDIR_OPTEE}"
|
||||
# Set CERT_EXTRACONF
|
||||
CERT_EXTRACONF="\
|
||||
--tos-fw ${FIP_DEPLOYDIR_OPTEE}/${FIP_OPTEE_HEADER}-${dt}.${FIP_OPTEE_SUFFIX} \
|
||||
--tos-fw-extra1 ${FIP_DEPLOYDIR_OPTEE}/${FIP_OPTEE_PAGER}-${dt}.${FIP_OPTEE_SUFFIX} \
|
||||
--tos-fw-extra2 ${FIP_DEPLOYDIR_OPTEE}/${FIP_OPTEE_PAGEABLE}-${dt}.${FIP_OPTEE_SUFFIX} \
|
||||
"
|
||||
if [ "${ENCRYPT_ENABLE}" = "1" ]; then
|
||||
encrypt_key="${ENCRYPT_FIP_KEY_PATH_LIST}"
|
||||
if [ -n "${STM32MP_ENCRYPT_SOC_NAME}" ]; then
|
||||
unset k
|
||||
for soc in ${STM32MP_ENCRYPT_SOC_NAME}; do
|
||||
k=$(expr $k + 1)
|
||||
[ "$(echo ${dt} | grep -c ${soc})" -eq 1 ] && encrypt_key=$(echo ${ENCRYPT_FIP_KEY_PATH_LIST} | cut -d',' -f${k})
|
||||
done
|
||||
fi
|
||||
encrypt_key="$(hexdump -e '/1 "%02x"' ${encrypt_key})"
|
||||
# encrypt optee header
|
||||
bbnote "${ENCTOOL} --key ${encrypt_key} --nonce ${FIP_ENCRYPT_NONCE} --fw-enc-status 0 \
|
||||
--in \"${FIP_DEPLOYDIR_OPTEE}/${FIP_OPTEE_HEADER}-${dt}.${FIP_OPTEE_SUFFIX}\" \
|
||||
--out \"${FIP_DEPLOYDIR_OPTEE}/${FIP_OPTEE_HEADER}-${dt}${FIP_ENCRYPT_SUFFIX}.${FIP_OPTEE_SUFFIX}\" "
|
||||
${ENCTOOL} --key ${encrypt_key} --nonce ${FIP_ENCRYPT_NONCE} --fw-enc-status 0 \
|
||||
--in "${FIP_DEPLOYDIR_OPTEE}/${FIP_OPTEE_HEADER}-${dt}.${FIP_OPTEE_SUFFIX}" \
|
||||
--out "${FIP_DEPLOYDIR_OPTEE}/${FIP_OPTEE_HEADER}-${dt}${FIP_ENCRYPT_SUFFIX}.${FIP_OPTEE_SUFFIX}"
|
||||
# encrypt optee pager
|
||||
bbnote "${ENCTOOL} --key ${encrypt_key} --nonce ${FIP_ENCRYPT_NONCE} --fw-enc-status 0 \
|
||||
--in \"${FIP_DEPLOYDIR_OPTEE}/${FIP_OPTEE_PAGER}-${dt}.${FIP_OPTEE_SUFFIX}\" \
|
||||
--out \"${FIP_DEPLOYDIR_OPTEE}/${FIP_OPTEE_PAGER}-${dt}${FIP_ENCRYPT_SUFFIX}.${FIP_OPTEE_SUFFIX}\" "
|
||||
${ENCTOOL} --key ${encrypt_key} --nonce ${FIP_ENCRYPT_NONCE} --fw-enc-status 0 \
|
||||
--in "${FIP_DEPLOYDIR_OPTEE}/${FIP_OPTEE_PAGER}-${dt}.${FIP_OPTEE_SUFFIX}" \
|
||||
--out "${FIP_DEPLOYDIR_OPTEE}/${FIP_OPTEE_PAGER}-${dt}${FIP_ENCRYPT_SUFFIX}.${FIP_OPTEE_SUFFIX}"
|
||||
# encrypt optee pageable
|
||||
bbnote "${ENCTOOL} --key ${encrypt_key} --nonce ${FIP_ENCRYPT_NONCE} --fw-enc-status 0 \
|
||||
--in \"${FIP_DEPLOYDIR_OPTEE}/${FIP_OPTEE_PAGEABLE}-${dt}.${FIP_OPTEE_SUFFIX}\" \
|
||||
--out \"${FIP_DEPLOYDIR_OPTEE}/${FIP_OPTEE_PAGEABLE}-${dt}${FIP_ENCRYPT_SUFFIX}.${FIP_OPTEE_SUFFIX}\" "
|
||||
${ENCTOOL} --key ${encrypt_key} --nonce ${FIP_ENCRYPT_NONCE} --fw-enc-status 0 \
|
||||
--in "${FIP_DEPLOYDIR_OPTEE}/${FIP_OPTEE_PAGEABLE}-${dt}.${FIP_OPTEE_SUFFIX}" \
|
||||
--out "${FIP_DEPLOYDIR_OPTEE}/${FIP_OPTEE_PAGEABLE}-${dt}${FIP_ENCRYPT_SUFFIX}.${FIP_OPTEE_SUFFIX}"
|
||||
fi
|
||||
# Set FIP_EXTRACONF
|
||||
FIP_EXTRACONF="\
|
||||
--tos-fw ${FIP_DEPLOYDIR_OPTEE}/${FIP_OPTEE_HEADER}-${dt}${FIP_ENCRYPT_SUFFIX}.${FIP_OPTEE_SUFFIX} \
|
||||
--tos-fw-extra1 ${FIP_DEPLOYDIR_OPTEE}/${FIP_OPTEE_PAGER}-${dt}${FIP_ENCRYPT_SUFFIX}.${FIP_OPTEE_SUFFIX} \
|
||||
--tos-fw-extra2 ${FIP_DEPLOYDIR_OPTEE}/${FIP_OPTEE_PAGEABLE}-${dt}${FIP_ENCRYPT_SUFFIX}.${FIP_OPTEE_SUFFIX} \
|
||||
"
|
||||
else
|
||||
bbfatal "Wrong configuration '${bl32_conf}' found in FIP_CONFIG for ${config} config."
|
||||
fi
|
||||
# Init FIP DDR config settings
|
||||
if [ -f "${FIP_DEPLOYDIR_FWDDR}/${FIP_FW_DDR}-${dt}.${FIP_FW_DDR_SUFFIX}" ]; then
|
||||
FIP_DDRCONF="--ddr-fw ${FIP_DEPLOYDIR_FWDDR}/${FIP_FW_DDR}-${dt}.${FIP_FW_DDR_SUFFIX}"
|
||||
CERT_DDRCONF="--ddr-fw ${FIP_DEPLOYDIR_FWDDR}/${FIP_FW_DDR}-${dt}.${FIP_FW_DDR_SUFFIX}"
|
||||
else
|
||||
FIP_DDRCONF=""
|
||||
CERT_DDRCONF=""
|
||||
fi
|
||||
# Init certificate settings
|
||||
if [ "${SIGN_ENABLE}" = "1" ]; then
|
||||
sign_key="${SIGN_KEY_PATH_LIST}"
|
||||
if [ $(echo ${SIGN_KEY_PASS} | wc -w) -gt 1 ]; then
|
||||
sign_single_key_pass=$(echo ${SIGN_KEY_PASS} | cut -d' ' -f1)
|
||||
else
|
||||
sign_single_key_pass="${SIGN_KEY_PASS}"
|
||||
fi
|
||||
if [ -n "${STM32MP_SOC_NAME}" ]; then
|
||||
unset k
|
||||
for soc in ${STM32MP_SOC_NAME}; do
|
||||
k=$(expr $k + 1)
|
||||
[ "$(echo ${dt} | grep -c ${soc})" -eq 1 ] && sign_key=$(echo ${SIGN_KEY_PATH_LIST} | cut -d',' -f${k})
|
||||
done
|
||||
fi
|
||||
mkdir -p ${B}/${config}-${dt}
|
||||
FIP_CERTCONF="\
|
||||
--tb-fw-cert ${B}/${config}-${dt}/tb_fw.crt \
|
||||
--trusted-key-cert ${B}/${config}-${dt}/trusted_key.crt \
|
||||
--nt-fw-cert ${B}/${config}-${dt}/nt_fw_content.crt \
|
||||
--nt-fw-key-cert ${B}/${config}-${dt}/nt_fw_key.crt \
|
||||
--tos-fw-cert ${B}/${config}-${dt}/tos_fw_content.crt \
|
||||
--tos-fw-key-cert ${B}/${config}-${dt}/tos_fw_key.crt \
|
||||
--stm32mp-cfg-cert ${B}/${config}-${dt}/stm32mp_cfg_cert.crt \
|
||||
"
|
||||
if [ "${FIP_BL31_ENABLE}" = "1" ]; then
|
||||
FIP_CERTCONF="${FIP_CERTCONF} \
|
||||
--soc-fw-cert ${B}/${config}-${dt}/soc_fw_content.crt \
|
||||
--soc-fw-key-cert ${B}/${config}-${dt}/soc_fw_key.crt \
|
||||
"
|
||||
fi
|
||||
# Need fake bl2 binary to generate certificates
|
||||
touch ${WORKDIR}/bl2-fake.bin
|
||||
# Generate certificates
|
||||
bbnote "${CERTTOOL} -n --tfw-nvctr 0 --ntfw-nvctr 0 --key-alg ecdsa --hash-alg sha256 \
|
||||
--rot-key ${sign_key} \
|
||||
--rot-key-pwd $sign_single_key_pass \
|
||||
${FIP_FWCONFIG} \
|
||||
${FIP_HWCONFIG} \
|
||||
${FIP_NTFW} \
|
||||
${FIP_CERTCONF} \
|
||||
${CERT_EXTRACONF} \
|
||||
${CERT_DDRCONF} \
|
||||
${CERT_BL31CONF} \
|
||||
--tb-fw ${WORKDIR}/bl2-fake.bin"
|
||||
${CERTTOOL} -n --tfw-nvctr 0 --ntfw-nvctr 0 --key-alg ecdsa --hash-alg sha256 \
|
||||
--rot-key ${sign_key} \
|
||||
--rot-key-pwd $sign_single_key_pass \
|
||||
${FIP_FWCONFIG} \
|
||||
${FIP_HWCONFIG} \
|
||||
${FIP_NTFW} \
|
||||
${FIP_CERTCONF} \
|
||||
${CERT_EXTRACONF} \
|
||||
${CERT_DDRCONF} \
|
||||
${CERT_BL31CONF} \
|
||||
--tb-fw ${WORKDIR}/bl2-fake.bin
|
||||
# Remove fake bl2 binary
|
||||
rm -f ${WORKDIR}/bl2-fake.bin
|
||||
|
||||
# Init FIP DDR cert settings
|
||||
FIP_DDRCERTCONF="--stm32mp-cfg-cert ${B}/${config}-${dt}/stm32mp_cfg_cert_ddr.crt"
|
||||
# Generate FIP DDR certificates
|
||||
if [ -f "${FIP_DEPLOYDIR_FWDDR}/${FIP_FW_DDR}-${dt}.${FIP_FW_DDR_SUFFIX}" ]; then
|
||||
bbnote "${CERTTOOL} -n --tfw-nvctr 0 \
|
||||
--rot-key ${sign_key} \
|
||||
--rot-key-pwd $sign_single_key_pass \
|
||||
${FIP_DDRCERTCONF} \
|
||||
${CERT_DDRCONF}"
|
||||
${CERTTOOL} -n --tfw-nvctr 0 \
|
||||
--rot-key ${sign_key} \
|
||||
--rot-key-pwd $sign_single_key_pass \
|
||||
${FIP_DDRCERTCONF} \
|
||||
${CERT_DDRCONF}
|
||||
fi
|
||||
else
|
||||
FIP_CERTCONF=""
|
||||
FIP_DDRCERTCONF=""
|
||||
fi
|
||||
# Generate FIP binary
|
||||
bbnote "${FIPTOOL} create \
|
||||
${FIP_FWCONFIG} \
|
||||
${FIP_HWCONFIG} \
|
||||
${FIP_NTFW} \
|
||||
${FIP_BL31CONF} \
|
||||
${FIP_EXTRACONF} \
|
||||
${FIP_DDRCONF} \
|
||||
${FIP_CERTCONF} \
|
||||
${FIP_DEPLOYDIR_FIP}/${FIP_BASENAME}-${dt}-${config}${FIP_ENCRYPT_SUFFIX}${FIP_SIGN_SUFFIX}.${FIP_SUFFIX}"
|
||||
${FIPTOOL} create \
|
||||
${FIP_FWCONFIG} \
|
||||
${FIP_HWCONFIG} \
|
||||
${FIP_NTFW} \
|
||||
${FIP_BL31CONF} \
|
||||
${FIP_EXTRACONF} \
|
||||
${FIP_DDRCONF} \
|
||||
${FIP_CERTCONF} \
|
||||
${FIP_DEPLOYDIR_FIP}/${FIP_BASENAME}-${dt}-${config}${FIP_ENCRYPT_SUFFIX}${FIP_SIGN_SUFFIX}.${FIP_SUFFIX}
|
||||
# Generate FIP DDR binary
|
||||
if [ -f "${FIP_DEPLOYDIR_FWDDR}/${FIP_FW_DDR}-${dt}.${FIP_FW_DDR_SUFFIX}" ]; then
|
||||
bbnote "${FIPTOOL} create \
|
||||
${FIP_DDRCERTCONF} \
|
||||
${FIP_DDRCONF} \
|
||||
${FIP_DEPLOYDIR_FIP}/${FIP_BASENAME}-${dt}-ddr${FIP_ENCRYPT_SUFFIX}${FIP_SIGN_SUFFIX}.${FIP_SUFFIX}"
|
||||
${FIPTOOL} create \
|
||||
${FIP_DDRCERTCONF} \
|
||||
${FIP_DDRCONF} \
|
||||
${FIP_DEPLOYDIR_FIP}/${FIP_BASENAME}-${dt}-ddr${FIP_ENCRYPT_SUFFIX}${FIP_SIGN_SUFFIX}.${FIP_SUFFIX}
|
||||
fi
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
# Stub do_compile for nativesdk use case as we only expect to provide FIPTOOL_WRAPPER
|
||||
do_compile:class-nativesdk() {
|
||||
return
|
||||
}
|
||||
|
||||
do_install:class-nativesdk() {
|
||||
# Create the FIPTOOL_WRAPPER script to use on sdk side
|
||||
cat << EOF > ${WORKDIR}/${FIPTOOL_WRAPPER}
|
||||
#!/bin/bash -
|
||||
function bbfatal() { echo "\$*" ; exit 1 ; }
|
||||
|
||||
# Set default TF-A FIP config
|
||||
FIP_CONFIG="\${FIP_CONFIG:-${FIP_CONFIG}}"
|
||||
FIP_BL31_ENABLE="\${FIP_BL31_ENABLE:-${FIP_BL31_ENABLE}}"
|
||||
FIP_BL32_CONF=""
|
||||
FIP_DEVICETREE="\${FIP_DEVICETREE:-}"
|
||||
|
||||
# Set default supported configuration for devicetree and bl32 configuration
|
||||
declare -A FIP_BL32_CONF_ARRAY
|
||||
declare -A FIP_DEVICETREE_ARRAY
|
||||
EOF
|
||||
for config in ${FIP_CONFIG}; do
|
||||
i=$(expr $i + 1)
|
||||
cat << EOF >> ${WORKDIR}/${FIPTOOL_WRAPPER}
|
||||
FIP_BL32_CONF_ARRAY[${config}]="$(echo ${FIP_BL32_CONF} | cut -d',' -f${i})"
|
||||
FIP_DEVICETREE_ARRAY[${config}]="$(echo ${FIP_DEVICETREE} | cut -d',' -f${i})"
|
||||
EOF
|
||||
done
|
||||
unset i
|
||||
cat << EOF >> ${WORKDIR}/${FIPTOOL_WRAPPER}
|
||||
|
||||
# Make sure about FIP_CONFIG value
|
||||
if [ -z "\$FIP_CONFIG" ]; then
|
||||
bbfatal "Wrong configuration 'FIP_CONFIG' is empty."
|
||||
else
|
||||
# Check that configuration match any of the supported ones
|
||||
for config in \$FIP_CONFIG; do
|
||||
CONFIG_FOUND=NO
|
||||
for fip_config in ${FIP_CONFIG}; do
|
||||
[ "\${config}" = "\${fip_config}" ] && { CONFIG_FOUND="YES" ; break; }
|
||||
done
|
||||
[ "\${CONFIG_FOUND}" = "NO" ] && bbfatal "Wrong 'FIP_CONFIG' configuration : \${config} is not one of the supported one (${FIP_CONFIG})"
|
||||
done
|
||||
fi
|
||||
# Manage FIP_BL32_CONF default init
|
||||
if [ -z "\$FIP_BL32_CONF" ]; then
|
||||
# Assigned default supported value
|
||||
for config in \$FIP_CONFIG; do
|
||||
FIP_BL32_CONF+="\${FIP_BL32_CONF_ARRAY[\${config}]},"
|
||||
done
|
||||
fi
|
||||
# Manage FIP_DEVICETREE default init
|
||||
if [ -z "\$FIP_DEVICETREE" ]; then
|
||||
# Assigned default supported value
|
||||
for config in \$FIP_CONFIG; do
|
||||
FIP_DEVICETREE+="\${FIP_DEVICETREE_ARRAY[\${config}]},"
|
||||
done
|
||||
fi
|
||||
|
||||
# Configure default folder path for binaries to package
|
||||
FIP_DEPLOYDIR_ROOT="\${FIP_DEPLOYDIR_ROOT:-}"
|
||||
FIP_DEPLOYDIR_FIP="\${FIP_DEPLOYDIR_FIP:-\$FIP_DEPLOYDIR_ROOT/fip}"
|
||||
FIP_DEPLOYDIR_TFA="\${FIP_DEPLOYDIR_TFA:-\$FIP_DEPLOYDIR_ROOT/arm-trusted-firmware/bl32}"
|
||||
FIP_DEPLOYDIR_BL31="\${FIP_DEPLOYDIR_BL31:-\$FIP_DEPLOYDIR_ROOT/arm-trusted-firmware/bl31}"
|
||||
FIP_DEPLOYDIR_FWDDR="\${FIP_DEPLOYDIR_FWDDR:-\$FIP_DEPLOYDIR_ROOT/arm-trusted-firmware/ddr}"
|
||||
FIP_DEPLOYDIR_FWCONF="\${FIP_DEPLOYDIR_FWCONF:-\$FIP_DEPLOYDIR_ROOT/arm-trusted-firmware/fwconfig}"
|
||||
FIP_DEPLOYDIR_OPTEE="\${FIP_DEPLOYDIR_OPTEE:-\$FIP_DEPLOYDIR_ROOT/optee}"
|
||||
FIP_DEPLOYDIR_UBOOT="\${FIP_DEPLOYDIR_UBOOT:-\$FIP_DEPLOYDIR_ROOT/u-boot}"
|
||||
|
||||
echo ""
|
||||
echo "${FIPTOOL_WRAPPER} config:"
|
||||
for config in \$FIP_CONFIG; do
|
||||
i=\$(expr \$i + 1)
|
||||
bl32_conf=\$(echo \$FIP_BL32_CONF | cut -d',' -f\$i)
|
||||
dt_config=\$(echo \$FIP_DEVICETREE | cut -d',' -f\$i)
|
||||
echo " \${config}:" ; \\
|
||||
echo " bl32 config value: \${bl32_conf}"
|
||||
echo " devicetree config: \${dt_config}"
|
||||
done
|
||||
echo ""
|
||||
echo "Switch configuration:"
|
||||
echo " FIP_BL31_ENABLE : \$FIP_BL31_ENABLE"
|
||||
echo ""
|
||||
echo "Output folders:"
|
||||
echo " FIP_DEPLOYDIR_ROOT : \$FIP_DEPLOYDIR_ROOT"
|
||||
echo " FIP_DEPLOYDIR_FIP : \$FIP_DEPLOYDIR_FIP"
|
||||
echo " FIP_DEPLOYDIR_TFA : \$FIP_DEPLOYDIR_TFA"
|
||||
echo " FIP_DEPLOYDIR_BL31 : \$FIP_DEPLOYDIR_BL31"
|
||||
echo " FIP_DEPLOYDIR_FWCONF: \$FIP_DEPLOYDIR_FWCONF"
|
||||
echo " FIP_DEPLOYDIR_OPTEE : \$FIP_DEPLOYDIR_OPTEE"
|
||||
echo " FIP_DEPLOYDIR_UBOOT : \$FIP_DEPLOYDIR_UBOOT"
|
||||
echo ""
|
||||
unset i
|
||||
for config in \$FIP_CONFIG; do
|
||||
i=\$(expr \$i + 1)
|
||||
bl32_conf=\$(echo \$FIP_BL32_CONF | cut -d',' -f\$i)
|
||||
dt_config=\$(echo \$FIP_DEVICETREE | cut -d',' -f\$i)
|
||||
for dt in \${dt_config}; do
|
||||
# Init soc suffix
|
||||
soc_suffix=""
|
||||
if [ -n "${STM32MP_SOC_NAME}" ]; then
|
||||
for soc in ${STM32MP_SOC_NAME}; do
|
||||
[ "\$(echo \${dt} | grep -c \${soc})" -eq 1 ] && soc_suffix="-\${soc}"
|
||||
done
|
||||
fi
|
||||
# Init FIP fw-config settings
|
||||
[ -f "\$FIP_DEPLOYDIR_FWCONF/\${dt}-${FIP_FW_CONFIG}-\${config}.${FIP_FW_CONFIG_SUFFIX}" ] || bbfatal "Missing \${dt}-${FIP_FW_CONFIG}-\${config}.${FIP_FW_CONFIG_SUFFIX} file in folder: \\\$FIP_DEPLOYDIR_FWCONF or '\\\$FIP_DEPLOYDIR_ROOT/arm-trusted-firmware/fwconfig'"
|
||||
FIP_FWCONFIG="--fw-config \$FIP_DEPLOYDIR_FWCONF/\${dt}-${FIP_FW_CONFIG}-\${config}.${FIP_FW_CONFIG_SUFFIX}"
|
||||
# Init FIP hw-config settings
|
||||
[ -f "\$FIP_DEPLOYDIR_UBOOT/${FIP_UBOOT_DTB}-\${dt}.${FIP_UBOOT_DTB_SUFFIX}" ] || bbfatal "Missing ${FIP_UBOOT_DTB}-\${dt}.${FIP_UBOOT_DTB_SUFFIX} file in folder: '\\\$FIP_DEPLOYDIR_UBOOT' or '\\\$FIP_DEPLOYDIR_ROOT/u-boot'"
|
||||
FIP_HWCONFIG="--hw-config \$FIP_DEPLOYDIR_UBOOT/${FIP_UBOOT_DTB}-\${dt}.${FIP_UBOOT_DTB_SUFFIX}"
|
||||
# Init FIP nt-fw config
|
||||
[ -f "\$FIP_DEPLOYDIR_UBOOT/${FIP_UBOOT}\${soc_suffix}.${FIP_UBOOT_SUFFIX}" ] || bbfatal "Missing ${FIP_UBOOT}\${soc_suffix}.${FIP_UBOOT_SUFFIX} file in folder: '\\\$FIP_DEPLOYDIR_UBOOT' or '\\\$FIP_DEPLOYDIR_ROOT/u-boot'"
|
||||
FIP_NTFW="--nt-fw \$FIP_DEPLOYDIR_UBOOT/${FIP_UBOOT}\${soc_suffix}.${FIP_UBOOT_SUFFIX}"
|
||||
# Init FIP bl31 settings
|
||||
if [ "\$FIP_BL31_ENABLE" = "1" ]; then
|
||||
# Check for files
|
||||
[ -f "\$FIP_DEPLOYDIR_BL31/${FIP_BL31}\${soc_suffix}.${FIP_BL31_SUFFIX}" ] || bbfatal "Missing \$FIP_DEPLOYDIR_BL31/${FIP_BL31}\${soc_suffix}.${FIP_BL31_SUFFIX} file in folder: '\\\$FIP_DEPLOYDIR_BL31' or '\\\$FIP_DEPLOYDIR_ROOT/arm-trusted-firmware/bl31'"
|
||||
[ -f "\$FIP_DEPLOYDIR_BL31/\${dt}-${FIP_BL31_DTB}.${FIP_BL31_DTB_SUFFIX}" ] || bbfatal "Missing \${dt}-${FIP_BL31_DTB}.${FIP_BL31_DTB_SUFFIX} file in folder: '\\\$FIP_DEPLOYDIR_BL31' or '\\\$FIP_DEPLOYDIR_ROOT/arm-trusted-firmware/bl31'"
|
||||
# Set FIP_BL31CONF
|
||||
FIP_BL31CONF="\\
|
||||
--soc-fw \$FIP_DEPLOYDIR_BL31/${FIP_BL31}\${soc_suffix}.${FIP_BL31_SUFFIX} \\
|
||||
--soc-fw-config \$FIP_DEPLOYDIR_BL31/\${dt}-${FIP_BL31_DTB}.${FIP_BL31_DTB_SUFFIX} \\
|
||||
"
|
||||
else
|
||||
FIP_BL31CONF=""
|
||||
fi
|
||||
# Init FIP extra conf settings
|
||||
if [ "\${bl32_conf}" = "${FIP_CONFIG_FW_TFA}" ]; then
|
||||
# Check for files
|
||||
[ -f "\$FIP_DEPLOYDIR_TFA/${FIP_TFA}\${soc_suffix}.${FIP_TFA_SUFFIX}" ] || bbfatal "Missing ${FIP_TFA}\${soc_suffix}.${FIP_TFA_SUFFIX} file in folder: '\\\$FIP_DEPLOYDIR_TFA' or '\\\$FIP_DEPLOYDIR_ROOT/arm-trusted-firmware/bl32'"
|
||||
[ -f "\$FIP_DEPLOYDIR_TFA/\${dt}-${FIP_TFA_DTB}.${FIP_TFA_DTB_SUFFIX}" ] || bbfatal "Missing \${dt}-${FIP_TFA_DTB}.${FIP_TFA_DTB_SUFFIX} file in folder: '\\\$FIP_DEPLOYDIR_TFA' or '\\\$FIP_DEPLOYDIR_ROOT/arm-trusted-firmware/bl32'"
|
||||
# Set FIP_EXTRACONF
|
||||
FIP_EXTRACONF="\\
|
||||
--tos-fw \$FIP_DEPLOYDIR_TFA/${FIP_TFA}\${soc_suffix}.${FIP_TFA_SUFFIX} \\
|
||||
--tos-fw-config \$FIP_DEPLOYDIR_TFA/\${dt}-${FIP_TFA_DTB}.${FIP_TFA_DTB_SUFFIX} \\
|
||||
"
|
||||
elif [ "\${bl32_conf}" = "${FIP_CONFIG_FW_TEE}" ]; then
|
||||
# Check for files
|
||||
[ -f "\$FIP_DEPLOYDIR_OPTEE/${FIP_OPTEE_HEADER}-\${dt}.${FIP_OPTEE_SUFFIX}" ] || bbfatal "Missing ${FIP_OPTEE_HEADER}-\${dt}.${FIP_OPTEE_SUFFIX} file in folder: '\\\$FIP_DEPLOYDIR_OPTEE' or '\\\$FIP_DEPLOYDIR_ROOT/optee'"
|
||||
[ -f "\$FIP_DEPLOYDIR_OPTEE/${FIP_OPTEE_PAGER}-\${dt}.${FIP_OPTEE_SUFFIX}" ] || bbfatal "Missing ${FIP_OPTEE_PAGER}-\${dt}.${FIP_OPTEE_SUFFIX} file in folder: '\\\$FIP_DEPLOYDIR_OPTEE' or '\\\$FIP_DEPLOYDIR_ROOT/optee'"
|
||||
[ -f "\$FIP_DEPLOYDIR_OPTEE/${FIP_OPTEE_PAGEABLE}-\${dt}.${FIP_OPTEE_SUFFIX}" ] || bbfatal "Missing ${FIP_OPTEE_PAGEABLE}-\${dt}.${FIP_OPTEE_SUFFIX} file in folder: '\\\$FIP_DEPLOYDIR_OPTEE' or '\\\$FIP_DEPLOYDIR_ROOT/optee'"
|
||||
# Set FIP_EXTRACONF
|
||||
FIP_EXTRACONF="\\
|
||||
--tos-fw \$FIP_DEPLOYDIR_OPTEE/${FIP_OPTEE_HEADER}-\${dt}.${FIP_OPTEE_SUFFIX} \\
|
||||
--tos-fw-extra1 \$FIP_DEPLOYDIR_OPTEE/${FIP_OPTEE_PAGER}-\${dt}.${FIP_OPTEE_SUFFIX} \\
|
||||
--tos-fw-extra2 \$FIP_DEPLOYDIR_OPTEE/${FIP_OPTEE_PAGEABLE}-\${dt}.${FIP_OPTEE_SUFFIX} \\
|
||||
"
|
||||
else
|
||||
bbfatal "Wrong configuration '\${bl32_conf}' found in FIP_CONFIG for \${config} config."
|
||||
fi
|
||||
|
||||
# DRR FW
|
||||
if [ -f "\$FIP_DEPLOYDIR_FWDDR/${FIP_FW_DDR}-\${dt}.${FIP_FW_DDR_SUFFIX}" ]; then
|
||||
FIP_EXTRACONF="\$FIP_EXTRACONF --ddr-fw \$FIP_DEPLOYDIR_FWDDR/${FIP_FW_DDR}-\${dt}.${FIP_FW_DDR_SUFFIX} "
|
||||
${FIPTOOL} create \\
|
||||
--ddr-fw \$FIP_DEPLOYDIR_FWDDR/${FIP_FW_DDR}-\${dt}.${FIP_FW_DDR_SUFFIX} \\
|
||||
\$FIP_DEPLOYDIR_FIP/${FIP_BASENAME}-\${dt}-ddr.${FIP_SUFFIX}
|
||||
echo "[${FIPTOOL}] DDR FW created"
|
||||
fi
|
||||
|
||||
# Generate FIP binary
|
||||
echo "[${FIPTOOL}] Create ${FIP_BASENAME}-\${dt}-\${config}.${FIP_SUFFIX} fip binary into 'FIP_DEPLOYDIR_FIP' folder..."
|
||||
[ -d "\$FIP_DEPLOYDIR_FIP" ] || mkdir -p "\$FIP_DEPLOYDIR_FIP"
|
||||
${FIPTOOL} create \\
|
||||
\$FIP_FWCONFIG \\
|
||||
\$FIP_HWCONFIG \\
|
||||
\$FIP_NTFW \\
|
||||
\$FIP_BL31CONF \\
|
||||
\$FIP_EXTRACONF \\
|
||||
\$FIP_DEPLOYDIR_FIP/${FIP_BASENAME}-\${dt}-\${config}.${FIP_SUFFIX}
|
||||
echo "[${FIPTOOL}] Done"
|
||||
done
|
||||
done
|
||||
EOF
|
||||
|
||||
# Install the FIPTOOL_WRAPPER
|
||||
install -d ${D}${bindir}
|
||||
install -m 0755 ${WORKDIR}/${FIPTOOL_WRAPPER} ${D}${bindir}/
|
||||
}
|
||||
|
||||
# Feed package for sdk with our fiptool wrapper
|
||||
FILES:${FIPTOOL_WRAPPER}:class-nativesdk = "${bindir}/${FIPTOOL_WRAPPER}"
|
||||
|
|
@ -89,7 +89,7 @@ do_image_boot_ubifs[depends] += " \
|
|||
|
||||
IMAGE_CMD:boot.ubifs() {
|
||||
BOOTIMG_FILES_SYMLINK="${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin"
|
||||
# Exclude DTB and DTBO from UBIFS image when creating a FIT image
|
||||
# Exclude DTB and DTBO from final image, when creating a FIT file
|
||||
if [ "${KERNEL_IMAGETYPE}" != "fitImage" ]; then
|
||||
if [ -n "${KERNEL_DEVICETREE}" ]; then
|
||||
for DTB in ${KERNEL_DEVICETREE}; do
|
||||
|
|
@ -116,7 +116,7 @@ IMAGE_CMD:boot.ubifs() {
|
|||
ln ${orig} ${TMP_BOOTDIR}/$(basename ${item})
|
||||
done
|
||||
|
||||
# Exclude boot scripts from UBIFS image when creating a FIT image
|
||||
# Exclude boot scripts from final image, when creating a FIT file
|
||||
if [ "${KERNEL_IMAGETYPE}" != "fitImage" ]; then
|
||||
# Hard-link boot scripts into the temporary folder
|
||||
for item in ${BOOT_SCRIPTS}; do
|
||||
|
|
@ -167,8 +167,12 @@ do_image_recovery_ubifs[depends] += " \
|
|||
"
|
||||
|
||||
IMAGE_CMD:recovery.ubifs() {
|
||||
RECOVERYIMG_FILES_SYMLINK="${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin"
|
||||
# Exclude DTB and DTBO from VFAT image when creating a FIT image
|
||||
if [ "${KERNEL_IMAGETYPE}" = "fitImage" ]; then
|
||||
RECOVERYIMG_FILES_SYMLINK="${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${RECOVERY_INITRAMFS_IMAGE}-${MACHINE}-${MACHINE}"
|
||||
else
|
||||
RECOVERYIMG_FILES_SYMLINK="${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin"
|
||||
fi
|
||||
# Exclude DTB and DTBO from final image, when creating a FIT file
|
||||
if [ "${KERNEL_IMAGETYPE}" != "fitImage" ]; then
|
||||
if [ -n "${KERNEL_DEVICETREE}" ]; then
|
||||
for DTB in ${KERNEL_DEVICETREE}; do
|
||||
|
|
@ -190,15 +194,17 @@ IMAGE_CMD:recovery.ubifs() {
|
|||
ln ${orig} ${TMP_RECOVERYDIR}/$(basename ${item})
|
||||
done
|
||||
|
||||
# Exclude bootscript from VFAT image when creating a FIT image
|
||||
if [ "${KERNEL_IMAGETYPE}" != "fitImage" ]; then
|
||||
# Exclude bootscript from final image when creating a FIT file
|
||||
if [ "${KERNEL_IMAGETYPE}" = "fitImage" ]; then
|
||||
# rename FITimage to u-boot default kernel load name
|
||||
mv ${TMP_RECOVERYDIR}/${KERNEL_IMAGETYPE}-${RECOVERY_INITRAMFS_IMAGE}-${MACHINE}-${MACHINE} ${TMP_RECOVERYDIR}/${KERNEL_IMAGETYPE}-${MACHINE}.bin
|
||||
else
|
||||
# Hard-link boot scripts into the temporary folder
|
||||
for item in ${BOOT_SCRIPTS}; do
|
||||
src="$(echo ${item} | awk -F':' '{ print $1 }')"
|
||||
dst="$(echo ${item} | awk -F':' '{ print $2 }')"
|
||||
ln ${DEPLOY_DIR_IMAGE}/${src} ${TMP_RECOVERYDIR}/${dst}
|
||||
done
|
||||
|
||||
# Copy the recovery initramfs into the temporary folder
|
||||
cp ${DEPLOY_DIR_IMAGE}/${RECOVERY_INITRAMFS_IMAGE}-${MACHINE}.cpio.gz.u-boot.tf ${TMP_RECOVERYDIR}/uramdisk-recovery.img
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -0,0 +1,125 @@
|
|||
EXTERNAL_KEY_CONF ??= "0"
|
||||
|
||||
ENCRYPT_ENABLE ??= "0"
|
||||
ENCRYPT_FIP_KEY ??= ""
|
||||
ENCRYPT_FSBL_KEY ??= ""
|
||||
ENCRYPT_SUFFIX ??= "_Encrypted"
|
||||
|
||||
SIGN_ENABLE ??= "0"
|
||||
SIGN_KEY ??=""
|
||||
SIGN_KEY_PASS ??= ""
|
||||
SIGN_SUFFIX ??= "_Signed"
|
||||
|
||||
SIGN_TOOL ??= ""
|
||||
|
||||
def search_path(file_search, d):
|
||||
"""
|
||||
Check for <file_search> path availability from BBPATH
|
||||
And return the <file_search> absolute path
|
||||
"""
|
||||
search_path = d.getVar("BBPATH").split(":")
|
||||
for p in search_path:
|
||||
file_path = os.path.join(p, file_search)
|
||||
if os.path.isfile(file_path):
|
||||
return file_path
|
||||
bbpaths = d.getVar('BBPATH').replace(':','\n\t')
|
||||
bb.fatal('\n[sign-stm32mp] Not able to find "%s" path from current BBPATH var:\n\t%s.' % (file_search, bbpaths))
|
||||
|
||||
def init_keylist_from(keylist, keyinput, soclist, d):
|
||||
"""
|
||||
Build the <keylist> var as a coma separated list of values,
|
||||
Using either the default <keyinput> var value
|
||||
or any defined <keyinput>_socname var value
|
||||
(with 'socname' item comming from <soclist> var value list)
|
||||
"""
|
||||
# Init soc name list
|
||||
socname_list = (d.getVar(soclist) or "").split()
|
||||
# Init key from keyinput var value
|
||||
key = d.getVar(keyinput) or ""
|
||||
if key:
|
||||
# Check first if keyinput_<soc> is defined to use it
|
||||
if len(socname_list) > 0:
|
||||
# Configure keylist according to STM32MP_SOC_NAME list
|
||||
d.setVar(keylist, '')
|
||||
for socname in socname_list:
|
||||
key = d.getVar(keyinput + '_' + socname) or ""
|
||||
if key:
|
||||
if d.getVar('EXTERNAL_KEY_CONF') == '1':
|
||||
key = search_path(key, d)
|
||||
bb.debug(1, "[sign-stm32mp] Append '%s' path to %s (socname %s)." % (key, keylist, socname))
|
||||
d.appendVar(keylist, key + ',')
|
||||
else:
|
||||
bb.fatal("[sign-stm32mp] Please make sure to configure \"%s_%s\" var to key file." % (keyinput, socname))
|
||||
else:
|
||||
# Default to keyinput value setting
|
||||
if d.getVar('EXTERNAL_KEY_CONF') == '1':
|
||||
key = search_path(key, d)
|
||||
bb.debug(1, "[sign-stm32mp] Set %s to '%s' path." % (keylist, key))
|
||||
d.setVar(keylist, key)
|
||||
else:
|
||||
bb.debug(1, "[sign-stm32mp] Set %s to '%s' path." % (keylist, key))
|
||||
d.setVar(keylist, key)
|
||||
else:
|
||||
# Check first if keyinput_<soc> is defined to use it
|
||||
if len(socname_list) > 0:
|
||||
# Configure keylist according to STM32MP_SOC_NAME list
|
||||
d.setVar(keylist, '')
|
||||
for socname in socname_list:
|
||||
key = d.getVar(keyinput + '_' + socname)
|
||||
if key:
|
||||
if d.getVar('EXTERNAL_KEY_CONF') == '1':
|
||||
key = search_path(key, d)
|
||||
bb.debug(1, "[sign-stm32mp] Append '%s' path to %s (socname %s)." % (key, keylist, socname))
|
||||
d.appendVar(keylist, key + ',')
|
||||
else:
|
||||
bb.fatal("[sign-stm32mp] Please make sure to configure \"%s_%s\" var to key file." % (keyinput, socname))
|
||||
else:
|
||||
bb.fatal("[sign-stm32mp] Please make sure to configure \"%s\" var to key file." % keyinput)
|
||||
|
||||
python __anonymous() {
|
||||
if d.getVar('SIGN_ENABLE') == "1" or d.getVar('ENCRYPT_ENABLE') == "1":
|
||||
|
||||
# Signing process is dedicated to "target" recipe only:
|
||||
# Make sure to discard native and nativesdk
|
||||
for native_class in ['native', 'nativesdk']:
|
||||
if bb.data.inherits_class(native_class, d):
|
||||
return
|
||||
|
||||
# Check for SIGN_TOOL configuration
|
||||
signtool = d.getVar('SIGN_TOOL') or ""
|
||||
if not signtool:
|
||||
bb.fatal("[sign-stm32mp] Please make sure to configure \"SIGN_TOOL\" var to signing tool.")
|
||||
# Check for SIGN_TOOL is present in PATH environment variable
|
||||
if not bb.utils.which(d.getVar('PATH'), signtool):
|
||||
bb.debug(1, "[sign-stm32mp] %s binary is not found in PATH." % signtool)
|
||||
signtool_path = search_path(signtool, d)
|
||||
bb.debug(1, "[sign-stm32mp] Set SIGN_TOOL to '%s' path." % signtool_path)
|
||||
d.setVar('SIGN_TOOL', signtool_path)
|
||||
|
||||
if d.getVar('SIGN_ENABLE') == "1":
|
||||
# Check for internal use of SIGN_KEY_PATH_LIST
|
||||
signingkey_list = d.getVar('SIGN_KEY_PATH_LIST')
|
||||
if signingkey_list:
|
||||
raise bb.parse.SkipRecipe("[sign-stm32mp] You cannot use SIGN_KEY_PATH_LIST as it is internal to sign-stm32mp.bbclass.")
|
||||
# Init SIGN_KEY_PATH_LIST from SIGN_KEY settings
|
||||
init_keylist_from('SIGN_KEY_PATH_LIST', 'SIGN_KEY', 'STM32MP_SOC_NAME', d)
|
||||
|
||||
if d.getVar('ENCRYPT_ENABLE') == "1":
|
||||
if d.getVar('SIGN_ENABLE') == "0":
|
||||
bb.fatal("[sign-stm32mp] You need to set 'SIGN_ENABLE = 1' to encrypt and sign binaries at once.")
|
||||
|
||||
# Check for internal use of ENCRYPT_FSBL_KEY_PATH_LIST
|
||||
fsbl_encryptkey_list = d.getVar('ENCRYPT_FSBL_KEY_PATH_LIST')
|
||||
if fsbl_encryptkey_list:
|
||||
raise bb.parse.SkipRecipe("[sign-stm32mp] You cannot use ENCRYPT_FSBL_KEY_PATH_LIST as it is internal to sign-stm32mp.bbclass.")
|
||||
# Init ENCRYPT_KEY_PATH_LIST from ENCRYPT_KEY settings
|
||||
init_keylist_from('ENCRYPT_FSBL_KEY_PATH_LIST', 'ENCRYPT_FSBL_KEY', 'STM32MP_ENCRYPT_SOC_NAME', d)
|
||||
|
||||
# Check for internal use of ENCRYPT_FIP_KEY_PATH_LIST
|
||||
fip_encryptkey_list = d.getVar('ENCRYPT_FIP_KEY_PATH_LIST')
|
||||
if fip_encryptkey_list:
|
||||
raise bb.parse.SkipRecipe("[sign-stm32mp] You cannot use ENCRYPT_FIP_KEY_PATH_LIST as it is internal to sign-stm32mp.bbclass.")
|
||||
# Init ENCRYPT_KEY_PATH_LIST from ENCRYPT_KEY settings
|
||||
init_keylist_from('ENCRYPT_FIP_KEY_PATH_LIST', 'ENCRYPT_FIP_KEY', 'STM32MP_ENCRYPT_SOC_NAME', d)
|
||||
|
||||
}
|
||||
|
|
@ -30,11 +30,13 @@ FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V42 = "ea25d099982d035af85d193c
|
|||
FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V45 = "63a38e9f392d8813d6f1f4d0d6fbe657"
|
||||
FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V48 = "db4762b09b6bda63da103963e6e081de"
|
||||
FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V49 = "2827219e81f28aba7c6a569f7c437fa7"
|
||||
FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V56 = "10c0fda810c63b052409b15a5445671a"
|
||||
FSL_EULA_FILE_MD5SUMS:append = " \
|
||||
${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V42} \
|
||||
${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V45} \
|
||||
${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V48} \
|
||||
${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V49} \
|
||||
${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V56} \
|
||||
"
|
||||
|
||||
# STM EULA
|
||||
|
|
|
|||
|
|
@ -0,0 +1,50 @@
|
|||
#@TYPE: Machine
|
||||
#@NAME: ConnectCore 91 Development Kit
|
||||
#@DESCRIPTION: Machine configuration for Digi's ConnectCore 91 DVK
|
||||
|
||||
DIGI_SOM = "ccimx91"
|
||||
MACHINEOVERRIDES =. "mx91:${DIGI_FAMILY}:${DIGI_SOM}:"
|
||||
|
||||
# Include the machine configuration for Digi's ConnectCore 9 module
|
||||
include conf/machine/include/ccimx9.inc
|
||||
|
||||
IMXBOOT_TARGETS = "flash_singleboot"
|
||||
|
||||
# U-Boot configurations
|
||||
UBOOT_CONFIG ??= "ccimx91-dvk"
|
||||
UBOOT_CONFIG[ccimx91-dvk] = "ccimx91-dvk_defconfig"
|
||||
|
||||
# imx-boot configurations
|
||||
ATF_PLATFORM = "imx91"
|
||||
IMX_BOOT_SOC_TARGET = "iMX91"
|
||||
IMXBOOT_TARGETS = "flash_singleboot"
|
||||
SECO_FIRMWARE_NAME = "mx91a0-ahab-container.img"
|
||||
|
||||
BOOTLOADER_SEEK_USERDATA = "32"
|
||||
|
||||
KERNEL_DEVICETREE ?= " \
|
||||
digi/ccimx91-dvk.dtb \
|
||||
digi/_ov_board_enet2_ccimx9-dvk.dtbo \
|
||||
digi/_ov_board_mikroe-accel2-click_ccimx9-dvk.dtbo \
|
||||
digi/_ov_board_mikroe-gyro-click_ccimx9-dvk.dtbo \
|
||||
digi/_ov_som_bt_ccimx9.dtbo \
|
||||
digi/_ov_som_bt-dtm_ccimx9.dtbo \
|
||||
digi/_ov_som_wifi_ccimx9.dtbo \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'tsn', 'digi/_ov_board_eqos-tsn_ccimx9-dvk.dtbo', '', d)} \
|
||||
"
|
||||
|
||||
# Default image for install scripts
|
||||
DEFAULT_IMAGE_NAME ?= "core-image-base"
|
||||
|
||||
# Set this platform without graphical support
|
||||
IS_HEADLESS = "true"
|
||||
|
||||
# Boot artifacts to be copied from the deploy dir to the installer ZIP
|
||||
BOOTABLE_ARTIFACTS = " \
|
||||
imx-boot-ccimx91-dvk.bin \
|
||||
"
|
||||
|
||||
# Add secure enclave
|
||||
SOC_TOOLS_TEST:append:mx91-nxp-bsp = " imx-secure-enclave"
|
||||
# Add AFE support
|
||||
NXPAFE_INSTALL:mx91-nxp-bsp = "nxp-afe nxp-afe-voiceseeker"
|
||||
|
|
@ -5,39 +5,38 @@
|
|||
DIGI_SOM = "ccimx93"
|
||||
MACHINEOVERRIDES =. "mx93:${DIGI_FAMILY}:${DIGI_SOM}:"
|
||||
|
||||
require include/ccimx93.inc
|
||||
# Include the machine configuration for Digi's ConnectCore 9 module
|
||||
include conf/machine/include/ccimx9.inc
|
||||
|
||||
# U-Boot configurations
|
||||
UBOOT_CONFIG ??= "ccimx93-dvk"
|
||||
UBOOT_CONFIG[ccimx93-dvk] = "ccimx93-dvk_defconfig"
|
||||
UBOOT_DTB_NAME = "ccimx93-dvk.dtb"
|
||||
|
||||
BOOTLOADER_SEEK_USERDATA = "32"
|
||||
# imx-boot configurations
|
||||
ATF_PLATFORM = "imx93"
|
||||
IMX_BOOT_SOC_TARGET = "iMX93"
|
||||
IMXBOOT_TARGETS = "flash_singleboot flash_singleboot_a0"
|
||||
# Generate images for all SOC revisions (keep the override as otherwise the
|
||||
# one in "use-imx-security-controller-firmware.bbclass" takes precedence)
|
||||
SECO_FIRMWARE_NAME:ccimx93 = "mx93??-ahab-container.img"
|
||||
|
||||
KERNEL_DEVICETREE ?= " \
|
||||
digi/ccimx93-dvk.dtb \
|
||||
digi/_ov_board_dlc0200ccp04df-mipi-dsi_ccimx93-dvk.dtbo \
|
||||
digi/_ov_board_enet2_ccimx93-dvk.dtbo \
|
||||
digi/_ov_board_lvds_ccimx93-dvk.dtbo \
|
||||
digi/_ov_board_mikroe-accel2-click_ccimx93-dvk.dtbo \
|
||||
digi/_ov_board_mikroe-gyro-click_ccimx93-dvk.dtbo \
|
||||
digi/_ov_board_nhd-3-5-640480ef-msxp-mipi-dsi_ccimx93-dvk.dtbo \
|
||||
digi/_ov_som_bt_ccimx93.dtbo \
|
||||
digi/_ov_som_bt-dtm_ccimx93.dtbo \
|
||||
digi/_ov_board_enet2_ccimx9-dvk.dtbo \
|
||||
digi/_ov_board_mikroe-accel2-click_ccimx9-dvk.dtbo \
|
||||
digi/_ov_board_mikroe-gyro-click_ccimx9-dvk.dtbo \
|
||||
digi/_ov_som_bt_ccimx9.dtbo \
|
||||
digi/_ov_som_bt-dtm_ccimx9.dtbo \
|
||||
digi/_ov_som_emulate-ccimx91_ccimx93.dtbo \
|
||||
digi/_ov_som_npu_ccimx93.dtbo \
|
||||
digi/_ov_som_wifi_ccimx93.dtbo \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'tsn', 'digi/_ov_board_eqos-tsn_ccimx93-dvk.dtbo', '', d)} \
|
||||
digi/_ov_som_wifi_ccimx9.dtbo \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'tsn', 'digi/_ov_board_eqos-tsn_ccimx9-dvk.dtbo', '', d)} \
|
||||
"
|
||||
|
||||
# Wireless external module
|
||||
WIRELESS_MODULE ?= ""
|
||||
WIRELESS_MODULE:append = " ${@oe.utils.conditional('HAVE_WIFI', '1', 'kernel-module-nxp-wlan', '', d)}"
|
||||
HAS_WIFI_VIRTWLANS = "true"
|
||||
|
||||
# Machine firmware
|
||||
MACHINE_FIRMWARE:append = " ${@oe.utils.conditional('HAVE_WIFI', '1', 'firmware-nxp-wifi-nxpiw612 firmware-murata-nxp', '', d)}"
|
||||
|
||||
MACHINE_EXTRA_RRECOMMENDS += "${WIRELESS_MODULE}"
|
||||
# Add additional firmware
|
||||
MACHINE_FIRMWARE:append = " ethos-u-firmware"
|
||||
|
||||
IMAGE_BOOT_FILES:append:use-nxp-bsp = " \
|
||||
imx93_m33_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin \
|
||||
|
|
@ -45,23 +44,8 @@ IMAGE_BOOT_FILES:append:use-nxp-bsp = " \
|
|||
"
|
||||
WKS_FILE_DEPENDS:append = " imx-m33-demos"
|
||||
|
||||
# XBee
|
||||
XBEE_RESET_N_GPIO ?= "gpio2@19"
|
||||
XBEE_SLEEP_RQ_GPIO ?= ""
|
||||
XBEE_TTY ?= "ttyLP3"
|
||||
|
||||
# Image FS types
|
||||
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
|
||||
"boot.vfat recovery.vfat squashfs tar.bz2", \
|
||||
"boot.vfat recovery.vfat ext4.gz tar.bz2 sdcard.gz", d)}'
|
||||
|
||||
# Boot artifacts to be copied from the deploy dir to the installer ZIP
|
||||
BOOTABLE_ARTIFACTS = " \
|
||||
imx-boot-ccimx93-dvk.bin \
|
||||
imx-boot-ccimx93-dvk-A0.bin \
|
||||
"
|
||||
|
||||
# Default overlayfs_etc mount point and type
|
||||
OVERLAYFS_ETC_MOUNT_POINT ?= "/mnt/data"
|
||||
OVERLAYFS_ETC_DEVICE ?= "/dev/mmcblk0p7"
|
||||
OVERLAYFS_ETC_FSTYPE ?= "ext4"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,158 @@
|
|||
#@TYPE: Machine
|
||||
#@NAME: ccmp25-dvk
|
||||
#@DESCRIPTION: Configuration for Digi ConnectCore MP25 DVK
|
||||
#@NEEDED_BSPLAYERS: layers/meta-digi
|
||||
|
||||
# Include the machine configuration for Digi's ConnectCore MP2.
|
||||
include conf/machine/include/ccmp2.inc
|
||||
|
||||
# Define specific familly common machine name
|
||||
DIGI_SOM = "ccmp25"
|
||||
MACHINEOVERRIDES =. "stm32mp2common:stm32mp25common:${DIGI_FAMILY}:${DIGI_SOM}:"
|
||||
|
||||
# =========================================================================
|
||||
# SOC
|
||||
# =========================================================================
|
||||
STM32MP_SOC_NAME = "stm32mp25"
|
||||
|
||||
# =========================================================================
|
||||
# Chip architecture
|
||||
# =========================================================================
|
||||
DEFAULTTUNE = "cortexa35"
|
||||
include conf/machine/include/arm/armv8a/tune-cortexa35.inc
|
||||
|
||||
# =========================================================================
|
||||
# boot device
|
||||
# =========================================================================
|
||||
# Configure the list of boards that enable EMMC/SDCARD
|
||||
DEVICE_BOARD_ENABLE:EMMC += "${STM32MP_DEVICETREE}"
|
||||
DEVICE_BOARD_ENABLE:SDCARD += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'sdcard', '${STM32MP_DEVICETREE}', '', d)}"
|
||||
|
||||
# =========================================================================
|
||||
# U-Boot configs
|
||||
# =========================================================================
|
||||
# Last one is the default (the one the symlinks point at)
|
||||
UBOOT_CONFIG = "ccmp25-dvk"
|
||||
UBOOT_CONFIG[ccmp25-dvk] = "ccmp25-dvk_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}"
|
||||
|
||||
# =========================================================================
|
||||
# Machine settings
|
||||
# =========================================================================
|
||||
# Define list of devicetree per supported storage
|
||||
STM32MP_DEVICETREE ??= "ccmp25-dvk"
|
||||
# Extra DTB for board - need to specify it with .dtb ...
|
||||
STM32MP_KERNEL_DEVICETREE:ccmp25-dvk += " \
|
||||
ccmp25-dvk.dtb \
|
||||
_ov_board_e55rb-i-mw346-c-mipi-dsi_ccmp25-dvk.dtbo \
|
||||
_ov_board_g101evn010-lvds_ccmp25-dvk.dtbo \
|
||||
_ov_board_mikroe-accel2-click_ccmp25-dvk.dtbo \
|
||||
_ov_board_mikroe-gyro-click_ccmp25-dvk.dtbo \
|
||||
_ov_board_mikroe-i2c-to-spi-click_ccmp25-dvk.dtbo \
|
||||
_ov_board_mikroe-mcp2518fd-click_ccmp25-dvk.dtbo \
|
||||
_ov_board_n25q256a-spi-nor-flash_ccmp25-dvk.dtbo \
|
||||
_ov_board_nhd-3-5-640480ef-msxp-mipi-dsi_ccmp25-dvk.dtbo \
|
||||
_ov_board_usb-3-0-typec_ccmp25-dvk.dtbo \
|
||||
_ov_som_bt_ccmp25.dtbo \
|
||||
_ov_som_wifi_ccmp25.dtbo \
|
||||
"
|
||||
|
||||
# =========================================================================
|
||||
# optee
|
||||
# =========================================================================
|
||||
# Map OPTEE configuration to device tree list
|
||||
OPTEE_CONF = "${STM32MP_DEVICETREE}"
|
||||
|
||||
# =========================================================================
|
||||
# Machine features
|
||||
# =========================================================================
|
||||
MACHINE_FEATURES += "splashscreen"
|
||||
MACHINE_FEATURES += "watchdog"
|
||||
MACHINE_FEATURES += "bluetooth"
|
||||
MACHINE_FEATURES += "wifi"
|
||||
MACHINE_FEATURES += "usbg0"
|
||||
|
||||
# GPU
|
||||
MACHINE_FEATURES += "${@'gpu' if d.getVar('ACCEPT_EULA_'+d.getVar('MACHINE')) == '1' else ''}"
|
||||
MACHINE_FEATURES += "openvx"
|
||||
MACHINE_FEATURES += "opencl"
|
||||
MACHINE_FEATURES += "vulkan"
|
||||
|
||||
# M33
|
||||
MACHINE_FEATURES += "m33copro"
|
||||
|
||||
# Disable external dt
|
||||
EXTERNAL_DT_ENABLED = "0"
|
||||
|
||||
# Flashlayout
|
||||
# No metadata generated and supported for the moment
|
||||
STM32MP_METADATA_DATA ?= ""
|
||||
|
||||
# GPU have vulkan
|
||||
DISTRO_FEATURES:append = " ${@bb.utils.contains('DISTRO', 'openstlinux-eglfs', '', 'vulkan', d)} "
|
||||
DISTRO_FEATURES:append = " opencl "
|
||||
|
||||
# =========================================================================
|
||||
# Firmware
|
||||
# =========================================================================
|
||||
MACHINE_FIRMWARE:append = " firmware-murata-infineon firmware-murata-infineon-mfgtest"
|
||||
|
||||
MACHINE_EXTRA_RRECOMMENDS += " \
|
||||
${MACHINE_FIRMWARE} \
|
||||
"
|
||||
|
||||
# =========================================================================
|
||||
# Image
|
||||
# =========================================================================
|
||||
# Image FS types
|
||||
IMAGE_FSTYPES += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
|
||||
"boot.vfat recovery.vfat squashfs tar.bz2", \
|
||||
"boot.vfat recovery.vfat ext4.gz tar.bz2", d)}'
|
||||
|
||||
# Default image for install scripts
|
||||
DEFAULT_IMAGE_NAME ?= "dey-image-webkit"
|
||||
|
||||
# Wic files
|
||||
WKS_FILES += " \
|
||||
ccmp2-1GB.wks.in \
|
||||
"
|
||||
|
||||
# Wireless external module
|
||||
HAS_WIFI_VIRTWLANS = "true"
|
||||
|
||||
# Remove additional bluetooth packages
|
||||
MACHINE_BLUETOOTH_EXTRA_INSTALL = ""
|
||||
|
||||
# For populate_sdk, gcc-arm-none-eabi_11 has a libpython3 dependency, so we remove it.
|
||||
ST_TOOLS_FOR_SDK:remove = "nativesdk-gcc-arm-none-eabi"
|
||||
|
||||
# XBee
|
||||
XBEE_RESET_N_GPIO ?= "GPIOD@6"
|
||||
XBEE_SLEEP_RQ_GPIO ?= ""
|
||||
XBEE_TTY ?= "ttySTM2"
|
||||
|
||||
# =========================================================================
|
||||
# alsa
|
||||
# =========================================================================
|
||||
ALSA_LIST = ""
|
||||
|
||||
# Disable use of vendorfs and userfs partitions
|
||||
ST_VENDORFS = "0"
|
||||
ST_USERFS = "0"
|
||||
|
||||
# Boot artifacts to be copied from the deploy dir to the installer ZIP
|
||||
BOOTABLE_ARTIFACTS = " \
|
||||
arm-trusted-firmware/tf-a-ccmp25-dvk-emmc.stm32 \
|
||||
fip/fip-ccmp25-dvk-optee.bin \
|
||||
metadata-ccmp25-dvk.bin \
|
||||
"
|
||||
|
||||
# Per-machine DISTRO_FEATURES customization
|
||||
MACHINE_DISTRO_FEATURES_REMOVE = "x11"
|
||||
|
||||
# Default ROOTFS max size for image being built to this value
|
||||
IMAGE_ROOTFS_MAXSIZE = "1572864"
|
||||
|
||||
# Default overlayfs_etc mount point and type
|
||||
OVERLAYFS_ETC_MOUNT_POINT ?= "/mnt/data"
|
||||
OVERLAYFS_ETC_DEVICE ?= "/dev/mmcblk0p11"
|
||||
OVERLAYFS_ETC_FSTYPE ?= "ext4"
|
||||
|
|
@ -16,6 +16,9 @@ UBOOT_SUFFIX = "imx"
|
|||
BOOTABLE_FILENAME = "${UBOOT_PREFIX}-${MACHINE}.${UBOOT_SUFFIX}"
|
||||
SDIMG_BOOTLOADER = "${DEPLOY_DIR_IMAGE}/${BOOTABLE_FILENAME}"
|
||||
|
||||
# Set InitRAMDisk load address to U-boot initramfs_addr
|
||||
UBOOT_RD_LOADADDRESS = "0x19000000"
|
||||
|
||||
# Linux kernel configuration
|
||||
KERNEL_DEFCONFIG ?= "arch/arm/configs/ccimx6sbc_defconfig"
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@ INIT_MANAGER ?= "sysvinit"
|
|||
UBOOT_PREFIX = "u-boot"
|
||||
UBOOT_SUFFIX = "imx"
|
||||
|
||||
# Set InitRAMDisk load address to U-boot initramfs_addr
|
||||
UBOOT_RD_LOADADDRESS = "0x83800000"
|
||||
|
||||
STORAGE_MEDIA = "mtd"
|
||||
|
||||
# Wireless external module
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@ BOOTLOADER_IMAGE_RECIPE = "imx-boot"
|
|||
BOOTABLE_FILENAME = "${UBOOT_PREFIX}-${MACHINE}.bin"
|
||||
SDIMG_BOOTLOADER = "${DEPLOY_DIR_IMAGE}/${BOOTABLE_FILENAME}"
|
||||
|
||||
# Set InitRAMDisk load address to U-boot initramfs_addr
|
||||
UBOOT_RD_LOADADDRESS = "0x43800000"
|
||||
|
||||
# LPDDR4 firmware
|
||||
DDR_FIRMWARE_NAME = " \
|
||||
lpddr4_pmu_train_1d_imem.bin \
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@ include conf/machine/include/arm/armv8a/tune-cortexa35.inc
|
|||
UBOOT_PREFIX = "imx-boot"
|
||||
UBOOT_SUFFIX = "bin"
|
||||
|
||||
# Set InitRAMDisk load address to U-boot initrd_addr
|
||||
UBOOT_RD_LOADADDRESS = "0x8A100000"
|
||||
|
||||
# The bootloader image that gets flashed consists of U-Boot and several fw binaries
|
||||
EXTRA_IMAGEDEPENDS += "imx-boot"
|
||||
BOOTLOADER_IMAGE_RECIPE = "imx-boot"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,120 @@
|
|||
#@TYPE: Machine
|
||||
#@NAME: ConnectCore 9 family of SOMs
|
||||
#@DESCRIPTION: Machine configuration for Digi's ConnectCore 9 family of SOMs
|
||||
|
||||
DIGI_FAMILY = "ccimx9"
|
||||
|
||||
require conf/machine/include/imx-digi-base.inc
|
||||
require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc
|
||||
|
||||
# Platform u-boot settings
|
||||
UBOOT_DTB_LOADADDRESS = "0x83000000"
|
||||
UBOOT_DTBO_LOADADDRESS = "0x83000000"
|
||||
UBOOT_ENTRYPOINT = "0x80400000"
|
||||
UBOOT_ENV = "boot"
|
||||
UBOOT_PREFIX = "imx-boot"
|
||||
UBOOT_SUFFIX = "bin"
|
||||
|
||||
# Set InitRAMDisk load address to U-boot initrd_addr
|
||||
UBOOT_RD_LOADADDRESS = "0x83800000"
|
||||
|
||||
# Platform kernel settings (keep the override as otherwise KERNEL_IMAGETYPE
|
||||
# from imx-digi-base.inc takes precedence)
|
||||
KERNEL_CLASSES = "kernel-fitimage"
|
||||
KERNEL_IMAGETYPE:ccimx9 = "${@oe.utils.vartrue('TRUSTFENCE_SIGN_ARTIFACTS', 'fitImage', 'Image.gz', d)}"
|
||||
|
||||
# The bootloader image that gets flashed consists of U-Boot and several fw binaries
|
||||
EXTRA_IMAGEDEPENDS += "imx-boot"
|
||||
BOOTLOADER_IMAGE_RECIPE = "imx-boot"
|
||||
BOOTABLE_FILENAME = "${UBOOT_PREFIX}-${MACHINE}.bin"
|
||||
SDIMG_BOOTLOADER = "${DEPLOY_DIR_IMAGE}/${BOOTABLE_FILENAME}"
|
||||
BOOTLOADER_SEEK_USERDATA = "32"
|
||||
|
||||
DDR_FIRMWARE_NAME = " \
|
||||
lpddr4_dmem_1d_v202201.bin \
|
||||
lpddr4_dmem_2d_v202201.bin \
|
||||
lpddr4_imem_1d_v202201.bin \
|
||||
lpddr4_imem_2d_v202201.bin \
|
||||
"
|
||||
|
||||
MACHINE_FEATURES += "pci wifi bluetooth"
|
||||
MACHINE_FEATURES:append:use-nxp-bsp = " optee jailhouse"
|
||||
|
||||
STORAGE_MEDIA = "mmc"
|
||||
WLAN_P2P_INTERFACE = "wfd0"
|
||||
|
||||
# Linux kernel configuration
|
||||
KERNEL_DEFCONFIG ?= "arch/arm64/configs/ccimx9_defconfig"
|
||||
|
||||
SPL_BINARY = "spl/u-boot-spl.bin"
|
||||
|
||||
MACHINE_EXTRA_RDEPENDS += " \
|
||||
e2fsprogs-mke2fs \
|
||||
e2fsprogs-resize2fs \
|
||||
parted \
|
||||
xbee-init \
|
||||
"
|
||||
|
||||
# TrustFence
|
||||
TRUSTFENCE_SIGN_MODE = "AHAB"
|
||||
|
||||
IMX_BOOT_SEEK = "32"
|
||||
|
||||
SERIAL_CONSOLES = "115200;ttyLP5"
|
||||
|
||||
# Bluetooth tty
|
||||
BT_TTY ?= "ttyLP0"
|
||||
|
||||
# Per-machine DISTRO_FEATURES customization
|
||||
MACHINE_DISTRO_FEATURES_REMOVE = "vulkan"
|
||||
|
||||
# SWUpdate sw-description configuration
|
||||
BOOTFS_EXT ?= ".boot.vfat"
|
||||
ROOTFS_EXT ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", ".squashfs", ".ext4.gz", d)}'
|
||||
|
||||
BOOT_DEV_NAME ?= "/dev/mmcblk0p1"
|
||||
ROOTFS_DEV_NAME ?= "/dev/mmcblk0p3"
|
||||
ROOTFS_ENC_DEV = "/dev/mapper/cryptrootfs"
|
||||
ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS') == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}"
|
||||
|
||||
# Wireless external module
|
||||
WIRELESS_MODULE ?= ""
|
||||
WIRELESS_MODULE:append = " ${@oe.utils.conditional('HAVE_WIFI', '1', 'kernel-module-nxp-wlan', '', d)}"
|
||||
HAS_WIFI_VIRTWLANS = "true"
|
||||
|
||||
# Machine firmware
|
||||
MACHINE_FIRMWARE:append = " ${@oe.utils.conditional('HAVE_WIFI', '1', 'firmware-nxp-wifi-nxpiw612 firmware-murata-nxp', '', d)}"
|
||||
|
||||
MACHINE_EXTRA_RRECOMMENDS += "${WIRELESS_MODULE}"
|
||||
|
||||
# XBee
|
||||
XBEE_RESET_N_GPIO ?= "gpio2@19"
|
||||
XBEE_SLEEP_RQ_GPIO ?= ""
|
||||
XBEE_TTY ?= "ttyLP3"
|
||||
|
||||
# Image FS types
|
||||
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
|
||||
"boot.vfat recovery.vfat squashfs tar.bz2", \
|
||||
"boot.vfat recovery.vfat ext4.gz tar.bz2 sdcard.gz", d)}'
|
||||
|
||||
# Default overlayfs_etc mount point and type
|
||||
OVERLAYFS_ETC_MOUNT_POINT ?= "/mnt/data"
|
||||
OVERLAYFS_ETC_DEVICE ?= "/dev/mmcblk0p7"
|
||||
OVERLAYFS_ETC_FSTYPE ?= "ext4"
|
||||
|
||||
PREFERRED_VERSION_gstreamer1.0:ccimx9 ?= "1.22.5.imx"
|
||||
PREFERRED_VERSION_gstreamer1.0-plugins-bad:ccimx9 ?= "1.22.5.imx"
|
||||
PREFERRED_VERSION_gstreamer1.0-plugins-base:ccimx9 ?= "1.22.5.imx"
|
||||
PREFERRED_VERSION_gstreamer1.0-plugins-good:ccimx9 ?= "1.22.5.imx"
|
||||
PREFERRED_VERSION_gstreamer1.0-plugins-ugly:ccimx9 ?= "1.22.6"
|
||||
|
||||
PREFERRED_VERSION_libdrm:ccimx9 ?= "2.4.115.imx"
|
||||
PREFERRED_VERSION_nativesdk-wayland:ccimx9 ?= "1.22.0.imx"
|
||||
PREFERRED_VERSION_wayland:ccimx9 ?= "1.22.0.imx"
|
||||
PREFERRED_VERSION_wayland-native:ccimx9 ?= "1.22.0.imx"
|
||||
PREFERRED_VERSION_wayland-protocols:ccimx9 ?= "1.32.imx"
|
||||
PREFERRED_VERSION_weston:ccimx9 ?= "11.0.3.imx"
|
||||
PREFERRED_VERSION_xwayland:ccimx9 ?= "23.1.1.imx"
|
||||
|
||||
PREFERRED_VERSION_nativesdk-trustfence-sign-tools:ccimx9 ?= "2023.04"
|
||||
PREFERRED_VERSION_trustfence-sign-tools-native:ccimx9 ?= "2023.04"
|
||||
|
|
@ -1,104 +0,0 @@
|
|||
#@TYPE: Machine
|
||||
#@NAME: ConnectCore 93 family of SOMs
|
||||
#@DESCRIPTION: Machine configuration for Digi's ConnectCore 93 family of SOMs
|
||||
|
||||
DIGI_FAMILY = "ccimx93"
|
||||
|
||||
require conf/machine/include/imx-digi-base.inc
|
||||
require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc
|
||||
|
||||
# Platform u-boot settings
|
||||
UBOOT_DTB_LOADADDRESS = "0x83000000"
|
||||
UBOOT_DTBO_LOADADDRESS = "0x83000000"
|
||||
UBOOT_ENTRYPOINT = "0x80400000"
|
||||
UBOOT_ENV = "boot"
|
||||
UBOOT_PREFIX = "imx-boot"
|
||||
UBOOT_SUFFIX = "bin"
|
||||
|
||||
# Platform kernel settings (keep the override as otherwise KERNEL_IMAGETYPE
|
||||
# from imx-digi-base.inc takes precedence)
|
||||
KERNEL_CLASSES = "kernel-fitimage"
|
||||
KERNEL_IMAGETYPE:ccimx93 = "${@oe.utils.vartrue('TRUSTFENCE_SIGN_ARTIFACTS', 'fitImage', 'Image.gz', d)}"
|
||||
|
||||
# The bootloader image that gets flashed consists of U-Boot and several fw binaries
|
||||
EXTRA_IMAGEDEPENDS += "imx-boot"
|
||||
BOOTLOADER_IMAGE_RECIPE = "imx-boot"
|
||||
BOOTABLE_FILENAME = "${UBOOT_PREFIX}-${MACHINE}.bin"
|
||||
SDIMG_BOOTLOADER = "${DEPLOY_DIR_IMAGE}/${BOOTABLE_FILENAME}"
|
||||
|
||||
# Generate images for all SOC revisions (keep the override as otherwise the
|
||||
# one in "use-imx-security-controller-firmware.bbclass" takes precedence)
|
||||
SECO_FIRMWARE_NAME:ccimx93 = "mx93??-ahab-container.img"
|
||||
|
||||
DDR_FIRMWARE_NAME = " \
|
||||
lpddr4_dmem_1d_v202201.bin \
|
||||
lpddr4_dmem_2d_v202201.bin \
|
||||
lpddr4_imem_1d_v202201.bin \
|
||||
lpddr4_imem_2d_v202201.bin \
|
||||
"
|
||||
|
||||
MACHINE_FEATURES += "pci wifi bluetooth"
|
||||
MACHINE_FEATURES:append:use-nxp-bsp = " optee jailhouse"
|
||||
|
||||
STORAGE_MEDIA = "mmc"
|
||||
WLAN_P2P_INTERFACE = "wfd0"
|
||||
|
||||
# Linux kernel configuration
|
||||
KERNEL_DEFCONFIG ?= "arch/arm64/configs/ccimx93_defconfig"
|
||||
|
||||
SPL_BINARY = "spl/u-boot-spl.bin"
|
||||
|
||||
# Set ATF platform name
|
||||
ATF_PLATFORM = "imx93"
|
||||
|
||||
MACHINE_EXTRA_RDEPENDS += " \
|
||||
e2fsprogs-mke2fs \
|
||||
e2fsprogs-resize2fs \
|
||||
parted \
|
||||
xbee-init \
|
||||
"
|
||||
|
||||
# TrustFence
|
||||
TRUSTFENCE_SIGN_MODE = "AHAB"
|
||||
|
||||
IMXBOOT_TARGETS = "flash_singleboot flash_singleboot_a0"
|
||||
|
||||
IMX_BOOT_SOC_TARGET = "iMX9"
|
||||
IMX_BOOT_SEEK = "32"
|
||||
|
||||
SERIAL_CONSOLES = "115200;ttyLP5"
|
||||
|
||||
# Bluetooth tty
|
||||
BT_TTY ?= "ttyLP0"
|
||||
|
||||
# Add additional firmware
|
||||
MACHINE_FIRMWARE:append = " ethos-u-firmware"
|
||||
|
||||
# Per-machine DISTRO_FEATURES customization
|
||||
MACHINE_DISTRO_FEATURES_REMOVE = "vulkan"
|
||||
|
||||
# SWUpdate sw-description configuration
|
||||
BOOTFS_EXT ?= ".boot.vfat"
|
||||
ROOTFS_EXT ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", ".squashfs", ".ext4.gz", d)}'
|
||||
|
||||
BOOT_DEV_NAME ?= "/dev/mmcblk0p1"
|
||||
ROOTFS_DEV_NAME ?= "/dev/mmcblk0p3"
|
||||
ROOTFS_ENC_DEV = "/dev/mapper/cryptrootfs"
|
||||
ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS') == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}"
|
||||
|
||||
PREFERRED_VERSION_gstreamer1.0:ccimx93 ?= "1.22.5.imx"
|
||||
PREFERRED_VERSION_gstreamer1.0-plugins-bad:ccimx93 ?= "1.22.5.imx"
|
||||
PREFERRED_VERSION_gstreamer1.0-plugins-base:ccimx93 ?= "1.22.5.imx"
|
||||
PREFERRED_VERSION_gstreamer1.0-plugins-good:ccimx93 ?= "1.22.5.imx"
|
||||
PREFERRED_VERSION_gstreamer1.0-plugins-ugly:ccimx93 ?= "1.22.6"
|
||||
|
||||
PREFERRED_VERSION_libdrm:ccimx93 ?= "2.4.115.imx"
|
||||
PREFERRED_VERSION_nativesdk-wayland:ccimx93 ?= "1.22.0.imx"
|
||||
PREFERRED_VERSION_wayland:ccimx93 ?= "1.22.0.imx"
|
||||
PREFERRED_VERSION_wayland-native:ccimx93 ?= "1.22.0.imx"
|
||||
PREFERRED_VERSION_wayland-protocols:ccimx93 ?= "1.32.imx"
|
||||
PREFERRED_VERSION_weston:ccimx93 ?= "11.0.3.imx"
|
||||
PREFERRED_VERSION_xwayland:ccimx93 ?= "23.1.1.imx"
|
||||
|
||||
PREFERRED_VERSION_nativesdk-trustfence-sign-tools:ccimx93 ?= "2023.04"
|
||||
PREFERRED_VERSION_trustfence-sign-tools-native:ccimx93 ?= "2023.04"
|
||||
|
|
@ -42,6 +42,9 @@ UBOOT_ENV_SIZE ?= "0x20000"
|
|||
# available space in the environment partition)
|
||||
UBOOT_ENV_RANGE ?= ""
|
||||
|
||||
# Set InitRAMDisk load address to U-boot initrd_addr
|
||||
UBOOT_RD_LOADADDRESS = "0xc4400000"
|
||||
|
||||
# OPTEE runtime packages to install
|
||||
OPTEE_PKGS ??= "optee-client"
|
||||
|
||||
|
|
@ -78,7 +81,7 @@ TRUSTFENCE_CONSOLE_DISABLE ?= "0"
|
|||
# TRUSTFENCE_CONSOLE_PASSPHRASE_ENABLE = ""
|
||||
|
||||
# Disable the generation of flashlayout files
|
||||
do_create_flashlayout_config[noexec] = "1"
|
||||
ENABLE_FLASHLAYOUT_CONFIG = "0"
|
||||
|
||||
# Include boot script into the FIT image
|
||||
UBOOT_ENV = "boot"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,97 @@
|
|||
#@TYPE: Machine
|
||||
#@NAME: ConnectCore for STM32MP2.
|
||||
#@DESCRIPTION: Machine configuration for Digi's ConnectCore MP2.
|
||||
|
||||
include conf/machine/include/st-machine-common-stm32mp.inc
|
||||
include conf/machine/include/digi-defaults.inc
|
||||
|
||||
DIGI_FAMILY = "ccmp2"
|
||||
|
||||
# Platform u-boot settings
|
||||
UBOOT_PREFIX = "fip"
|
||||
UBOOT_SUFFIX = "bin"
|
||||
# Set U-Boot FIP settings
|
||||
FIP_UBOOT_DTB = "u-boot"
|
||||
|
||||
# =========================================================================
|
||||
# trusted-firmware-a
|
||||
# =========================================================================
|
||||
PREFERRED_PROVIDER_virtual/trusted-firmware-a = "tf-a-stm32mp"
|
||||
PREFERRED_VERSION_tf-a-stm32mp ?= "v2.8%"
|
||||
|
||||
# Configure use of BL31
|
||||
FIP_BL31_ENABLE = "1"
|
||||
|
||||
# =========================================================================
|
||||
# optee-os
|
||||
# =========================================================================
|
||||
PREFERRED_PROVIDER_virtual/optee-os = "optee-os-stm32mp"
|
||||
PREFERRED_VERSION_optee-os-stm32mp ?= "3.19%"
|
||||
|
||||
PREFERRED_VERSION_gcnano-driver-stm32mp ?= "6.4.15%"
|
||||
PREFERRED_VERSION_gcnano-userland-multi-binary-stm32mp ?= "6.4.15%"
|
||||
|
||||
PREFERRED_VERSION_nativesdk-tf-a-tools ?= "v2.8%"
|
||||
PREFERRED_VERSION_tf-a-tools-native ?= "v2.8%"
|
||||
|
||||
# =========================================================================
|
||||
# Kernel
|
||||
# =========================================================================
|
||||
KERNEL_IMAGETYPE = "${@bb.utils.contains('TRUSTFENCE_FIT_IMG', '1', 'fitImage', 'Image.gz', d)}"
|
||||
KERNEL_CLASSES = "${@bb.utils.contains('TRUSTFENCE_FIT_IMG', '1', 'kernel-fitimage', 'kernel-uimage', d)}"
|
||||
KERNEL_ALT_IMAGETYPE = "vmlinux"
|
||||
KERNEL_DEFCONFIG ?= "arch/arm64/configs/ccmp2_defconfig"
|
||||
|
||||
STORAGE_MEDIA = "mmc"
|
||||
|
||||
# Enable STM specific features
|
||||
DEY_SOC_VENDOR = "STM"
|
||||
|
||||
# SWUpdate sw-description configuration
|
||||
BOOTFS_EXT ?= ".boot.vfat"
|
||||
ROOTFS_EXT ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", ".squashfs", ".ext4.gz", d)}'
|
||||
|
||||
BOOT_DEV_NAME ?= "/dev/mmcblk0p6"
|
||||
ROOTFS_DEV_NAME ?= "/dev/mmcblk0p8"
|
||||
ROOTFS_ENC_DEV = "/dev/mapper/cryptrootfs"
|
||||
ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS') == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}"
|
||||
|
||||
# List of supported boot devices
|
||||
BOOTDEVICE_LABELS ?= "emmc"
|
||||
# Supported boot schemes
|
||||
BOOTSCHEME_LABELS ?= "optee"
|
||||
|
||||
MACHINE_EXTRA_RRECOMMENDS:remove = "kernel-imagebootfs"
|
||||
|
||||
MACHINE_EXTRA_RDEPENDS += " \
|
||||
e2fsprogs-mke2fs \
|
||||
e2fsprogs-resize2fs \
|
||||
mtd-utils-ubifs \
|
||||
parted \
|
||||
xbee-init \
|
||||
"
|
||||
|
||||
# =========================================================================
|
||||
# Signing configuration
|
||||
# =========================================================================
|
||||
ENCRYPT_ENABLE ?= "0"
|
||||
ENCRYPT_SUFFIX ?= "_Encrypted"
|
||||
|
||||
SIGN_ENABLE ?= "0"
|
||||
SIGN_SUFFIX ?= "_Signed"
|
||||
|
||||
# =========================================================================
|
||||
# Debug trace
|
||||
# =========================================================================
|
||||
# activate/deactivate the debug and trace on boot stage
|
||||
ST_DEBUG_TRACE = "0"
|
||||
|
||||
# Wic files
|
||||
WKS_FILE_DEPENDS ?= " \
|
||||
virtual/bootloader \
|
||||
virtual/trusted-firmware-a \
|
||||
${@bb.utils.contains('BOOTSCHEME_LABELS', 'optee', 'virtual/optee-os', '', d)} \
|
||||
"
|
||||
|
||||
# Disable the generation of flashlayout files
|
||||
ENABLE_FLASHLAYOUT_CONFIG = "0"
|
||||
|
|
@ -16,9 +16,11 @@ PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
|
|||
# ccimx8x 5.15 2020.04 (packaged in imx-boot)
|
||||
# ccimx8mn 5.15 2020.04 (packaged in imx-boot)
|
||||
# ccimx8mm 5.15 2020.04 (packaged in imx-boot)
|
||||
# ccimx91 6.6 2024.04 (packaged in imx-boot)
|
||||
# ccimx93 6.1 2023.04 (packaged in imx-boot)
|
||||
# ccmp15 5.15 2021.10
|
||||
# ccmp13 5.15 2021.10
|
||||
# ccmp25 6.1 2022.10
|
||||
#
|
||||
|
||||
# Help variables used in recipes
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ DEFAULTTUNE:mx6-generic-bsp ?= "cortexa9thf-neon"
|
|||
DEFAULTTUNE:mx6ul-generic-bsp ?= "cortexa7thf-neon"
|
||||
DEFAULTTUNE:mx8m-generic-bsp ?= "cortexa53-crypto"
|
||||
DEFAULTTUNE:mx8x-generic-bsp ?= "cortexa35-crypto"
|
||||
DEFAULTTUNE:mx91-generic-bsp ?= "cortexa55"
|
||||
DEFAULTTUNE:mx93-generic-bsp ?= "cortexa55"
|
||||
|
||||
INHERIT += "machine-overrides-extender"
|
||||
|
|
@ -56,6 +57,7 @@ MACHINEOVERRIDES_EXTENDER:mx8mn:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxd
|
|||
MACHINEOVERRIDES_EXTENDER:mx8mp:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxdrm:imxvpu:imxgpu:imxgpu2d:imxgpu3d:imxvulkan:mx8-generic-bsp:mx8-nxp-bsp:mx8m-generic-bsp:mx8m-nxp-bsp:mx8mp-generic-bsp:mx8mp-nxp-bsp"
|
||||
MACHINEOVERRIDES_EXTENDER:mx8qxp:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxdrm:imxdpu:imxgpu:imxgpu2d:imxgpu3d:imxvulkan:mx8-generic-bsp:mx8-nxp-bsp:mx8x-generic-bsp:mx8x-nxp-bsp:mx8qxp-generic-bsp:mx8qxp-nxp-bsp"
|
||||
MACHINEOVERRIDES_EXTENDER:mx8dx:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxdrm:imxdpu:imxgpu:imxgpu2d:imxgpu3d:imxvulkan:mx8-generic-bsp:mx8-nxp-bsp:mx8x-generic-bsp:mx8x-nxp-bsp:mx8dx-generic-bsp:mx8dx-nxp-bsp"
|
||||
MACHINEOVERRIDES_EXTENDER:mx91:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxdrm:imxpxp:mx9-generic-bsp:mx9-nxp-bsp:mx91-generic-bsp:mx91-nxp-bsp"
|
||||
MACHINEOVERRIDES_EXTENDER:mx93:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxdrm:imxpxp:mx9-generic-bsp:mx9-nxp-bsp:mx93-generic-bsp:mx93-nxp-bsp"
|
||||
|
||||
#######
|
||||
|
|
@ -69,6 +71,7 @@ MACHINEOVERRIDES_EXTENDER:mx8mn:use-mainline-bsp = "imx-generic-bsp:imx-mainlin
|
|||
MACHINEOVERRIDES_EXTENDER:mx8mp:use-mainline-bsp = "imx-generic-bsp:imx-mainline-bsp:mx8-generic-bsp:mx8-mainline-bsp:mx8m-generic-bsp:mx8m-mainline-bsp:mx8mp-generic-bsp:mx8mp-mainline-bsp"
|
||||
MACHINEOVERRIDES_EXTENDER:mx8qxp:use-mainline-bsp = "imx-generic-bsp:imx-mainline-bsp:mx8-generic-bsp:mx8-mainline-bsp:mx8x-generic-bsp:mx8x-mainline-bsp:mx8qxp-generic-bsp:mx8qxp-mainline-bsp"
|
||||
MACHINEOVERRIDES_EXTENDER:mx8dx:use-mainline-bsp = "imx-generic-bsp:imx-mainline-bsp:mx8-generic-bsp:mx8-mainline-bsp:mx8x-generic-bsp:mx8x-mainline-bsp:mx8dx-generic-bsp:mx8dx-mainline-bsp"
|
||||
MACHINEOVERRIDES_EXTENDER:mx91:use-mainline-bsp = "imx-generic-bsp:imx-mainline-bsp:mx9-generic-bsp:mx9-mainline-bsp:mx91-generic-bsp:mx91-mainline-bsp"
|
||||
MACHINEOVERRIDES_EXTENDER:mx93:use-mainline-bsp = "imx-generic-bsp:imx-mainline-bsp:mx9-generic-bsp:mx9-mainline-bsp:mx93-generic-bsp:mx93-mainline-bsp"
|
||||
|
||||
MACHINEOVERRIDES_EXTENDER_FILTER_OUT = " \
|
||||
|
|
@ -98,6 +101,7 @@ MACHINEOVERRIDES_EXTENDER_FILTER_OUT = " \
|
|||
mx8qxp \
|
||||
mx8dx \
|
||||
mx8dxl \
|
||||
mx91 \
|
||||
mx93 \
|
||||
"
|
||||
|
||||
|
|
@ -113,6 +117,7 @@ MACHINE_SOCARCH_SUFFIX:mx8mn-nxp-bsp = "-mx8mn"
|
|||
MACHINE_SOCARCH_SUFFIX:mx8mp-nxp-bsp = "-mx8mp"
|
||||
MACHINE_SOCARCH_SUFFIX:mx8qxp-nxp-bsp = "-mx8"
|
||||
MACHINE_SOCARCH_SUFFIX:mx8dx-nxp-bsp = "-mx8"
|
||||
MACHINE_SOCARCH_SUFFIX:mx91-nxp-bsp = "-mx91"
|
||||
MACHINE_SOCARCH_SUFFIX:mx93-nxp-bsp = "-mx93"
|
||||
|
||||
# For Mainline we use a single SoC suffix as we don't have different build options
|
||||
|
|
@ -188,6 +193,7 @@ IMX_EXTRA_FIRMWARE ?= ""
|
|||
IMX_EXTRA_FIRMWARE:mx8-generic-bsp = "firmware-imx-8 imx-sc-firmware imx-seco"
|
||||
IMX_EXTRA_FIRMWARE:mx8m-generic-bsp = "firmware-imx-8m"
|
||||
IMX_EXTRA_FIRMWARE:mx8x-generic-bsp = "imx-sc-firmware imx-seco"
|
||||
IMX_EXTRA_FIRMWARE:mx91-generic-bsp = "imx-boot-firmware-files firmware-ele-imx"
|
||||
IMX_EXTRA_FIRMWARE:mx93-generic-bsp = "imx-boot-firmware-files firmware-ele-imx"
|
||||
|
||||
# Firmware
|
||||
|
|
@ -271,12 +277,15 @@ PREFERRED_VERSION_vulkan-loader:imxvulkan ??= "1.2.182.0"
|
|||
PREFERRED_VERSION_vulkan-tools:imxvulkan ??= "1.2.182.0"
|
||||
|
||||
# Use i.MX optee Version
|
||||
PREFERRED_VERSION_optee-os:mx8-nxp-bsp ??= "3.19.0.imx"
|
||||
PREFERRED_VERSION_optee-os:mx9-nxp-bsp ??= "4.0.0.imx"
|
||||
PREFERRED_VERSION_optee-client:mx8-nxp-bsp ??= "3.19.0.imx"
|
||||
PREFERRED_VERSION_optee-client:mx9-nxp-bsp ??= "4.0.0.imx"
|
||||
PREFERRED_VERSION_optee-test:mx8-nxp-bsp ??= "3.19.0.imx"
|
||||
PREFERRED_VERSION_optee-test:mx9-nxp-bsp ??= "4.0.0.imx"
|
||||
PREFERRED_VERSION_optee-os:mx8-nxp-bsp ??= "3.19.0.imx"
|
||||
PREFERRED_VERSION_optee-os:mx91-nxp-bsp ??= "4.2.0.imx"
|
||||
PREFERRED_VERSION_optee-os:mx93-nxp-bsp ??= "4.0.0.imx"
|
||||
PREFERRED_VERSION_optee-client:mx8-nxp-bsp ??= "3.19.0.imx"
|
||||
PREFERRED_VERSION_optee-client:mx91-nxp-bsp ??= "4.2.0.imx"
|
||||
PREFERRED_VERSION_optee-client:mx93-nxp-bsp ??= "4.0.0.imx"
|
||||
PREFERRED_VERSION_optee-test:mx8-nxp-bsp ??= "3.19.0.imx"
|
||||
PREFERRED_VERSION_optee-test:mx91-nxp-bsp ??= "4.2.0.imx"
|
||||
PREFERRED_VERSION_optee-test:mx93-nxp-bsp ??= "4.0.0.imx"
|
||||
|
||||
# Machine learning backports from NXP's lf-6.1.55-2.2.0 release
|
||||
PREFERRED_VERSION_ethos-u-driver-stack:ccimx93 = "23.08"
|
||||
|
|
|
|||
|
|
@ -26,4 +26,4 @@ addtask deploy after do_install before do_build
|
|||
|
||||
FILES:${PN} += "${nonarch_base_libdir}/firmware/imx/ele/${SECO_FIRMWARE_NAME}"
|
||||
|
||||
COMPATIBLE_MACHINE = "(mx8ulp-nxp-bsp|mx9-nxp-bsp)"
|
||||
COMPATIBLE_MACHINE = "(ccimx93)"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
# Copyright 2021-2023 NXP
|
||||
SUMMARY = "NXP i.MX ELE firmware"
|
||||
DESCRIPTION = "EdgeLock Secure Enclave firmware for i.MX series SoCs"
|
||||
SECTION = "base"
|
||||
LICENSE = "Proprietary"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=10c0fda810c63b052409b15a5445671a"
|
||||
|
||||
inherit fsl-eula-unpack use-imx-security-controller-firmware deploy
|
||||
|
||||
SRC_URI = "${FSL_MIRROR}/${BP}-${IMX_SRCREV_ABBREV}.bin;fsl-eula=true"
|
||||
IMX_SRCREV_ABBREV = "4ed450a"
|
||||
SRC_URI[md5sum] = "1359bc7d378bddfe1d8479eba05b05ec"
|
||||
SRC_URI[sha256sum] = "d858fcbb47482a898a1af5fe5f3f8be53bb21fac793b33e9bcdfd2b4dda79d3c"
|
||||
|
||||
S = "${WORKDIR}/${BP}-${IMX_SRCREV_ABBREV}"
|
||||
|
||||
do_compile[noexec] = "1"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${nonarch_base_libdir}/firmware/imx/ele
|
||||
install -m 0644 ${S}/${SECO_FIRMWARE_NAME} ${D}${nonarch_base_libdir}/firmware/imx/ele
|
||||
}
|
||||
|
||||
do_deploy () {
|
||||
# Deploy the related firmware to be package by imx-boot
|
||||
install -m 0644 ${S}/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}
|
||||
}
|
||||
addtask deploy after do_install before do_build
|
||||
|
||||
FILES:${PN} += "${nonarch_base_libdir}/firmware/imx/ele/${SECO_FIRMWARE_NAME}"
|
||||
|
||||
COMPATIBLE_MACHINE = "(ccimx91)"
|
||||
|
|
@ -1,17 +1,20 @@
|
|||
# Copyright (C) 2023 Digi International.
|
||||
# Copyright (C) 2023,2024, Digi International Inc.
|
||||
|
||||
LIC_FILES_CHKSUM:ccimx91 = "file://LICENSE.txt;md5=10c0fda810c63b052409b15a5445671a"
|
||||
LIC_FILES_CHKSUM:ccimx93 = "file://LICENSE.txt;md5=2827219e81f28aba7c6a569f7c437fa7"
|
||||
|
||||
SRCBRANCH:ccimx91 = "lf-6.6.23_2.0.0"
|
||||
SRCREV:ccimx91 = "7e038c6afba3118bcee91608764ac3c633bce0c4"
|
||||
SRCBRANCH:ccimx93 = "lf-6.1.55_2.2.0"
|
||||
SRCREV:ccimx93 = "7be5a936ce8677962dd7b41c6c9f41dd14350bec"
|
||||
|
||||
do_install:append:ccimx93() {
|
||||
do_install:append:ccimx9() {
|
||||
# Install NXP Connectivity IW612 firmware
|
||||
install -m 0644 nxp/FwImage_IW612_SD/sd_w61x_v1.bin.se ${D}${nonarch_base_libdir}/firmware/nxp
|
||||
install -m 0644 nxp/FwImage_IW612_SD/uartspi_n61x_v1.bin.se ${D}${nonarch_base_libdir}/firmware/nxp
|
||||
}
|
||||
|
||||
PACKAGES:prepend:ccimx93 = "${PN}-nxpiw612 "
|
||||
PACKAGES:prepend:ccimx9 = "${PN}-nxpiw612 "
|
||||
|
||||
FILES:${PN}-nxpiw612 = " \
|
||||
${nonarch_base_libdir}/firmware/nxp/sd_w61x_v1.bin.se \
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
From: Javier Viguera <javier.viguera@digi.com>
|
||||
Date: Mon, 19 Aug 2024 16:50:20 +0200
|
||||
Subject: [PATCH] ccimx91: use UART6 for the default console
|
||||
|
||||
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
|
||||
---
|
||||
plat/imx/imx91/include/platform_def.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/plat/imx/imx91/include/platform_def.h b/plat/imx/imx91/include/platform_def.h
|
||||
index 0ddd699f5e0b..6de23d8ef06f 100644
|
||||
--- a/plat/imx/imx91/include/platform_def.h
|
||||
+++ b/plat/imx/imx91/include/platform_def.h
|
||||
@@ -55,7 +55,7 @@
|
||||
#define MAX_MMAP_REGIONS 17
|
||||
#endif
|
||||
|
||||
-#define IMX_LPUART_BASE 0x44380000
|
||||
+#define IMX_LPUART_BASE 0x425a0000
|
||||
#define IMX_BOOT_UART_CLK_IN_HZ 24000000 /* Select 24MHz oscillator */
|
||||
#define IMX_CONSOLE_BAUDRATE 115200
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2022,2023 Digi International
|
||||
# Copyright (C) 2022-2024, Digi International Inc.
|
||||
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
|
||||
|
||||
|
|
@ -8,6 +8,9 @@ SRC_URI:append:ccimx8m = " \
|
|||
file://0003-imx8mn-Define-UART1-as-console-for-boot-stage.patch \
|
||||
file://0004-imx8mn-Disable-M7-debug-console.patch \
|
||||
"
|
||||
SRC_URI:append:ccimx91 = " \
|
||||
file://0001-ccimx91-use-UART6-for-the-default-console.patch \
|
||||
"
|
||||
SRC_URI:append:ccimx93 = " \
|
||||
file://0001-ccimx93-use-UART6-for-the-default-console.patch \
|
||||
file://0002-imx93-bring-back-ELE-clock-workaround-for-soc-revisi.patch \
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
# Copyright (C) 2024, Digi International Inc.
|
||||
|
||||
#
|
||||
# Reuse meta-freescale's imx-atf_2.6.bb
|
||||
#
|
||||
require recipes-bsp/imx-atf/imx-atf_2.6.bb
|
||||
|
||||
SRC_URI = "git://github.com/nxp-imx/imx-atf.git;protocol=https;branch=${SRCBRANCH}"
|
||||
SRCBRANCH = "lf_v2.10"
|
||||
# Tag: lf-6.6.23-2.0.0
|
||||
SRCREV = "49143a1701d9ccd3239e3f95f3042897ca889ea8"
|
||||
|
||||
COMPATIBLE_MACHINE = "(ccimx91)"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2023 Digi International Inc.
|
||||
# Copyright (C) 2023,2024, Digi International Inc.
|
||||
|
||||
#
|
||||
# Reuse meta-freescale's imx-atf_2.6.bb
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2023 Digi International
|
||||
# Copyright (C) 2023, Digi International Inc.
|
||||
|
||||
PLATFORM:mx9-nxp-bsp = "IMX8ULP"
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,49 @@
|
|||
From: Javier Viguera <javier.viguera@digi.com>
|
||||
Date: Mon, 19 Aug 2024 17:07:33 +0200
|
||||
Subject: [PATCH] imx91: soc.mak: capture commands output into a log file
|
||||
|
||||
This is later used to get the needed information for the signing of the
|
||||
boot artifacts.
|
||||
|
||||
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
|
||||
---
|
||||
iMX91/soc.mak | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/iMX91/soc.mak b/iMX91/soc.mak
|
||||
index b87a5bef79ce..3db3760c546d 100644
|
||||
--- a/iMX91/soc.mak
|
||||
+++ b/iMX91/soc.mak
|
||||
@@ -1,4 +1,5 @@
|
||||
MKIMG = ../mkimage_imx8
|
||||
+MKIMAGE_LOG = "mkimage-$(firstword $(MAKECMDGOALS)).log"
|
||||
|
||||
CC ?= gcc
|
||||
REV ?= A0
|
||||
@@ -51,7 +52,7 @@ define append_container
|
||||
@flashbin_size=`wc -c flash.bin | awk '{print $$1}'`; \
|
||||
psize=$$((0x400 * $(2))); \
|
||||
pad_cnt=$$(((flashbin_size + psize - 1) / psize)); \
|
||||
- echo "append $(1) at $$((pad_cnt * $(2))) KB, psize=$$psize"; \
|
||||
+ echo "append $(1) at $$((pad_cnt * $(2))) KB, psize=$$psize" | tee -a $(MKIMAGE_LOG); \
|
||||
dd if=$(1) of=flash.bin bs=1K seek=$$((pad_cnt * $(2)));
|
||||
endef
|
||||
|
||||
@@ -126,7 +127,7 @@ u-boot-atf-container.img: bl31.bin u-boot-hash.bin
|
||||
-ap bl31.bin a55 $(ATF_LOAD_ADDR) \
|
||||
-ap u-boot-hash.bin a55 $(UBOOT_LOAD_ADDR) \
|
||||
-out u-boot-atf-container.img; \
|
||||
- fi
|
||||
+ fi | tee $(MKIMAGE_LOG)
|
||||
|
||||
u-boot-atf-container-spinand.img: bl31.bin u-boot-hash.bin
|
||||
if [ -f $(TEE) ]; then \
|
||||
@@ -202,7 +203,7 @@ endif
|
||||
|
||||
|
||||
flash_singleboot: $(MKIMG) $(AHAB_IMG) $(SPL_A55_IMG) u-boot-atf-container.img
|
||||
- ./$(MKIMG) -soc IMX9 -append $(AHAB_IMG) -c -ap $(SPL_A55_IMG) a55 $(SPL_LOAD_ADDR) -out flash.bin
|
||||
+ ./$(MKIMG) -soc IMX9 -append $(AHAB_IMG) -c -ap $(SPL_A55_IMG) a55 $(SPL_LOAD_ADDR) -out flash.bin | tee -a $(MKIMAGE_LOG)
|
||||
$(call append_container,u-boot-atf-container.img,1)
|
||||
|
||||
flash_singleboot_no_ahabfw: $(MKIMG) $(SPL_A55_IMG) u-boot-atf-container.img
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2022-2024 Digi International Inc.
|
||||
# Copyright (C) 2022-2024, Digi International Inc.
|
||||
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||
|
||||
|
|
@ -8,15 +8,19 @@ SRC_URI:append:ccimx8m = " \
|
|||
file://0003-LFU-573-1-imx8m-Generate-hash-of-FIT-FDT-structure-t.patch \
|
||||
file://0004-LFU-573-2-imx8m-Reserve-new-IVT-CSF-for-FIT-FDT-sign.patch \
|
||||
"
|
||||
|
||||
SRC_URI:append:ccimx91 = " \
|
||||
file://0001-imx91-soc.mak-capture-commands-output-into-a-log-fil.patch \
|
||||
"
|
||||
SRC_URI:append:ccimx93 = " \
|
||||
file://0001-imx9-soc.mak-capture-commands-output-into-a-log-file.patch \
|
||||
file://0002-imx9-soc.mak-add-makefile-target-to-build-A0-revisio.patch \
|
||||
"
|
||||
|
||||
# Use NXP's lf-6.1.55-2.2.0 release for ccimx93
|
||||
SRC_URI:ccimx93 = "git://github.com/nxp-imx/imx-mkimage.git;protocol=https;branch=${SRCBRANCH}"
|
||||
SRC_URI:ccimx9 = "git://github.com/nxp-imx/imx-mkimage.git;protocol=https;branch=${SRCBRANCH}"
|
||||
SRCBRANCH:ccimx91 = "lf-6.6.23_2.0.0"
|
||||
SRCBRANCH:ccimx93 = "lf-6.1.55_2.2.0"
|
||||
SRCREV:ccimx91 = "ca5d6b2d3fd9ab15825b97f7ef6f1ce9a8644966"
|
||||
SRCREV:ccimx93 = "c4365450fb115d87f245df2864fee1604d97c06a"
|
||||
|
||||
DEPENDS += "${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'trustfence-sign-tools-native', '', d)}"
|
||||
|
|
@ -24,6 +28,11 @@ DEPENDS += "${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'trustfence-sign-too
|
|||
# Do not tag imx-boot
|
||||
UUU_BOOTLOADER = ""
|
||||
UUU_BOOTLOADER_TAGGED = ""
|
||||
BOOT_STAGING:mx91-generic-bsp = "${S}/iMX91"
|
||||
BOOT_STAGING:mx93-generic-bsp = "${S}/iMX9"
|
||||
|
||||
# Add SOC family
|
||||
SOC_FAMILY:mx91-generic-bsp = "mx91"
|
||||
|
||||
REV_OPTION:ccimx93 = "REV=A1"
|
||||
|
||||
|
|
@ -46,6 +55,11 @@ compile_mx93:append:ccimx93() {
|
|||
fi
|
||||
}
|
||||
|
||||
compile_mx91() {
|
||||
bbnote i.MX 91 boot binary build
|
||||
compile_mx93
|
||||
}
|
||||
|
||||
do_compile:append:ccimx8m() {
|
||||
bbnote "building ${IMX_BOOT_SOC_TARGET} - print_fit_hab"
|
||||
make SOC=${IMX_BOOT_SOC_TARGET} dtbs=${UBOOT_DTB_NAME} print_fit_hab
|
||||
|
|
@ -83,6 +97,10 @@ do_install:ccimx8x () {
|
|||
done
|
||||
}
|
||||
|
||||
deploy_mx91() {
|
||||
deploy_mx93
|
||||
}
|
||||
|
||||
generate_symlinks() {
|
||||
# imx-boot recipe in meta-freescale supports *multiple* build configurations.
|
||||
# We assume here only ONE build configuration for our platforms (otherwise
|
||||
|
|
@ -102,6 +120,13 @@ do_deploy:append:ccimx8m() {
|
|||
install -m 0644 ${BOOT_STAGING}/mkimage-print_fit_hab.log ${DEPLOYDIR}/${BOOT_TOOLS}
|
||||
}
|
||||
|
||||
do_deploy:append:ccimx91() {
|
||||
generate_symlinks
|
||||
for target in ${IMXBOOT_TARGETS}; do
|
||||
install -m 0644 ${BOOT_STAGING}/mkimage-${target}.log ${DEPLOYDIR}/${BOOT_TOOLS}
|
||||
done
|
||||
}
|
||||
|
||||
do_deploy:append:ccimx93() {
|
||||
generate_symlinks
|
||||
for target in ${IMXBOOT_TARGETS}; do
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2022-2024 Digi International Inc.
|
||||
# Copyright (C) 2022-2024, Digi International Inc.
|
||||
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||
|
||||
|
|
@ -6,10 +6,10 @@ SRC_URI:append:ccimx8m = " \
|
|||
file://0001-imx8m-soc.mak-preserve-dtbs-after-build.patch \
|
||||
"
|
||||
|
||||
# Use NXP's lf-6.1.55-2.2.0 release for ccimx93
|
||||
SRC_URI:ccimx93 = "git://github.com/nxp-imx/imx-mkimage.git;protocol=https;branch=${SRCBRANCH}"
|
||||
SRCBRANCH:ccimx93 = "lf-6.1.55_2.2.0"
|
||||
SRCREV:ccimx93 = "c4365450fb115d87f245df2864fee1604d97c06a"
|
||||
# Use NXP's lf-6.1.55-2.2.0 release for ccimx9
|
||||
SRC_URI:ccimx9 = "git://github.com/nxp-imx/imx-mkimage.git;protocol=https;branch=${SRCBRANCH}"
|
||||
SRCBRANCH:ccimx9 = "lf-6.1.55_2.2.0"
|
||||
SRCREV:ccimx9 = "c4365450fb115d87f245df2864fee1604d97c06a"
|
||||
|
||||
# "fmacro-prefix-map" is not supported on old versions of GCC
|
||||
DEBUG_PREFIX_MAP:remove:class-nativesdk = "-fmacro-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2021-2022 NXP
|
||||
# Copyright 2021-2024 NXP
|
||||
|
||||
SUMMARY = "NXP i.MX SECURE ENCLAVE library"
|
||||
DESCRIPTION = "NXP IMX SECURE ENCLAVE library"
|
||||
|
|
@ -25,4 +25,4 @@ do_install () {
|
|||
oe_runmake DESTDIR=${D} install_tests
|
||||
}
|
||||
|
||||
COMPATIBLE_MACHINE = "(mx8ulp-nxp-bsp|mx93-nxp-bsp)"
|
||||
COMPATIBLE_MACHINE = "(mx8ulp-nxp-bsp|mx91-nxp-bsp|mx93-nxp-bsp)"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2023, Digi International Inc.
|
||||
# Copyright (C) 2023, Digi International Inc.
|
||||
|
||||
DEPENDS:append:mx9-nxp-bsp = " imx-lib"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
# Copyright (C) 2013-2021 Digi International.
|
||||
# Copyright (C) 2013-2021, Digi International Inc.
|
||||
# Update 10-imx.rules
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2019 Digi International.
|
||||
# Copyright (C) 2019, Digi International Inc.
|
||||
|
||||
# The most recent version of this tool is unable to boot closed devices.
|
||||
# Revert to the version that was used in DEY 2.4.
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ SRCREV = "0f889a1f9640f6210132dd565141eb19005245fb"
|
|||
S = "${WORKDIR}/git"
|
||||
|
||||
DEFAULT_PREFERENCE = "-1"
|
||||
COMPATIBLE_MACHINE = "(ccimx93)"
|
||||
COMPATIBLE_MACHINE = "(ccimx9)"
|
||||
|
||||
inherit meson pkgconfig manpages
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2023, 2024 Digi International Inc.
|
||||
# Copyright (C) 2023,2024, Digi International Inc.
|
||||
|
||||
SRCREV:mx93-nxp-bsp = "4391dcda499870418bb38fe395c3cba0664c5bab"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2023, 2024 Digi International Inc.
|
||||
# Copyright (C) 2023,2024, Digi International Inc.
|
||||
|
||||
LIC_FILES_CHKSUM:ccimx93 = "file://LICENSE.txt;md5=2827219e81f28aba7c6a569f7c437fa7"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2023, 2024 Digi International Inc.
|
||||
# Copyright (C) 2023,2024, Digi International Inc.
|
||||
|
||||
#
|
||||
# Reuse meta-freescale's linux-imx-headers_5.15.bb
|
||||
|
|
@ -11,4 +11,4 @@ SRCREV = "770c5fe2c1d1529fae21b7043911cd50c6cf087e"
|
|||
|
||||
IMX_UAPI_HEADERS:remove = "isl29023.h"
|
||||
|
||||
COMPATIBLE_MACHINE = "(ccimx93)"
|
||||
COMPATIBLE_MACHINE = "(ccimx9)"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2023 Digi International Inc.
|
||||
# Copyright (C) 2023,2024, Digi International Inc.
|
||||
|
||||
#
|
||||
# Reuse meta-freescale's optee-client_3.19.0.imx.bb
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
# Copyright (C) 2024, Digi International Inc.
|
||||
|
||||
#
|
||||
# Reuse meta-freescale's optee-client_3.19.0.imx.bb
|
||||
#
|
||||
require recipes-security/optee-imx/optee-client_3.19.0.imx.bb
|
||||
|
||||
SRC_URI += "${@oe.utils.vartrue('TRUSTFENCE_FILE_BASED_ENCRYPT', 'file://tee-supplicant', '', d)}"
|
||||
SRCBRANCH = "lf-6.6.23_2.0.0"
|
||||
SRCREV = "3eac340a781c00ccd61b151b0e9c22a8c6e9f9f0"
|
||||
|
||||
EXTRA_OEMAKE += "PKG_CONFIG=pkg-config CFG_TEE_FS_PARENT_PATH='${localstatedir}/lib/tee'"
|
||||
|
||||
do_install() {
|
||||
oe_runmake DESTDIR=${D} install
|
||||
install -D -p -m0644 ${WORKDIR}/tee-supplicant.service ${D}${systemd_system_unitdir}/tee-supplicant.service
|
||||
sed -i -e s:@sysconfdir@:${sysconfdir}:g \
|
||||
-e s:@sbindir@:${sbindir}:g \
|
||||
${D}${systemd_system_unitdir}/tee-supplicant.service
|
||||
|
||||
if ${@oe.utils.vartrue('TRUSTFENCE_FILE_BASED_ENCRYPT', 'true', 'false',d)}; then
|
||||
install -d ${D}${sysconfdir}/default/
|
||||
install -m 0644 ${WORKDIR}/tee-supplicant ${D}${sysconfdir}/default/tee-supplicant
|
||||
fi
|
||||
}
|
||||
|
||||
COMPATIBLE_MACHINE = "(ccimx91)"
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
From: Javier Viguera <javier.viguera@digi.com>
|
||||
Date: Mon, 19 Aug 2024 17:42:24 +0200
|
||||
Subject: [PATCH] core: imx: support ccimx91-dvk
|
||||
|
||||
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
|
||||
---
|
||||
core/arch/arm/plat-imx/conf.mk | 6 ++++++
|
||||
core/arch/arm/plat-imx/registers/imx93.h | 1 +
|
||||
2 files changed, 7 insertions(+)
|
||||
|
||||
diff --git a/core/arch/arm/plat-imx/conf.mk b/core/arch/arm/plat-imx/conf.mk
|
||||
index 9ab3e1e95133..5128e9ee5e8e 100644
|
||||
--- a/core/arch/arm/plat-imx/conf.mk
|
||||
+++ b/core/arch/arm/plat-imx/conf.mk
|
||||
@@ -95,6 +95,7 @@ mx95-flavorlist = \
|
||||
mx95evk \
|
||||
|
||||
mx91-flavorlist = \
|
||||
+ ccimx91dvk \
|
||||
mx91evk \
|
||||
|
||||
ifneq (,$(filter $(PLATFORM_FLAVOR),$(mx6ul-flavorlist)))
|
||||
@@ -491,6 +492,11 @@ CFG_DDR_SIZE ?= 0x80000000
|
||||
CFG_UART_BASE ?= UART1_BASE
|
||||
endif
|
||||
|
||||
+ifneq (,$(filter $(PLATFORM_FLAVOR),ccimx91dvk))
|
||||
+CFG_DDR_SIZE ?= 0x20000000
|
||||
+CFG_UART_BASE ?= UART6_BASE
|
||||
+endif
|
||||
+
|
||||
ifneq (,$(filter $(PLATFORM_FLAVOR),mx95evk))
|
||||
CFG_DDR_SIZE ?= 0x80000000
|
||||
CFG_UART_BASE ?= UART1_BASE
|
||||
diff --git a/core/arch/arm/plat-imx/registers/imx93.h b/core/arch/arm/plat-imx/registers/imx93.h
|
||||
index 21080da82d04..17f4d8f5755e 100644
|
||||
--- a/core/arch/arm/plat-imx/registers/imx93.h
|
||||
+++ b/core/arch/arm/plat-imx/registers/imx93.h
|
||||
@@ -9,6 +9,7 @@
|
||||
#define GICR_BASE 0x48040000
|
||||
|
||||
#define UART1_BASE 0x44380000
|
||||
+#define UART6_BASE 0x425a0000
|
||||
/*
|
||||
* For Normal MU - Use MU_BASE as 0x47520000
|
||||
* For Trust MU - Use MU_BASE as 0x47530000
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2023 Digi International Inc.
|
||||
# Copyright (C) 2023,2024, Digi International Inc.
|
||||
|
||||
#
|
||||
# Reuse meta-freescale's optee-os_3.19.0.imx.bb
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
# Copyright (C) 2024, Digi International Inc.
|
||||
|
||||
#
|
||||
# Reuse meta-freescale's optee-os_3.19.0.imx.bb
|
||||
#
|
||||
require recipes-security/optee-imx/optee-os_3.19.0.imx.bb
|
||||
|
||||
SRC_URI = " \
|
||||
git://github.com/nxp-imx/imx-optee-os.git;protocol=https;branch=${SRCBRANCH} \
|
||||
file://0007-allow-setting-sysroot-for-clang.patch \
|
||||
file://0001-core-imx-support-ccimx91-dvk.patch \
|
||||
file://environment.d-optee-sdk.sh \
|
||||
"
|
||||
SRCBRANCH = "lf-6.6.23_2.0.0"
|
||||
# Tag: lf-6.6.23-2.0.0
|
||||
SRCREV = "c6be5b572452a2808d1a34588fd10e71715e23cf"
|
||||
|
||||
PLATFORM_FLAVOR:ccimx91 = "ccimx91dvk"
|
||||
|
||||
do_install:append:ccimx91 () {
|
||||
mkdir -p ${D}/environment-setup.d
|
||||
sed -e "s,#OPTEE_ARCH#,${OPTEE_ARCH},g" ${WORKDIR}/environment.d-optee-sdk.sh > ${D}/environment-setup.d/optee-sdk.sh
|
||||
}
|
||||
|
||||
FILES:${PN}-staticdev += "/environment-setup.d/"
|
||||
|
||||
COMPATIBLE_MACHINE = "(ccimx91)"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2023 Digi International Inc.
|
||||
# Copyright (C) 2023,2024, Digi International Inc.
|
||||
|
||||
#
|
||||
# Reuse meta-freescale's optee-test_3.19.0.imx.bb
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
# Copyright (C) 2024, Digi International Inc.
|
||||
|
||||
#
|
||||
# Reuse meta-freescale's optee-test_3.19.0.imx.bb
|
||||
#
|
||||
require recipes-security/optee-imx/optee-test_3.19.0.imx.bb
|
||||
|
||||
DEPENDS += "openssl"
|
||||
|
||||
SRCBRANCH = "lf-6.6.23_2.0.0"
|
||||
SRCREV = "07682f1b1b41ec0bfa507286979b36ab8d344a96"
|
||||
|
||||
COMPATIBLE_MACHINE = "(ccimx91)"
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
COMPATIBLE_MACHINE = "(stm32mpcommon)"
|
||||
|
||||
inherit module
|
||||
|
||||
# todo manage android build (sync)
|
||||
EXTRA_OEMAKE = "KERNEL_DIR=${STAGING_KERNEL_BUILDDIR}"
|
||||
EXTRA_OEMAKE:append:stm32mp1common = " SOC_PLATFORM=st-mp1"
|
||||
EXTRA_OEMAKE:append:stm32mp2common = " SOC_PLATFORM=st-mp2"
|
||||
# Use DEBUG=1 for more traces and easier debug
|
||||
EXTRA_OEMAKE:append = " DEBUG=0"
|
||||
EXTRA_OEMAKE:append = " -C ${STAGING_KERNEL_BUILDDIR} M=${S}"
|
||||
EXTRA_OEMAKE:append = " AQROOT=${S}"
|
||||
|
||||
do_create_runtime_spdx[depends] += "virtual/kernel:do_create_runtime_spdx"
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
SUMMARY = "GCNano kernel drivers"
|
||||
LICENSE = "GPL-1.0-only & MIT"
|
||||
# Note get md5sum with: $ head -n 53 Makefile | md5sum
|
||||
LIC_FILES_CHKSUM = "file://Makefile;endline=53;md5=85a35fecd70aaa9c4047554f71e1407d"
|
||||
|
||||
SRC_URI = "git://github.com/STMicroelectronics/gcnano-binaries;protocol=https;branch=gcnano-${GCNANO_VERSION}-binaries"
|
||||
SRCREV = "bbaae49a0e4859ed53f898a250269c8a237261bc"
|
||||
|
||||
GCNANO_VERSION = "6.4.15"
|
||||
GCNANO_SUBVERSION:stm32mp1common = "stm32mp1"
|
||||
GCNANO_SUBVERSION:stm32mp2common = "stm32mp2"
|
||||
GCNANO_RELEASE = "r1"
|
||||
|
||||
PV = "${GCNANO_VERSION}-${GCNANO_SUBVERSION}-${GCNANO_RELEASE}"
|
||||
|
||||
S = "${WORKDIR}/git/${BPN}"
|
||||
|
||||
include gcnano-driver-stm32mp.inc
|
||||
|
||||
# ---------------------------------
|
||||
# Configure archiver use
|
||||
# ---------------------------------
|
||||
include ${@oe.utils.ifelse(d.getVar('ST_ARCHIVER_ENABLE') == '1', 'gcnano-driver-stm32mp-archiver.inc','')}
|
||||
|
||||
COMPATIBLE_MACHINE = "(ccmp2)"
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
FILESEXTRAPATHS:prepend := "${THISDIR}/tf-a-stm32mp:"
|
||||
|
||||
SECTION = "bootloaders"
|
||||
|
||||
LICENSE = "BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031"
|
||||
CVE_PRODUCT = "arm:trusted_firmware-a"
|
||||
|
||||
SRC_URI = "git://git.trustedfirmware.org/TF-A/trusted-firmware-a.git;protocol=http;branch=lts-v2.8"
|
||||
SRCREV = "f94d6db9b101d3d4cd053e54edd5b876f1cc84ec"
|
||||
|
||||
SRC_URI += " \
|
||||
file://tf-a-st-ddr.tar.gz;subdir=git;name=fw \
|
||||
file://0001-v2.8-stm32mp25-beta.patch \
|
||||
"
|
||||
|
||||
SRC_URI[fw.sha256sum] = "c87d8a03a8feab1f8a51818a7942deade5d31abb7f4afaa6d6dfa922383e9805"
|
||||
|
||||
TF_A_VERSION = "v2.8.12"
|
||||
TF_A_SUBVERSION = "stm32mp"
|
||||
TF_A_RELEASE = "beta-r1"
|
||||
PV = "${TF_A_VERSION}-${TF_A_SUBVERSION}-${TF_A_RELEASE}"
|
||||
|
||||
ARCHIVER_ST_BRANCH = "${TF_A_VERSION}-${TF_A_SUBVERSION}"
|
||||
ARCHIVER_ST_REVISION = "${PV}"
|
||||
ARCHIVER_COMMUNITY_BRANCH = "master"
|
||||
ARCHIVER_COMMUNITY_REVISION = "${TF_A_VERSION}"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
# ---------------------------------
|
||||
# Configure default preference to manage dynamic selection between tarball and github
|
||||
# ---------------------------------
|
||||
STM32MP_SOURCE_SELECTION ?= "tarball"
|
||||
|
||||
DEFAULT_PREFERENCE = "${@bb.utils.contains('STM32MP_SOURCE_SELECTION', 'github', '-1', '1', d)}"
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
# Define config for each TF_A_CONFIG
|
||||
# TF_A_CONFIG[config] ?= "<list of devicetree>,<extra opt flags>,<binary basename (default: 'tf-a')>,<make target (default: 'all')>,<type of binary to deploy: [bl2 bl31 bl32 fwconfig] (default 'bl2')>"
|
||||
|
||||
TF_A_OPTEE_param:stm32mp1common = "AARCH32_SP=optee"
|
||||
TF_A_OPTEE_param:stm32mp2common = "SPD=opteed"
|
||||
|
||||
TF_A_CONFIG[optee] ?= "${STM32MP_DEVICETREE},${TF_A_OPTEE_param},,${@bb.utils.contains('FIP_BL31_ENABLE', '1', 'bl31 dtbs', 'dtbs', d)},${@bb.utils.contains('FIP_BL31_ENABLE', '1', 'bl31 fwconfig', 'fwconfig', d)}"
|
||||
|
||||
TF_A_CONFIG[emmc] ?= "${DEVICE_BOARD_ENABLE:EMMC},STM32MP_EMMC=1 ${@bb.utils.contains('MACHINE_FEATURES', 'fw-update', 'PSA_FWU_SUPPORT=1', '', d)}"
|
||||
TF_A_CONFIG[nand] ?= "${DEVICE_BOARD_ENABLE:NAND},STM32MP_RAW_NAND=1 ${@bb.utils.contains('MACHINE_FEATURES', 'fw-update', 'PSA_FWU_SUPPORT=1', '', d)} ${@'STM32MP_FORCE_MTD_START_OFFSET=${TF_A_MTD_START_OFFSET_NAND}' if ${TF_A_MTD_START_OFFSET_NAND} else ''}"
|
||||
TF_A_CONFIG[nor] ?= "${DEVICE_BOARD_ENABLE:NOR},STM32MP_SPI_NOR=1 ${@bb.utils.contains('MACHINE_FEATURES', 'fw-update', 'PSA_FWU_SUPPORT=1', '', d)} ${@'STM32MP_FORCE_MTD_START_OFFSET=${TF_A_MTD_START_OFFSET_NOR}' if ${TF_A_MTD_START_OFFSET_NOR} else ''}"
|
||||
TF_A_CONFIG[sdcard] ?= "${DEVICE_BOARD_ENABLE:SDCARD},STM32MP_SDMMC=1 ${@bb.utils.contains('MACHINE_FEATURES', 'fw-update', 'PSA_FWU_SUPPORT=1', '', d)}"
|
||||
TF_A_CONFIG[spinand] ?= "${DEVICE_BOARD_ENABLE:SPINAND},STM32MP_SPI_NAND=1 ${@bb.utils.contains('MACHINE_FEATURES', 'fw-update', 'PSA_FWU_SUPPORT=1', '', d)} ${@'STM32MP_FORCE_MTD_START_OFFSET=${TF_A_MTD_START_OFFSET_SPINAND}' if ${TF_A_MTD_START_OFFSET_SPINAND} else ''}"
|
||||
TF_A_CONFIG[uart] ?= "${STM32MP_DEVICETREE},STM32MP_UART_PROGRAMMER=1"
|
||||
TF_A_CONFIG[usb] ?= "${STM32MP_DEVICETREE},STM32MP_USB_PROGRAMMER=1"
|
||||
|
||||
# Define configuration for SSP
|
||||
TF_A_CONFIG[uart-ssp] ?= "${STM32MP_DEVICETREE},STM32MP_UART_PROGRAMMER=1 STM32MP_SSP=1,tf-a-ssp"
|
||||
TF_A_CONFIG[usb-ssp] ?= "${STM32MP_DEVICETREE},STM32MP_USB_PROGRAMMER=1 STM32MP_SSP=1,tf-a-ssp"
|
||||
|
|
@ -0,0 +1,603 @@
|
|||
FILESEXTRAPATHS:prepend := "${THISDIR}/tf-a-stm32mp:"
|
||||
|
||||
PROVIDES += "virtual/trusted-firmware-a"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
inherit deploy
|
||||
#inherit sign-stm32mp
|
||||
inherit fip-utils-stm32mp2
|
||||
#inherit external-dt
|
||||
|
||||
|
||||
STAGING_EXTDT_DIR = "${TMPDIR}/work-shared/${MACHINE}/external-dt"
|
||||
|
||||
# Include TF-A config definitions
|
||||
require tf-a-stm32mp2-config.inc
|
||||
|
||||
# ------------------------------------
|
||||
# Set MBEDTLS support
|
||||
TFA_MBEDTLS_DIR ?= "mbedtls"
|
||||
# MBEDTLS v2.28.5
|
||||
SRC_URI_MBEDTLS = "git://github.com/ARMmbed/mbedtls.git;protocol=https;destsuffix=git/${TFA_MBEDTLS_DIR};branch=mbedtls-2.28;name=mbedtls"
|
||||
SRCREV_mbedtls = "47e8cc9db2e469d902b0e3093ae9e482c3d87188"
|
||||
LIC_FILES_CHKSUM_MBEDTLS = "file://mbedtls/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
|
||||
LICENSE_MBEDTLS = "Apache-2.0"
|
||||
# Add MBEDTLS to our sources
|
||||
SRC_URI:append = " ${@bb.utils.contains('SIGN_ENABLE', '1', '${SRC_URI_MBEDTLS}', '', d)}"
|
||||
# Update license variables
|
||||
LICENSE:append = "${@bb.utils.contains('SIGN_ENABLE', '1', ' & ${LICENSE_MBEDTLS}', '', d)}"
|
||||
LIC_FILES_CHKSUM:append = "${@bb.utils.contains('SIGN_ENABLE', '1', ' ${LIC_FILES_CHKSUM_MBEDTLS}', '', d)}"
|
||||
# Add mbed TLS to version
|
||||
SRCREV_FORMAT:append = "${@bb.utils.contains('SIGN_ENABLE', '1', '_mbedtls', '', d)}"
|
||||
# ------------------------------------
|
||||
|
||||
B = "${WORKDIR}/build"
|
||||
# Configure build dir for externalsrc class usage through devtool
|
||||
EXTERNALSRC_BUILD:pn-${PN} = "${WORKDIR}/build"
|
||||
|
||||
DEPENDS += "dtc-native openssl-native"
|
||||
DEPENDS:append = " ${@bb.utils.contains('TF_A_ENABLE_DEBUG_WRAPPER', '1', 'stm32wrapper4dbg-native', '', d)}"
|
||||
|
||||
# Default log level
|
||||
ST_TF_A_DEBUG ??= "1"
|
||||
ST_TF_A_DEBUG_TRACE ??= "0"
|
||||
ST_TF_A_LOG_LEVEL_RELEASE ??= "20"
|
||||
ST_TF_A_LOG_LEVEL_DEBUG ??= "40"
|
||||
|
||||
# Configure make settings
|
||||
EXTRA_OEMAKE += 'PLAT=${TFA_PLATFORM}'
|
||||
EXTRA_OEMAKE += 'ARCH=${TFA_ARM_ARCH}'
|
||||
EXTRA_OEMAKE += 'ARM_ARCH_MAJOR=${TFA_ARM_MAJOR}'
|
||||
EXTRA_OEMAKE += 'CROSS_COMPILE=${TARGET_PREFIX}'
|
||||
# Debug support
|
||||
EXTRA_OEMAKE += "${@bb.utils.contains('ST_TF_A_DEBUG_TRACE', '1', 'DEBUG=${ST_TF_A_DEBUG}', '', d)}"
|
||||
EXTRA_OEMAKE += "${@bb.utils.contains('ST_TF_A_DEBUG_TRACE', '1', 'LOG_LEVEL=${ST_TF_A_LOG_LEVEL_DEBUG}', 'LOG_LEVEL=${ST_TF_A_LOG_LEVEL_RELEASE}', d)}"
|
||||
EXTRA_OEMAKE += "${@bb.utils.contains('EXTERNAL_DT_ENABLED', '1', 'TFA_EXTERNAL_DT=${STAGING_EXTDT_DIR}/tf-a', '', d)}"
|
||||
# OPTEE in sysram
|
||||
EXTRA_OEMAKE:append:stm32mp1common = " ${@bb.utils.contains('ST_OPTEE_IN_SYSRAM', '1', 'STM32MP1_OPTEE_IN_SYSRAM=1', '', d)}"
|
||||
|
||||
# Define default TF-A namings
|
||||
TF_A_BASENAME ?= "tf-a"
|
||||
TF_A_SUFFIX ?= "stm32"
|
||||
|
||||
# Output the ELF generated
|
||||
ELF_DEBUG_ENABLE ?= ""
|
||||
TF_A_ELF_SUFFIX = "elf"
|
||||
|
||||
BL1_NAME ?= "bl1/bl1"
|
||||
BL1_ELF = "${BL1_NAME}.${TF_A_ELF_SUFFIX}"
|
||||
BL1_BASENAME = "${@os.path.basename(d.getVar("BL1_NAME"))}"
|
||||
BL1_BASENAME_DEPLOY ?= "${@os.path.basename(d.getVar("BL1_NAME"))}"
|
||||
|
||||
BL2_NAME ?= "bl2/bl2"
|
||||
BL2_ELF = "${BL2_NAME}.${TF_A_ELF_SUFFIX}"
|
||||
BL2_BASENAME = "${@os.path.basename(d.getVar("BL2_NAME"))}"
|
||||
BL2_BASENAME_DEPLOY ?= "${@os.path.basename(d.getVar("BL2_NAME"))}"
|
||||
|
||||
BL31_NAME ?= "bl31/bl31"
|
||||
BL31_ELF = "${BL31_NAME}.${TF_A_ELF_SUFFIX}"
|
||||
BL31_BASENAME = "${@os.path.basename(d.getVar("BL31_NAME"))}"
|
||||
BL31_BASENAME_DEPLOY ?= "${@os.path.basename(d.getVar("BL31_NAME"))}"
|
||||
BL31_SUFFIX ?= "bin"
|
||||
|
||||
BL32_NAME ?= "bl32/bl32"
|
||||
BL32_ELF = "${BL32_NAME}.${TF_A_ELF_SUFFIX}"
|
||||
BL32_BASENAME = "${@os.path.basename(d.getVar("BL32_NAME"))}"
|
||||
BL32_BASENAME_DEPLOY ?= "${@os.path.basename(d.getVar("BL32_NAME"))}"
|
||||
BL32_SUFFIX ?= "bin"
|
||||
|
||||
DT_SUFFIX ?= "dtb"
|
||||
FWCONFIG_NAME ?= "fw-config"
|
||||
|
||||
# Output the firwmare ddr
|
||||
TF_A_FWDDR ?= "0"
|
||||
TF_A_FWDDR:stm32mp25common = "1"
|
||||
|
||||
FWDDR_NAME ?= "ddr_pmu"
|
||||
FWDDR_SUFFIX ?= "bin"
|
||||
|
||||
# Set default TF-A config
|
||||
TF_A_CONFIG ?= ""
|
||||
|
||||
# Enable the wrapper for debug
|
||||
TF_A_ENABLE_DEBUG_WRAPPER ??= "1"
|
||||
|
||||
# Set default configuration to allow signing
|
||||
TF_A_SIGN_SUFFIX ??= "${@bb.utils.contains('SIGN_ENABLE', '1', '${SIGN_SUFFIX}', '', d)}"
|
||||
TF_A_SIGN_OF ?= "0x00000001"
|
||||
TF_A_SIGN_OF:stm32mp1common ?= "0x00000001"
|
||||
TF_A_SIGN_OF:stm32mp25common ?= "0x00000001"
|
||||
TF_A_SIGN_OF:stm32mp25revabcommon ?= "0x00000001"
|
||||
|
||||
TF_A_ENCRYPT_SUFFIX ??= "${@bb.utils.contains('ENCRYPT_ENABLE', '1', '${ENCRYPT_SUFFIX}', '', d)}"
|
||||
TF_A_ENCRYPT_DC ?= "0x0E5F2025"
|
||||
TF_A_ENCRYPT_DC:stm32mp1common ?= "0x0E5F2025"
|
||||
TF_A_ENCRYPT_DC:stm32mp25common ?= "0x25205f0e"
|
||||
TF_A_ENCRYPT_DC:stm32mp25revabcommon ?= "0x25205f0e"
|
||||
|
||||
TF_A_ENCRYPT_IMGVER ?= "0"
|
||||
TF_A_ENCRYPT_OF ?= "0x80000003"
|
||||
TF_A_ENCRYPT_OF:stm32mp1common ?= "0x80000003"
|
||||
TF_A_ENCRYPT_OF:stm32mp2common ?= "0x10000003"
|
||||
|
||||
|
||||
# Set metadata generation
|
||||
TF_A_ENABLE_METADATA ??= "${@bb.utils.contains('MACHINE_FEATURES', 'fw-update', '1', '0', d)}"
|
||||
TF_A_METADATA_NAME ?= "metadata"
|
||||
TF_A_METADATA_SUFFIX ?= "bin"
|
||||
TF_A_METADATA_BINARY ??= "${TF_A_METADATA_NAME}.${TF_A_METADATA_SUFFIX}"
|
||||
|
||||
TF_A_METADATA_TOOL ?= "tools/fwu_gen_metadata/fwumd_tool.py"
|
||||
TF_A_METADATA_JSON ?= "plat/st/common/default_metadata.json"
|
||||
|
||||
# Configure specific build flags
|
||||
EXTRA_OEMAKE += "${@bb.utils.contains('SIGN_ENABLE', '1', 'TRUSTED_BOARD_BOOT=1', '', d)}"
|
||||
EXTRA_OEMAKE += "${@bb.utils.contains('SIGN_ENABLE', '1', 'MBEDTLS_DIR=${TFA_MBEDTLS_DIR}', '', d)}"
|
||||
EXTRA_OEMAKE:append:stm32mp2common = " ${@bb.utils.contains('SIGN_ENABLE', '1', 'BRANCH_PROTECTION=0', '', d)} "
|
||||
|
||||
EXTRA_OEMAKE += "${@bb.utils.contains('ENCRYPT_ENABLE', '1', 'DECRYPTION_SUPPORT=aes_gcm ENCRYPT_BL32=1', '', d)}"
|
||||
EXTRA_OEMAKE += "${@bb.utils.contains('ENCRYPT_ENABLE', '1', bb.utils.contains('FIP_BL31_ENABLE', '1', 'ENCRYPT_BL31=1', '', d), '', d)} "
|
||||
|
||||
# Addons parameters for SIGN_TOOL
|
||||
SIGN_TOOL_EXTRA ?= ""
|
||||
SIGN_TOOL_EXTRA:stm32mp25common = "--header-version 2"
|
||||
SIGN_TOOL_EXTRA:stm32mp25revabcommon = "--header-version 2"
|
||||
|
||||
# Specific for revA board
|
||||
EXTRA_OEMAKE:append:stm32mp25revabcommon = " CONFIG_STM32MP25X_REVA=1 "
|
||||
|
||||
# -----------------------------------------------
|
||||
# Handle TF-A config and set internal vars
|
||||
# TF_A_DEVICETREE
|
||||
# TF_A_EXTRA_OPTFLAGS
|
||||
python () {
|
||||
import re
|
||||
|
||||
tfaconfigflags = d.getVarFlags('TF_A_CONFIG')
|
||||
# The "doc" varflag is special, we don't want to see it here
|
||||
tfaconfigflags.pop('doc', None)
|
||||
tfaconfig = (d.getVar('TF_A_CONFIG') or "").split()
|
||||
tfabasename = d.getVar('TF_A_BASENAME')
|
||||
|
||||
if not tfaconfig:
|
||||
raise bb.parse.SkipRecipe("TF_A_CONFIG must be set in the %s machine configuration." % d.getVar("MACHINE"))
|
||||
if (d.getVar('TF_A_DEVICETREE') or "").split():
|
||||
raise bb.parse.SkipRecipe("You cannot use TF_A_DEVICETREE as it is internal to TF_A_CONFIG var expansion.")
|
||||
if (d.getVar('TF_A_EXTRA_OPTFLAGS') or "").split():
|
||||
raise bb.parse.SkipRecipe("You cannot use TF_A_EXTRA_OPTFLAGS as it is internal to TF_A_CONFIG var expansion.")
|
||||
if (d.getVar('TF_A_BINARIES') or "").split():
|
||||
raise bb.parse.SkipRecipe("You cannot use TF_A_BINARIES as it is internal to TF_A_CONFIG var expansion.")
|
||||
if (d.getVar('TF_A_MAKE_TARGET') or "").split():
|
||||
raise bb.parse.SkipRecipe("You cannot use TF_A_MAKE_TARGET as it is internal to TF_A_CONFIG var expansion.")
|
||||
if (d.getVar('TF_A_FILES') or "").split():
|
||||
raise bb.parse.SkipRecipe("You cannot use TF_A_FILES as it is internal to TF_A_CONFIG var expansion.")
|
||||
|
||||
if len(tfaconfig) > 0:
|
||||
for config in tfaconfig:
|
||||
for f, v in tfaconfigflags.items():
|
||||
if config == f:
|
||||
# Make sure to get var flag properly expanded
|
||||
v = d.getVarFlag('TF_A_CONFIG', config)
|
||||
if not v.strip():
|
||||
bb.fatal('[TF_A_CONFIG] Missing configuration for %s config' % config)
|
||||
items = v.split(',')
|
||||
if items[0] and len(items) > 5:
|
||||
raise bb.parse.SkipRecipe('Only <DEVICETREE>,<EXTRA_OPTFLAGS>,<BINARY_BASENAME>,<MAKE_TARGET>,<FILES TYPE> can be specified!')
|
||||
# Set internal vars
|
||||
bb.debug(1, "Appending '%s' to TF_A_DEVICETREE" % items[0])
|
||||
d.appendVar('TF_A_DEVICETREE', items[0] + ',')
|
||||
if len(items) > 1 and items[1]:
|
||||
bb.debug(1, "Appending '%s' to TF_A_EXTRA_OPTFLAGS." % items[1])
|
||||
d.appendVar('TF_A_EXTRA_OPTFLAGS', items[1] + ',')
|
||||
else:
|
||||
d.appendVar('TF_A_EXTRA_OPTFLAGS', '' + ',')
|
||||
if len(items) > 2 and items[2]:
|
||||
bb.debug(1, "Appending '%s' to TF_A_BINARIES." % items[2])
|
||||
d.appendVar('TF_A_BINARIES', items[2] + ',')
|
||||
else:
|
||||
bb.debug(1, "Appending '%s' to TF_A_BINARIES." % tfabasename)
|
||||
d.appendVar('TF_A_BINARIES', tfabasename + ',')
|
||||
if len(items) > 3 and items[3]:
|
||||
bb.debug(1, "Appending '%s' to TF_A_MAKE_TARGET." % items[3])
|
||||
d.appendVar('TF_A_MAKE_TARGET', items[3] + ',')
|
||||
else:
|
||||
d.appendVar('TF_A_MAKE_TARGET', 'all' + ',')
|
||||
if len(items) > 4 and items[4]:
|
||||
bb.debug(1, "Appending '%s' to TF_A_FILES." % items[4])
|
||||
d.appendVar('TF_A_FILES', items[4] + ',')
|
||||
else:
|
||||
d.appendVar('TF_A_FILES', 'bl2' + ',')
|
||||
break
|
||||
|
||||
# Manage case of signature:
|
||||
if d.getVar('SIGN_ENABLE') == "1":
|
||||
# If signature are activated, for winning space, the debug parameter will be remove and level of trace decrease
|
||||
if d.getVar('ST_TF_A_DEBUG_TRACE') == '1':
|
||||
bb.warn("TF-A SIGNATURE: force ST_TF_A_DEBUG_TRACE to '0' to disable DEBUG and decrease log level")
|
||||
d.setVar('ST_TF_A_DEBUG_TRACE', "0")
|
||||
}
|
||||
|
||||
# -----------------------------------------------
|
||||
# Enable use of work-shared folder
|
||||
TFA_SHARED_SOURCES ??= "1"
|
||||
STAGING_TFA_DIR = "${TMPDIR}/work-shared/${MACHINE}/tfa-source"
|
||||
# Make sure to move ${S} to STAGING_TFA_DIR. We can't just
|
||||
# create the symlink in advance as the git fetcher can't cope with
|
||||
# the symlink.
|
||||
do_unpack[cleandirs] += "${S}"
|
||||
do_unpack[cleandirs] += "${@bb.utils.contains('TFA_SHARED_SOURCES', '1', '${STAGING_TFA_DIR}', '', d)}"
|
||||
do_clean[cleandirs] += "${S}"
|
||||
do_clean[cleandirs] += "${@bb.utils.contains('TFA_SHARED_SOURCES', '1', '${STAGING_TFA_DIR}', '', d)}"
|
||||
base_do_unpack:append () {
|
||||
# Specific part to update devtool-source class
|
||||
if bb.data.inherits_class('devtool-source', d):
|
||||
# We don't want to move the source to STAGING_TFA_DIR here
|
||||
if d.getVar('STAGING_TFA_DIR', d):
|
||||
d.setVar('STAGING_TFA_DIR', '${S}')
|
||||
|
||||
shared = d.getVar("TFA_SHARED_SOURCES")
|
||||
if shared and oe.types.boolean(shared):
|
||||
# Copy/Paste from kernel class with adaptation to TFA var
|
||||
s = d.getVar("S")
|
||||
if s[-1] == '/':
|
||||
# drop trailing slash, so that os.symlink(tfasrc, s) doesn't use s as directory name and fail
|
||||
s=s[:-1]
|
||||
tfasrc = d.getVar("STAGING_TFA_DIR")
|
||||
if s != tfasrc:
|
||||
bb.utils.mkdirhier(tfasrc)
|
||||
bb.utils.remove(tfasrc, recurse=True)
|
||||
if d.getVar("EXTERNALSRC"):
|
||||
# With EXTERNALSRC S will not be wiped so we can symlink to it
|
||||
os.symlink(s, tfasrc)
|
||||
else:
|
||||
import shutil
|
||||
shutil.move(s, tfasrc)
|
||||
os.symlink(tfasrc, s)
|
||||
}
|
||||
|
||||
do_compile() {
|
||||
unset LDFLAGS
|
||||
unset CFLAGS
|
||||
unset CPPFLAGS
|
||||
|
||||
unset i
|
||||
for config in ${TF_A_CONFIG}; do
|
||||
i=$(expr $i + 1)
|
||||
# Initialize devicetree list, extra make options and tf-a basename
|
||||
dt_config=$(echo ${TF_A_DEVICETREE} | cut -d',' -f${i})
|
||||
extra_opt=$(echo ${TF_A_EXTRA_OPTFLAGS} | cut -d',' -f${i})
|
||||
tfa_basename=$(echo ${TF_A_BINARIES} | cut -d',' -f${i})
|
||||
tf_a_make_target=$(echo ${TF_A_MAKE_TARGET} | cut -d',' -f${i})
|
||||
for dt in ${dt_config}; do
|
||||
# Init specific soc settings
|
||||
soc_extra_opt=""
|
||||
soc_suffix=""
|
||||
if [ -n "${STM32MP_SOC_NAME}" ]; then
|
||||
for soc in ${STM32MP_SOC_NAME}; do
|
||||
if [ "$(echo ${dt} | grep -c ${soc})" -eq 1 ]; then
|
||||
soc_extra_opt="$(echo ${soc} | awk '{print toupper($0)}')=1"
|
||||
soc_suffix="-${soc}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
mkdir -p ${B}/${config}${soc_suffix}
|
||||
if [ "${TF_A_ENABLE_METADATA}" = "1" ]; then
|
||||
${S}/${TF_A_METADATA_TOOL} jsonparse "${S}/${TF_A_METADATA_JSON}" -b "${B}/${config}${soc_suffix}/${TF_A_METADATA_NAME}.${TF_A_METADATA_SUFFIX}"
|
||||
fi
|
||||
|
||||
# Init specific ddr settings
|
||||
ddr_extra_opt=""
|
||||
if [ "${TF_A_FWDDR}" = "1" ]; then
|
||||
# Detect ddr type if it's present
|
||||
oe_runmake -C "${S}" BUILD_PLAT="${B}/${config}${soc_suffix}-${dt}" DTB_FILE_NAME="${dt}.dtb" ${extra_opt} ${soc_extra_opt} dtbs
|
||||
if [ -f "${B}/${config}${soc_suffix}-${dt}/fdts/${dt}-bl2.dtb" ]; then
|
||||
ddr_dtb_node=$(${STAGING_BINDIR_NATIVE}/fdtget -l ${B}/${config}${soc_suffix}-${dt}/fdts/${dt}-bl2.dtb /soc | grep ddr | head -n 1)
|
||||
ddr_propertie=$(${STAGING_BINDIR_NATIVE}/fdtget ${B}/${config}${soc_suffix}-${dt}/fdts/${dt}-bl2.dtb /soc/${ddr_dtb_node} st,mem-name || echo "none")
|
||||
ddr_target=""
|
||||
# potentials value of ddr_propertie:
|
||||
# DDR3 16bits
|
||||
# DDR4 32bits
|
||||
# DDR4 8Gbits
|
||||
# LPDDR4 32bits
|
||||
case ${ddr_propertie} in
|
||||
DDR3*)
|
||||
ddr_extra_opt=" STM32MP_DDR3_TYPE=1 "
|
||||
ddr_target="ddr3"
|
||||
;;
|
||||
DDR4*)
|
||||
ddr_extra_opt=" STM32MP_DDR4_TYPE=1 "
|
||||
ddr_target="ddr4"
|
||||
;;
|
||||
LPDDR4*)
|
||||
ddr_extra_opt=" STM32MP_LPDDR4_TYPE=1 "
|
||||
ddr_target="lpddr4"
|
||||
;;
|
||||
*)
|
||||
bbwarn "Missing st,mem-name information for ${dt}"
|
||||
;;
|
||||
esac
|
||||
bbnote "${dt}: ${tf_a_make_target} -> ${ddr_extra_opt}"
|
||||
# Copy TF-A ddr binary with explicit devicetree filename
|
||||
if [ -n "${ddr_target}" ]; then
|
||||
if [ -s "${S}/drivers/st/ddr/phy/firmware/bin/${ddr_target}_pmu_train.bin" ]; then
|
||||
cp "${S}/drivers/st/ddr/phy/firmware/bin/${ddr_target}_pmu_train.bin" "${B}/${config}${soc_suffix}-${dt}/${FWDDR_NAME}-${dt}.${FWDDR_SUFFIX}"
|
||||
else
|
||||
bbwarn "Missing ddr firmware file ${ddr_target}_pmu_train.bin for ${dt}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
encrypt_extra_opt=""
|
||||
if [ "${ENCRYPT_ENABLE}" = "1" ]; then
|
||||
encrypt_key="${ENCRYPT_FIP_KEY_PATH_LIST}"
|
||||
if [ -n "${STM32MP_ENCRYPT_SOC_NAME}" ]; then
|
||||
unset k
|
||||
for soc in ${STM32MP_ENCRYPT_SOC_NAME}; do
|
||||
k=$(expr $k + 1)
|
||||
[ "$(echo ${dt} | grep -c ${soc})" -eq 1 ] && encrypt_key=$(echo ${ENCRYPT_FIP_KEY_PATH_LIST} | cut -d',' -f${k})
|
||||
done
|
||||
fi
|
||||
encrypt_extra_opt="ENC_KEY=$(hexdump -e '/1 "%02x"' ${encrypt_key})"
|
||||
fi
|
||||
|
||||
oe_runmake -C "${S}" BUILD_PLAT="${B}/${config}${soc_suffix}-${dt}" DTB_FILE_NAME="${dt}.dtb" ${extra_opt} ${soc_extra_opt} ${ddr_extra_opt} ${encrypt_extra_opt} ${tf_a_make_target}
|
||||
|
||||
# Copy TF-A binary with explicit devicetree filename
|
||||
if [ -f "${B}/${config}${soc_suffix}-${dt}/${tfa_basename}-${dt}.${TF_A_SUFFIX}" ]; then
|
||||
cp "${B}/${config}${soc_suffix}-${dt}/${tfa_basename}-${dt}.${TF_A_SUFFIX}" "${B}/${config}${soc_suffix}-${dt}/${tfa_basename}-${dt}-${config}.${TF_A_SUFFIX}"
|
||||
if [ "${TF_A_ENABLE_DEBUG_WRAPPER}" = "1" ]; then
|
||||
stm32wrapper4dbg -s "${B}/${config}${soc_suffix}-${dt}/${tfa_basename}-${dt}.${TF_A_SUFFIX}" -d "${B}/${config}${soc_suffix}-${dt}/debug-${tfa_basename}-${dt}-${config}.${TF_A_SUFFIX}"
|
||||
fi
|
||||
|
||||
if [ "${SIGN_ENABLE}" = "1" ]; then
|
||||
# Init sign key for signing tools
|
||||
sign_key="${SIGN_KEY_PATH_LIST}"
|
||||
if [ -n "${STM32MP_SOC_NAME}" ]; then
|
||||
unset k
|
||||
for soc in ${STM32MP_SOC_NAME}; do
|
||||
k=$(expr $k + 1)
|
||||
[ "$(echo ${dt} | grep -c ${soc})" -eq 1 ] && sign_key=$(echo ${SIGN_KEY_PATH_LIST} | cut -d',' -f${k})
|
||||
done
|
||||
fi
|
||||
# Init default '-of' option for signing case
|
||||
tf_a_sign_of_opt=""
|
||||
dd if="${B}/${config}${soc_suffix}-${dt}/${tfa_basename}-${dt}-${config}.${TF_A_SUFFIX}" of=header.dump bs=1 count=4 skip=72 > /dev/null 2> /dev/null
|
||||
temp_version=$(od -A o -t dI header.dump | head -n 1 | cut -d' ' -f2- | sed "s/ //g")
|
||||
rm -f header.dump
|
||||
[ "$(expr $temp_version / 65536)" = "2" ] && tf_a_sign_of_opt="-of ${TF_A_SIGN_OF}"
|
||||
# Sign tf-a binary
|
||||
echo "${SIGN_TOOL} \
|
||||
-bin "${B}/${config}${soc_suffix}-${dt}/${tfa_basename}-${dt}-${config}.${TF_A_SUFFIX}" \
|
||||
-o "${B}/${config}${soc_suffix}-${dt}/${tfa_basename}-${dt}-${config}${TF_A_SIGN_SUFFIX}.${TF_A_SUFFIX}" \
|
||||
--password ${SIGN_KEY_PASS} \
|
||||
--public-key $(ls -1 $(dirname ${sign_key})/publicKey*.pem | tr '\n' '\t') \
|
||||
--private-key ${sign_key} \
|
||||
--type fsbl \
|
||||
--silent \
|
||||
${SIGN_TOOL_EXTRA} \
|
||||
${tf_a_sign_of_opt}"
|
||||
${SIGN_TOOL} \
|
||||
-bin "${B}/${config}${soc_suffix}-${dt}/${tfa_basename}-${dt}-${config}.${TF_A_SUFFIX}" \
|
||||
-o "${B}/${config}${soc_suffix}-${dt}/${tfa_basename}-${dt}-${config}${TF_A_SIGN_SUFFIX}.${TF_A_SUFFIX}" \
|
||||
--password ${SIGN_KEY_PASS} \
|
||||
--public-key $(ls -1 $(dirname ${sign_key})/publicKey*.pem | tr '\n' '\t') \
|
||||
--private-key ${sign_key} \
|
||||
--type fsbl \
|
||||
--silent \
|
||||
${SIGN_TOOL_EXTRA} \
|
||||
${tf_a_sign_of_opt}
|
||||
if [ "${TF_A_ENABLE_DEBUG_WRAPPER}" = "1" ]; then
|
||||
echo "${SIGN_TOOL} \
|
||||
-bin "${B}/${config}${soc_suffix}-${dt}/debug-${tfa_basename}-${dt}-${config}.${TF_A_SUFFIX}" \
|
||||
-o "${B}/${config}${soc_suffix}-${dt}/debug-${tfa_basename}-${dt}-${config}${TF_A_SIGN_SUFFIX}.${TF_A_SUFFIX}" \
|
||||
--password ${SIGN_KEY_PASS} \
|
||||
--public-key $(ls -1 $(dirname ${sign_key})/publicKey*.pem | tr '\n' '\t') \
|
||||
--private-key "${sign_key}" \
|
||||
--type fsbl \
|
||||
--silent \
|
||||
${SIGN_TOOL_EXTRA} \
|
||||
${tf_a_sign_of_opt}"
|
||||
${SIGN_TOOL} \
|
||||
-bin "${B}/${config}${soc_suffix}-${dt}/debug-${tfa_basename}-${dt}-${config}.${TF_A_SUFFIX}" \
|
||||
-o "${B}/${config}${soc_suffix}-${dt}/debug-${tfa_basename}-${dt}-${config}${TF_A_SIGN_SUFFIX}.${TF_A_SUFFIX}" \
|
||||
--password ${SIGN_KEY_PASS} \
|
||||
--public-key $(ls -1 $(dirname ${sign_key})/publicKey*.pem | tr '\n' '\t') \
|
||||
--private-key "${sign_key}" \
|
||||
--type fsbl \
|
||||
--silent \
|
||||
${SIGN_TOOL_EXTRA} \
|
||||
${tf_a_sign_of_opt}
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${ENCRYPT_ENABLE}" = "1" ]; then
|
||||
# Init encrypt key for signing tools
|
||||
encrypt_key="${ENCRYPT_FSBL_KEY_PATH_LIST}"
|
||||
if [ -n "${STM32MP_ENCRYPT_SOC_NAME}" ]; then
|
||||
unset k
|
||||
for soc in ${STM32MP_ENCRYPT_SOC_NAME}; do
|
||||
k=$(expr $k + 1)
|
||||
[ "$(echo ${dt} | grep -c ${soc})" -eq 1 ] && encrypt_key=$(echo ${ENCRYPT_FSBL_KEY_PATH_LIST} | cut -d',' -f${k})
|
||||
done
|
||||
fi
|
||||
# Init default '-of' option for signing case
|
||||
tf_a_sign_of_opt=""
|
||||
dd if="${B}/${config}${soc_suffix}-${dt}/${tfa_basename}-${dt}-${config}.${TF_A_SUFFIX}" of=header.dump bs=1 count=4 skip=72 > /dev/null 2> /dev/null
|
||||
temp_version=$(od -A o -t dI header.dump | head -n 1 | cut -d' ' -f2- | sed "s/ //g")
|
||||
rm -f header.dump
|
||||
[ "$(expr $temp_version / 65536)" = "2" ] && tf_a_sign_of_opt="-hv 2"
|
||||
# Encrypt tf-a binary
|
||||
echo '${SIGN_TOOL} \
|
||||
-bin "${B}/${config}${soc_suffix}-${dt}/${tfa_basename}-${dt}-${config}${TF_A_SIGN_SUFFIX}.${TF_A_SUFFIX}" \
|
||||
-o "${B}/${config}${soc_suffix}-${dt}/${tfa_basename}-${dt}-${config}${TF_A_ENCRYPT_SUFFIX}${TF_A_SIGN_SUFFIX}.${TF_A_SUFFIX}" \
|
||||
--password ${SIGN_KEY_PASS} \
|
||||
--public-key $(ls -1 $(dirname ${sign_key})/publicKey*.pem | tr '\n' '\t') \
|
||||
--private-key ${sign_key} \
|
||||
--type fsbl \
|
||||
--silent \
|
||||
--enc-key ${encrypt_key} \
|
||||
--enc-dc "${TF_A_ENCRYPT_DC}" \
|
||||
--image-version "${TF_A_ENCRYPT_IMGVER}" \
|
||||
-of "${TF_A_ENCRYPT_OF}" \
|
||||
${tf_a_sign_of_opt} '
|
||||
${SIGN_TOOL} \
|
||||
-bin "${B}/${config}${soc_suffix}-${dt}/${tfa_basename}-${dt}-${config}${TF_A_SIGN_SUFFIX}.${TF_A_SUFFIX}" \
|
||||
-o "${B}/${config}${soc_suffix}-${dt}/${tfa_basename}-${dt}-${config}${TF_A_ENCRYPT_SUFFIX}${TF_A_SIGN_SUFFIX}.${TF_A_SUFFIX}" \
|
||||
--password ${SIGN_KEY_PASS} \
|
||||
--public-key $(ls -1 $(dirname ${sign_key})/publicKey*.pem | tr '\n' '\t') \
|
||||
--private-key ${sign_key} \
|
||||
--type fsbl \
|
||||
--silent \
|
||||
--enc-key ${encrypt_key} \
|
||||
--enc-dc "${TF_A_ENCRYPT_DC}" \
|
||||
--image-version "${TF_A_ENCRYPT_IMGVER}" \
|
||||
-of "${TF_A_ENCRYPT_OF}" \
|
||||
${tf_a_sign_of_opt}
|
||||
if [ "${TF_A_ENABLE_DEBUG_WRAPPER}" = "1" ]; then
|
||||
echo '${SIGN_TOOL} \
|
||||
-bin "${B}/${config}${soc_suffix}-${dt}/debug-${tfa_basename}-${dt}-${config}${TF_A_SIGN_SUFFIX}.${TF_A_SUFFIX}" \
|
||||
-o "${B}/${config}${soc_suffix}-${dt}/debug-${tfa_basename}-${dt}-${config}${TF_A_ENCRYPT_SUFFIX}${TF_A_SIGN_SUFFIX}.${TF_A_SUFFIX}" \
|
||||
--password ${SIGN_KEY_PASS} \
|
||||
--public-key $(ls -1 $(dirname ${sign_key})/publicKey*.pem | tr '\n' '\t') \
|
||||
--private-key ${sign_key} \
|
||||
--type fsbl \
|
||||
--silent \
|
||||
--enc-key ${encrypt_key} \
|
||||
--enc-dc "${TF_A_ENCRYPT_DC}" \
|
||||
--image-version "${TF_A_ENCRYPT_IMGVER}" \
|
||||
-of "${TF_A_ENCRYPT_OF}" \
|
||||
${tf_a_sign_of_opt}'
|
||||
${SIGN_TOOL} \
|
||||
-bin "${B}/${config}${soc_suffix}-${dt}/debug-${tfa_basename}-${dt}-${config}${TF_A_SIGN_SUFFIX}.${TF_A_SUFFIX}" \
|
||||
-o "${B}/${config}${soc_suffix}-${dt}/debug-${tfa_basename}-${dt}-${config}${TF_A_ENCRYPT_SUFFIX}${TF_A_SIGN_SUFFIX}.${TF_A_SUFFIX}" \
|
||||
--password ${SIGN_KEY_PASS} \
|
||||
--public-key $(ls -1 $(dirname ${sign_key})/publicKey*.pem | tr '\n' '\t') \
|
||||
--private-key ${sign_key} \
|
||||
--type fsbl \
|
||||
--silent \
|
||||
--enc-key ${encrypt_key} \
|
||||
--enc-dc "${TF_A_ENCRYPT_DC}" \
|
||||
--image-version "${TF_A_ENCRYPT_IMGVER}" \
|
||||
-of "${TF_A_ENCRYPT_OF}"\
|
||||
${tf_a_sign_of_opt}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
if [ "${TF_A_ENABLE_METADATA}" = "1" ]; then
|
||||
${S}/${TF_A_METADATA_TOOL} jsonparse "${S}/${TF_A_METADATA_JSON}" -b "${B}/${TF_A_METADATA_NAME}.${TF_A_METADATA_SUFFIX}"
|
||||
fi
|
||||
}
|
||||
|
||||
do_deploy() {
|
||||
install -d ${DEPLOYDIR}
|
||||
install -d ${DEPLOYDIR}/arm-trusted-firmware
|
||||
|
||||
unset i
|
||||
for config in ${TF_A_CONFIG}; do
|
||||
i=$(expr $i + 1)
|
||||
# Initialize devicetree list and tf-a basename
|
||||
dt_config=$(echo ${TF_A_DEVICETREE} | cut -d',' -f${i})
|
||||
tfa_basename=$(echo ${TF_A_BINARIES} | cut -d',' -f${i})
|
||||
tfa_file_type=$(echo ${TF_A_FILES} | cut -d',' -f${i})
|
||||
for dt in ${dt_config}; do
|
||||
# Init soc suffix
|
||||
soc_suffix=""
|
||||
if [ -n "${STM32MP_SOC_NAME}" ]; then
|
||||
for soc in ${STM32MP_SOC_NAME}; do
|
||||
[ "$(echo ${dt} | grep -c ${soc})" -eq 1 ] && soc_suffix="-${soc}"
|
||||
done
|
||||
fi
|
||||
for file_type in ${tfa_file_type}; do
|
||||
case "${file_type}" in
|
||||
bl2)
|
||||
# Install TF-A binary
|
||||
if [ -f "${B}/${config}${soc_suffix}-${dt}/${tfa_basename}-${dt}-${config}.${TF_A_SUFFIX}" ]; then
|
||||
install -m 644 "${B}/${config}${soc_suffix}-${dt}/${tfa_basename}-${dt}-${config}${TF_A_ENCRYPT_SUFFIX}${TF_A_SIGN_SUFFIX}.${TF_A_SUFFIX}" "${DEPLOYDIR}/arm-trusted-firmware/"
|
||||
if [ "${TF_A_ENABLE_DEBUG_WRAPPER}" = "1" ]; then
|
||||
install -d "${DEPLOYDIR}/arm-trusted-firmware/debug"
|
||||
install -m 644 "${B}/${config}${soc_suffix}-${dt}/debug-${tfa_basename}-${dt}-${config}${TF_A_ENCRYPT_SUFFIX}${TF_A_SIGN_SUFFIX}.${TF_A_SUFFIX}" "${DEPLOYDIR}/arm-trusted-firmware/debug/"
|
||||
fi
|
||||
fi
|
||||
if [ -n "${ELF_DEBUG_ENABLE}" ]; then
|
||||
install -d "${DEPLOYDIR}/arm-trusted-firmware/debug"
|
||||
if [ -f "${B}/${config}${soc_suffix}-${dt}/${BL2_ELF}" ]; then
|
||||
install -m 644 "${B}/${config}${soc_suffix}-${dt}/${BL2_ELF}" "${DEPLOYDIR}/arm-trusted-firmware/debug/${tfa_basename}-${BL2_BASENAME_DEPLOY}${soc_suffix}-${config}.${TF_A_ELF_SUFFIX}"
|
||||
fi
|
||||
fi
|
||||
if [ "${TF_A_FWDDR}" = "1" ]; then
|
||||
install -d "${DEPLOYDIR}/arm-trusted-firmware/ddr"
|
||||
# Install DDR firmware binary
|
||||
if [ -f "${B}/${config}${soc_suffix}-${dt}/${FWDDR_NAME}-${dt}.${FWDDR_SUFFIX}" ]; then
|
||||
if [ ! -s "${DEPLOYDIR}/arm-trusted-firmware/ddr/${FWDDR_NAME}-${dt}.${FWDDR_SUFFIX}" ]; then
|
||||
install -m 644 "${B}/${config}${soc_suffix}-${dt}/${FWDDR_NAME}-${dt}.${FWDDR_SUFFIX}" "${DEPLOYDIR}/arm-trusted-firmware/ddr/"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
bl31)
|
||||
# Install BL31 files
|
||||
install -d "${DEPLOYDIR}/arm-trusted-firmware/bl31"
|
||||
# Install BL31 binary
|
||||
if [ -f "${B}/${config}${soc_suffix}-${dt}/${BL31_BASENAME}.${BL31_SUFFIX}" ]; then
|
||||
install -m 644 "${B}/${config}${soc_suffix}-${dt}/${BL31_BASENAME}.${BL31_SUFFIX}" "${DEPLOYDIR}/arm-trusted-firmware/bl31/${tfa_basename}-${BL31_BASENAME_DEPLOY}${soc_suffix}.${BL31_SUFFIX}"
|
||||
fi
|
||||
# Install BL31 devicetree
|
||||
if [ -f "${B}/${config}${soc_suffix}-${dt}/fdts/${dt}-${BL31_BASENAME}.${DT_SUFFIX}" ]; then
|
||||
install -m 644 "${B}/${config}${soc_suffix}-${dt}/fdts/${dt}-${BL31_BASENAME}.${DT_SUFFIX}" "${DEPLOYDIR}/arm-trusted-firmware/bl31/${dt}-${BL31_BASENAME}.${DT_SUFFIX}"
|
||||
fi
|
||||
if [ -n "${ELF_DEBUG_ENABLE}" ]; then
|
||||
install -d "${DEPLOYDIR}/arm-trusted-firmware/bl31/debug"
|
||||
if [ -f "${B}/${config}${soc_suffix}-${dt}/${BL31_ELF}" ]; then
|
||||
install -m 644 "${B}/${config}${soc_suffix}-${dt}/${BL31_ELF}" "${DEPLOYDIR}/arm-trusted-firmware/bl31/debug/${tfa_basename}-${BL31_BASENAME_DEPLOY}${soc_suffix}-${config}.${TF_A_ELF_SUFFIX}"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
bl32)
|
||||
# Install BL32 files
|
||||
install -d "${DEPLOYDIR}/arm-trusted-firmware/bl32"
|
||||
# Install BL32 binary
|
||||
if [ -f "${B}/${config}${soc_suffix}-${dt}/${BL32_BASENAME}.${BL32_SUFFIX}" ]; then
|
||||
install -m 644 "${B}/${config}${soc_suffix}-${dt}/${BL32_BASENAME}.${BL32_SUFFIX}" "${DEPLOYDIR}/arm-trusted-firmware/bl32/${tfa_basename}-${BL32_BASENAME_DEPLOY}${soc_suffix}.${BL32_SUFFIX}"
|
||||
fi
|
||||
# Install BL32 devicetree
|
||||
if [ -f "${B}/${config}${soc_suffix}-${dt}/fdts/${dt}-${BL32_BASENAME}.${DT_SUFFIX}" ]; then
|
||||
install -m 644 "${B}/${config}${soc_suffix}-${dt}/fdts/${dt}-${BL32_BASENAME}.${DT_SUFFIX}" "${DEPLOYDIR}/arm-trusted-firmware/bl32/${dt}-${BL32_BASENAME}.${DT_SUFFIX}"
|
||||
fi
|
||||
if [ -n "${ELF_DEBUG_ENABLE}" ]; then
|
||||
install -d "${DEPLOYDIR}/arm-trusted-firmware/bl32/debug"
|
||||
if [ -f "${B}/${config}${soc_suffix}-${dt}/${BL32_ELF}" ]; then
|
||||
install -m 644 "${B}/${config}${soc_suffix}-${dt}/${BL32_ELF}" "${DEPLOYDIR}/arm-trusted-firmware/bl32/debug/${tfa_basename}-${BL32_BASENAME_DEPLOY}${soc_suffix}-${config}.${TF_A_ELF_SUFFIX}"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
fwconfig)
|
||||
# Install fwconfig
|
||||
install -d "${DEPLOYDIR}/arm-trusted-firmware/fwconfig"
|
||||
if [ -f "${B}/${config}${soc_suffix}-${dt}/fdts/${dt}-${FWCONFIG_NAME}.${DT_SUFFIX}" ]; then
|
||||
install -m 644 "${B}/${config}${soc_suffix}-${dt}/fdts/${dt}-${FWCONFIG_NAME}.${DT_SUFFIX}" "${DEPLOYDIR}/arm-trusted-firmware/fwconfig/${dt}-${FWCONFIG_NAME}-${config}.${DT_SUFFIX}"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done # for file_type in ${tfa_file_type}
|
||||
done # for dt in ${dt_config}
|
||||
if [ -n "${ELF_DEBUG_ENABLE}" ]; then
|
||||
install -d "${DEPLOYDIR}/arm-trusted-firmware/debug"
|
||||
if [ -f "${B}/${config}${soc_suffix}-${dt}/${BL1_ELF}" ]; then
|
||||
install -m 644 "${B}/${config}${soc_suffix}-${dt}/${BL1_ELF}" "${DEPLOYDIR}/arm-trusted-firmware/debug/${tfa_basename}-${BL1_BASENAME_DEPLOY}-${config}.${TF_A_ELF_SUFFIX}"
|
||||
fi
|
||||
fi
|
||||
done # for config in ${TF_A_CONFIG}
|
||||
|
||||
if [ "${TF_A_ENABLE_METADATA}" = "1" ]; then
|
||||
install -d "${DEPLOYDIR}/arm-trusted-firmware"
|
||||
if [ -f "${B}/${TF_A_METADATA_NAME}.${TF_A_METADATA_SUFFIX}" ]; then
|
||||
install -m 644 "${B}/${TF_A_METADATA_NAME}.${TF_A_METADATA_SUFFIX}" "${DEPLOYDIR}/arm-trusted-firmware/${TF_A_METADATA_BINARY}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
addtask deploy before do_build after do_compile
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (C) 2022 Digi International Inc.
|
||||
# Copyright (C) 2022, Digi International Inc.
|
||||
#
|
||||
|
||||
# Select internal or Github TF-A repo
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
#
|
||||
# Copyright (C) 2024 Digi International Inc.
|
||||
#
|
||||
require tf-a-stm32mp2-common.inc
|
||||
require tf-a-stm32mp2.inc
|
||||
|
||||
SUMMARY = "Trusted Firmware-A for STM32MP1"
|
||||
LICENSE = "BSD-3-Clause"
|
||||
|
||||
# Select internal or Github TF-A repo
|
||||
TFA_URI_STASH = "${DIGI_MTK_GIT}/emp/arm-trusted-firmware.git;protocol=ssh"
|
||||
TFA_URI_GITHUB = "${DIGI_GITHUB_GIT}/arm-trusted-firmware.git;protocol=https"
|
||||
TFA_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${TFA_URI_STASH}', '${TFA_URI_GITHUB}', d)}"
|
||||
|
||||
SRCBRANCH = "v2.8/stm32mp/master"
|
||||
SRCREV = "${AUTOREV}"
|
||||
|
||||
SRC_URI = " \
|
||||
${TFA_GIT_URI};branch=${SRCBRANCH} \
|
||||
"
|
||||
|
||||
TF_A_VERSION = "v2.8.12"
|
||||
TF_A_RELEASE = "beta-r1"
|
||||
|
||||
# Configure settings
|
||||
TFA_PLATFORM = "stm32mp1"
|
||||
TFA_ARM_MAJOR = "7"
|
||||
TFA_ARM_ARCH = "aarch32"
|
||||
|
||||
TFA_PLATFORM:aarch64 = "stm32mp2"
|
||||
TFA_ARM_MAJOR:aarch64 = "8"
|
||||
TFA_ARM_ARCH:aarch64 = "aarch64"
|
||||
|
||||
# Enable the wrapper for debug
|
||||
TF_A_ENABLE_DEBUG_WRAPPER ?= "1"
|
||||
|
||||
# ---------------------------------
|
||||
# Configure archiver use
|
||||
# ---------------------------------
|
||||
include ${@oe.utils.ifelse(d.getVar('ST_ARCHIVER_ENABLE') == '1', 'tf-a-stm32mp-archiver.inc','')}
|
||||
|
||||
COMPATIBLE_MACHINE = "(ccmp2)"
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
# Copyright (C) 2024, Digi International Inc.
|
||||
|
||||
do_deploy:append() {
|
||||
unset i
|
||||
for config in ${TF_A_CONFIG}; do
|
||||
i=$(expr $i + 1)
|
||||
dt_config=$(echo ${TF_A_DEVICETREE} | cut -d',' -f${i})
|
||||
tfa_basename=$(echo ${TF_A_BINARIES} | cut -d',' -f${i})
|
||||
for dt in ${dt_config}; do
|
||||
TF_A_FILENAME="${tfa_basename}-${dt}-${config}.${TF_A_SUFFIX}"
|
||||
if [ -f "${DEPLOYDIR}/arm-trusted-firmware/${TF_A_FILENAME}" ]; then
|
||||
ln -s "arm-trusted-firmware/${TF_A_FILENAME}" "${DEPLOYDIR}"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
# Last value of 'dt' is good for metadata binary, so use that.
|
||||
if [ "${TF_A_ENABLE_METADATA}" = "1" ]; then
|
||||
if [ -f "${DEPLOYDIR}/arm-trusted-firmware/${TF_A_METADATA_BINARY}" ]; then
|
||||
ln -s "arm-trusted-firmware/${TF_A_METADATA_BINARY}" "${DEPLOYDIR}/${TF_A_METADATA_NAME}-${dt}.${TF_A_METADATA_SUFFIX}"
|
||||
fi
|
||||
fi
|
||||
|
||||
unset i
|
||||
for config in ${FIP_CONFIG}; do
|
||||
i=$(expr $i + 1)
|
||||
dt_config="$(echo ${FIP_DEVICETREE} | cut -d',' -f${i})"
|
||||
for dt in ${dt_config}; do
|
||||
FIP_FILENAME="${FIP_BASENAME}-${dt}-${config}${FIP_SIGN_SUFFIX}.${FIP_SUFFIX}"
|
||||
if [ -f "${DEPLOYDIR}/fip/${FIP_FILENAME}" ]; then
|
||||
ln -s "fip/${FIP_FILENAME}" "${DEPLOYDIR}"
|
||||
fi
|
||||
done
|
||||
done
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
FILESEXTRAPATHS:prepend := "${THISDIR}/tf-a-tools:"
|
||||
|
||||
SRC_URI:append = " \
|
||||
file://0001-FIX-GCC-tools-overwrite.patch \
|
||||
file://0001-tools-allow-to-use-a-root-key-password-from-command-.patch \
|
||||
"
|
||||
|
||||
DEPENDS += "dtc-native openssl"
|
||||
|
||||
COMPATIBLE_HOST:class-target = "null"
|
||||
|
||||
HOSTCC:class-native = "${BUILD_CC}"
|
||||
HOSTCC:class-nativesdk = "${CC}"
|
||||
|
||||
EXTRA_OEMAKE += "HOSTCC='${HOSTCC}' OPENSSL_DIR='${STAGING_EXECPREFIXDIR}'"
|
||||
EXTRA_OEMAKE += "certtool enctool fiptool"
|
||||
EXTRA_OEMAKE += "PLAT=${TFA_PLATFORM}"
|
||||
|
||||
do_configure[noexec] = "1"
|
||||
|
||||
do_compile:prepend:class-native () {
|
||||
# This is still needed to have the native fiptool executing properly by
|
||||
# setting the RPATH
|
||||
sed -e '/^LDLIBS/ s,$, \$\{BUILD_LDFLAGS},' \
|
||||
-e '/^INCLUDE_PATHS/ s,$, \$\{BUILD_CFLAGS},' \
|
||||
-i ${S}/tools/fiptool/Makefile
|
||||
# This is still needed to have the native cert_create executing properly by
|
||||
# setting the RPATH
|
||||
sed -e '/^LIB_DIR/ s,$, \$\{BUILD_LDFLAGS},' \
|
||||
-e '/^INC_DIR/ s,$, \$\{BUILD_CFLAGS},' \
|
||||
-i ${S}/tools/cert_create/Makefile
|
||||
# This is still needed to have the native fiptool executing properly by
|
||||
# setting the RPATH
|
||||
sed -e '/^LIB_DIR/ s,$, \$\{BUILD_LDFLAGS},' \
|
||||
-e '/^INC_DIR/ s,$, \$\{BUILD_CFLAGS},' \
|
||||
-i ${S}/tools/encrypt_fw/Makefile
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${bindir}
|
||||
install -m 0755 \
|
||||
${B}/tools/fiptool/fiptool \
|
||||
${B}/tools/cert_create/cert_create \
|
||||
${B}/tools/encrypt_fw/encrypt_fw \
|
||||
${D}${bindir}
|
||||
}
|
||||
|
||||
BBCLASSEXTEND += "native nativesdk"
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
From 68a2098a3035b8374d0ce0b1feead650dadbce64 Mon Sep 17 00:00:00 2001
|
||||
From: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
|
||||
Date: Thu, 24 Nov 2022 16:18:27 +0100
|
||||
Subject: [PATCH] FIX GCC tools overwrite
|
||||
|
||||
Signed-off-by: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
|
||||
---
|
||||
Makefile | 22 +++++++++++-----------
|
||||
1 file changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 1ddb7b844..d6583dfe9 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -183,19 +183,19 @@ endif
|
||||
# Toolchain
|
||||
################################################################################
|
||||
|
||||
-HOSTCC := gcc
|
||||
+HOSTCC ?= gcc
|
||||
export HOSTCC
|
||||
|
||||
-CC := ${CROSS_COMPILE}gcc
|
||||
-CPP := ${CROSS_COMPILE}cpp
|
||||
-AS := ${CROSS_COMPILE}gcc
|
||||
-AR := ${CROSS_COMPILE}ar
|
||||
-LINKER := ${CROSS_COMPILE}ld
|
||||
-OC := ${CROSS_COMPILE}objcopy
|
||||
-OD := ${CROSS_COMPILE}objdump
|
||||
-NM := ${CROSS_COMPILE}nm
|
||||
-PP := ${CROSS_COMPILE}gcc -E
|
||||
-DTC := dtc
|
||||
+#CC := ${CROSS_COMPILE}gcc
|
||||
+#CPP := ${CROSS_COMPILE}cpp
|
||||
+#AS := ${CROSS_COMPILE}gcc
|
||||
+#AR := ${CROSS_COMPILE}ar
|
||||
+#LINKER := ${CROSS_COMPILE}ld
|
||||
+#OC := ${CROSS_COMPILE}objcopy
|
||||
+#OD := ${CROSS_COMPILE}objdump
|
||||
+#NM := ${CROSS_COMPILE}nm
|
||||
+#PP := ${CROSS_COMPILE}gcc -E
|
||||
+#DTC := dtc
|
||||
|
||||
# Use ${LD}.bfd instead if it exists (as absolute path or together with $PATH).
|
||||
ifneq ($(strip $(wildcard ${LD}.bfd) \
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
From 204cde3bd45f634e3699a42ed8f865a8385743a5 Mon Sep 17 00:00:00 2001
|
||||
From: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
|
||||
Date: Mon, 28 Nov 2022 12:16:38 +0100
|
||||
Subject: [PATCH] tools: allow to use a root key password from command line
|
||||
|
||||
By defining the ROT_KEY_PWD, user is able to define the private
|
||||
root key password. Useful for build system management.
|
||||
|
||||
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
|
||||
---
|
||||
make_helpers/tbbr/tbbr_tools.mk | 2 ++
|
||||
tools/cert_create/include/key.h | 2 +-
|
||||
tools/cert_create/src/key.c | 4 ++--
|
||||
tools/cert_create/src/main.c | 13 +++++++++++--
|
||||
4 files changed, 16 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/make_helpers/tbbr/tbbr_tools.mk b/make_helpers/tbbr/tbbr_tools.mk
|
||||
index 5ef2d852e..147159b1a 100644
|
||||
--- a/make_helpers/tbbr/tbbr_tools.mk
|
||||
+++ b/make_helpers/tbbr/tbbr_tools.mk
|
||||
@@ -25,6 +25,7 @@
|
||||
# KEY_SIZE
|
||||
# ROT_KEY
|
||||
# PROT_KEY
|
||||
+# ROT_KEY_PWD
|
||||
# PLAT_KEY
|
||||
# SWD_ROT_KEY
|
||||
# CORE_SWD_KEY
|
||||
@@ -74,6 +75,7 @@ $(if ${HASH_ALG},$(eval $(call CERT_ADD_CMD_OPT,${HASH_ALG},--hash-alg,FWU_)))
|
||||
$(if ${ROT_KEY},$(eval $(call CERT_ADD_CMD_OPT,${ROT_KEY},--rot-key)))
|
||||
$(if ${ROT_KEY},$(eval $(call CERT_ADD_CMD_OPT,${ROT_KEY},--rot-key,FWU_)))
|
||||
$(if ${PROT_KEY},$(eval $(call CERT_ADD_CMD_OPT,${PROT_KEY},--prot-key)))
|
||||
+$(if ${ROT_KEY_PWD},$(eval $(call CERT_ADD_CMD_OPT,${ROT_KEY_PWD},--rot-key-pwd)))
|
||||
$(if ${PLAT_KEY},$(eval $(call CERT_ADD_CMD_OPT,${PLAT_KEY},--plat-key)))
|
||||
$(if ${SWD_ROT_KEY},$(eval $(call CERT_ADD_CMD_OPT,${SWD_ROT_KEY},--swd-rot-key)))
|
||||
$(if ${CORE_SWD_KEY},$(eval $(call CERT_ADD_CMD_OPT,${CORE_SWD_KEY},--core-swd-key)))
|
||||
diff --git a/tools/cert_create/include/key.h b/tools/cert_create/include/key.h
|
||||
index 312575b44..ed3654b08 100644
|
||||
--- a/tools/cert_create/include/key.h
|
||||
+++ b/tools/cert_create/include/key.h
|
||||
@@ -74,7 +74,7 @@ key_t *key_get_by_opt(const char *opt);
|
||||
int key_new(key_t *key);
|
||||
#endif
|
||||
int key_create(key_t *key, int type, int key_bits);
|
||||
-int key_load(key_t *key, unsigned int *err_code);
|
||||
+int key_load(key_t *key, char *rot_key_pwd, unsigned int *err_code);
|
||||
int key_store(key_t *key);
|
||||
void key_cleanup(void);
|
||||
|
||||
diff --git a/tools/cert_create/src/key.c b/tools/cert_create/src/key.c
|
||||
index 487777b67..c8f5357be 100644
|
||||
--- a/tools/cert_create/src/key.c
|
||||
+++ b/tools/cert_create/src/key.c
|
||||
@@ -189,7 +189,7 @@ int key_create(key_t *key, int type, int key_bits)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int key_load(key_t *key, unsigned int *err_code)
|
||||
+int key_load(key_t *key, char *rot_key_pwd, unsigned int *err_code)
|
||||
{
|
||||
FILE *fp;
|
||||
EVP_PKEY *k;
|
||||
@@ -198,7 +198,7 @@ int key_load(key_t *key, unsigned int *err_code)
|
||||
/* Load key from file */
|
||||
fp = fopen(key->fn, "r");
|
||||
if (fp) {
|
||||
- k = PEM_read_PrivateKey(fp, &key->key, NULL, NULL);
|
||||
+ k = PEM_read_PrivateKey(fp, &key->key, NULL, rot_key_pwd);
|
||||
fclose(fp);
|
||||
if (k) {
|
||||
*err_code = KEY_ERR_NONE;
|
||||
diff --git a/tools/cert_create/src/main.c b/tools/cert_create/src/main.c
|
||||
index 2ab6bcfd9..90bb82ba8 100644
|
||||
--- a/tools/cert_create/src/main.c
|
||||
+++ b/tools/cert_create/src/main.c
|
||||
@@ -292,6 +292,10 @@ static const cmd_opt_t common_cmd_opt[] = {
|
||||
{ "print-cert", no_argument, NULL, 'p' },
|
||||
"Print the certificates in the standard output"
|
||||
}
|
||||
+ ,{
|
||||
+ { "rot-key-pwd", required_argument, NULL, 'r' },
|
||||
+ "Password for the root key"
|
||||
+ },
|
||||
};
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
@@ -310,6 +314,7 @@ int main(int argc, char *argv[])
|
||||
unsigned char md[SHA512_DIGEST_LENGTH];
|
||||
unsigned int md_len;
|
||||
const EVP_MD *md_info;
|
||||
+ char *rot_key_pw = NULL;
|
||||
|
||||
NOTICE("CoT Generation Tool: %s\n", build_msg);
|
||||
NOTICE("Target platform: %s\n", platform_msg);
|
||||
@@ -347,7 +352,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
while (1) {
|
||||
/* getopt_long stores the option index here. */
|
||||
- c = getopt_long(argc, argv, "a:b:hknps:", cmd_opt, &opt_idx);
|
||||
+ c = getopt_long(argc, argv, "a:b:hknpr:s:", cmd_opt, &opt_idx);
|
||||
|
||||
/* Detect the end of the options. */
|
||||
if (c == -1) {
|
||||
@@ -381,6 +386,10 @@ int main(int argc, char *argv[])
|
||||
case 'p':
|
||||
print_cert = 1;
|
||||
break;
|
||||
+ case 'r':
|
||||
+ rot_key_pw = malloc(sizeof(char) * strlen(optarg));
|
||||
+ strncpy(rot_key_pw, optarg, strlen(optarg));
|
||||
+ break;
|
||||
case 's':
|
||||
hash_alg = get_hash_alg(optarg);
|
||||
if (hash_alg < 0) {
|
||||
@@ -441,7 +450,7 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
|
||||
/* First try to load the key from disk */
|
||||
- if (key_load(&keys[i], &err_code)) {
|
||||
+ if (key_load(&keys[i], rot_key_pw, &err_code)) {
|
||||
/* Key loaded successfully */
|
||||
continue;
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
require tf-a-stm32mp2-common.inc
|
||||
require tf-a-tools.inc
|
||||
|
||||
SUMMARY = "Cert_create & Fiptool for fip generation for Trusted Firmware-A"
|
||||
LICENSE = "BSD-3-Clause"
|
||||
|
||||
# Select internal or Github TF-A repo
|
||||
TFA_URI_STASH = "${DIGI_MTK_GIT}/emp/arm-trusted-firmware.git;protocol=ssh"
|
||||
TFA_URI_GITHUB = "${DIGI_GITHUB_GIT}/arm-trusted-firmware.git;protocol=https"
|
||||
TFA_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${TFA_URI_STASH}', '${TFA_URI_GITHUB}', d)}"
|
||||
|
||||
SRCBRANCH = "v2.8/stm32mp/master"
|
||||
SRCREV = "${AUTOREV}"
|
||||
|
||||
SRC_URI = " \
|
||||
${TFA_GIT_URI};branch=${SRCBRANCH} \
|
||||
"
|
||||
|
||||
# Configure settings
|
||||
TFA_PLATFORM = "stm32mp1"
|
||||
TFA_PLATFORM:class-native = "stm32mp2"
|
||||
TFA_PLATFORM:class-nativesdk = "stm32mp2"
|
||||
|
|
@ -0,0 +1 @@
|
|||
export VIVANTE_SDK_DIR="%VIVANTE_SDK_DIR%"
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"file_format_version": "1.0.0",
|
||||
"ICD":
|
||||
{
|
||||
"library_path": "%VULKANLIB%",
|
||||
"api_version": "%VULKANVERSION%"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
require gcnano-userland.inc
|
||||
|
||||
LICENSE = "Proprietary"
|
||||
LIC_FILES_CHKSUM = "file://${GCNANO_TAR_FILENAME}/LICENSE;md5=0e85fa534ee3a1a7f5ccc65cd6e789f9"
|
||||
|
||||
DEPENDS += " libdrm wayland "
|
||||
|
||||
SRC_URI = "git://github.com/STMicroelectronics/gcnano-binaries;protocol=https;branch=gcnano-${GCNANO_VERSION}-binaries"
|
||||
SRCREV = "bbaae49a0e4859ed53f898a250269c8a237261bc"
|
||||
|
||||
PV = "${GCNANO_VERSION}+${GCNANO_DATE}"
|
||||
|
||||
GCNANO_VERSION = "6.4.15"
|
||||
|
||||
GCNANO_DATE:stm32mp1common = "20240206"
|
||||
GCNANO_DATE:stm32mp2common = "20240517"
|
||||
|
||||
GCNANO_PACKAGECONFIG = "egl gbm glesv1 glesv2 vg"
|
||||
|
||||
GCNANO_PACKAGECONFIG:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'openvx', 'vx', '', d)}"
|
||||
GCNANO_PACKAGECONFIG:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'opencl', 'cl', '', d)}"
|
||||
GCNANO_PACKAGECONFIG:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'vulkan', 'vulkan', '', d)}"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
B = "${S}/${GCNANO_TAR_FILENAME}"
|
||||
|
||||
#------------------------------------------
|
||||
# Overwrite of do_unpack to untar the tarball
|
||||
python() {
|
||||
# Make sure that we're dealing with recipe that enables externalsrc class
|
||||
if bb.data.inherits_class('externalsrc', d):
|
||||
bb.build.addtask('gcnano_userland_binaries_unpack', 'do_populate_lic', None, d)
|
||||
bb.build.addtask('gcnano_userland_binaries_unpack', 'do_configure', None, d)
|
||||
}
|
||||
|
||||
do_gcnano_userland_binaries_unpack[depends] += "xz-native:do_populate_sysroot"
|
||||
do_gcnano_userland_binaries_unpack() {
|
||||
cd ${S}
|
||||
rm -rf ${GCNANO_TAR_FILENAME}
|
||||
if [ -f "${GCNANO_TAR_FILENAME}.bin" ]; then
|
||||
sh ${GCNANO_TAR_FILENAME}.bin --auto-accept
|
||||
else
|
||||
bbfatal "Missing '${GCNANO_TAR_FILENAME}.bin' file in ${S} folder."
|
||||
fi
|
||||
}
|
||||
|
||||
do_unpack[depends] += "xz-native:do_populate_sysroot"
|
||||
python do_unpack() {
|
||||
eula = d.getVar('ACCEPT_EULA_'+d.getVar('MACHINE'))
|
||||
eula_file = d.getVar('EULA_FILE_ST')
|
||||
machine = d.getVar('MACHINE')
|
||||
pkg = d.getVar('PN')
|
||||
if eula == None:
|
||||
bb.fatal("To use '%s' you need to accept the STMicroelectronics EULA at '%s'. "
|
||||
"Please read it and in case you accept it, write: "
|
||||
"ACCEPT_EULA_%s = \"1\" in your local.conf." % (pkg, eula_file, machine))
|
||||
elif eula == '0':
|
||||
bb.fatal("To use '%s' you need to accept the STMicroelectronics EULA." % pkg)
|
||||
else:
|
||||
bb.note("STMicroelectronics EULA has been accepted for '%s'" % pkg)
|
||||
|
||||
try:
|
||||
externalsrc = d.getVar('EXTERNALSRC')
|
||||
if not externalsrc:
|
||||
bb.build.exec_func('base_do_unpack', d)
|
||||
bb.build.exec_func('do_gcnano_userland_binaries_unpack', d)
|
||||
except:
|
||||
raise
|
||||
}
|
||||
do_unpack[vardepsexclude] += "EULA_FILE_ST"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2022-2023, Digi International Inc.
|
||||
# Copyright (C) 2022,2023, Digi International Inc.
|
||||
|
||||
#
|
||||
# Workarounds for Crank storyboard engine
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
require gcnano-userland-binary.inc
|
||||
|
||||
SUMMARY = "Vivante libraries OpenGL ES, OpenVG and EGL (multi backend)"
|
||||
LICENSE = "Proprietary"
|
||||
|
||||
GCNANO_BACKEND = "multi"
|
||||
GCNANO_FLAVOUR = "release"
|
||||
|
||||
COMPATIBLE_MACHINE = "(ccmp2)"
|
||||
|
|
@ -0,0 +1,443 @@
|
|||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
GCNANO_PACKAGECONFIG ??= ""
|
||||
|
||||
PROVIDES = "\
|
||||
gcnano-userland \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'glesv1', 'virtual/libgles1', '', d)} \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'glesv2', 'virtual/libgles2', '', d)} \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'glesv2', 'virtual/libgles3', '', d)} \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'vg', 'virtual/libopenvg', '', d)} \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'vx', 'virtual/libopenvx', '', d)} \
|
||||
"
|
||||
|
||||
PACKAGES += "\
|
||||
gcnano-ldconf \
|
||||
libgal-gcnano libgal-gcnano-dev \
|
||||
\
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'cl', 'libopencl-gcnano libopencl-gcnano-dev', '', d)} \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'egl', 'libegl-gcnano libegl-gcnano-dev', '', d)} \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'gbm', 'libgbm-gcnano libgbm-gcnano-dev', '', d)} \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'glesv1', 'libgles1-gcnano libgles1-gcnano-dev', '', d)} \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'glesv2', 'libgles2-gcnano libgles2-gcnano-dev', '', d)} \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'glesv2', 'libgles3-gcnano-dev', '', d)} \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'vg', 'libopenvg-gcnano libopenvg-gcnano-dev', '', d)} \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'vulkan', 'libvulkan-driver-gcnano libvulkan-driver-gcnano-dev', '', d)} \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'vx', 'libopenvx-gcnano libopenvx-gcnano-dev', '', d)} \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'vx', 'libovxkernels-gcnano libovxkernels-gcnano-dev', '', d)} \
|
||||
\
|
||||
${@bb.utils.contains_any('GCNANO_PACKAGECONFIG', 'glesv1 glesv2 vg vulkan', 'libglslc-gcnano libglslc-gcnano-dev', '', d)} \
|
||||
${@bb.utils.contains_any('GCNANO_PACKAGECONFIG', 'cl vx', 'libclc-gcnano libclc-gcnano-dev', '', d)} \
|
||||
${@bb.utils.contains_any('GCNANO_PACKAGECONFIG', 'cl vulkan', 'libspirv-gcnano libspirv-gcnano-dev', '', d)} \
|
||||
"
|
||||
|
||||
GCNANO_BACKEND ??= "multi"
|
||||
GCNANO_VERSION ??= "6"
|
||||
GCNANO_DATE ??= ""
|
||||
|
||||
GCNANO_MACHINE:stm32mp1common = "stm32mp1"
|
||||
GCNANO_MACHINE:stm32mp2common = "stm32mp2"
|
||||
|
||||
# Init the gcnano build type
|
||||
GCNANO_FLAVOUR ??= "release"
|
||||
|
||||
# Init the gcnano tarball file name
|
||||
GCNANO_TAR_FILENAME ?= "gcnano-userland-${GCNANO_BACKEND}-${GCNANO_MACHINE}-${GCNANO_VERSION}-${GCNANO_DATE}"
|
||||
|
||||
# Configure gcnano output library dir
|
||||
GCNANO_USERLAND_OUTPUT_LIBDIR ??= "${libdir}"
|
||||
|
||||
GCNANO_USERLAND_LDCONF ?= "gcnano.conf"
|
||||
GCNANO_OPENCL_ICD ?= "VeriSilicon.icd"
|
||||
GCNANO_VULKAN_ICD ?= "VeriSilicon_icd.json"
|
||||
|
||||
# Configure the pkgconfig settings
|
||||
PKGCONFIG_DV ??= "23.0.3"
|
||||
PKGCONFIG_PREFIX ??= "${exec_prefix}"
|
||||
|
||||
do_compile:append() {
|
||||
# Generate specific conf file if required
|
||||
if [ "${GCNANO_USERLAND_OUTPUT_LIBDIR}" = "${libdir}" ]; then
|
||||
bbnote "gcnano-userland output libdir is default one (${libdir})"
|
||||
else
|
||||
bbnote "gcnano-userland output libdir set to ${GCNANO_USERLAND_OUTPUT_LIBDIR}: generate specific conf file for ldconfig"
|
||||
echo ${GCNANO_USERLAND_OUTPUT_LIBDIR} > ${B}/${GCNANO_USERLAND_LDCONF}
|
||||
fi
|
||||
}
|
||||
|
||||
# Install utility for gcano-userland:
|
||||
# gcnano_install_lib <LIBDIR> <LIBDIR_INSTALL> \
|
||||
# <INCDIR> <INCDIR_INSTALL> \
|
||||
# <PKGDIR> <PKGDIR_INSTALL>
|
||||
gcnano_install_lib() {
|
||||
# Init for lib dir install
|
||||
gcnano_libdir=$1
|
||||
gcnano_libdir_install=$2
|
||||
# Init for include dir install
|
||||
gcnano_incdir=$3
|
||||
gcnano_incdir_install=$4
|
||||
# Init for package config install
|
||||
gcnano_pkgdir=$5
|
||||
gcnano_pkgdir_install=$6
|
||||
|
||||
# Install libraries & headers
|
||||
install -m 0755 -d ${gcnano_libdir_install}
|
||||
install -m 0755 -d ${gcnano_incdir_install}
|
||||
|
||||
# Install libraries
|
||||
install -m 0555 ${gcnano_libdir}/libGAL.so ${gcnano_libdir_install}/
|
||||
install -m 0555 ${gcnano_libdir}/libVSC.so ${gcnano_libdir_install}/
|
||||
# Install includes
|
||||
install -m 0755 -d ${gcnano_incdir_install}/KHR
|
||||
install -m 0644 ${gcnano_incdir}/KHR/* ${gcnano_incdir_install}/KHR
|
||||
|
||||
# Install compiler libraries when needed
|
||||
needs_clc="false"
|
||||
needs_glslc="false"
|
||||
needs_spirv="false"
|
||||
|
||||
for lib in ${GCNANO_PACKAGECONFIG}; do
|
||||
case ${lib} in
|
||||
"cl")
|
||||
# Install libraries
|
||||
find ${gcnano_libdir}/* -type f -name libOpenCL*.so.* -exec install -m 0555 '{}' ${gcnano_libdir_install}/ \;
|
||||
# Request CLC and SPIR-V
|
||||
needs_clc="true"
|
||||
needs_spirv="true"
|
||||
;;
|
||||
"egl")
|
||||
# Install libraries
|
||||
find ${gcnano_libdir}/* -type f -name libEGL.so.* -exec install -m 0555 '{}' ${gcnano_libdir_install}/ \;
|
||||
# Install includes
|
||||
install -m 0755 -d ${gcnano_incdir_install}/EGL
|
||||
install -m 0644 ${gcnano_incdir}/EGL/* ${gcnano_incdir_install}/EGL
|
||||
# Install pkgconfig
|
||||
install -m 0755 -d ${gcnano_pkgdir_install}
|
||||
install -m 0644 ${gcnano_pkgdir}/egl.pc ${gcnano_pkgdir_install}/
|
||||
;;
|
||||
"gbm")
|
||||
# Install libraries
|
||||
find ${gcnano_libdir}/* -type f -name libgbm.so.* -exec install -m 0555 '{}' ${gcnano_libdir_install}/ \;
|
||||
install -m 0755 ${gcnano_libdir}/libgbm_viv.so ${gcnano_libdir_install}/
|
||||
# Install includes
|
||||
install -m 0755 -d ${gcnano_incdir_install}
|
||||
install -m 0644 ${gcnano_incdir}/gbm.h ${gcnano_incdir_install}/
|
||||
# Install pkgconfig
|
||||
install -m 0755 -d ${gcnano_pkgdir_install}
|
||||
install -m 644 ${gcnano_pkgdir}/gbm.pc ${gcnano_pkgdir_install}/
|
||||
;;
|
||||
"glesv1")
|
||||
# Install libraries
|
||||
find ${gcnano_libdir}/* -type f -name libGLESv1_CM.so.* -exec install -m 0555 '{}' ${gcnano_libdir_install}/ \;
|
||||
# Install includes
|
||||
install -m 0755 -d ${gcnano_incdir_install}/GLES
|
||||
install -m 0644 ${gcnano_incdir}/GLES/* ${gcnano_incdir_install}/GLES
|
||||
# Install pkgconfig
|
||||
install -m 0755 -d ${gcnano_pkgdir_install}
|
||||
install -m 644 ${gcnano_pkgdir}/glesv1_cm.pc ${gcnano_pkgdir_install}/
|
||||
# Request GLSLC
|
||||
needs_glslc="true"
|
||||
;;
|
||||
"glesv2")
|
||||
# Install libraries
|
||||
find ${gcnano_libdir}/* -type f -name libGLESv2.so.* -exec install -m 0555 '{}' ${gcnano_libdir_install}/ \;
|
||||
# Install includes GLESv2 and GLESv3
|
||||
install -m 0755 -d ${gcnano_incdir_install}/GLES2
|
||||
install -m 0644 ${gcnano_incdir}/GLES2/* ${gcnano_incdir_install}/GLES2
|
||||
# Hack for weston & kmscube compilation
|
||||
# Weston and kmscube use GLES3 header but the decision to use gles2 or gles3
|
||||
# are made a runtime
|
||||
install -m 0755 -d ${gcnano_incdir_install}/GLES3
|
||||
install -m 0644 ${gcnano_incdir}/GLES3/* ${gcnano_incdir_install}/GLES3
|
||||
# Install pkgconfig
|
||||
install -m 0755 -d ${gcnano_pkgdir_install}
|
||||
install -m 644 ${gcnano_pkgdir}/glesv2.pc ${gcnano_pkgdir_install}/
|
||||
# Request GLSLC
|
||||
needs_glslc="true"
|
||||
;;
|
||||
"vulkan")
|
||||
# Install libraries
|
||||
find ${gcnano_libdir}/* -type f -name libvulkan*.so* -exec install -m 0555 '{}' ${gcnano_libdir_install}/ \;
|
||||
# Request GLSLC and SPIR-V
|
||||
needs_glslc="true"
|
||||
needs_spirv="true"
|
||||
;;
|
||||
"vg")
|
||||
# Install libraries
|
||||
find ${gcnano_libdir}/* -type f -name libOpenVG*.so.* -exec install -m 0555 '{}' ${gcnano_libdir_install}/ \;
|
||||
# Install includes
|
||||
install -m 0755 -d ${gcnano_incdir_install}/VG
|
||||
install -m 0644 ${gcnano_incdir}/VG/* ${gcnano_incdir_install}/VG
|
||||
# Install pkgconfig
|
||||
install -m 0755 -d ${gcnano_pkgdir_install}
|
||||
install -m 644 ${gcnano_pkgdir}/vg.pc ${gcnano_pkgdir_install}/
|
||||
# Request GLSLC
|
||||
needs_glslc="true"
|
||||
;;
|
||||
"vx")
|
||||
# Install libraries
|
||||
find ${gcnano_libdir}/* -type f -name libOpenVX*.so* -exec install -m 0555 '{}' ${gcnano_libdir_install}/ \;
|
||||
install -m 0555 ${gcnano_libdir}/libArchModelSw.so ${gcnano_libdir_install}/
|
||||
install -m 0555 ${gcnano_libdir}/libNNArchPerf.so ${gcnano_libdir_install}/
|
||||
install -m 0555 ${gcnano_libdir}/libovxlib.so ${gcnano_libdir_install}/
|
||||
install -m 0555 ${gcnano_libdir}/libNNGPUBinary.so ${gcnano_libdir_install}/
|
||||
install -m 0555 ${gcnano_libdir}/libNNVXCBinary.so ${gcnano_libdir_install}/
|
||||
install -m 0555 ${gcnano_libdir}/libOvx12VXCBinary.so ${gcnano_libdir_install}/
|
||||
install -m 0555 ${gcnano_libdir}/libOvxGPUVXCBinary.so ${gcnano_libdir_install}/
|
||||
# Install includes
|
||||
install -m 0755 -d ${gcnano_incdir_install}/VX
|
||||
install -m 0644 ${gcnano_incdir}/VX/* ${gcnano_incdir_install}/VX
|
||||
# Request CLC
|
||||
needs_clc="true"
|
||||
# To allow building OpenVX kernel program from OpenCL kernel source code,
|
||||
# cl_viv_vx_ext.h must be installed at runtime
|
||||
install -m 0755 -d ${gcnano_incdir_install}/CL
|
||||
install -m 644 ${gcnano_incdir}/CL/cl_viv_vx_ext.h ${gcnano_incdir_install}/CL
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Install libCLC
|
||||
if [ "${needs_clc}" = "true" ]; then
|
||||
find ${gcnano_libdir}/* -type f -name libCLC.so -exec install -m 0555 '{}' ${gcnano_libdir_install}/ \;
|
||||
fi
|
||||
|
||||
# Install libGLSLC
|
||||
if [ "${needs_glslc}" = "true" ]; then
|
||||
find ${gcnano_libdir}/* -type f -name libGLSLC.so -exec install -m 0555 '{}' ${gcnano_libdir_install}/ \;
|
||||
fi
|
||||
|
||||
# Install libSPIRV
|
||||
if [ "${needs_spirv}" = "true" ]; then
|
||||
find ${gcnano_libdir}/* -type f -name libSPIRV_viv.so -exec install -m 0555 '{}' ${gcnano_libdir_install}/ \;
|
||||
fi
|
||||
}
|
||||
|
||||
# Install utility for gcano-userland:
|
||||
# gcnano_install_symlinks <LIBDIR> <LIBDIR_INSTALL>
|
||||
#
|
||||
# Iterate other installed libraries and create appropriate symlinks if they
|
||||
# don't exist as symlink or real library at that location.
|
||||
# For well-formed library with ABI suffix, create a SONAME-suffixed symlink
|
||||
# and dev-.so-only symlink.
|
||||
# For .so-only installed library, only create dev-.so-only symlink.
|
||||
gcnano_install_symlinks() {
|
||||
# Init for lib dir install
|
||||
gcnano_libdir=$1
|
||||
gcnano_lib_symlink_dir_install=$2
|
||||
|
||||
bbnote "Create symlinks to shared libs in ${gcnano_lib_symlink_dir_install} folder (mandatory for SDK)"
|
||||
# Init relative path for symlinks
|
||||
relative_path=$(realpath -m --relative-to=${gcnano_lib_symlink_dir_install} ${gcnano_libdir})
|
||||
# Move to gcnano_lib_symlink_dir_install for symlinks
|
||||
cd "${gcnano_lib_symlink_dir_install}"
|
||||
for sharelib in $(find ${gcnano_libdir}/ -type f -name "*.so*"); do
|
||||
# Get full libname
|
||||
sharelib_name=$(basename ${sharelib})
|
||||
# Get base libname
|
||||
dev_lib_name=$(echo ${sharelib_name} | awk -F'.so' '{print $1}').so
|
||||
# Get SONAME
|
||||
soname_lib_name=$(objdump -x ${sharelib} 2>/dev/null | grep SONAME | awk -F' ' '{print $NF}')
|
||||
# Create symlink
|
||||
for link_name in ${soname_lib_name} ${dev_lib_name}; do
|
||||
if [ -e "${link_name}" ]; then
|
||||
bbnote "Already existing share lib: ${link_name}. No symlink created in ${gcnano_lib_symlink_dir_install}."
|
||||
elif [ ! -e "${relative_path}/${sharelib_name}" ]; then
|
||||
bbnote "Not able to find share lib: ${relative_path}/${sharelib_name}. No symlink created in ${gcnano_lib_symlink_dir_install}."
|
||||
else
|
||||
ln -sf ${relative_path}/${sharelib_name} ${link_name}
|
||||
fi
|
||||
done
|
||||
done
|
||||
cd "${PWD}"
|
||||
}
|
||||
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||
SRC_URI:append = " ${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'vulkan', 'file://vulkan_icd.json.template', '', d)}"
|
||||
SRC_URI:append = " ${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'vx', 'file://openvx_profile.sh.template', '', d)}"
|
||||
|
||||
do_install() {
|
||||
# Update pkgconfig files info
|
||||
for pkg_file in $(find ${B}/pkgconfig/* -type f -name *.pc); do
|
||||
sed -e "s;#PREFIX#;${PKGCONFIG_PREFIX};g" -e "s;#VERSION#;${PKGCONFIG_DV};g" -i ${pkg_file}
|
||||
done
|
||||
|
||||
# Install gcnano libraries
|
||||
gcnano_install_lib "${B}/${GCNANO_FLAVOUR}/drivers" "${D}${GCNANO_USERLAND_OUTPUT_LIBDIR}" \
|
||||
"${B}/${GCNANO_FLAVOUR}/include" "${D}${includedir}" \
|
||||
"${B}/pkgconfig" "${D}${libdir}/pkgconfig"
|
||||
|
||||
# Manage creation of additional development symlinks to solve missing libs issue on SDK side
|
||||
gcnano_install_symlinks "${D}${GCNANO_USERLAND_OUTPUT_LIBDIR}" "${D}${libdir}"
|
||||
|
||||
if [ -s "${B}/${GCNANO_USERLAND_LDCONF}" ]; then
|
||||
install -d ${D}${sysconfdir}/ld.so.conf.d/
|
||||
install -m 0644 "${B}/${GCNANO_USERLAND_LDCONF}" ${D}${sysconfdir}/ld.so.conf.d/
|
||||
fi
|
||||
|
||||
# Generate OpenCL ICD
|
||||
if [ -n "$(echo ${GCNANO_PACKAGECONFIG} | grep 'cl')" ]; then
|
||||
install -m 0755 -d "${D}${sysconfdir}/OpenCL/vendors"
|
||||
find "${D}${GCNANO_USERLAND_OUTPUT_LIBDIR}" -type f -name "libOpenCL*.so*" | sed s"%${D}%%" > "${D}${sysconfdir}/OpenCL/vendors/${GCNANO_OPENCL_ICD}"
|
||||
fi
|
||||
|
||||
# Generate Vulkan ICD
|
||||
if [ -n "$(echo ${GCNANO_PACKAGECONFIG} | grep 'vulkan')" ]; then
|
||||
vklib=$(find "${D}${GCNANO_USERLAND_OUTPUT_LIBDIR}" -type f -name "libvulkan*.so*" | sed s"%${D}%%")
|
||||
vkvers=$(echo ${vklib} | awk -F'.so.' '{print $2}')
|
||||
|
||||
install -m 0755 -d "${D}${sysconfdir}/vulkan/icd.d"
|
||||
sed -e "s#%VULKANLIB%#${vklib}#" -e "s#%VULKANVERSION%#${vkvers}#" ${WORKDIR}/vulkan_icd.json.template > ${D}${sysconfdir}/vulkan/icd.d/${GCNANO_VULKAN_ICD}
|
||||
fi
|
||||
|
||||
# Install profile script to export required environment variables to allow OpenVX kernel program
|
||||
# to be built at runtime
|
||||
if [ -n "$(echo ${GCNANO_PACKAGECONFIG} | grep 'vx')" ]; then
|
||||
install -m 0755 -d "${D}${sysconfdir}/profile.d"
|
||||
sed "s#%VIVANTE_SDK_DIR%#${exec_prefix}#" ${WORKDIR}/openvx_profile.sh.template > ${D}${sysconfdir}/profile.d/openvx_profile.sh
|
||||
fi
|
||||
}
|
||||
|
||||
SYSROOT_DIRS:append = " ${GCNANO_USERLAND_OUTPUT_LIBDIR}"
|
||||
|
||||
# For the packages that make up the OpenGL interfaces, inject variables so that
|
||||
# they don't get Debian-renamed (which would remove the -gcnano suffix), and
|
||||
# RPROVIDEs/RCONFLICTs on the generic libgl name.
|
||||
python __anonymous() {
|
||||
pkgconfig = (d.getVar('GCNANO_PACKAGECONFIG') or "").split()
|
||||
for p in (("gbm", "libgbm",),
|
||||
("egl", "libegl", "libegl1"),
|
||||
("glesv1", "libgles1", "libglesv1-cm1"),
|
||||
("glesv2", "libgles2", "libglesv2-2"),
|
||||
("glesv2", "libgles3"),
|
||||
("vg", "libopenvg"),
|
||||
("vx", "libopenvx"),
|
||||
("cl", "libopencl"),
|
||||
("vulkan", "libvulkan-driver")):
|
||||
if not p[0] in pkgconfig:
|
||||
continue
|
||||
|
||||
pkgs = d.getVar('PACKAGES').split()
|
||||
|
||||
fullp = p[1] + "-gcnano"
|
||||
if fullp in pkgs:
|
||||
rpkgs = " ".join(p[1:])
|
||||
d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
|
||||
d.appendVar("RREPLACES:" + fullp, rpkgs)
|
||||
d.appendVar("RPROVIDES:" + fullp, rpkgs)
|
||||
d.appendVar("RCONFLICTS:" + fullp, rpkgs)
|
||||
if d.getVar("GCNANO_USERLAND_OUTPUT_LIBDIR") != d.getVar("libdir"):
|
||||
d.appendVar("RDEPENDS:" + fullp, " gcnano-ldconf")
|
||||
|
||||
# For -dev, the first element is both the Debian and original name
|
||||
fullp += "-dev"
|
||||
if fullp in pkgs:
|
||||
rpkgs = " ".join([f"{q}-dev" for q in p[1:]])
|
||||
d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
|
||||
d.appendVar("RREPLACES:" + fullp, rpkgs)
|
||||
d.appendVar("RPROVIDES:" + fullp, rpkgs)
|
||||
d.appendVar("RCONFLICTS:" + fullp, rpkgs)
|
||||
}
|
||||
|
||||
# EGL, GLESv1, GLESv2 and VG run-time packages embed lib*.so to allow
|
||||
# GPU stack to run properly
|
||||
# NOTE: it's mandatory to libEGL.so, libGLESv2.so and libOpenVG.so availabale on filesystem
|
||||
# because gcnano userland library try to make a dlopen on this library (with specific .so extension)
|
||||
FILES:${PN} = ""
|
||||
FILES:gcnano-ldconf = "${sysconfdir}/ld.so.conf.d/*"
|
||||
FILES:libgal-gcnano = "${GCNANO_USERLAND_OUTPUT_LIBDIR}/libGAL.so"
|
||||
FILES:libgal-gcnano += "${GCNANO_USERLAND_OUTPUT_LIBDIR}/libVSC.so"
|
||||
FILES:libegl-gcnano = "${GCNANO_USERLAND_OUTPUT_LIBDIR}/libEGL.so.* ${libdir}/libEGL.so*"
|
||||
FILES:libgbm-gcnano = "${GCNANO_USERLAND_OUTPUT_LIBDIR}/libgbm.so.* ${libdir}/libgbm.so.*"
|
||||
FILES:libgbm-gcnano += "${GCNANO_USERLAND_OUTPUT_LIBDIR}/libgbm_viv.so"
|
||||
FILES:libgles1-gcnano = "${GCNANO_USERLAND_OUTPUT_LIBDIR}/libGLESv1_CM.so.* ${libdir}/libGLESv1_CM.so*"
|
||||
FILES:libgles2-gcnano = "${GCNANO_USERLAND_OUTPUT_LIBDIR}/libGLESv2.so.* ${libdir}/libGLESv2.so*"
|
||||
FILES:libopenvg-gcnano = "${GCNANO_USERLAND_OUTPUT_LIBDIR}/libOpenVG.so.* ${libdir}/libOpenVG.so*"
|
||||
FILES:libopenvx-gcnano = "${GCNANO_USERLAND_OUTPUT_LIBDIR}/libOpenVX*.so* ${libdir}/libOpenVX.so.*"
|
||||
FILES:libopenvx-gcnano += "${GCNANO_USERLAND_OUTPUT_LIBDIR}/libArchModelSw.so"
|
||||
FILES:libopenvx-gcnano += "${GCNANO_USERLAND_OUTPUT_LIBDIR}/libNNArchPerf.so"
|
||||
FILES:libopenvx-gcnano += "${GCNANO_USERLAND_OUTPUT_LIBDIR}/libovxlib.so"
|
||||
FILES:libopenvx-gcnano += "${includedir}/CL/cl_viv_vx_ext.h ${sysconfdir}/profile.d/*"
|
||||
FILES:libovxkernels-gcnano += "${GCNANO_USERLAND_OUTPUT_LIBDIR}/libNNGPUBinary.so"
|
||||
FILES:libovxkernels-gcnano += "${GCNANO_USERLAND_OUTPUT_LIBDIR}/libNNVXCBinary.so"
|
||||
FILES:libovxkernels-gcnano += "${GCNANO_USERLAND_OUTPUT_LIBDIR}/libOvx12VXCBinary.so"
|
||||
FILES:libovxkernels-gcnano += "${GCNANO_USERLAND_OUTPUT_LIBDIR}/libOvxGPUVXCBinary.so"
|
||||
FILES:libopencl-gcnano = "${GCNANO_USERLAND_OUTPUT_LIBDIR}/libOpenCL_VSI.so.* ${libdir}/libOpenCL_VSI.so.*"
|
||||
FILES:libopencl-gcnano += "${sysconfdir}/OpenCL/vendors/*"
|
||||
FILES:libvulkan-driver-gcnano = "${GCNANO_USERLAND_OUTPUT_LIBDIR}/libvulkan_VSI.so.* ${libdir}/libvulkan_VSI.so.*"
|
||||
FILES:libvulkan-driver-gcnano += "${sysconfdir}/vulkan/icd.d/*"
|
||||
FILES:libglslc-gcnano = "${GCNANO_USERLAND_OUTPUT_LIBDIR}/libGLSLC.so"
|
||||
FILES:libclc-gcnano = "${GCNANO_USERLAND_OUTPUT_LIBDIR}/libCLC.so"
|
||||
FILES:libspirv-gcnano = "${GCNANO_USERLAND_OUTPUT_LIBDIR}/libSPIRV_viv.so"
|
||||
|
||||
FILES:${PN}-dev = ""
|
||||
FILES:libgal-gcnano-dev = "${libdir}/libGAL.so ${libdir}/libVSC.so"
|
||||
FILES:libegl-gcnano-dev = "${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc"
|
||||
FILES:libgbm-gcnano-dev = "${libdir}/libgbm.so ${libdir}/libgbm_viv.so ${includedir}/gbm.h ${libdir}/pkgconfig/gbm.pc"
|
||||
FILES:libgles1-gcnano-dev = "${includedir}/GLES ${libdir}/pkgconfig/glesv1_cm.pc"
|
||||
FILES:libgles2-gcnano-dev = "${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc"
|
||||
FILES:libopenvg-gcnano-dev = "${includedir}/VG ${libdir}/pkgconfig/vg.pc"
|
||||
FILES:libgles3-gcnano-dev = "${includedir}/GLES3"
|
||||
FILES:libopenvg-gcnano-dev = "${includedir}/VG ${libdir}/pkgconfig/vg.pc"
|
||||
FILES:libopenvx-gcnano-dev = "${libdir}/libOpenVX.so ${libdir}/libOpenVXU.so ${includedir}/VX"
|
||||
FILES:libopenvx-gcnano-dev += "${libdir}/libArchModelSw.so"
|
||||
FILES:libopenvx-gcnano-dev += "${libdir}/libNNArchPerf.so"
|
||||
FILES:libopenvx-gcnano-dev += "${libdir}/libovxlib.so"
|
||||
FILES:libovxkernels-gcnano-dev += "${libdir}/libNNGPUBinary.so"
|
||||
FILES:libovxkernels-gcnano-dev += "${libdir}/libNNVXCBinary.so"
|
||||
FILES:libovxkernels-gcnano-dev += "${libdir}/libOvx12VXCBinary.so"
|
||||
FILES:libovxkernels-gcnano-dev += "${libdir}/libOvxGPUVXCBinary.so"
|
||||
FILES:libopencl-gcnano-dev = "${libdir}/libOpenCL_VSI.so"
|
||||
FILES:libvulkan-driver-gcnano-dev = "${libdir}/libvulkan_VSI.so"
|
||||
FILES:libglslc-gcnano-dev = "${libdir}/libGLSLC.so"
|
||||
FILES:libclc-gcnano-dev += "${libdir}/libCLC.so"
|
||||
FILES:libspirv-gcnano-dev = "${libdir}/libSPIRV_viv.so"
|
||||
|
||||
# Set gcnano-userland package with runtime dependencies on all packages
|
||||
RDEPENDS:${PN} += "\
|
||||
libgal-gcnano \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'egl', 'libegl-gcnano', '', d)} \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'gbm', 'libgbm-gcnano', '', d)} \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'glesv1', 'libgles1-gcnano', '', d)} \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'glesv2', 'libgles2-gcnano', '', d)} \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'vg', 'libopenvg-gcnano', '', d)} \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'cl', 'libopencl-gcnano', '', d)} \
|
||||
${@bb.utils.contains('GCNANO_PACKAGECONFIG', 'vulkan', 'libvulkan-driver-gcnano', '', d)} \
|
||||
"
|
||||
|
||||
RDEPENDS:libgles1-gcnano += "libglslc-gcnano"
|
||||
RDEPENDS:libgles2-gcnano += "libglslc-gcnano"
|
||||
RDEPENDS:libopenvg-gcnano += "libglslc-gcnano"
|
||||
|
||||
RDEPENDS:libopencl-gcnano += "libclc-gcnano libspirv-gcnano"
|
||||
RDEPENDS:libopenvx-gcnano += "libclc-gcnano libovxkernels-gcnano"
|
||||
RDEPENDS:libvulkan-driver-gcnano += "libglslc-gcnano libspirv-gcnano"
|
||||
|
||||
RDEPENDS:libgles2-gcnano-dev += "libgles3-gcnano-dev"
|
||||
|
||||
# Generate empty gcnano-userland package to install all dependencies
|
||||
ALLOW_EMPTY:${PN} = "1"
|
||||
|
||||
# Avoid QA Issue: No GNU_HASH in the elf binary
|
||||
INSANE_SKIP:libgal-gcnano += "ldflags"
|
||||
INSANE_SKIP:libegl-gcnano += "ldflags"
|
||||
INSANE_SKIP:libgbm-gcnano += "ldflags"
|
||||
INSANE_SKIP:libgles1-gcnano += "ldflags"
|
||||
INSANE_SKIP:libgles2-gcnano += "ldflags"
|
||||
INSANE_SKIP:libopenvg-gcnano += "ldflags"
|
||||
INSANE_SKIP:libopenvx-gcnano += "ldflags"
|
||||
INSANE_SKIP:libovxkernels-gcnano += "ldflags"
|
||||
INSANE_SKIP:libclc-gcnano += "ldflags"
|
||||
INSANE_SKIP:libopencl-gcnano += "ldflags"
|
||||
INSANE_SKIP:libvulkan-driver-gcnano += "ldflags"
|
||||
INSANE_SKIP:libglslc-gcnano += "ldflags"
|
||||
INSANE_SKIP:libspirv-gcnano += "ldflags"
|
||||
|
||||
# Avoid QA Issue: non -dev/-dbg/nativesdk- package contains symlink .so
|
||||
INSANE_SKIP:libegl-gcnano += "dev-so"
|
||||
INSANE_SKIP:libgles1-gcnano += "dev-so"
|
||||
INSANE_SKIP:libgles2-gcnano += "dev-so"
|
||||
INSANE_SKIP:libopenvg-gcnano += "dev-so"
|
||||
INSANE_SKIP:libopenvx-gcnano += "dev-so"
|
||||
|
|
@ -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>
|
||||
|
|
@ -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__'
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
require mesa.inc
|
||||
|
||||
SUMMARY += " (OpenGL only, no EGL/GLES)"
|
||||
|
||||
PROVIDES = "virtual/libgl virtual/mesa"
|
||||
|
||||
S = "${WORKDIR}/mesa-${PV}"
|
||||
|
||||
TARGET_CFLAGS = "-I${STAGING_INCDIR}/drm"
|
||||
|
||||
# At least one DRI rendering engine is required to build mesa.
|
||||
# When no X11 is available, use osmesa for the rendering engine.
|
||||
PACKAGECONFIG ??= "opengl gallium ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa', d)}"
|
||||
PACKAGECONFIG:class-target = "opengl gallium ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa', d)}"
|
||||
|
||||
COMPATIBLE_MACHINE = "(ccmp2)"
|
||||
|
|
@ -0,0 +1,353 @@
|
|||
SUMMARY = "A free implementation of the OpenGL API"
|
||||
DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - \
|
||||
a system for rendering interactive 3D graphics. \
|
||||
A variety of device drivers allows Mesa to be used in many different environments \
|
||||
ranging from software emulation to complete hardware acceleration for modern GPUs. \
|
||||
Mesa is used as part of the overall Direct Rendering Infrastructure and X.org \
|
||||
environment."
|
||||
|
||||
HOMEPAGE = "http://mesa3d.org"
|
||||
BUGTRACKER = "https://bugs.freedesktop.org"
|
||||
SECTION = "x11"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://docs/license.rst;md5=63779ec98d78d823a9dc533a0735ef10"
|
||||
|
||||
PE = "2"
|
||||
|
||||
SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
|
||||
file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
|
||||
file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "386362a5d80df3b096636b67f340e1ce67b705b44767d5bdd11d2ed1037192d5"
|
||||
|
||||
UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
|
||||
|
||||
#because we cannot rely on the fact that all apps will use pkgconfig,
|
||||
#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
|
||||
do_install:append() {
|
||||
# sed can't find EGL/eglplatform.h as it doesn't get installed when glvnd enabled.
|
||||
# So, check if EGL/eglplatform.h exists before running sed.
|
||||
if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)} && [ -f ${D}${includedir}/EGL/eglplatform.h ]; then
|
||||
sed -i -e 's/^#elif defined(__unix__) && defined(EGL_NO_X11)$/#elif defined(__unix__) \&\& defined(EGL_NO_X11) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
|
||||
fi
|
||||
}
|
||||
|
||||
DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native"
|
||||
EXTRANATIVEPATH += "chrpath-native"
|
||||
PROVIDES = " \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'glvnd', 'virtual/libglx', '', d)} \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2 virtual/libgles3', '', d)} \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \
|
||||
virtual/mesa \
|
||||
"
|
||||
|
||||
inherit meson pkgconfig python3native gettext features_check
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
ANY_OF_DISTRO_FEATURES = "opengl vulkan"
|
||||
|
||||
PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)}"
|
||||
|
||||
MESA_LLVM_RELEASE ?= ""
|
||||
|
||||
# set the MESA_BUILD_TYPE to either 'release' (default) or 'debug'
|
||||
# by default the upstream mesa sources build a debug release
|
||||
# here we assume the user will want a release build by default
|
||||
MESA_BUILD_TYPE ?= "release"
|
||||
def check_buildtype(d):
|
||||
_buildtype = d.getVar('MESA_BUILD_TYPE')
|
||||
if _buildtype not in ['release', 'debug']:
|
||||
bb.fatal("unknown build type (%s), please set MESA_BUILD_TYPE to either 'release' or 'debug'" % _buildtype)
|
||||
if _buildtype == 'debug':
|
||||
return 'debugoptimized'
|
||||
return 'plain'
|
||||
MESON_BUILDTYPE = "${@check_buildtype(d)}"
|
||||
|
||||
EXTRA_OEMESON = " \
|
||||
-Dshared-glapi=enabled \
|
||||
-Dglx-read-only-text=true \
|
||||
-Dplatforms='${@",".join("${PLATFORMS}".split())}' \
|
||||
"
|
||||
|
||||
def strip_comma(s):
|
||||
return s.strip(',')
|
||||
|
||||
PACKAGECONFIG = " \
|
||||
gallium \
|
||||
${@bb.utils.filter('DISTRO_FEATURES', 'x11 vulkan wayland', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm virgl', '', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'dri3', '', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 'zink', '', d)} \
|
||||
${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'video-codecs', '', d)} \
|
||||
"
|
||||
|
||||
PACKAGECONFIG:append:class-native = "gallium-llvm r600"
|
||||
|
||||
# "gbm" requires "opengl"
|
||||
PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled"
|
||||
|
||||
X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr"
|
||||
# "x11" requires "opengl"
|
||||
PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}"
|
||||
PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols"
|
||||
|
||||
PACKAGECONFIG[dri3] = "-Ddri3=enabled, -Ddri3=disabled, xorgproto libxshmfence"
|
||||
|
||||
# Vulkan drivers need dri3 enabled
|
||||
# amd could be enabled as well but requires gallium-llvm with llvm >= 3.9
|
||||
VULKAN_DRIVERS = ""
|
||||
VULKAN_DRIVERS:append:x86 = ",intel"
|
||||
VULKAN_DRIVERS:append:x86-64 = ",intel"
|
||||
# i686 is a 32 bit override for mesa-native
|
||||
VULKAN_DRIVERS:append:i686 = ",intel"
|
||||
VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
|
||||
VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'broadcom', ',broadcom', '', d)}"
|
||||
PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers"
|
||||
|
||||
# mesa development and testing tools support, per driver
|
||||
TOOLS = ""
|
||||
TOOLS_DEPS = ""
|
||||
TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
|
||||
TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
|
||||
TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
|
||||
TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}"
|
||||
|
||||
# dependencies for tools.
|
||||
TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ncurses libxml2 ', '', d)}"
|
||||
|
||||
# the fdperf tool requires libconfig (a part of meta-oe) so it needs special
|
||||
# treatment in addition to the usual 'freedreno tools'.
|
||||
PACKAGECONFIG[freedreno-fdperf] = ",,libconfig"
|
||||
|
||||
PACKAGECONFIG[tools] = "-Dtools=${@strip_comma('${TOOLS}')}, -Dtools='', ${TOOLS_DEPS}"
|
||||
|
||||
PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false"
|
||||
PACKAGECONFIG[glvnd] = "-Dglvnd=true, -Dglvnd=false, libglvnd"
|
||||
|
||||
# "gles" requires "opengl"
|
||||
PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2=disabled"
|
||||
|
||||
# "egl" requires "opengl"
|
||||
PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
|
||||
|
||||
# "opencl" requires libclc from meta-clang and spirv-tools from OE-Core
|
||||
OPENCL_NATIVE = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', '-Dopencl-native=true', '', d)}"
|
||||
PACKAGECONFIG[opencl] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools"
|
||||
|
||||
PACKAGECONFIG[broadcom] = ""
|
||||
PACKAGECONFIG[etnaviv] = ""
|
||||
PACKAGECONFIG[freedreno] = ""
|
||||
PACKAGECONFIG[kmsro] = ""
|
||||
PACKAGECONFIG[vc4] = ""
|
||||
PACKAGECONFIG[v3d] = ""
|
||||
PACKAGECONFIG[zink] = ""
|
||||
|
||||
GALLIUMDRIVERS = "swrast"
|
||||
# gallium swrast was found to crash Xorg on startup in x32 qemu
|
||||
GALLIUMDRIVERS:x86-x32 = ""
|
||||
GALLIUMDRIVERS:append:x86 = ",i915,iris,crocus"
|
||||
GALLIUMDRIVERS:append:x86-64 = ",i915,iris,crocus"
|
||||
# i686 is a 32 bit override for mesa-native
|
||||
GALLIUMDRIVERS:append:i686 = ",i915,iris,crocus"
|
||||
|
||||
GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
|
||||
GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
|
||||
GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'kmsro', ',kmsro', '', d)}"
|
||||
GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'vc4', ',vc4', '', d)}"
|
||||
GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'v3d', ',v3d', '', d)}"
|
||||
GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'zink', ',zink', '', d)}"
|
||||
|
||||
# radeonsi requires LLVM
|
||||
GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}"
|
||||
GALLIUMDRIVERS_LLVM = "r300,nouveau${GALLIUMDRIVERS_RADEONSI}"
|
||||
GALLIUMDRIVERS_LLVM:append:x86 = ",svga"
|
||||
GALLIUMDRIVERS_LLVM:append:x86-64 = ",svga"
|
||||
# i686 is a 32 bit override for mesa-native
|
||||
GALLIUMDRIVERS_LLVM:append:i686 = ",svga"
|
||||
|
||||
PACKAGECONFIG[r600] = ""
|
||||
PACKAGECONFIG[virgl] = ""
|
||||
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'virgl', ',virgl', '', d)}"
|
||||
|
||||
PACKAGECONFIG[gallium] = "-Dgallium-drivers=${@strip_comma('${GALLIUMDRIVERS}')}, -Dgallium-drivers='', libdrm"
|
||||
PACKAGECONFIG[gallium-llvm] = "-Dllvm=enabled -Dshared-llvm=enabled, -Dllvm=disabled, llvm${MESA_LLVM_RELEASE} llvm-native \
|
||||
elfutils"
|
||||
PACKAGECONFIG[xa] = "-Dgallium-xa=enabled, -Dgallium-xa=disabled"
|
||||
PACKAGECONFIG[va] = "-Dgallium-va=enabled,-Dgallium-va=disabled,libva-initial"
|
||||
|
||||
PACKAGECONFIG[vdpau] = "-Dgallium-vdpau=enabled,-Dgallium-vdpau=disabled,libvdpau"
|
||||
|
||||
PACKAGECONFIG[lima] = ""
|
||||
GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
|
||||
|
||||
PACKAGECONFIG[panfrost] = ""
|
||||
GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}"
|
||||
|
||||
PACKAGECONFIG[vulkan-beta] = "-Dvulkan-beta=true,-Dvulkan-beta=false"
|
||||
|
||||
PACKAGECONFIG[osmesa] = "-Dosmesa=true,-Dosmesa=false"
|
||||
|
||||
PACKAGECONFIG[perfetto] = "-Dperfetto=true,-Dperfetto=false,libperfetto"
|
||||
|
||||
PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind"
|
||||
|
||||
PACKAGECONFIG[lmsensors] = "-Dlmsensors=enabled,-Dlmsensors=disabled,lmsensors"
|
||||
|
||||
VIDEO_CODECS = "vc1dec,h264dec,h264enc,h265dec,h265enc"
|
||||
PACKAGECONFIG[video-codecs] = "-Dvideo-codecs=${@strip_comma('${VIDEO_CODECS}')}, -Dvideo-codecs=''"
|
||||
|
||||
# llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
|
||||
FULL_OPTIMIZATION:append = " -fno-omit-frame-pointer"
|
||||
|
||||
CFLAGS:append:armv5 = " -DMISSING_64BIT_ATOMICS"
|
||||
CFLAGS:append:armv6 = " -DMISSING_64BIT_ATOMICS"
|
||||
|
||||
# Remove the mesa dependency on mesa-dev, as mesa is empty
|
||||
DEV_PKG_DEPENDENCY = ""
|
||||
|
||||
# Khronos documentation says that include/GLES2/gl2ext.h can be used for
|
||||
# OpenGL ES 3 specification as well as for OpenGL ES 2.
|
||||
# There can be applications including GLES2/gl2ext.h instead of GLES3/gl3ext.h
|
||||
# meaning we should probably bring in GLES2/gl2ext.h if someone asks for
|
||||
# development package of libgles3.
|
||||
RDEPENDS:libgles3-mesa-dev += "libgles2-mesa-dev"
|
||||
|
||||
RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools', '', d)}"
|
||||
|
||||
PACKAGES =+ "libegl-mesa libegl-mesa-dev \
|
||||
libosmesa libosmesa-dev \
|
||||
libgl-mesa libgl-mesa-dev \
|
||||
libglx-mesa libglx-mesa-dev \
|
||||
libglapi libglapi-dev \
|
||||
libgbm libgbm-dev \
|
||||
libgles1-mesa libgles1-mesa-dev \
|
||||
libgles2-mesa libgles2-mesa-dev \
|
||||
libgles3-mesa libgles3-mesa-dev \
|
||||
libopencl-mesa libopencl-mesa-dev \
|
||||
libxatracker libxatracker-dev \
|
||||
mesa-megadriver mesa-vulkan-drivers \
|
||||
mesa-vdpau-drivers mesa-tools \
|
||||
"
|
||||
|
||||
do_install:append () {
|
||||
# Drivers never need libtool .la files
|
||||
rm -f ${D}${libdir}/dri/*.la
|
||||
rm -f ${D}${libdir}/egl/*.la
|
||||
rm -f ${D}${libdir}/gallium-pipe/*.la
|
||||
rm -f ${D}${libdir}/gbm/*.la
|
||||
|
||||
# libwayland-egl has been moved to wayland 1.15+
|
||||
rm -f ${D}${libdir}/libwayland-egl*
|
||||
rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc
|
||||
}
|
||||
|
||||
# For the packages that make up the OpenGL interfaces, inject variables so that
|
||||
# they don't get Debian-renamed (which would remove the -mesa suffix), and
|
||||
# RPROVIDEs/RCONFLICTs on the generic libgl name.
|
||||
python __anonymous() {
|
||||
pkgconfig = (d.getVar('PACKAGECONFIG') or "").split()
|
||||
suffix = ""
|
||||
if "-native" in d.getVar("PN"):
|
||||
suffix = "-native"
|
||||
for p in (("egl", "libegl", "libegl1"),
|
||||
("opengl", "libgl", "libgl1"),
|
||||
("glvnd", "libglx",),
|
||||
("gles", "libgles1", "libglesv1-cm1"),
|
||||
("gles", "libgles2", "libglesv2-2"),
|
||||
("gles", "libgles3",),
|
||||
("opencl", "libopencl",)):
|
||||
if not p[0] in pkgconfig:
|
||||
continue
|
||||
mlprefix = d.getVar("MLPREFIX")
|
||||
fullp = mlprefix + p[1] + "-mesa" + suffix
|
||||
mlprefix = d.getVar("MLPREFIX")
|
||||
pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:])
|
||||
d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
|
||||
d.appendVar("RREPLACES:" + fullp, pkgs)
|
||||
d.appendVar("RPROVIDES:" + fullp, pkgs)
|
||||
d.appendVar("RCONFLICTS:" + fullp, pkgs)
|
||||
|
||||
d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}mesa-megadriver" + suffix)
|
||||
|
||||
# For -dev, the first element is both the Debian and original name
|
||||
fullp = mlprefix + p[1] + "-mesa-dev" + suffix
|
||||
pkgs = " " + mlprefix + p[1] + "-dev" + suffix
|
||||
d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
|
||||
d.appendVar("RREPLACES:" + fullp, pkgs)
|
||||
d.appendVar("RPROVIDES:" + fullp, pkgs)
|
||||
d.appendVar("RCONFLICTS:" + fullp, pkgs)
|
||||
}
|
||||
|
||||
python mesa_populate_packages() {
|
||||
pkgs = ['mesa', 'mesa-dev', 'mesa-dbg']
|
||||
for pkg in pkgs:
|
||||
d.setVar("RPROVIDES:%s" % pkg, pkg.replace("mesa", "mesa-dri", 1))
|
||||
d.setVar("RCONFLICTS:%s" % pkg, pkg.replace("mesa", "mesa-dri", 1))
|
||||
d.setVar("RREPLACES:%s" % pkg, pkg.replace("mesa", "mesa-dri", 1))
|
||||
|
||||
import re
|
||||
dri_drivers_root = oe.path.join(d.getVar('PKGD'), d.getVar('libdir'), "dri")
|
||||
if os.path.isdir(dri_drivers_root):
|
||||
dri_pkgs = sorted(os.listdir(dri_drivers_root))
|
||||
lib_name = d.expand("${MLPREFIX}mesa-megadriver")
|
||||
for p in dri_pkgs:
|
||||
m = re.match(r'^(.*)_dri\.so$', p)
|
||||
if m:
|
||||
pkg_name = " ${MLPREFIX}mesa-driver-%s" % legitimize_package_name(m.group(1))
|
||||
d.appendVar("RPROVIDES:%s" % lib_name, pkg_name)
|
||||
d.appendVar("RCONFLICTS:%s" % lib_name, pkg_name)
|
||||
d.appendVar("RREPLACES:%s" % lib_name, pkg_name)
|
||||
|
||||
pipe_drivers_root = os.path.join(d.getVar('libdir'), "gallium-pipe")
|
||||
do_split_packages(d, pipe_drivers_root, r'^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='')
|
||||
}
|
||||
|
||||
PACKAGESPLITFUNCS =+ "mesa_populate_packages"
|
||||
|
||||
PACKAGES_DYNAMIC += "^mesa-driver-.*"
|
||||
PACKAGES_DYNAMIC:class-native = "^mesa-driver-.*-native"
|
||||
|
||||
FILES:mesa-megadriver = "${libdir}/dri/* ${datadir}/drirc.d"
|
||||
FILES:mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${datadir}/vulkan"
|
||||
FILES:${PN}-vdpau-drivers = "${libdir}/vdpau/*.so.*"
|
||||
FILES:libegl-mesa = "${libdir}/libEGL*.so.* ${datadir}/glvnd/egl_vendor.d"
|
||||
FILES:libgbm = "${libdir}/libgbm.so.*"
|
||||
FILES:libgles1-mesa = "${libdir}/libGLESv1*.so.*"
|
||||
FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*"
|
||||
FILES:libgl-mesa = "${libdir}/libGL.so.*"
|
||||
FILES:libglx-mesa = "${libdir}/libGLX*.so.*"
|
||||
FILES:libopencl-mesa = "${libdir}/libMesaOpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd"
|
||||
FILES:libglapi = "${libdir}/libglapi.so.*"
|
||||
FILES:libosmesa = "${libdir}/libOSMesa.so.*"
|
||||
FILES:libxatracker = "${libdir}/libxatracker.so.*"
|
||||
|
||||
FILES:${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan ${libdir}/vdpau/*.so"
|
||||
FILES:libegl-mesa-dev = "${libdir}/libEGL*.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc"
|
||||
FILES:libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h"
|
||||
FILES:libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc"
|
||||
FILES:libglx-mesa-dev = "${libdir}/libGLX*.*"
|
||||
FILES:libglapi-dev = "${libdir}/libglapi.*"
|
||||
FILES:libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc"
|
||||
FILES:libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc"
|
||||
FILES:libgles3-mesa-dev = "${includedir}/GLES3"
|
||||
FILES:libopencl-mesa-dev = "${libdir}/libMesaOpenCL.so"
|
||||
FILES:libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc"
|
||||
FILES:libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \
|
||||
${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \
|
||||
${libdir}/pkgconfig/xatracker.pc"
|
||||
# catch all to get all the tools and data
|
||||
FILES:${PN}-tools = "${bindir} ${datadir}"
|
||||
ALLOW_EMPTY:${PN}-tools = "1"
|
||||
|
||||
# Fix upgrade path from mesa to mesa-megadriver
|
||||
RREPLACES:mesa-megadriver = "mesa"
|
||||
RCONFLICTS:mesa-megadriver = "mesa"
|
||||
RPROVIDES:mesa-megadriver = "mesa"
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
require ${BPN}.inc
|
||||
|
||||
COMPATIBLE_MACHINE = "(ccmp2)"
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
FILESEXTRAPATHS:prepend := "${THISDIR}/mesa:"
|
||||
|
||||
PACKAGECONFIG:stm32mp1common = "${@bb.utils.filter('DISTRO_FEATURES', 'wayland ', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm', '', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11', '', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \
|
||||
\
|
||||
gallium \
|
||||
"
|
||||
|
||||
PACKAGECONFIG:stm32mp2common = " \
|
||||
gallium \
|
||||
${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm', '', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'x11 dri3', '', d)} \
|
||||
"
|
||||
|
||||
PACKAGECONFIG = " \
|
||||
gallium \
|
||||
${@bb.utils.filter('DISTRO_FEATURES', 'x11 vulkan wayland', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm virgl', '', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'dri3', '', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \
|
||||
"
|
||||
|
||||
# Enable Etnaviv support
|
||||
GALLIUMDRIVERS:append:stm32mpcommon = ",etnaviv,kmsro"
|
||||
|
|
@ -9,16 +9,17 @@
|
|||
#===============================================================================
|
||||
|
||||
check_dt_status() {
|
||||
gcnano_dir=$(ls /proc/device-tree/soc/ | grep gpu)
|
||||
if [ -z "$gcnano_dir" ] || [ ! -d /proc/device-tree/soc/$gcnano_dir ];
|
||||
gcnano_path=$(find /proc/device-tree/soc* | grep gpu | head -n 1)
|
||||
gcnano_dir=$(basename $gcnano_path)
|
||||
if [ -z "$gcnano_dir" ] || [ ! -d $gcnano_path ];
|
||||
then
|
||||
echo "Gcnano in /proc/device-tree/soc/ is not available" > /dev/kmsg
|
||||
force_no_dtb_gpu="1"
|
||||
else
|
||||
if [ ! -f /proc/device-tree/soc/$gcnano_dir/status ]; then
|
||||
if [ ! -f $gcnano_path/status ]; then
|
||||
gcnano_status="okay"
|
||||
else
|
||||
if $(grep -q "okay" /proc/device-tree/soc/$gcnano_dir/status); then
|
||||
if $(grep -q "okay" $gcnano_path/status); then
|
||||
gcnano_status="okay"
|
||||
fi
|
||||
fi
|
||||
|
|
@ -96,8 +97,14 @@ then
|
|||
sed -i "s/OPTARGS=--use-pixman/#OPTARGS=--use-pixman/g" /etc/default/weston
|
||||
sed -i "/#Autogenerated/d" /etc/default/weston
|
||||
fi
|
||||
if [ ! -f /etc/default/weston ];
|
||||
then
|
||||
echo "#Autogenerated" > /etc/default/weston
|
||||
echo "#OPTARGS=--use-pixman" >> /etc/default/weston
|
||||
echo "WESTON_USER=root" >> /etc/default/weston
|
||||
fi
|
||||
else
|
||||
if [ -f /etc/default/weston ] && $(grep -q "Autogenerated" /etc/default/weston) ;
|
||||
if [ -f /etc/default/weston ] && $(grep -q "pixman" /etc/default/weston) ;
|
||||
then
|
||||
echo "Weston already configured on pixman" > /dev/kmsg
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (C) 2022 Digi International Inc.
|
||||
# Copyright (C) 2022, Digi International Inc.
|
||||
#
|
||||
SUMMARY = "Gstreamer framework packagegroup for DEY image"
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -0,0 +1,172 @@
|
|||
FILESEXTRAPATHS:prepend := "${THISDIR}/optee-os:"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
PROVIDES += "virtual/optee-os"
|
||||
RPROVIDES:${PN} += "virtual/optee-os virtual/systemd-bootconf"
|
||||
|
||||
CVE_PRODUCT = "op-tee:op-tee_os"
|
||||
|
||||
#############################################################
|
||||
#inherit external-dt scp-firmware
|
||||
|
||||
# Enable use of scp-firmware shared folder
|
||||
STAGING_SCPFW_DIR = "${TMPDIR}/work-shared/${MACHINE}/scp-firmware"
|
||||
|
||||
do_compile[depends] += "scp-firmware:do_configure"
|
||||
|
||||
|
||||
STAGING_EXTDT_DIR = "${TMPDIR}/work-shared/${MACHINE}/external-dt"
|
||||
#############################################################
|
||||
|
||||
B = "${WORKDIR}/build"
|
||||
# Configure build dir for externalsrc class usage through devtool
|
||||
EXTERNALSRC_BUILD:pn-${PN} = "${WORKDIR}/build"
|
||||
|
||||
DEPENDS += "dtc-native"
|
||||
DEPENDS += "python3-pycryptodomex-native"
|
||||
DEPENDS += "python3-pyelftools-native"
|
||||
DEPENDS += "libgcc python3-cryptography-native"
|
||||
DEPENDS += "python3-pillow-native"
|
||||
|
||||
inherit deploy python3native
|
||||
|
||||
OPTEEMACHINE ?= "${MACHINE}"
|
||||
OPTEEOUTPUTMACHINE ?= "${MACHINE}"
|
||||
|
||||
# Default log level
|
||||
ST_OPTEE_DEBUG_LOG_LEVEL ??= "2"
|
||||
|
||||
# default core debug
|
||||
ST_OPTEE_CORE_DEBUG ??= "y"
|
||||
ST_OPTEE_CORE_DEBUG:stm32mp15common ?= "n"
|
||||
|
||||
EXTRA_OEMAKE = "PLATFORM=${OPTEEMACHINE}"
|
||||
EXTRA_OEMAKE += "CROSS_COMPILE_core=${HOST_PREFIX}"
|
||||
EXTRA_OEMAKE += "CROSS_COMPILE_ta_arm64=${HOST_PREFIX}"
|
||||
EXTRA_OEMAKE += "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', 'ARCH=arm CFG_ARM64_core=y', 'ARCH=arm CFG_ARM32_core=y CROSS_COMPILE_ta_arm32=${HOST_PREFIX}', d)}"
|
||||
EXTRA_OEMAKE += "NOWERROR=1"
|
||||
EXTRA_OEMAKE += "LDFLAGS="
|
||||
# Set external-dt support
|
||||
EXTRA_OEMAKE += "${@bb.utils.contains('EXTERNAL_DT_ENABLED', '1', 'CFG_EXT_DTS=${STAGING_EXTDT_DIR}/optee', '', d)}"
|
||||
# Set scp-firmware support
|
||||
EXTRA_OEMAKE += "CFG_SCP_FIRMWARE=${STAGING_SCPFW_DIR}"
|
||||
|
||||
# debug and trace
|
||||
EXTRA_OEMAKE += "${@bb.utils.contains('ST_OPTEE_DEBUG_TRACE', '1', 'CFG_TEE_CORE_LOG_LEVEL=${ST_OPTEE_DEBUG_LOG_LEVEL} CFG_TEE_CORE_DEBUG=${ST_OPTEE_CORE_DEBUG}', '', d)}"
|
||||
|
||||
# OPTEE in sysram
|
||||
EXTRA_OEMAKE:append:stm32mp15common = " ${@bb.utils.contains('ST_OPTEE_IN_SYSRAM', '1', 'CFG_STM32MP1_OPTEE_IN_SYSRAM=y', '', d)}"
|
||||
|
||||
# SCP firmware
|
||||
#EXTRA_OEMAKE_SCP_FIRMWARE ??= ""
|
||||
EXTRA_OEMAKE_SCP_FIRMWARE:stm32mp15common ??= ""
|
||||
EXTRA_OEMAKE_SCP_FIRMWARE:stm32mp13common ??= "${@bb.utils.contains('ENABLE_SCMI_SCPFW', '1', 'CFG_SCMI_SCPFW=y', 'CFG_SCMI_SCPFW=n', d)}"
|
||||
EXTRA_OEMAKE_SCP_FIRMWARE:stm32mp25common ??= "CFG_SCMI_SCPFW=y"
|
||||
EXTRA_OEMAKE += " ${EXTRA_OEMAKE_SCP_FIRMWARE}"
|
||||
|
||||
OPTEE_ARCH:armv7a = "arm32"
|
||||
OPTEE_ARCH:armv7ve = "arm32"
|
||||
OPTEE_ARCH:aarch64 = "arm64"
|
||||
|
||||
do_configure:prepend(){
|
||||
chmod 755 ${S}/scripts/bin_to_c.py
|
||||
}
|
||||
|
||||
do_compile() {
|
||||
export CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_HOST}"
|
||||
export OPENSSL_MODULES=${STAGING_LIBDIR_NATIVE}/ossl-modules/
|
||||
if [ -n "${OPTEE_CONF}" ]; then
|
||||
for conf in ${OPTEE_CONF}; do
|
||||
# Configure SOC switch
|
||||
soc_extra=""
|
||||
for soc in ${STM32MP_SOC_NAME}; do
|
||||
if [ "$(echo ${conf} | grep -c ${soc})" -eq 1 ]; then
|
||||
soc_extra="$(echo CFG_${soc} | awk '{print toupper($0)}')=y"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
oe_runmake -C ${S} O=${B}/${conf} CFG_EMBED_DTB_SOURCE_FILE=${conf}.dts ${soc_extra}
|
||||
done
|
||||
else
|
||||
oe_runmake -C ${S} O=${B}/out
|
||||
fi
|
||||
}
|
||||
|
||||
do_install:stm32mp1common() {
|
||||
#install TA devkit
|
||||
install -d ${D}${includedir}/optee/export-user_ta/
|
||||
|
||||
if [ -n "${OPTEE_CONF}" ]; then
|
||||
for conf in ${OPTEE_CONF}; do
|
||||
for f in ${B}/${conf}/export-ta_${OPTEE_ARCH}/* ; do
|
||||
cp -aRf $f ${D}${includedir}/optee/export-user_ta/
|
||||
done
|
||||
done
|
||||
fi
|
||||
}
|
||||
do_install:stm32mp2common() {
|
||||
#install TA devkit
|
||||
install -d ${D}${includedir}/optee/export-user_ta_arm32/
|
||||
install -d ${D}${includedir}/optee/export-user_ta_arm64/
|
||||
|
||||
if [ -n "${OPTEE_CONF}" ]; then
|
||||
for conf in ${OPTEE_CONF}; do
|
||||
if [ -d ${B}/${conf}/export-ta_arm32 ]; then
|
||||
for f in ${B}/${conf}/export-ta_arm32/* ; do
|
||||
cp -aRf $f ${D}${includedir}/optee/export-user_ta_arm32/
|
||||
done
|
||||
fi
|
||||
if [ -d ${B}/${conf}/export-ta_arm64 ]; then
|
||||
for f in ${B}/${conf}/export-ta_arm64/* ; do
|
||||
cp -aRf $f ${D}${includedir}/optee/export-user_ta_arm64/
|
||||
done
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# Configure optee binaries
|
||||
OPTEE_HEADER = "tee-header_v2"
|
||||
OPTEE_PAGEABLE = "tee-pageable_v2"
|
||||
OPTEE_PAGER = "tee-pager_v2"
|
||||
OPTEE_SUFFIX = "bin"
|
||||
# Output the ELF generated
|
||||
ELF_DEBUG_ENABLE ?= ""
|
||||
OPTEE_ELF = "tee"
|
||||
OPTEE_ELF_SUFFIX = "elf"
|
||||
|
||||
do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}/optee"
|
||||
do_deploy() {
|
||||
install -d ${DEPLOYDIR}/debug
|
||||
if [ -n "${OPTEE_CONF}" ]; then
|
||||
for conf in ${OPTEE_CONF}; do
|
||||
install -m 644 ${B}/${conf}/core/${OPTEE_HEADER}.${OPTEE_SUFFIX} ${DEPLOYDIR}/${OPTEE_HEADER}-${conf}.${OPTEE_SUFFIX}
|
||||
install -m 644 ${B}/${conf}/core/${OPTEE_PAGER}.${OPTEE_SUFFIX} ${DEPLOYDIR}/${OPTEE_PAGER}-${conf}.${OPTEE_SUFFIX}
|
||||
install -m 644 ${B}/${conf}/core/${OPTEE_PAGEABLE}.${OPTEE_SUFFIX} ${DEPLOYDIR}/${OPTEE_PAGEABLE}-${conf}.${OPTEE_SUFFIX}
|
||||
if [ -n "${ELF_DEBUG_ENABLE}" ]; then
|
||||
install -m 644 ${B}/${conf}/core/${OPTEE_ELF}.${OPTEE_ELF_SUFFIX} ${DEPLOYDIR}/debug/${OPTEE_ELF}-${conf}.${OPTEE_ELF_SUFFIX}
|
||||
fi
|
||||
done
|
||||
else
|
||||
install -m 644 ${B}/core/${OPTEE_HEADER}.${OPTEE_SUFFIX} ${DEPLOYDIR}/${OPTEE_HEADER}.${OPTEE_SUFFIX}
|
||||
install -m 644 ${B}/core/${OPTEE_PAGER}.${OPTEE_SUFFIX} ${DEPLOYDIR}/${OPTEE_PAGER}.${OPTEE_SUFFIX}
|
||||
install -m 644 ${B}/core/${OPTEE_PAGEABLE}.${OPTEE_SUFFIX} ${DEPLOYDIR}/${OPTEE_PAGEABLE}.${OPTEE_SUFFIX}
|
||||
if [ -n "${ELF_DEBUG_ENABLE}" ]; then
|
||||
install -m 644 ${B}/core/${OPTEE_ELF}.${OPTEE_ELF_SUFFIX} ${DEPLOYDIR}/debug/${OPTEE_ELF}.${OPTEE_ELF_SUFFIX}
|
||||
fi
|
||||
fi
|
||||
}
|
||||
addtask deploy before do_build after do_compile
|
||||
|
||||
FILES:${PN} = "${nonarch_base_libdir}/firmware/"
|
||||
FILES:${PN}-dev = "/usr/include/optee"
|
||||
|
||||
INSANE_SKIP:${PN}-dev = "staticdev"
|
||||
|
||||
INHIBIT_PACKAGE_STRIP = "1"
|
||||
# ---------------------------------------------------------------------
|
||||
# Avoid QA Issue: contains reference to TMPDIR [buildpaths]
|
||||
INSANE_SKIP:${PN} += "buildpaths"
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (C) 2022 Digi International Inc.
|
||||
# Copyright (C) 2022, Digi International Inc.
|
||||
#
|
||||
|
||||
# Select internal or Github OPTEE repo
|
||||
|
|
@ -14,3 +14,6 @@ SRC_URI = " \
|
|||
${OPTEE_GIT_URI};branch=${SRCBRANCH};name=os \
|
||||
file://fonts.tar.gz;subdir=git;name=fonts \
|
||||
"
|
||||
|
||||
# If TF enabled, force use of HUK in OTP bits
|
||||
EXTRA_OEMAKE += "${@oe.utils.conditional('TRUSTFENCE_ENABLED', '1', 'CFG_OTP_HUK=1', '', d)}"
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
SUMMARY = "OPTEE TA development kit for stm32mp"
|
||||
LICENSE = "BSD-2-Clause & BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173"
|
||||
|
||||
# Select internal or Github OPTEE repo
|
||||
OPTEE_URI_STASH = "${DIGI_MTK_GIT}/emp/optee_os.git;protocol=ssh"
|
||||
OPTEE_URI_GITHUB = "${DIGI_GITHUB_GIT}/optee_os.git;protocol=https"
|
||||
OPTEE_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${OPTEE_URI_STASH}', '${OPTEE_URI_GITHUB}', d)}"
|
||||
|
||||
SRCBRANCH = "3.19.0/stm/master"
|
||||
SRCREV = "${AUTOREV}"
|
||||
|
||||
SRC_URI = " \
|
||||
${OPTEE_GIT_URI};branch=${SRCBRANCH};name=os \
|
||||
file://fonts.tar.gz;subdir=git;name=fonts \
|
||||
"
|
||||
|
||||
SRC_URI[fonts.sha256sum] = "4941e8bb6d8ac377838e27b214bf43008c496a24a8f897e0b06433988cbd53b2"
|
||||
|
||||
OPTEE_VERSION = "3.19.0"
|
||||
OPTEE_SUBVERSION = "stm32mp"
|
||||
OPTEE_RELEASE = "beta-r1"
|
||||
|
||||
PV = "${OPTEE_VERSION}-${OPTEE_SUBVERSION}-${OPTEE_RELEASE}"
|
||||
|
||||
ARCHIVER_ST_BRANCH = "${OPTEE_VERSION}-${OPTEE_SUBVERSION}"
|
||||
ARCHIVER_ST_REVISION = "${PV}"
|
||||
ARCHIVER_COMMUNITY_BRANCH = "master"
|
||||
ARCHIVER_COMMUNITY_REVISION = "${OPTEE_VERSION}"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
OPTEEMACHINE ?= "stm32mp1"
|
||||
OPTEEMACHINE:stm32mp1common = "stm32mp1"
|
||||
OPTEEMACHINE:stm32mp2common = "stm32mp2"
|
||||
|
||||
OPTEEOUTPUTMACHINE ?= "stm32mp1"
|
||||
OPTEEOUTPUTMACHINE:stm32mp1common = "stm32mp1"
|
||||
OPTEEOUTPUTMACHINE:stm32mp2common = "stm32mp2"
|
||||
|
||||
# The package is empty but must be generated to avoid apt-get installation issue
|
||||
ALLOW_EMPTY:${PN} = "1"
|
||||
|
||||
require optee-os-stm32mp2-common.inc
|
||||
|
||||
# Specific for revA board
|
||||
EXTRA_OEMAKE_REVA:stm32mp25revabcommon:append = " CFG_STM32MP25x_REVA=y "
|
||||
EXTRA_OEMAKE += " ${EXTRA_OEMAKE_REVA}"
|
||||
|
||||
# ---------------------------------
|
||||
# Configure archiver use
|
||||
# ---------------------------------
|
||||
include ${@oe.utils.ifelse(d.getVar('ST_ARCHIVER_ENABLE') == '1', 'optee-os-stm32mp-archiver.inc','')}
|
||||
|
||||
# ---------------------------------
|
||||
# Configure default preference to manage dynamic selection between tarball and github
|
||||
# ---------------------------------
|
||||
STM32MP_SOURCE_SELECTION ?= "tarball"
|
||||
|
||||
DEFAULT_PREFERENCE = "${@bb.utils.contains('STM32MP_SOURCE_SELECTION', 'github', '-1', '1', d)}"
|
||||
|
||||
COMPATIBLE_MACHINE = "(ccmp2)"
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
#
|
||||
# Archiver Configuration
|
||||
#
|
||||
SRC_URI:append = " file://README.HOW_TO.txt "
|
||||
COPYLEFT_LICENSE_INCLUDE:append = " BSD-3* "
|
||||
|
||||
inherit archiver
|
||||
ARCHIVER_MODE[src] = "original"
|
||||
|
||||
inherit archiver_stm32mp_clean
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
SUMMARY = "SCP Firmware for stm32mp"
|
||||
LICENSE = "BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://${S}/license.md;md5=ef610a65bfb6d16f79778877cbfd45df"
|
||||
|
||||
SRC_URI = "gitsm://github.com/ARM-software/SCP-firmware;protocol=https;nobranch=1"
|
||||
SRCREV = "0c7236b1851d90124210a0414fd982dc55322c7c"
|
||||
|
||||
SRC_URI += " \
|
||||
file://0001-2.12-stm32mp-r1.patch \
|
||||
file://0001-Correct-git-error.patch \
|
||||
"
|
||||
|
||||
SCPFW_VERSION = "2.12"
|
||||
SCPFW_SUBVERSION = "stm32mp"
|
||||
SCPFW_RELEASE = "r1"
|
||||
|
||||
PV = "${SCPFW_VERSION}-${SCPFW_SUBVERSION}-${SCPFW_RELEASE}"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
###################################################################
|
||||
#inherit scp-firmware
|
||||
|
||||
# Enable use of scp-firmware shared folder
|
||||
STAGING_SCPFW_DIR = "${TMPDIR}/work-shared/${MACHINE}/scp-firmware"
|
||||
|
||||
do_compile[depends] += "scp-firmware:do_configure"
|
||||
###################################################################
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
COMPATIBLE_MACHINE = "(stm32mpcommon)"
|
||||
|
||||
# Do not remove source code, even if rm_work is configured
|
||||
RM_WORK_EXCLUDE += "${PN}"
|
||||
|
||||
# -----------------------------------------------
|
||||
# Enable use of work-shared folder
|
||||
# Make sure to move ${S} to STAGING_SCPFW_DIR. We can't just
|
||||
# create the symlink in advance as the git fetcher can't cope with
|
||||
# the symlink.
|
||||
do_unpack[cleandirs] += "${S}"
|
||||
do_unpack[cleandirs] += "${STAGING_SCPFW_DIR}"
|
||||
do_clean[cleandirs] += "${S}"
|
||||
do_clean[cleandirs] += "${STAGING_SCPFW_DIR}"
|
||||
python do_symlink_scpfirmwaresrc() {
|
||||
# Specific part to update devtool-source class
|
||||
if bb.data.inherits_class('devtool-source', d):
|
||||
# We don't want to move the source to STAGING_SCPFW_DIR here
|
||||
if d.getVar('STAGING_SCPFW_DIR', d):
|
||||
d.setVar('STAGING_SCPFW_DIR', '${S}')
|
||||
|
||||
# Copy/Paste from kernel class with adaptation to SCPFW var
|
||||
s = d.getVar("S")
|
||||
if s[-1] == '/':
|
||||
# drop trailing slash, so that os.symlink(scpscr, s) doesn't use s as directory name and fail
|
||||
s=s[:-1]
|
||||
scpscr = d.getVar("STAGING_SCPFW_DIR")
|
||||
if s != scpscr:
|
||||
bb.utils.mkdirhier(scpscr)
|
||||
bb.utils.remove(scpscr, recurse=True)
|
||||
if d.getVar("EXTERNALSRC"):
|
||||
# With EXTERNALSRC S will not be wiped so we can symlink to it
|
||||
os.symlink(s, scpscr)
|
||||
else:
|
||||
import shutil
|
||||
shutil.move(s, scpscr)
|
||||
os.symlink(scpscr, s)
|
||||
}
|
||||
addtask symlink_scpfirmwaresrc before do_patch do_configure after do_unpack
|
||||
|
||||
# ---------------------------------
|
||||
# Configure archiver use
|
||||
# ---------------------------------
|
||||
include ${@oe.utils.ifelse(d.getVar('ST_ARCHIVER_ENABLE') == '1', 'scp-firmware-archiver.inc','')}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,32 @@
|
|||
From 27dd5642469b49aa6a94d99d97bce793f2473053 Mon Sep 17 00:00:00 2001
|
||||
From: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
|
||||
Date: Tue, 28 Nov 2023 14:18:02 +0100
|
||||
Subject: [PATCH] Correct git error
|
||||
|
||||
When there is no .git for scp firmware, the git describe command
|
||||
return error:
|
||||
fatal: not a git repository (or any parent up to mount point /mnt)
|
||||
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
|
||||
|
||||
To correct this kind of error, we can redirect the error on a variable
|
||||
|
||||
Signed-off-by: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
|
||||
---
|
||||
framework/CMakeLists.txt | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/framework/CMakeLists.txt b/framework/CMakeLists.txt
|
||||
index 9b9bb229..9a9f0bd4 100644
|
||||
--- a/framework/CMakeLists.txt
|
||||
+++ b/framework/CMakeLists.txt
|
||||
@@ -197,6 +197,7 @@ if(GIT_FOUND)
|
||||
COMMAND "${GIT_EXECUTABLE}" describe --tags --dirty --always
|
||||
WORKING_DIRECTORY "${SCP_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE SCP_DESCRIBE
|
||||
+ ERROR_VARIABLE _errorOut
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
Sharing scp firmware
|
||||
1. Prepare scp firmware source
|
||||
2. Manage scp firmware source code with GIT
|
||||
3. Configure scp firmware source code
|
||||
4. Test scp firmware source code
|
||||
|
||||
--------------------------------------
|
||||
1. Prepare scp-firmware source
|
||||
--------------------------------------
|
||||
If not already done, extract the sources from Developer Package tarball, for example:
|
||||
$ tar xf en.SOURCES-stm32mp1-*.tar.xz
|
||||
|
||||
In the scp firmware source directory (sources/*/##BP##-##PR##),
|
||||
you have one external dt tarball:
|
||||
- ##BP##-##PR##.tar.xz
|
||||
- 00*.patch
|
||||
|
||||
If you would like to have a git management for the source code move to
|
||||
to section 2 [Management of external dt source code with GIT].
|
||||
|
||||
Otherwise, to manage scp firmware source code without git, you must extract the
|
||||
tarball now and apply the patch:
|
||||
|
||||
$> tar xf ##BP##-##PR##.tar.xz
|
||||
$> cd ##BP##
|
||||
$> for p in `ls -1 ../*.patch`; do patch -p1 < $p; done
|
||||
|
||||
You can now move to section 3 [Configure scp firmware source code].
|
||||
|
||||
-------------------------------------
|
||||
2. Manage external dt source code with GIT
|
||||
-------------------------------------
|
||||
If you like to have a better management of change made on external dt source, you
|
||||
have following solutions to use git.
|
||||
|
||||
2.1 Create Git from tarball
|
||||
---------------------------
|
||||
$ cd <directory to scp firmware source code>
|
||||
$ test -d .git || git init . && git add . && git commit -m "new scp-firwmare" && git gc
|
||||
$ git checkout -b WORKING
|
||||
NB: this is the fastest way to get your scp firmware source code ready for development
|
||||
|
||||
-------------------------------
|
||||
3. Configure scp firmware source code
|
||||
-------------------------------
|
||||
To enable use of scp firmware source code for other component, you must set the
|
||||
SCPFW_DIR variable to your shell environement:
|
||||
|
||||
$> export SCPFW_DIR=$PWD/##BP##
|
||||
|
||||
---------------------------
|
||||
4. Test scp firmware source code
|
||||
---------------------------
|
||||
Nothing to do, scp-firmware is directly used by other component.
|
||||
|
||||
#> echo "*** Nothing to test ***"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2022 Digi International
|
||||
# Copyright (C) 2022, Digi International Inc.
|
||||
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2013-2023 Digi International.
|
||||
# Copyright (C) 2013-2024, Digi International Inc.
|
||||
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
|
||||
|
||||
|
|
@ -10,12 +10,6 @@ SRC_URI:append:ccimx6 = " \
|
|||
file://asound.play.state \
|
||||
"
|
||||
|
||||
SRC_URI:append:ccimx6ul = " file://asound.state"
|
||||
SRC_URI:append:ccimx8x = " file://asound.state"
|
||||
SRC_URI:append:ccimx8m = " file://asound.state"
|
||||
SRC_URI:append:ccimx93 = " file://asound.state"
|
||||
SRC_URI:append:ccmp1 = " file://asound.state"
|
||||
|
||||
do_install:append:ccimx6() {
|
||||
ln -sf asound.micro_play.state ${D}${localstatedir}/lib/alsa/asound.state
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,9 @@
|
|||
pcm.ccmp25dvk {
|
||||
type hw
|
||||
card 0
|
||||
}
|
||||
ctl.ccmp25dvk {
|
||||
type hw
|
||||
card 0
|
||||
}
|
||||
ctl.!default ccmp25dvk
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2013-2021 Digi International.
|
||||
# Copyright (C) 2013-2021, Digi International Inc.
|
||||
|
||||
SUMMARY = "Atheros' proprietary tools"
|
||||
LICENSE = "Proprietary"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright (C) 2016 Freescale Semiconductor
|
||||
# Copyright 2017-2018 NXP
|
||||
# Copyright (C) 2018-2024 Digi International.
|
||||
# Copyright (C) 2018-2024, Digi International Inc.
|
||||
|
||||
DESCRIPTION = "i.MX System Controller Firmware, customized for Digi platforms"
|
||||
LICENSE = "Proprietary"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2013-2017 Digi International.
|
||||
# Copyright (C) 2013-2017, Digi International Inc.
|
||||
|
||||
SUMMARY = "Firmware files for Digi's platforms, such as Atheros bluetooth."
|
||||
SECTION = "base"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2022-2024 Digi International Inc.
|
||||
# Copyright (C) 2022-2024, Digi International Inc.
|
||||
|
||||
SUMMARY = "Murata Infineon firmware binaries"
|
||||
SECTION = "base"
|
||||
|
|
@ -15,6 +15,13 @@ SRC_URI = " \
|
|||
file://cyfmac4373-sdio_World.clm_blob \
|
||||
file://cyw4373-autocountry \
|
||||
file://cyw4373-autocountry.service \
|
||||
file://cyfmac55500-sdio.txt \
|
||||
file://cyfmac55500-sdio_US.clm_blob \
|
||||
file://cyfmac55500-sdio.trxse \
|
||||
file://CYW55500A1_001.002.032.0121.0000_Generic_UART_37_4MHz_wlbga_iPA_sLNA_ANT0.hcd \
|
||||
file://cyw55512-bluetooth \
|
||||
file://cyw55512-bluetooth.service \
|
||||
file://mbt \
|
||||
"
|
||||
|
||||
SRCREV_cyw-fmac-fw="db8deb03b8d24e5069ac4581d1c35b767012e926"
|
||||
|
|
@ -31,9 +38,36 @@ DEPENDS = "libnl"
|
|||
|
||||
do_install () {
|
||||
bbnote "Installing Murata Infineon firmware binaries: "
|
||||
install -d ${D}${sbindir}
|
||||
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
||||
# Install systemd unit files
|
||||
install -d ${D}${systemd_unitdir}/system/
|
||||
install -m 0644 ${WORKDIR}/cyw4373-autocountry.service ${D}${systemd_unitdir}/system/cyw4373-autocountry.service
|
||||
install -m 0644 ${WORKDIR}/cyw55512-bluetooth.service ${D}${systemd_unitdir}/system/cyw55512-bluetooth.service
|
||||
fi
|
||||
|
||||
install -d ${D}${sysconfdir}/init.d/
|
||||
|
||||
# Install autocountry service
|
||||
install -m 0755 ${WORKDIR}/cyw4373-autocountry ${D}${sysconfdir}/cyw4373-autocountry
|
||||
ln -sf /etc/cyw4373-autocountry ${D}${sysconfdir}/init.d/cyw4373-autocountry
|
||||
|
||||
# Install bluetooth init service
|
||||
install -m 0755 ${WORKDIR}/cyw55512-bluetooth ${D}${sysconfdir}/cyw55512-bluetooth
|
||||
ln -sf /etc/cyw55512-bluetooth ${D}${sysconfdir}/init.d/cyw55512-bluetooth
|
||||
|
||||
# Install WLAN client utility binary based on 32-bit/64-bit arch
|
||||
if [ ${TARGET_ARCH} = "aarch64" ]; then
|
||||
install -m 755 ${S}/cyw-fmac-utils-imx64/wl ${D}${sbindir}
|
||||
else
|
||||
install -m 755 ${S}/cyw-fmac-utils-imx32/wl ${D}${sbindir}
|
||||
fi
|
||||
}
|
||||
|
||||
do_install:append:ccmp1 () {
|
||||
install -d ${D}${base_libdir}/firmware/cypress
|
||||
install -d ${D}${base_libdir}/firmware/brcm
|
||||
install -d ${D}${sbindir}
|
||||
|
||||
# Install Bluetooth patch *.HCD file
|
||||
# For Murata 2AE (LBEE5PK2AE-564)
|
||||
|
|
@ -49,37 +83,45 @@ do_install () {
|
|||
# Install NVRAM files (*.txt)
|
||||
# For Murata 2AE (LBEE5PK2AE-564)
|
||||
install -m 444 ${S}/cyw-fmac-nvram/cyfmac4373-sdio.2AE.txt ${D}${base_libdir}/firmware/cypress/cyfmac4373-sdio.txt
|
||||
}
|
||||
|
||||
# Install WLAN client utility binary based on 32-bit/64-bit arch
|
||||
if [ ${TARGET_ARCH} = "aarch64" ]; then
|
||||
install -m 755 ${S}/cyw-fmac-utils-imx64/wl ${D}${sbindir}
|
||||
else
|
||||
install -m 755 ${S}/cyw-fmac-utils-imx32/wl ${D}${sbindir}
|
||||
fi
|
||||
do_install:append:ccmp2 () {
|
||||
install -d ${D}${base_libdir}/firmware/cypress
|
||||
install -d ${D}${base_libdir}/firmware/brcm
|
||||
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
||||
# Install systemd unit files
|
||||
install -d ${D}${systemd_unitdir}/system/
|
||||
install -m 0644 ${WORKDIR}/cyw4373-autocountry.service ${D}${systemd_unitdir}/system/cyw4373-autocountry.service
|
||||
fi
|
||||
# Install Bluetooth patch *.HCD file
|
||||
# For Murata 2GY (LBEE5HY2GY-SMP)
|
||||
install -m 444 CYW55500A1_001.002.032.0121.0000_Generic_UART_37_4MHz_wlbga_iPA_sLNA_ANT0.hcd ${D}${base_libdir}/firmware/brcm/CYW55500A1.hcd
|
||||
|
||||
install -d ${D}${sysconfdir}/init.d/
|
||||
install -m 0755 ${WORKDIR}/cyw4373-autocountry ${D}${sysconfdir}/cyw4373-autocountry
|
||||
ln -sf /etc/cyw4373-autocountry ${D}${sysconfdir}/init.d/cyw4373-autocountry
|
||||
# Install WLAN firmware file (*.bin) and Regulatory binary file (*.clm_blob)
|
||||
# For Murata 2GY (LBEE5HY2GY-SMP)
|
||||
install -m 444 cyfmac55500-sdio.trxse ${D}${base_libdir}/firmware/cypress/cyfmac55500-sdio.trxse
|
||||
install -m 444 cyfmac55500-sdio_US.clm_blob ${D}${base_libdir}/firmware/cypress/cyfmac55500-sdio_US.clm_blob
|
||||
|
||||
# Install NVRAM files (*.txt)
|
||||
# For Murata 2GY (LBEE5HY2GY-SMP)
|
||||
install -m 444 cyfmac55500-sdio.txt ${D}${base_libdir}/firmware/cypress/cyfmac55500-sdio.txt
|
||||
|
||||
# Install Manufacturing Bluetooth Test tool (MBT)
|
||||
install -m 755 mbt ${D}${sbindir}
|
||||
}
|
||||
|
||||
inherit update-rc.d systemd
|
||||
|
||||
INITSCRIPT_PACKAGES += "${PN}-autocountry"
|
||||
INITSCRIPT_PACKAGES += "${PN}-autocountry ${PN}-bluetooth"
|
||||
INITSCRIPT_NAME:${PN}-autocountry = "cyw4373-autocountry"
|
||||
INITSCRIPT_PARAMS:${PN}-autocountry = "start 19 2 3 4 5 . stop 21 0 1 6 ."
|
||||
INITSCRIPT_NAME:${PN}-bluetooth = "cyw55512-bluetooth"
|
||||
INITSCRIPT_PARAMS:${PN}-bluetooth = "start 19 2 3 4 5 . stop 21 0 1 6 ."
|
||||
|
||||
SYSTEMD_PACKAGES = "${PN}-autocountry"
|
||||
SYSTEMD_PACKAGES = "${PN}-autocountry ${PN}-bluetooth"
|
||||
SYSTEMD_SERVICE:${PN}-autocountry = "cyw4373-autocountry.service"
|
||||
SYSTEMD_SERVICE:${PN}-bluetooth = "cyw55512-bluetooth.service"
|
||||
|
||||
PACKAGES =+ " \
|
||||
${PN}-mfgtest \
|
||||
${PN}-autocountry \
|
||||
${PN}-bluetooth \
|
||||
"
|
||||
|
||||
FILES:${PN} = " \
|
||||
|
|
@ -87,7 +129,7 @@ FILES:${PN} = " \
|
|||
"
|
||||
|
||||
FILES:${PN}-mfgtest = " \
|
||||
${sbindir} \
|
||||
${sbindir}/wl \
|
||||
"
|
||||
|
||||
FILES:${PN}-autocountry = " \
|
||||
|
|
@ -96,11 +138,19 @@ FILES:${PN}-autocountry = " \
|
|||
${systemd_unitdir}/system/cyw4373-autocountry.service \
|
||||
"
|
||||
|
||||
RDEPENDS:${PN}:append = " ${PN}-autocountry"
|
||||
FILES:${PN}-bluetooth = " \
|
||||
${sysconfdir}/cyw55512-bluetooth \
|
||||
${sysconfdir}/init.d/cyw55512-bluetooth \
|
||||
${systemd_unitdir}/system/cyw55512-bluetooth.service \
|
||||
${sbindir}/mbt \
|
||||
"
|
||||
|
||||
RDEPENDS:${PN}:append:ccmp1 = " ${PN}-autocountry"
|
||||
RDEPENDS:${PN}-autocountry:append = " ${PN}-mfgtest"
|
||||
RDEPENDS:${PN}:append:ccmp2 = " ${PN}-bluetooth"
|
||||
|
||||
INSANE_SKIP:${PN} += "build-deps"
|
||||
INSANE_SKIP:${PN} += "file-rdeps"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
COMPATIBLE_MACHINE = "(ccmp1)"
|
||||
COMPATIBLE_MACHINE = "(ccmp1|ccmp2)"
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,466 @@
|
|||
#CYW955513SDM2WLIPA_TAG215
|
||||
#802.11ax 1x1 Tri-Band HE20 WiFi 6/6e + BT/BLE 5.2 Combo with SDIO/SPI interface
|
||||
#test1
|
||||
NVRAMRev=$Rev: 53b0a7a3628d2aeaac03f69abc9ffd286740aa76 $
|
||||
sromrev=11
|
||||
boardrev=0x1530
|
||||
boardtype=0x0904
|
||||
boardflags=0x00400001
|
||||
boardflags2=0x00800000
|
||||
boardflags3=0x40000100
|
||||
#boardnum=57410
|
||||
macaddr=00:90:4c:2e:c3:05
|
||||
|
||||
#Regulatory specific
|
||||
ccode=0
|
||||
regrev=0
|
||||
|
||||
# Board specific
|
||||
vendid=0x12be
|
||||
devid=0xbd3e
|
||||
manfid=0x2d0
|
||||
antswitch=0
|
||||
pdgain5g=0
|
||||
pdgain2g=0
|
||||
aa2g=1
|
||||
aa5g=1
|
||||
agbg0=2
|
||||
aga0=2
|
||||
extpagain5g=2
|
||||
extpagain2g=2
|
||||
rxgains2gelnagaina0=0
|
||||
rxgains2gtrisoa0=13
|
||||
rxgains2gtrelnabypa0=0
|
||||
rxgains5gelnagaina0=0
|
||||
rxgains5gtrisoa0=7
|
||||
rxgains5gtrelnabypa0=0
|
||||
rxgains5gmelnagaina0=0
|
||||
rxgains5gmtrisoa0=7
|
||||
rxgains5gmtrelnabypa0=0
|
||||
rxgains5ghelnagaina0=0
|
||||
rxgains5ghtrisoa0=7
|
||||
rxgains5ghtrelnabypa0=0
|
||||
|
||||
# ==== RSSI related parametes start ==============================================================
|
||||
# 2G-Core0 [20MHz, 40Mhz]
|
||||
rssicorrnorm_c0=-5,0
|
||||
# ===================================
|
||||
# 5G-Core0 [20MHz(l), 40MHz(l), 80Mhz(l), 20MHz(ml), 40MHz(ml), 80Mhz(ml), 20MHz(mu), 40MHz(mu), 80Mhz(mu), 20MHz(h), 40MHz(h), 80Mhz(h)]
|
||||
# 5170 to below 5500(ch36 to ch96) - l
|
||||
# 5500 to below 5620(ch100 to ch120) - ml
|
||||
# 5620 to below 5745(ch124 to ch144) - mu
|
||||
# 5745 to below 5835(ch149 to ch165) - h
|
||||
# ===================================
|
||||
rssicorrnorm5g_c0=7,0,0,6,0,0,3,0,0,4,0,0
|
||||
# 6G-Core0 [20MHz(u5), 40MHz(u5), 80Mhz(u5), 20MHz(u6), 40MHz(u6), 80Mhz(u6), 20MHz(u7), 40MHz(u7), 80Mhz(u7), 20MHz(u8), 40MHz(u8), 80Mhz(u8)]
|
||||
rssicorrnorm6g_c0=1,0,0,-4,0,0,-2,0,0,0,0,0
|
||||
|
||||
# These parameter are not required (seems obsolete), valid for fast AGC
|
||||
#rssi_delta_5gl=-6 4 -8 -8 -6 4 -8 -8 -6 4 -8 -8 -3 6 -3 -4 -3 6 -3 -4 -3 6 -3 -4
|
||||
#rssi_delta_5gml=-1 3 -1 -3 -1 3 -1 -3 -1 3 -1 -3 -1 2 0 -2 -1 2 0 -2 -1 2 0 -2
|
||||
#rssi_delta_5gmu=0 3 -1 -2 0 3 -1 -2 0 3 -1 -2 0 2 0 -2 0 2 0 -2 0 2 0 -2
|
||||
#rssi_delta_5gh=2 4 2 -1 2 4 2 -1 2 4 2 -1 0 0 2 -2 0 0 2 -2 0 0 2 -2
|
||||
#rssi_delta_6gunii5=-6 4 -8 -8 -6 4 -8 -8 -6 4 -8 -8 -3 6 -3 -4 -3 6 -3 -4 -3 6 -3 -4
|
||||
#rssi_delta_6gunii6=-1 3 -1 -3 -1 3 -1 -3 -1 3 -1 -3 -1 2 0 -2 -1 2 0 -2 -1 2 0 -2
|
||||
#rssi_delta_6gunii7=0 3 -1 -2 0 3 -1 -2 0 3 -1 -2 0 2 0 -2 0 2 0 -2 0 2 0 -2
|
||||
#rssi_delta_6gunii8=2 4 2 -1 2 4 2 -1 2 4 2 -1 0 0 2 -2 0 0 2 -2 0 0 2 -2
|
||||
rssi_cal_rev=1
|
||||
rxgaincal_rssical=1
|
||||
|
||||
# Correction for low rssi region
|
||||
low_pwr_rssi_thresh_qdBm_5g=-334
|
||||
low_pwr_rssi_bias_5g_c0=-2,0,0,-8,0,0,-6,0,0,-8,0,0
|
||||
|
||||
# Setting this to 255 to disable temp based compensation
|
||||
gain_cal_temp=25
|
||||
rxgain_tempcoeff2g_sub=32,32,32,32,32,32,32,32,32,32
|
||||
rxgain_tempcoeff5gl=28
|
||||
rxgain_tempcoeff5gml=24
|
||||
rxgain_tempcoeff5gmu=24
|
||||
rxgain_tempcoeff5gh=24
|
||||
rxgain_tempcoeff2g_sub_elnaoff=32,32,32,32,32,32,32,32,32,32
|
||||
rxgain_tempcoeff5gl_elnaoff=28
|
||||
rxgain_tempcoeff5gml_elnaoff=22
|
||||
rxgain_tempcoeff5gmu_elnaoff=22
|
||||
rxgain_tempcoeff5gh_elnaoff=22
|
||||
rxgain_tempcoeff6g_unii5=24
|
||||
rxgain_tempcoeff6g_unii6=24
|
||||
rxgain_tempcoeff6g_unii7=28
|
||||
rxgain_tempcoeff6g_unii8=34
|
||||
|
||||
# Each nibble represent 2G channel from 1 to 14. LSB 3 bits specify group number (i.e. 0 to 4), MSB specify if ch used for calibration
|
||||
rssi_cal_freq_grp_2g= 0x08,0x01,0x91,0x2a,0x23,0xb3,0xc4
|
||||
rssi_delta_2gb0=0,0,0,0
|
||||
rssi_delta_2gb1=0,0,0,0
|
||||
rssi_delta_2gb2=0,0,0,0
|
||||
rssi_delta_2gb3=0,0,0,0
|
||||
rssi_delta_2gb4=0,0,0,0
|
||||
# ==== RSSI related parametes end ==============================================================
|
||||
|
||||
#Two range TSSI
|
||||
tworangetssi2g=0
|
||||
tworangetssi5g=0
|
||||
# NOTE :================================================================================
|
||||
# To run TPC with Two Range TSSI ,set tworangetssi2g = 1 and lowpowerrange2g = 0
|
||||
# To run TPC with Single Range TSSI, set tworangetssi2g = 0
|
||||
# To run TPC please READ instructions near pa2ga0 and pa2ga1 as well
|
||||
# To generate PA params for Low Range set tworangetssi2g = 0 and lowpowerrange2g to 1
|
||||
# To generate PA params for High Range set tworangetssi2g = 1 and lowpowerrange2g to 1
|
||||
# ======================================================================================
|
||||
#lowpowerrange2g=0
|
||||
#lowpowerrange5g=0
|
||||
|
||||
#Related to FW Download. Host may use this
|
||||
nocrc=1
|
||||
#FIXME:4369 otpimagesize? Check with Rama
|
||||
otpimagesize=502
|
||||
|
||||
xtalfreq=37400
|
||||
|
||||
txchain=1
|
||||
rxchain=1
|
||||
|
||||
cckdigfilttype=3
|
||||
cck_txgain_offsetval=0x18
|
||||
|
||||
#bit mask for slice capability bit 0:2G bit 1:5G
|
||||
bandcap=2
|
||||
|
||||
|
||||
#FDSS Related
|
||||
fdss_level_5g=9
|
||||
fdss_interp_en=0
|
||||
fdss_level_2g=4
|
||||
|
||||
#FIXME: fdss level for 6G made same as 5G for now
|
||||
fdss_level_6g=9
|
||||
|
||||
#LPB related : FIXME Enable later
|
||||
leg_preamble_boost=12,12,0
|
||||
lpb_comp=10
|
||||
|
||||
#PAPRR Related
|
||||
paprdis=0
|
||||
paprrmcsgain2g=130,130,130,129,128,0,0,0,0,0,0,0
|
||||
paprrmcsgamma2g=550,550,550,650,700,-1,-1,-1,-1,-1,-1,-1
|
||||
paprrmcsgain5g20=130,130,130,129,128,0,0,0,0,0,0,0
|
||||
paprrmcsgamma5g20=500,500,550,650,700,-1,-1,-1,-1,-1,-1,-1
|
||||
|
||||
#PAPR params for 6G
|
||||
#FIXME: papr params 6G made same as 5G for now
|
||||
paprrmcsgain6g20=130,130,130,129,128,0,0,0,0,0,0,0
|
||||
paprrmcsgamma6g20=500,500,550,650,700,-1,-1,-1,-1,-1,-1,-1
|
||||
|
||||
#Tempsense Related
|
||||
tempthresh=255
|
||||
tempoffset=255
|
||||
rawtempsense=0x1ff
|
||||
phycal_tempdelta=15
|
||||
temps_period=15
|
||||
temps_hysteresis=15
|
||||
|
||||
#------------- TSSI Related -------------
|
||||
tssipos2g=1
|
||||
tssipos5g=1
|
||||
|
||||
AvVmid_c0=6,75,5,93,5,93,5,93,5,93,5,90,5,90,5,90,5,90
|
||||
|
||||
low_adc_rate_en=1
|
||||
#limit Tx gain index
|
||||
txidxcap2g=10
|
||||
txidxcap5g=10
|
||||
txidxcap6g=10
|
||||
|
||||
# Single RANGE TPC/TSSI
|
||||
#2G OFDM
|
||||
pa2ga0=-83,6939,-652
|
||||
#2G CCK
|
||||
pa2gccka0=-70,7733,-727
|
||||
#5G channels:36 to 48,52 to 64,100 to 144,149 to 165
|
||||
pa5ga0=-94,7296,-678,-88,7337,-671,-135,6902,-712,-110,7005,-686
|
||||
#PA Params 6G UNII-5,6,7,8
|
||||
pa6ga0=-157,6232,-665,-156,6495,-703,-145,6522,-710,-162,6115,-686
|
||||
|
||||
# Max power and offsets
|
||||
maxp2ga0=86
|
||||
maxp5ga0=72,72,72,72
|
||||
#Max Power on 6G UNII-5/6 and UNII-7/8
|
||||
maxp6ga0=64,60
|
||||
|
||||
subband5gver=0x4
|
||||
paparambwver=3
|
||||
cckpwroffset0=0
|
||||
|
||||
# PD offsets for 2G,5G,6G
|
||||
# 2G power offset per channel
|
||||
powoffs2gtna0=0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
# 5G power offset per channel for band edge channel
|
||||
powoffs5g20mtna0=0,0,0,0,0,0,0
|
||||
pdoffset20ma0=0x0000
|
||||
pdoffset6g20ma0=0x0000
|
||||
pdoffset6g20ma0_group1=0x0000
|
||||
|
||||
cckbw202gpo=0
|
||||
cckbw20ul2gpo=0
|
||||
mcsbw202gpo=0x88554444
|
||||
|
||||
dot11agofdmhrbw202gpo=0x5444
|
||||
ofdmlrbw202gpo=0x0044
|
||||
mcsbw205glpo=0x55111110
|
||||
mcsbw205gmpo=0x55111110
|
||||
mcsbw205ghpo=0x55111110
|
||||
|
||||
# ppr offsets for UNII-5/6 of 6GHz band
|
||||
mcsbw206glpo=0x33000000
|
||||
|
||||
# ppr offsets for UNII-7/8 of 6GHz band
|
||||
mcsbw206gmpo=0x44000000
|
||||
|
||||
mcs1024qam2gpo=0x00aa
|
||||
mcs1024qam5glpo=0x000077
|
||||
mcs1024qam5gmpo=0x000077
|
||||
mcs1024qam5ghpo=0x000077
|
||||
mcs1024qam5gx1po=0x000077
|
||||
mcs1024qam5gx2po=0x000077
|
||||
mcs8poexp=0
|
||||
mcs9poexp=0
|
||||
mcs10poexp=0
|
||||
mcs11poexp=0
|
||||
# 1024QAM rates' offset for 6GHz UNII-5/6
|
||||
mcs1024qam6glpo=0x555555
|
||||
# 1024QAM rates' offset for 6GHz UNII-7/8
|
||||
mcs1024qam6gmpo=0x555555
|
||||
|
||||
#UL-OFDMA PPR's accros RU's
|
||||
#currently programmed same PPR accross RU's
|
||||
#across QAM's the PPR are same b/w SU and RU
|
||||
#each RU PPR is grouped with 5 bits
|
||||
ruppr2g20bpska0=0x10842
|
||||
ruppr2g20qpska0=0x10842
|
||||
ruppr2g20qam16a0=0x10842
|
||||
ruppr2g20qam64a0=0x294A5
|
||||
ruppr2g20qam256a0=0x42108
|
||||
ruppr2g20qam1024a0=0x5294A
|
||||
ruppr5g20bpska0=0x0
|
||||
ruppr5g20qpska0=0x0
|
||||
ruppr5g20qam16a0=0x10842
|
||||
ruppr5g20qam64a0=0x10842
|
||||
ruppr5g20qam256a0=0x18c63
|
||||
ruppr5g20qam1024a0=0x294A5
|
||||
|
||||
# OLPC Related
|
||||
disable_olpc=0
|
||||
olpc_thresh5g=60
|
||||
olpc_anchor5g=64
|
||||
disable_olpc_2g=0
|
||||
olpc_thresh2g=56
|
||||
olpc_anchor2g=60
|
||||
#FIXME: olpc params 6G made same as 5G for now
|
||||
olpc_thresh6g=60
|
||||
olpc_anchor6g=64
|
||||
|
||||
#LTE Coex Related
|
||||
ltecxmux=0
|
||||
ltecxpadnum=0x0504
|
||||
ltecxfnsel=0x44
|
||||
ltecxgcigpio=0x04
|
||||
#OOB params
|
||||
#device_wake_opt=1
|
||||
#host_wake_opt=0
|
||||
|
||||
# SWCTRL Related
|
||||
swctrlmap_5g=0x18081808,0x12021202,0x18081808,0x000008,0x1F
|
||||
swctrlmapext_5g=0x00000000,0x00000000,0x00000000,0x000000,0x000
|
||||
fem_table_init_val=0x01100110,0x00000000
|
||||
fem_table_init_val_ext=0x00000000,0x00000000
|
||||
|
||||
swctrlmap_2g=0x16061606,0x1808180C,0x16061606,0x000008,0x11F
|
||||
swctrlmapext_2g=0x00000000,0x00000000,0x00000000,0x000000,0x000
|
||||
|
||||
clb2gslice0core0=0x1c
|
||||
clb5gslice0core0=0x1e
|
||||
#For TDM coex use the following
|
||||
btc_prisel_ant_mask=0x0
|
||||
clb_swctrl_smask_ant0=0x37f
|
||||
# 2 Ant hyb/par following comment above
|
||||
#btc_prisel_ant_mask=0x3
|
||||
#clb_swctrl_smask_ant0=0x34f
|
||||
muxenab=1
|
||||
|
||||
#BT Coex 1:TDM
|
||||
btc_mode=1
|
||||
|
||||
# --- PAPD Cal related params ----
|
||||
# 0:NBPAPD 1:WBPAPD
|
||||
txwbpapden=1
|
||||
# NB PAPD Cal params
|
||||
# 0x5Gc02Gc0
|
||||
nb_eps_offset=0x01dd01e3
|
||||
nb_bbmult=0x5550
|
||||
nb_papdcalidx=0x050a
|
||||
nb_txattn=0x0000
|
||||
nb_rxattn=0x0000
|
||||
papdgainctrl2g=0
|
||||
papdgainctrl5g=0
|
||||
pacalshift2g=5
|
||||
pacalshift5g=4
|
||||
eps_stopidx=63
|
||||
# two-core specific variables for each of UNII-5/6/7/8 bands
|
||||
# u5c0,u6c0,u7c0,u8c0
|
||||
nb_txattn_6g=0,0,0,0
|
||||
nb_rxattn_6g=0,0,0,0
|
||||
nb_papdcalidx_6g=10,10,10,10
|
||||
nb_bbmult_6g=80,80,80,80
|
||||
nb_eps_offset_6g=475,475,475,475
|
||||
papdgainctrl6g=0
|
||||
pacalshift6g20=3,4,4,4
|
||||
|
||||
# WB papd cal params
|
||||
# c02g,c05g20
|
||||
wb_txattn=0,1
|
||||
wb_rxattn=0,0
|
||||
wb_tia_gain_mode=2,2
|
||||
wb_eps_offset=474,462
|
||||
wb_papdcalidx=10,5
|
||||
wb_bbmult=64,90
|
||||
wb_calref_db=23,24
|
||||
wb_txbuf_offset=33,32
|
||||
wb_frac_del=255,255
|
||||
wb_g_frac_bits=10,10
|
||||
|
||||
# WB 6G cal params
|
||||
# u5c0,u6c0,u7c0,u8c0
|
||||
wb_txattn_6g20=1,1,1,1
|
||||
wb_rxattn_6g20=0,0,0,0
|
||||
wb_tia_gain_mode_6g20=4,4,2,5
|
||||
wb_papdcalidx_6g20=10,10,5,30
|
||||
wb_bbmult_6g20=70,80,80,86
|
||||
wb_eps_offset_6g20=470,468,463,471
|
||||
wb_calref_db_6g20=24,24,24,28
|
||||
|
||||
|
||||
#2nd LUT parameters
|
||||
wb_multipapd_en=0
|
||||
wb_PapdLutSel_idx_6g20=42,42,42,42
|
||||
wb_eps_index_offset_6g20=5,5,5,5
|
||||
wb_papdcalidx_6g20_lut1=10,10,10,10
|
||||
wb_bbmult_6g20_lut1=66,70,74,74
|
||||
wb_calref_db_6g20_lut1=26,26,26,26
|
||||
|
||||
# WBPAPD gain control params
|
||||
wb_gainctrl_nvram_en=1
|
||||
wb_target_tssi_2g20=200
|
||||
wb_target_tssi_5g20=210,210,210,150
|
||||
wb_target_tssi_6g20=75,71,100,-45
|
||||
wb_fudge_factor_2g5g=1,0,-1,-1,-1
|
||||
|
||||
# 2g/5G 2nd PAPD LUT parameters applicable for -40degc
|
||||
wb_eps_offset_lut1=22,10
|
||||
wb_calref_db_lut1=23,19
|
||||
wb_papdcalidx_lut1=10,10
|
||||
wb_bbmult_lut1=25,40
|
||||
wb_PapdLutSel_idx_2g5g=53,52
|
||||
|
||||
# energy detect threshold
|
||||
ed_thresh2g=-65
|
||||
ed_thresh5g=-68
|
||||
ed_thresh6g=-68
|
||||
# energy detect threshold for EU
|
||||
eu_edthresh2g=-65
|
||||
eu_edthresh5g=-68
|
||||
eu_edthresh6g=-68
|
||||
|
||||
btldopu=0
|
||||
|
||||
#rpcal coef for imptxbf
|
||||
rpcal2g=0
|
||||
rpcal5gb0=238
|
||||
rpcal5gb1=228
|
||||
rpcal5gb2=222
|
||||
rpcal5gb3=229
|
||||
|
||||
#Enable LHL PS mode
|
||||
lhl_ps_mode=3
|
||||
|
||||
#SR related params
|
||||
#The min resource state during sleep
|
||||
rmin=0x1
|
||||
#disable sr topoff
|
||||
lpflags=0
|
||||
#disable fastlpo setting
|
||||
fastlpo_pcie_dis=0
|
||||
fastlpo_dis=0
|
||||
|
||||
#PALDO settings 0=3.3 1=3.35 2=3.41 3=3.46 4=2.86, 5=2.97 6=3.08, 7=3.19
|
||||
#paldo3p3_voltage=0
|
||||
|
||||
#2G lowpwr settings 0=TOT 1=setting1 2=setting2 3=settingHE(lowpwr)
|
||||
#ipa2glowpwr=3
|
||||
|
||||
#temperature throttling
|
||||
# Currently tvpm is not part of H1 build, disable for initial BU
|
||||
tvpm=1
|
||||
tvpm_txc_txdc=105,15
|
||||
tvpm_txc_txdc_lowlimit=1
|
||||
tvpm_txc_txdc_insert=0,0
|
||||
tvpm_monitor_period=3
|
||||
#temperature throttling, aggressive setting
|
||||
tvpm_txc_txdc_burst=110,20,5
|
||||
|
||||
##Dynamic Desense Params for 2 ant hybrid coex
|
||||
#btcdyn_flags=3
|
||||
#btcdyn_dflt_dsns_level=0
|
||||
#btcdyn_low_dsns_level=1
|
||||
#btcdyn_mid_dsns_level=2
|
||||
#btcdyn_high_dsns_level=4
|
||||
#btcdyn_default_btc_mode=5
|
||||
#btcdyn_dsns_rows=2
|
||||
#btcdyn_dsns_row1=5,-4,0,-50,-70
|
||||
#btcdyn_dsns_row0=5,12,0,-50,-65
|
||||
|
||||
ppr_hitemp_offset=70,10
|
||||
# idx 0: PPR temp thresh, default 150
|
||||
# idx 1: PPR temp thresh hysteresis, default 15
|
||||
cckbw202gpo_ht=0x6666
|
||||
# CCK high temp offset, 0.5dBm/step, rate(11,5.5,2,1Mbps)
|
||||
ofdmbw202gpo_ht=0x66666666
|
||||
# 2G OFDM temp offset, 0.5dBm/step, rate(54,48,36,24,18,12,9,6Mbps)
|
||||
mcsbw202gpo_ht=0x66666666
|
||||
# 2G BW20 VHT/HT temp offset, 0.5dBm/step, rate(C9,C8,M7,M6,M5,M4,M3,M2-0)
|
||||
mcsbw202gpo_1024qam_ht=0x66
|
||||
# 2G BW20 HE/VHT temp offset, 0.5dBm/step, rate(C11,C10)
|
||||
ofdmbw205gpo_ht=0x66666666
|
||||
# 5G OFDM temp offset, 0.5dBm/step, rate(54,48,36,24,18,12,9,6Mbps)
|
||||
mcsbw205gpo_ht=0x66666666
|
||||
# 5G BW20 HE/VHT/HT temp offset, 0.5dBm/step, rate(C9,C8,M7,M6,M5,M4,M3,M2-0)
|
||||
mcsbw205gpo_1024qam_ht=0x66
|
||||
# 5G BW20 HE/VHT temp offset, 0.5dBm/step, rate(C11,C10)
|
||||
ofdmbw206gpo_ht=0x66666666
|
||||
# 6G OFDM temp offset, 0.5dBm/step, rate(54,48,36,24,18,12,9,6Mbps)
|
||||
mcsbw206gpo_ht=0x66666666
|
||||
# 6G BW20 HE/VHT/HT temp offset, 0.5dBm/step, rate(C9,C8,M7,M6,M5,M4,M3,M2-0)
|
||||
mcsbw206gpo_1024qam_ht=0x66
|
||||
# 6G BW20 HE/VHT temp offset, 0.5dBm/step, rate(C11,C10)
|
||||
|
||||
# SWDIV related
|
||||
swdiv_en=1 #To enable SW-DIV feature
|
||||
swdiv_gpio=0
|
||||
swdiv_swctrl_en=2
|
||||
swdiv_swctrl_ant0=0
|
||||
swdiv_swctrl_ant1=1
|
||||
swdiv_antmap2g_main=1
|
||||
swdiv_antmap5g_main=1
|
||||
|
||||
swdiv_snrlim=290 #Only enable sw_div if the snr on present antenna is less than 290/8=36.25
|
||||
swdiv_thresh=2000 #No.of rxpkts threshold
|
||||
swdiv_snrthresh=24 #Difference between antenna's snr is greater than 24/8=3dB, then shift the antennas
|
||||
swdiv_timeon=10
|
||||
swdiv_timeoff=1
|
||||
swdiv_snr2g20=232
|
||||
swdiv_snr2g40=257
|
||||
swdiv_snr5g20=232
|
||||
swdiv_snr5g40=312
|
||||
swdiv_snr5g80=296
|
||||
|
||||
swdiv_ap_dead_check=0 #Enable sending of null frames at a periodicity of 1 sec to check whether the present antenna is dead
|
||||
swdiv_ap_div=0 #Enabling ap_diversity
|
||||
Binary file not shown.
|
|
@ -0,0 +1,50 @@
|
|||
#!/bin/sh
|
||||
#===============================================================================
|
||||
#
|
||||
# Copyright (C) 2024 by Digi International Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 as published by
|
||||
# the Free Software Foundation.
|
||||
#
|
||||
#
|
||||
# !Description: Initialize Bluetooth interface
|
||||
#
|
||||
#===============================================================================
|
||||
|
||||
SCRIPTNAME="$(basename ${0})"
|
||||
export MBT_TRANSPORT=/dev/ttySTM1
|
||||
|
||||
log() {
|
||||
if type "systemd-cat" >/dev/null 2>/dev/null; then
|
||||
systemd-cat -p "${1}" -t "${SCRIPTNAME}" printf "%s" "${2}"
|
||||
else
|
||||
logger -p "${1}" -t "${SCRIPTNAME}" "${2}"
|
||||
fi
|
||||
}
|
||||
|
||||
bt_power_cycle() {
|
||||
#CCMP2 BT_REG_EN GPIO PZ5
|
||||
gpioset gpiochip11 5=0
|
||||
sleep 0.5
|
||||
gpioset gpiochip11 5=1
|
||||
}
|
||||
|
||||
bt_init() {
|
||||
bt_power_cycle
|
||||
# Load Bluetooth firmware on device
|
||||
mbt download /lib/firmware/brcm/CYW55500A1.hcd
|
||||
# Attach serial UART to the Bluetooth stack
|
||||
btattach -B /dev/ttySTM1 -P bcm -S 921600 &
|
||||
sleep 2
|
||||
|
||||
# Up the interface to be able to send hci commands
|
||||
if ! hciconfig hci0 up; then
|
||||
log err "FAILED (hci0 up)"
|
||||
exit
|
||||
fi
|
||||
log info "OK"
|
||||
}
|
||||
|
||||
bt_init
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=CYW55512 Bluetooth Initialization
|
||||
After=network.target suspend.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/etc/cyw55512-bluetooth
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target suspend.target
|
||||
Binary file not shown.
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2023-2024, Digi International.
|
||||
# Copyright (C) 2023,2024, Digi International Inc.
|
||||
|
||||
SUMMARY = "Murata NXP firmware binaries"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
|
|
@ -27,4 +27,4 @@ do_install () {
|
|||
FILES:${PN} = "${nonarch_base_libdir}/firmware"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
COMPATIBLE_MACHINE = "ccimx93"
|
||||
COMPATIBLE_MACHINE = "(ccimx9)"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2016-2023 Digi International.
|
||||
# Copyright (C) 2016-2023, Digi International Inc.
|
||||
|
||||
SUMMARY = "Qualcomm firmware files for Digi's platforms."
|
||||
SECTION = "base"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
# Copyright (C) 2014 Digi International.
|
||||
# Copyright (C) 2014, Digi International Inc.
|
||||
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue