Integration example using OPTIGA Trust M with Raspberry Pi 4 and Yocto
In this example we will build a Raspberry Pi image containing the linux-optiga-trust-m tooling. The toolkit will be directly installed and usable on your Raspberry Pi 4, so that you can explore the features offered by the platform. This versatile platform is directly usable, and will allow you to implement many security solutions such as device authentication, secure communications.Using Thistle Yocto Build, it is very easy to build fully usable images directly with Yocto. For this example we will use a Raspberry Pi 4 as a target platform, and connect it to a Adafruit Infineon Trust M Breakout Board with a Qwiic adapter from Sparkfun.
To quickly get started, we can use the gen-config option of thistle-yocto-build. This will generate the default configuration for the Raspberry Pi 4.
Copy
Ask AI
$ ./thistle-yocto-build gen-config rpi4Generated default thistle-yocto-build config file at conf.yml
We now need to amend the configuration, so that the trust-m package provided by meta-thistle will be built and installed on the target. We also enabled i2c on the Raspberry Pi, and enabled automatic loading of the i2c kernel module.
We can now build the image! Building this image takes approximately 60 minutes on a Ryzen5 3600, and requires ~50GB of free storage. This build will be performed in debug mode, with SSH enabled.
We can now connect the Raspberry Pi 4, and test the Trust M tooling!
Copy
Ask AI
# connect using SSH and the credentials set at build-time$ ssh thistle@192.168.4.41# get chipinfo of connected Trust M$ raspberrypi4-64-thistle:~$ sudo trustm_chipinfoPassword:
Copy
Ask AI
Read Chip Info [0xE0C2]: Success.========================================================CIM Identifier [bCimIdentifer]: 0xcdPlatform Identifer [bPlatformIdentifier]: 0x16Model Identifer [bModelIdentifier]: 0x33ID of ROM mask [wROMCode]: 0x8401Chip Type [rgbChipType]: 0x00 0x1c 0x00 0x01 0x00 0x00Batch Number [rgbBatchNumber]: 0x0a 0x09 0x1b 0x5c 0x00 0x0bX-coordinate [wChipPositionX]: 0x002cY-coordinate [wChipPositionY]: 0x0055Firmware Identifier [dwFirmwareIdentifier]: 0x80101071Build Number [rgbESWBuild]: 08 09Chip software build:OPTIGA Trust M rev.1; Firmware Version: 1.30.809========================================================