linux4sam / meta-atmel

OpenEmbedded/Yocto Project layer for for Microchip SoC (aka AT91)
https://www.linux4sam.org/bin/view/Linux4SAM/YoctoProject
MIT License
91 stars 120 forks source link

bitbake cryptoauthlib doesnt found the recipe? #172

Closed hsnhrn closed 4 years ago

hsnhrn commented 4 years ago

Hi i have cloned the layer and trying to build it using bitbake. But the recipes in dynamic-layers are not being found with bitbake command. How can i add recipes which are in dynamic-layers folder into my image?

codrin989 commented 4 years ago

Hi @hsnhrn . For the recipes from dynamic-layers/aws-layer you need to also clone meta-aws layer, from https://github.com/aws/meta-aws . Please see https://github.com/linux4sam/meta-atmel/blob/dunfell/README#L45 for more details. Are you trying to build only cryptoauthlib?

hsnhrn commented 4 years ago

hi @codrin989 thanks for your reply, i also need python3-cryptoauthlib..

hsnhrn commented 4 years ago

I cloned the meta-aws and added it to my bblaers but getting this error on ruunning bitbake cryptoauthlib ERROR: Nothing PROVIDES 'eudev' (but /home/user/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-06-24/layers/meta-atmel/dynamic-layers/aws-layer/recipes-security/cryptoauthlib/cryptoauthlib_git.bb DEPENDS on or otherwise requires it) eudev was skipped: conflicting distro feature 'systemd' (in DISTRO_FEATURES) ERROR: Required build target 'cryptoauthlib' has no buildable providers. Missing or unbuildable dependency chain was: ['cryptoauthlib', 'eudev']

codrin989 commented 4 years ago

It looks like there is a conflict between systemd and eudev. If you really want to use systemd instead of sysvinit, try replacing 'eudev' with 'udev' here: https://github.com/linux4sam/meta-atmel/blob/dunfell/dynamic-layers/aws-layer/recipes-security/cryptoauthlib/cryptoauthlib_git.bb#L11

hsnhrn commented 4 years ago

Thanks a lot. worked fine now!!

colin-pm commented 4 years ago

@codrin989 I know this task is closed, but can I ask why meta-aws is a dependency of cryptoauthlib?

codrin989 commented 4 years ago

Hi @colin-pm . For us, cryptoauthlib only made sense when used in relation with greengrass. If this is not the case (and it looks like it's not), please make a new feature request. Or you could make a pull request directly :)

hsnhrn commented 4 years ago

@codrin989 i am trying to run these examples https://github.com/MicrochipTech/cryptoauthtools/tree/master/python/examples but i am not able to import cryptoauthlib and got this error below : File "/usr/lib/python3.8/site-packages/cryptoauthlib/init.py". line 16. in load_cryptoauthlib() File "/usr/lib/python3.8/site-packages/cryptoauthlib/library.py". line 83. in load_cryptoauthlib() _CRYPTO_LIB =ctypes.cdll.LoadLibrary(os.path.join(curr_path. "libcryptoauth.so")) File "/usr/lib/python3.8/ctypes/init.py". line 451. in LoadLibrary return self._dlltype(name) File "/usr/lib/python3.8/ctypes/init.py". line 373. in init self._handle = _dlopen(self._name mode) OSError : /usr/lib/python3.8/site-packages/cryptoauthlib/libcryptoauth.so: undefined symbol: hid_open

As you mentioned above it only make sense to use it with greengrass. So is this error related to soemthing like that? and can i fix this somehow?

I dont know whether its right to open this again or should i create a new post?

codrin989 commented 4 years ago

Hi @hsnhrn . Yes, please open a new post, this is something different. Thanks!