I am working with LS1046ARDB Evaluation Board to develop a network based application. I have started my project with Flex-builder(flexbuild_lsdk2108), Flex-installer(version: 1.13.2108) and Codewarrior IDE.
Q1: Cryptodev failure in LS1046ARDB
I have depolyed the image's in SD card through flex-installer:
Steps which i followed for Installing :
flex-builder -c linux:custom
/*automate caam load*/
# CONFIG_CRYPTO_DEV_FSL_CAAM_DMA 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_KEYBLOB_API_DESC=y
CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=m
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
CONFIG_CRYPTO_DEV_FSL_CAAM_TK_API=y
# CONFIG_CRYPTO_DEV_FSL_CAAM_TK_API_TEST is not set
CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_TEST=y
CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y
CONFIG_CRYPTO_DEV_FSL_CAAM_SM_SLOTSIZE=7
CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST=m
CONFIG_CRYPTO_DEV_FSL_CAAM_JR_UIO=y
flex-builder -c linux -a arm64
flex-builder -c openssl -a arm64
flex-builder -c dpdk -a arm64
flex-builder -c pktgen_dpdk -a arm64
flex-builder -c ovs_dpdk -a arm64
flex-builder -c cryptodev_linux -a arm64
flex-builder -i mkrfs -r ubuntu:main
flex-builder -i mkboot
flex-builder -i merge-component -a arm64
flex-builder -i packrfs
flex-builder -i mkfw -m ls1046ardb
flex-installer -i pf -d /dev/sdb
sudo flex-installer -b boot_LS_arm64_lts_5.10_202308021034.tgz -r rootfs_lsdk2108_ubuntu_main_arm64_202308021035.tgz -f firmware_ls1046ardb_sdboot.img -d /dev/sdb
console Output :
user@localhost:~$ ls /dev/crypto
ls: cannot access '/dev/crypto': No such file or directory
user@localhost:~$ sudo modprobe caam
[sudo] password for user:
user@localhost:~$ dmesg | grep -i caam
[ 3.033910] caam 1700000.crypto: Linux CAAM Queue I/F driver initialised
[ 3.040877] caam 1700000.crypto: device ID = 0x0a11030100000000 (Era 8)
[ 3.047505] caam 1700000.crypto: job rings = 3, qi = 1
[ 3.073367] caam algorithms registered in /proc/crypto
[ 3.079229] caam 1700000.crypto: caam pkc algorithms registered in /proc/crypto
[ 3.088679] caam 1700000.crypto: algorithms registered in /proc/crypto
[ 3.095354] caam 1700000.crypto: registering rng-caam
[ 3.104012] caam 1700000.crypto: wanted 32 bytes, got 0
[ 3.109315] caam 1700000.crypto: wanted 64 bytes, got 0
[ 3.114561] caam 1700000.crypto: wanted 128 bytes, got 0
[ 3.180669] caam 1700000.crypto: wanted 32 bytes, got 16
[ 3.234143] caam 1700000.crypto: wanted 64 bytes, got 16
[ 3.287644] caam 1700000.crypto: wanted 128 bytes, got 16
[ 3.293154] Device caam-keygen registered
[ 3.306444] caam_jr 1730000.jr: failed to flush job ring 2
[ 3.311962] caam_jr: probe of 1730000.jr failed with error -5
user@localhost:~$ sudo modprobe cryptodev
modprobe: FATAL: Module cryptodev not found in directory /lib/modules/5.10.35-dirty
user@localhost:~$
Q2:u-boot-qoriq build for LS1046ARDB is not using the right env
flex-installer -i pf -d /dev/sdb
sudo flex-installer -b boot_LS_arm64_lts_5.10_202308021034.tgz -r rootfs_lsdk2108_ubuntu_main_arm64_202308021035.tgz -f firmware_ls1046ardb_sdboot.img -d /dev/sdb
Boot log :
Loading Environment from MMC... *** Warning - bad CRC, using default environment
Console log :
root@localhost:~# cat /etc/fw_env.config
/dev/mmcblk0 0x500000 0x2000
I have update the ENV_OFFSET 0x500000 & ENV_SIZE 0x2000 in fw_env.config in /etc according to above files.
root@localhost:~# fw_printenv -c /etc/fw_env.config
Environment WRONG, copy 0
Cannot read environment, using default
Cannot read default environment from file
root@localhost:~#
My question :
1.when I automate CAAM engine load in bootloader and i couldn't able to modprobe cryptodev .How to solve this issue ?
2.u-boot-qoriq build for LS1046ARDB is not using the right environment.can you guide me to find the correct offset and size?
1. When the system booting up, modules folder in the second bootparition will be copied to /lib/modules folder in rootfs automatically.
Please check whether lib/modules/5.10.35*/extra/cryptodev.ko exists in your rootfs. If no, please check whether cryptodev.ko exists in in the second bootparition of SD card, and please copy it manually.
2. Under u-boot.
=> env default -a
## Resetting to default environment
=> saveenv
Saving Environment to MMC... Writing to MMC(0)... OK