This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OMAP L138 Crypto Build Problem

Other Parts Discussed in Thread: OMAP-L138

This is probably more of a generic Linux problem than an OMAP-L138 specific problem, but I'm going to start here.  I have an OMAP-L138 EVM kit and am trying to build in simple ECB encryption test code.  I'm trying to borrow code from <kernel>/crypto/tcrypt.c and make a sample application to encrypt and decrypt a small block of data.  When I include the same headers as tcrypt.c, I get a compile error in my application build process.  The error points all the way down to rwsem.h, indicating that it cannot find <asm/rwsem.h>.  Looking at rwsem.h, there's clearly a compile switch.

<code>

#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK
#include <linux/rwsem-spinlock.h> /* use a generic implementation */
#else
#include <asm/rwsem.h> /* use an arch-specific implementation */
#endif

</code>

Looking around, I see that CONFIG_RWSEM_GENERIC_SPINLOCK is defined in .config and linux/autoconf.h.  My question is, how do I let my build process (Makefile) know that this value is defined in a "logical" manner?

The easier question to answer, maybe, is does anybody have a sample user-app that accesses the Linux Crypto API to encrypt/decrypt data blocks on a Davinci/OMAP platform?

Thanks for any suggestions.