Welcome! Log In Create A New Profile

Advanced

Anyone gotten cryptodev-linux working for kirkwood (Debian Squeeze)

Posted by wooglez 
Anyone gotten cryptodev-linux working for kirkwood (Debian Squeeze)
September 14, 2012 07:02PM
Has anyone succesfully gotten openssl patched to use the Marvell Kirkwoods AES hardware acceleration?
I've found these links detailing part of the process :
link1
link2
link3
But I'm running kernel 2.6.32-5-kirkwood and some of the links in the scripts are dead (http://archlinuxarm.org/mirror/with-linux/kernel/2/2.6/2.6.38/2.6.38.8/sheeva-2.6.38.8.config)
Any help appreciated.
Re: Anyone gotten cryptodev-linux working for kirkwood (Debian Squeeze)
September 24, 2012 07:48AM
get the latest openssl source code 1.0.1c as of my writeing and just compile it with -DHAVE_CRYPTODEV no patches needed last time i compiled it. then compile and install the cryptodev module.
Re: Anyone gotten cryptodev-linux working for kirkwood (Debian Squeeze)
October 11, 2012 12:02AM
I got as far as make with openssl and then it spazzed out on me. Could you take a look?
You did this all on debian squeeze also? I'd already successfully compiled and loaded / unloaded the module.
Hi wooglez,

have you tried it 'the Debian way'?

you can actually download the source package with the whole build env that was used to build the package that is in the archives. Edit it and you will get a package that you can install and uninstall whenever you like.

Now, I see that the most recent version on Squeeze is 0.9.8o, so you have to get the source package from the wheezy repository.
Add the following two lines to /etc/apt/sources.list:
 deb http://backports.debian.org/debian-backports squeeze-backports main
 deb-src http://ftp.de.debian.org/debian/ wheezy main
do a
 sudo apt-get update
and go through the following procedure:
 # install some necessities:
 sudo apt-get install dpkg-dev debhelper=9.20120608~bpo60+1

 # install the source ball:
 apt-get source openssl    # that's right: NO 'sudo'

 cd openssl-1.0.1c/
 vi debian/rules
 # edit the CONFARGS variable to contain -DHAVE_CRYPTODEV

 # the following may tell you that some development libraries and stuff like m4 are missing, so install them and repeat the command:
 dpkg-buildpackage -us -uc
 # go enjoy a beverage of your choice...

 # at last:
 sudo dpkg -i ../openssl_1.0.1c-4_armel.deb
and you should have it installed.

I installed it on a Dreamplug, but under wheezy, though the procedure I suggest contains extra steps which should make it work under squeeze. But your mileage may vary, as I have not thoroughly tested them.

I hope that helps,

cheers,

t1m
Re: Anyone gotten cryptodev-linux working for kirkwood (Debian Squeeze)
October 15, 2012 03:26AM
Do I understand correctly, that additionally kernel support with headers need to be present?
eng_cryptodev.c:57:30: fatal error: crypto/cryptodev.h: No such file or directory
Re: Anyone gotten cryptodev-linux working for kirkwood (Debian Squeeze)
October 15, 2012 06:15AM
t1m thanks so much for your excellent response, you have no idea how much I've been searching to get this working on my pogo. I actually prefer to do things the debian way but I was finding very little in the way of steps or resources to get this working. So I truly appreciate the time you put into such a detailed post. However I'm still failing at the last step. I'm currently re-running 'dpkg-buildpackage -us -uc' with a log to post so someone can see where I went wrong. I'll link it in my next followup post.



Edited 1 time(s). Last edit at 10/15/2012 10:28AM by wooglez.
Hi wooglez,

glad I could be of help.

maybe the following will also help. The output you attached to your second post looks like you haven't got 'libc6-dev' installed (standard C headers like stdlib.h come with it, and they seem to be missing in your installation).

therefore my tip: install libc6-dev :)

hth,

cheers,

t1m
nielsek Wrote:
-------------------------------------------------------
> Do I understand correctly, that additionally
> kernel support with headers need to be present?
> eng_cryptodev.c:57:30: fatal error:
> crypto/cryptodev.h: No such file or directory

Yes, you have to install the cryptodev kernel module and development files.

If you followed the instructions detailed under Link2 from the OP, you should get the header installed in /usr/include/crypto.

cheers,

t1m
Re: Anyone gotten cryptodev-linux working for kirkwood (Debian Squeeze)
October 23, 2012 07:33PM
hey t1m,
I've actually got libc6-dev installed, I can't find a good way to log the output from the dpkg-buildpakage command. I'm attempting to tee it to a seperate file but it's ending before the error messages start occuring.
Here's my command :
dpkg-buildpackage -us -uc |tee -i ../build_openssl_output.log
(moved up a directory so it doesn't try to build it)

EDIT
output is here: http://paste.debian.net/203714/
unfortunately it's not logging where it errors out
I managed to get some of them here: http://paste.debian.net/203713/
but there's a bit of overlap



Edited 2 time(s). Last edit at 10/25/2012 07:48PM by wooglez.
Hi wooglez,

it seems you have not done the
make install
in the crypto-dev source. This way, the include files will be installed into /usr/include/crypto and should be found by the compiler/preprocessor. The error you posted shows that the headers of the crypto-device are missing.

cheers,

t1m

sorry for the delay, I am quite busy...

wooglez Wrote:
-------------------------------------------------------
> hey t1m,
> I've actually got libc6-dev installed, I can't
> find a good way to log the output from the
> dpkg-buildpakage command. I'm attempting to tee it
> to a seperate file but it's ending before the
> error messages start occuring.
> Here's my command :
> dpkg-buildpackage -us -uc |tee -i ../build_openssl_output.log

Try with
dpkg-buildpackage -us -uc 2>&1 | tee -i ../build_openssl_output.log

> (moved up a directory so it doesn't try to build
> it)
>
> EDIT
> output is here: http://paste.debian.net/203714/
> unfortunately it's not logging where it errors
> out
> I managed to get some of them here:
> http://paste.debian.net/203713/
> but there's a bit of overlap
Re: Anyone gotten cryptodev-linux working for kirkwood (Debian Squeeze)
November 12, 2012 07:58PM
hey t1m,
I'm pretty sure I did make install when getting compiling the cryptodev module. Perhaps I'm misunderstanding. I redid make install in my cryptodev-20091126/ directory and it shows some headers in /usr/include/crypto as well as having a module that inserts correctly. I'm still getting the same error running dpkg-buildpackage -us -uc however. Let me know if there's a better medium to contact you via (perhaps IRC?) no need to apologize, I'm really grateful I'm getting any help on this at all.

latest pastebin of what my directories look like paste



Edited 1 time(s). Last edit at 11/12/2012 07:59PM by wooglez.
Re: Anyone gotten cryptodev-linux working for kirkwood (Debian Squeeze)
January 12, 2013 02:10AM
revisiting this thread again,
turns out I didn't have the crypto headers in /usr/include/crypto like t1m was suggesting. re-installing crypto-dev with
make 
make install
added them correctly now.
I then re-ran as root.
dpkg-buildpackage -us -uc
runs much longer now, the end however still errors out.
link to output/error



Edited 1 time(s). Last edit at 01/12/2013 02:11AM by wooglez.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: