Hello All,
I am using IVY carrier board with running our custom Torizon OS Reference Minimal Image and kernel version is 6.6.94.
I want to add TPM support driver in our custom Torizon OS that we build in Yocto. I did following steps:
#TPM Integration
1. Enable TPM driver SLB9670 in kernel configuration
bitbake -c menuconfig virtual/kernel
//nevigate Device Drivers --> Character devices --> TPM Hardware Support
//Ensure the corresponding driver (e.g., CONFIG_TCG_TPM, CONFIG_TCG_TIS_SPI) is enabled as a module (M) or built-in (Y).
2. Open your build/conf/local.conf file in a text editor add below line
DISTRO_FEATURES:append = " tpm2"
IMAGE_INSTALL:append = " tpm2-tools tpm2-tss"
3. bitbake-layers create-layer ../layers/meta-tpm-driver // Create the custom layer
// Add customer layer path in conf/bblayers.conf you can do manually or using below command
bitbake-layers add-layer ../layers/meta-tpm-driver
// For modifying the kernel using yocto, create a custom recipes-kernel/linux recipe inside your layer,
// a linux-toradex directory to store your additional sources and a .bbappend file.
mkdir -p recipes-kernel/linux/linux-toradex
//Please note that instead of % you may want to append the change to a specific version (e.g. recipes-kernel/linux/linux-toradex_5.15%.bbappend)
touch recipes-kernel/linux/linux-toradex/linux-toradex_6.6%.bbappend
// Create the files folder under /home/vishal/oe-core/layers/meta-tpm-driver/recipes-kernel/linux
// below contents in my .bbappend file
# In meta-my-project/recipes-kernel/linux/linux-imx_%.bbappend
# 1. Point to your DTS source file in the 'files' directory
SRC_URI += "file://slm9670-tpm.dts"
# 2. Tell the kernel build system to compile this file into a .dtbo
IMX8M_KERNEL_DEVICETREE_OVERLAYS += "overlays/slm9670-tpm.dtbo"
# 3. Tell the Toradex boot scripts to activate it by default
IMX8M_EXTRA_CONFIG += "dtoverlay=slb9670-tpm"
4. //Create the .dts file in files folder go ot below
cd ~/oe-core/layers/meta-my-project/recipes-kernel/linux/files/
nano slm9670-tpm.dts
//Use below device tree
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&ecspi2>;
__overlay__ {
status = "okay"; // Ensure the parent bus is active
tpm: tpm@0 {
compatible = "infineon,slm9670";
reg = <0>;
spi-max-frequency = <10000000>;
status = "okay";
};
};
};
};
5. Verify TPM driver
ls -l /dev/tpm*
dmesg | grep -i tpm
When i did 5th steps in above “No such file or directory“ message will appear.
Please help me to address problem where I am doing wrong?
Thanks in Advanced..!!
Vishal


