Where is kmod-cryptodev?

I am trying to build 18.06.2 but I am not sure where the kmod-cryptodev is in menuconfig?

When I start make I see with warning:

WARNING: Makefile 'package/feeds/packages/gnutls/Makefile' has a dependency on 'kmod-cryptodev', which does not exist

I checked my old openwrt image and there is a kmod-cryptodev ... what am I doing wrong?

Which one?

https://openwrt.org/packages/table/start?dataflt[Description_wiki*~]=crypto

The one mentioned in the warning... 'kmod-cryptodev' ?
I think it is this one?
https://github.com/openwrt/packages/tree/openwrt-18.06/utils/cryptodev-linux

But I am not able to find it in menuconfig somehow? (I see luci and other packages fine)

I don't see that listed in the Package Table.

Should be under

Kernel modules->Cryptographic

@lleachii yes it is not there, but is it because it comes with feeds? I can see unrar/unzip in utilities for example but not in the packages list.
@anomeome I do not see it in menuconfig with kernel modules, do you?

In packages.index file I see

Package: kmod-cryptodev
Submenu: Cryptographic API modules

Yes, but I do not build 18.x, I assume:

./scripts/feeds update -a
./scripts/feeds install -a

has transpired, does the search facility "/" find it; although I do not think there is any dependency which would hide that kmod.

1 Like

@anomeome yes of course I updated/installed the feeds. As I mentioned I am able to see many other utilities etc. just fine... strange...

Perhaps a silly question, but does your target support a crypto device?

1 Like

@jeff I am not sure :slight_smile: I am building for MT7621 but I don't think it matters. It should work same even if you do not have hardware. That is the point of /dev/crypto, the software can take advantage of crypto support without any changes if there is hardware support available. But also opkg does not seem to find it and it is not in packages list. Shouldn't it exist as a package at least?

Maybe it is best that somebody who has 18.06.2 sources comment on this.

Works fine here with openwrt-18.06 sources (as well as on the v18.06.2 tag)

jeff@deb-devel:~/devel/openwrt$ ./scripts/diffconfig.sh 
CONFIG_TARGET_ramips=y
CONFIG_TARGET_ramips_mt7621=y
CONFIG_TARGET_ramips_mt7621_DEVICE_mt7621=y
CONFIG_PACKAGE_kmod-crypto-aead=y
CONFIG_PACKAGE_kmod-crypto-authenc=y
CONFIG_PACKAGE_kmod-crypto-hash=y
CONFIG_PACKAGE_kmod-crypto-manager=y
CONFIG_PACKAGE_kmod-crypto-null=y
CONFIG_PACKAGE_kmod-crypto-pcompress=y
CONFIG_PACKAGE_kmod-cryptodev=y

@jeff When I make the link manually, it appears in menuconfig. After this->
~/openwrt/package/feeds/packages$ ln -s ../../../feeds/packages/utils/cryptodev-linux cryptodev-linux

I am able to remove the link

$ ./scripts/feeds  uninstall cryptodev-linux
Uninstalling package 'cryptodev-linux'

but when I install it, it does not make the symlink

$ ./scripts/feeds install cryptodev-linux
WARNING: Makefile 'package/feeds/packages/gnutls/Makefile' has a dependency on 'kmod-cryptodev', which does not exist
$ ls package/feeds/packages/cryptodev-linux
ls: cannot access 'package/feeds/packages/cryptodev-linux': No such file or directory
$

It works if I force it

$ ./scripts/feeds install -f cryptodev-linux
WARNING: Makefile 'package/feeds/packages/gnutls/Makefile' has a dependency on 'kmod-cryptodev', which does not exist
Overriding core package 'cryptodev-linux' with version from packages
$ ls package/feeds/packages/cryptodev-linux
Makefile
$

Does this mean that it thinks that cryptodev-linux exists in core openwrt?
Also this does not explain why it does not show up at https://openwrt.org/packages/table/start?dataflt[Description_wiki*~]=crypto

I checked the feeds script and the is_core_src function was checking some files from tmp folder. I deleted the tmp folder and then re-executed

./scripts/feeds update -a
./scripts/feeds install -a

Then it started working normally...

$ ./scripts/feeds uninstall cryptodev-linux
Uninstalling package 'cryptodev-linux'
$ ./scripts/feeds install cryptodev-linux
WARNING: Makefile 'package/feeds/packages/gnutls/Makefile' has a dependency on 'kmod-cryptodev', which does not exist
Installing package 'cryptodev-linux' from packages
$ ls package/feeds/packages/cryptodev-linux
Makefile

Also the warning about kmod-cryptodev disappears once it is installed...

It seems like something was messed up in the tmp folder which cause this apparently...

I've found (and had recommended to me) that deleting ./tmp/ is needed to clear up dependency weirdness. My apologies for not thinking of that. I've had to delete it any time I make a change to device-level kernel config, such as config-4.19 or config-default

1 Like

I don't know what happened because I cloned this today fresh. Anyway, thanks for the help :slight_smile:
That said, it was not very useful as it seems to use -generic drivers for crypto... I thought MT7621 had hardware support for some crypto at least...

# cat /proc/crypto
name         : lzo
driver       : lzo-scomp
module       : kernel
priority     : 0
refcnt       : 1
selftest     : passed
internal     : no
type         : scomp

name         : lzo
driver       : lzo-generic
module       : kernel
priority     : 0
refcnt       : 2
selftest     : passed
internal     : no
type         : compression

name         : zlib-deflate
driver       : zlib-deflate-scomp
module       : kernel
priority     : 0
refcnt       : 1
selftest     : passed
internal     : no
type         : scomp

name         : deflate
driver       : deflate-scomp
module       : kernel
priority     : 0
refcnt       : 1
selftest     : passed
internal     : no
type         : scomp

name         : deflate
driver       : deflate-generic
module       : kernel
priority     : 0
refcnt       : 2
selftest     : passed
internal     : no
type         : compression

name         : ecb(arc4)
driver       : ecb(arc4)-generic
module       : kernel
priority     : 100
refcnt       : 1
selftest     : passed
internal     : no
type         : blkcipher
blocksize    : 1
min keysize  : 1
max keysize  : 256
ivsize       : 0
geniv        : <default>

name         : arc4
driver       : arc4-generic
module       : kernel
priority     : 0
refcnt       : 5
selftest     : passed
internal     : no
type         : cipher
blocksize    : 1
min keysize  : 1
max keysize  : 256

name         : aes
driver       : aes-generic
module       : kernel
priority     : 100
refcnt       : 4
selftest     : passed
internal     : no
type         : cipher
blocksize    : 16
min keysize  : 16
max keysize  : 32

name         : digest_null
driver       : digest_null-generic
module       : kernel
priority     : 0
refcnt       : 1
selftest     : passed
internal     : no
type         : shash
blocksize    : 1
digestsize   : 0

name         : compress_null
driver       : compress_null-generic
module       : kernel
priority     : 0
refcnt       : 1
selftest     : passed
internal     : no
type         : compression

name         : ecb(cipher_null)
driver       : ecb-cipher_null
module       : kernel
priority     : 100
refcnt       : 1
selftest     : passed
internal     : no
type         : blkcipher
blocksize    : 1
min keysize  : 0
max keysize  : 0
ivsize       : 0
geniv        : <default>

name         : cipher_null
driver       : cipher_null-generic
module       : kernel
priority     : 0
refcnt       : 1
selftest     : passed
internal     : no
type         : cipher
blocksize    : 1
min keysize  : 0
max keysize  : 0