AN12714 "i.MX Encrypted Storage Using CAAM Secure Keys" refers to the "caam-keygen" user space application. I'm using Yocto with meta-freescale, and thought it would have a bitbake recipe for this tool. But it seems it doesn't.
The file SCR/SCR-5.15.32-2.0.0.txt does list package keyctl_caam.git, at git repo location https://source.codeaurora.org/external/imx/keyctl_caam. That's all it has, as far as I can tell.
Is there a Yocto bitbake recipe anywhere for the "caam-keygen" tool, aka keyctl_caam package?
Before @Harvey021's response, I wrote my own recipe as follows.
SUMMARY = "Key generation using NXP CAAM"
HOMEPAGE = "https://www.nxp.com/"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=8636bd68fc00cc6a3809b7b58b45f982"
SRCBRANCH = "master"
SRC_URI = "git://source.codeaurora.org/external/imx/keyctl_caam;protocol=https;branch=${SRCBRANCH}"
PV = "5.15.5-1.0.0+git${SRCPV}"
PR = "r0"
S = "${WORKDIR}/git"
B = "${WORKDIR}/git"
SRCREV = "81dc06cdb9c4d0d4ba10459d85af9a8603774948"
TARGET_CC_ARCH += "${LDFLAGS}"
do_compile() {
oe_runmake KEYBLOB_LOCATION=./ all
}
do_install () {
install -d ${D}/${bindir}/
install -m 0755 ${B}/caam-keygen ${D}${bindir}/
}
FILES:${PN} += "${bindir}"
I happened to be having bsp5.4.47 and can see them as below.
recipes:
./meta-imx/meta-bsp/recipes-security/smw/keyctl-caam_git.bb
packages:
./build/tmp/deploy/images/imx8mmevk/keyctl_caam/caam-keygen
./build/tmp/deploy/images/imx8mmevk/keyctl_caam/caam-keygen.h
./build/tmp/deploy/images/imx8mmevk/keyctl_caam/caam-keygen.c
./build/tmp/deploy/images/imx8mmevk/keyctl_caam/caam-keygen_priv.h
./build/tmp/deploy/images/imx8mmevk/keyctl_caam/caam-keygen.o
Best regards
Harvey
Thanks, it's good to know about meta-imx.
I've been using meta-freescale. It's not clear to me what is the provenance and scope of each of these Yocto layers.
Hi
meta-freescale provides support for the base and for i.MX Arm reference boards.
meta-imx provides updates for meta-freescale, poky and others, and other sub-layers.
You can get more details from Yocto User Guide.
Best regards
Harvey