LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-10-2014, 12:26 PM   #1
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Rep: Reputation: Disabled
Compiling cryptodev on Geode LX500 -


Hopefully some programmer types can help me out, as I am not one in the slightest.

Trying to compile cryptodev so as to be able to use the AES engine in the Geode CPU. This is the output of make:

Code:
make -C /lib/modules/3.14.0-4-ARCH/build SUBDIRS=`pwd` modules
make[1]: Entering directory '/usr/lib/modules/3.14.0-4-ARCH/build'
  CC [M]  /root/cryptodev-linux-1.6/ioctl.o
/root/cryptodev-linux-1.6/ioctl.c:710:21: warning: âis_known_acceleratedâ defined but not used [-Wunused-function]
 static unsigned int is_known_accelerated(struct crypto_tfm *tfm)
                     ^
  CC [M]  /root/cryptodev-linux-1.6/main.o
  CC [M]  /root/cryptodev-linux-1.6/cryptlib.o
/root/cryptodev-linux-1.6/cryptlib.c: In function âcryptodev_cipher_encryptâ:
/root/cryptodev-linux-1.6/cryptlib.c:223:2: error: implicit declaration of function âINIT_COMPLETIONâ [-Werror=implicit-function-declaration]
  INIT_COMPLETION(cdata->async.result->completion);
  ^
cc1: some warnings being treated as errors
scripts/Makefile.build:308: recipe for target '/root/cryptodev-linux-1.6/cryptlib.o' failed
make[2]: *** [/root/cryptodev-linux-1.6/cryptlib.o] Error 1
Makefile:1274: recipe for target '_module_/root/cryptodev-linux-1.6' failed
make[1]: *** [_module_/root/cryptodev-linux-1.6] Error 2
make[1]: Leaving directory '/usr/lib/modules/3.14.0-4-ARCH/build'
Makefile:18: recipe for target 'build' failed
make: *** [build] Error 2
This is the makefile:

Code:
#
# Since version 1.6 the asynchronous mode has been
# disabled by default. To re-enable it uncomment the
# corresponding CFLAG.
#
CRYPTODEV_CFLAGS ?= #-DENABLE_ASYNC
#CRYPTODEV_CFLAGS += -Wno-error
KBUILD_CFLAGS += -I$(src) $(CRYPTODEV_CFLAGS)
KERNEL_DIR = /lib/modules/$(shell uname -r)/build
VERSION = 1.6
PREFIX =

cryptodev-objs = ioctl.o main.o cryptlib.o authenc.o zc.o util.o

obj-m += cryptodev.o

build: version.h
        make -C $(KERNEL_DIR) SUBDIRS=`pwd` modules

version.h: Makefile
        @echo "#define VERSION \"$(VERSION)\"" > version.h

install: modules_install

modules_install:
        make -C $(KERNEL_DIR) SUBDIRS=`pwd` modules_install
        @echo "Installing cryptodev.h in $(PREFIX)/usr/include/crypto ..."
        @install -D crypto/cryptodev.h $(PREFIX)/usr/include/crypto/cryptodev.h

clean:
        make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean
        rm -f $(hostprogs) *~
        CFLAGS=$(CRYPTODEV_CFLAGS) KERNEL_DIR=$(KERNEL_DIR) make -C tests clean

check:
        CFLAGS=$(CRYPTODEV_CFLAGS) KERNEL_DIR=$(KERNEL_DIR) make -C tests check

FILEBASE = cryptodev-linux-$(VERSION)
TMPDIR ?= /tmp
OUTPUT = $(FILEBASE).tar.gz

dist: clean
        @echo Packing
        @rm -f *.tar.gz
        @mkdir $(TMPDIR)/$(FILEBASE)
        @cp -ar crypto extras tests examples Makefile *.c *.h README NEWS \
                AUTHORS COPYING $(TMPDIR)/$(FILEBASE)
        @rm -rf $(TMPDIR)/$(FILEBASE)/.git* $(TMPDIR)/$(FILEBASE)/releases $(TMPDIR)/$(FILEBASE)/scripts
        @tar -C /tmp -czf ./$(OUTPUT) $(FILEBASE)
        @rm -rf $(TMPDIR)/$(FILEBASE)
        @echo Signing $(OUTPUT)
        @gpg --output $(OUTPUT).sig -sb $(OUTPUT)
        @gpg --verify $(OUTPUT).sig $(OUTPUT)
        @mv $(OUTPUT) $(OUTPUT).sig releases/
It seems like there is an error in the cryptlib.c code? But i would have NO idea where to go from there... I have tried adding the -i switch to all the "make" statements in the Makefile, but that just made make skip the errors; it didn't actually build the program, i don't think.

EDIT tried changing the first line in the makefile to:
Code:
CRYPTODEV_CFLAGS ?= -Wno-error #-DENABLE_ASYNC
with of course no change in result.

Last edited by psycroptic; 04-10-2014 at 03:18 PM.
 
Old 04-10-2014, 03:56 PM   #2
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Original Poster
Rep: Reputation: Disabled
so i tried downloading cryptodev from another source (https://github.com/cryptodev-linux/cryptodev-linux/), and this one makes just fine. I do a make install:

Code:
make -C /lib/modules/3.14.0-4-ARCH/build SUBDIRS=`pwd` modules_install
make[1]: Entering directory '/usr/lib/modules/3.14.0-4-ARCH/build'
  INSTALL /root/cryptodev-linux-master/cryptodev.ko
  DEPMOD  3.14.0-4-ARCH
make[1]: Leaving directory '/usr/lib/modules/3.14.0-4-ARCH/build'
Installing cryptodev.h in /usr/include/crypto ...
Looks like it installed, no errors reported, but it doesn't actually install; nothing is placed in /usr/lib/modules/3.14.0-4-ARCH/build/* relating to cryptodev, and /dev/crypto does not exist.

Any ideas, or is this a dead-end?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedded linux on Geode LX, how to?? webquinty Linux - Newbie 4 08-10-2009 06:06 PM
Logitech LX500 - Mouse click results in keystroke insanetek Linux - Hardware 0 07-11-2005 07:55 PM
Geode sc1200 radhapriya General 1 04-02-2003 01:30 AM
Geode sc1200 radhapriya Programming 1 03-31-2003 02:13 PM
Geode sc1200 radhapriya Linux - Hardware 0 03-31-2003 03:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration