Skip to content

Commit

Permalink
linux-iot2050: Make PVU only available for secureboot build
Browse files Browse the repository at this point in the history
Signed-off-by: Li Hua Qian <huaqian.li@siemens.com>
  • Loading branch information
huaqianli committed Dec 3, 2024
1 parent 5fa7bec commit 2ec0879
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
1 change: 1 addition & 0 deletions kas/opt/secure-boot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ local_conf_header:
secureboot_override: |
OVERRIDES .= ":uefi-stmm"
OVERRIDES .= ":secureboot"
OVERRIDES .= ":pvu-dma"
secure-boot-signer: |
IMAGER_BUILD_DEPS += "ebg-secure-boot-signer"
IMAGER_INSTALL += "ebg-secure-boot-signer"
Expand Down
1 change: 0 additions & 1 deletion recipes-kernel/linux/files/iot2050_defconfig_base
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,6 @@ CONFIG_RPMSG_QCOM_GLINK_RPM=y
CONFIG_RPMSG_VIRTIO=m
CONFIG_TI_SCI_PM_DOMAINS=y
CONFIG_TI_PRUSS=y
CONFIG_TI_PVU=y
CONFIG_EXTCON_PALMAS=m
CONFIG_EXTCON_USB_GPIO=m
CONFIG_MEMORY=y
Expand Down
27 changes: 26 additions & 1 deletion recipes-kernel/linux/linux-iot2050-6.1.inc
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,37 @@ def get_patches(d, patchdir):

return ' '.join(['file://' + patch[len(files_dir)+1:] for patch in patches])

def get_extra_configs(d):
import re
import os

overrides = d.getVar('OVERRIDES')
append_config = []

if re.search("pvu-dma", overrides):
append_config.append('CONFIG_TI_PVU=y')

if append_config:
append_config_file = os.path.join(d.getVar('T'), 'iot2050_append_config.cfg')
append_config_dir = os.path.dirname(append_config_file)

# isar/bitbake/lib/bb/data_smart.py will check for all bb file even not current build bb
if not os.path.exists(append_config_dir):
return ''
with open(append_config_file, 'w') as f:
for line in append_config:
f.write(line + '\n')
return 'file://' + append_config_file
else:
return ''

SRC_URI += " \
https://cdn.kernel.org/pub/linux/kernel/projects/cip/6.1/linux-cip-${PV}.tar.xz \
${@get_patches(d, 'patches-6.1')} \
file://patches-6.1/ \
file://${KERNEL_DEFCONFIG} \
file://iot2050_defconfig_extra.cfg"
file://iot2050_defconfig_extra.cfg \
${@get_extra_configs(d)} "

S = "${WORKDIR}/linux-cip-${PV}"

Expand Down

0 comments on commit 2ec0879

Please sign in to comment.