Hi, I am trying to integrate cryptodev_linux component. I used the following commands to generate bootpartition.
$ flex-builder -c cryptodev_linux -a arm64
$ flex-builder -c openssl -a arm64
$ flex-builder -i merge-component -a arm64:
$ flex-builder -i mkbootpartition -a arm64
I copied the bootpartition in sd card and used the following command in the kit.
flex-installer -b bootpartition_LS_arm64_lts_5.4.tgz -r rootfs_lsdk2004_ubuntu_main_arm64.tgz -d /dev/mmcblk0
when i reboot the kit and run the following command ,
modprobe caamalg
It shows error as
"caamalg not found in modules.dep"
How do i make openssl use sec engine for the operations?? Kindly help.
已解决! 转到解答。
Please execute the following commands
$ flex-builder -c cryptodev_linux -a arm64
$ flex-builder -c openssl -a arm64:
$ flex-builder -i merge-component -a arm64
$ flex-builder -i mkbootpartition -a arm64
$ flex-builder -i mkrfs -r ubuntu:main
Then run the following command, please note you need to use /dev/mmcblk0(the device name)
# flex-installer -b bootpartition_LS_arm64_lts_5.4.tgz -r rootfs_lsdk2004_ubuntu_main_arm64.tgz -d /dev/mmcblk0
If you want to use "modprobe caamalg", you need to build caamalg as Linux Kernel module when build Linux Kernel image, you need to configure "CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API" as "m" in Linux Kernel configuration file.
However in the default Linux Kernel configuration file, these SEC related Kernel options have already been configured as built-in mode, so "modprobe caamalg" is not needed.
# CONFIG_CRYPTO_DEV_MARVELL_CESA is not set
CONFIG_CRYPTO_DEV_FSL_CAAM_COMMON=y
CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC=y
CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC=y
CONFIG_CRYPTO_DEV_FSL_CAAM=y
# CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG is not set
CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y
CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9
# CONFIG_CRYPTO_DEV_FSL_CAAM_INTC is not set
CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y
CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_QI=y
CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y
CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y
CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y
You need to use "modprobe cryptodev" for hardware offloading with OpenSSL.
Please mount the second SD partition to /mnt, then check whether cryptodev.ko exists in module folder.
$ mount /dev/mmcblk0p2 /mnt
root@localhost:~# find /mnt/modules/ -name cryptodev.ko
/mnt/modules/4.19.90/extra/cryptodev.ko
/mnt/modules/5.4.3/extra/cryptodev.ko
If cryptodev.ko exists in the bootpartition, please check whether it exists in the rootfs filesystem.
root@localhost:~# find / -name cryptodev.ko
/boot/modules/4.19.90/extra/cryptodev.ko
/boot/modules/5.4.3/extra/cryptodev.ko
You could use the pre_built images which could be downloaded as the following.
$ wget https://www.nxp.com/lgfiles/sdk/lsdk2004/bootpartition_LS_arm64_lts_5.4.tgz
$ wget https://www.nxp.com/lgfiles/sdk/lsdk2004/rootfs_lsdk2004_ubuntu_main_arm64.tgz
I tried the steps suggested by you . I have attached error enclosed.
How do i integrate cryptodev with openssl and create an image as i want it to be part of the image. I tried these steps as suggested by you in one of my pevious query
flex-builder -c cryptodev_linux -a arm64 $
flex-builder -c openssl -a arm64 $
flex-builder -i mkrfs -r yocto:tiny $ f
flex-builder -i merge-component -r yocto:tiny $
flex-builder -i mklinux -r yocto:tiny $
flex-builder -i mkfw -m ls1046ardb -b qspi
But still when i type modprobe cryptodev , I get the following error,
Cryptodev not found in modules.dep.
In LSDK 20.04, Kernel module cryptodev.ko is integrated in bootpartition.
Please execute the following commands
$ flex-builder -c cryptodev_linux -a arm64
$ flex-builder -c openssl -a arm64:
$ flex-builder -i merge-component -a arm64
$ flex-builder -i mkbootpartition -a arm64
$ flex-builder -i mkrfs -r ubuntu:main
Then run the following command, please note you need to use /dev/mmcblk0(the device name)
# flex-installer -b bootpartition_LS_arm64_lts_5.4.tgz -r rootfs_lsdk2004_ubuntu_main_arm64.tgz -d /dev/mmcblk0
Thanks for the reply.
I tried your previous instruction.
When i enter the following , I get this error
root@TinyLinux:/mnt# /mnt/modules/5.4.3/extra/cryptodev.ko
-sh: /mnt/modules/5.4.3/extra/cryptodev.ko: Permission denied
Please execute the following commands
$ flex-builder -c cryptodev_linux -a arm64
$ flex-builder -c openssl -a arm64:
$ flex-builder -i merge-component -a arm64
$ flex-builder -i mkbootpartition -a arm64
$ flex-builder -i mkrfs -r ubuntu:main
Then run the following command, please note you need to use /dev/mmcblk0(the device name)
# flex-installer -b bootpartition_LS_arm64_lts_5.4.tgz -r rootfs_lsdk2004_ubuntu_main_arm64.tgz -d /dev/mmcblk0
Sir ,
I executed those instructions. everything worked fine. Now how do i link openssl with cryptodev ?
For that I executed ur previous instruction
root@localhost:~# find /mnt/modules/ -name cryptodev.ko
root@TinyLinux:/mnt# /mnt/modules/5.4.3/extra/cryptodev.ko
-sh: /mnt/modules/5.4.3/extra/cryptodev.ko: Permission denied