Jump to content

Ubuntu: Driver compile problems [solved]


Recommended Posts

Hi guys,

I'm currently trying to compile IPW2100 & SLMDM in Ubuntu. After a real pain in the a$$ lot of twiddling, I believe I've got my kernel sources set up properly. However, when I try to compile them I get all sorts of errors like this:

 

root@ubuntu:~/slmdm-2.7.10 # make

gcc -Wall -O3 -fomit-frame-pointer -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -I. -I/ usr/src/linux/include -DMODVERSIONS --include /usr/src/linux/include/linux/modv ersions.h -o amrmo_init.o -c amrmo_init.c

<command line>:138477907:408: /usr/src/linux/include/linux/modversions.h: No suc h file or directory

In file included from /usr/include/asm/system.h:5,

from /usr/include/asm/processor.h:18,

from /usr/include/asm/thread_info.h:13,

from /usr/src/linux/include/linux/thread_info.h:21,

from /usr/src/linux/include/linux/spinlock.h:12,

from /usr/src/linux/include/linux/capability.h:45,

from /usr/src/linux/include/linux/sched.h:7,

from /usr/src/linux/include/linux/module.h:10,

from amrmo_init.c:47:

/usr/src/linux/include/linux/kernel.h:72: error: syntax error before "void"

In file included from /usr/src/linux/include/linux/capability.h:45,

from /usr/src/linux/include/linux/sched.h:7,

from /usr/src/linux/include/linux/module.h:10,

from amrmo_init.c:47:

/usr/src/linux/include/linux/spinlock.h:43: error: syntax error before "_spin_tr ylock"

/usr/src/linux/include/linux/spinlock.h:44: error: syntax error before "_write_t rylock"

/usr/src/linux/include/linux/spinlock.h:46: error: conflicting types for `fastca ll'

/usr/src/linux/include/linux/spinlock.h:44: error: previous declaration of `fast call'

/usr/src/linux/include/linux/spinlock.h:46: error: syntax error before "_spin_lo ck"

/usr/src/linux/include/linux/spinlock.h:47: error: syntax error before "_read_lo ck"

/usr/src/linux/include/linux/spinlock.h:48: error: syntax error before "_write_l ock"

/usr/src/linux/include/linux/spinlock.h:50: error: syntax error before "_spin_un lock"

/usr/src/linux/include/linux/spinlock.h:51: error: syntax error before "_read_un lock"

/usr/src/linux/include/linux/spinlock.h:52: error: syntax error before "_write_u nlock"

/usr/src/linux/include/linux/spinlock.h:54: error: conflicting types for `fastca ll'

/usr/src/linux/include/linux/spinlock.h:52: error: previous declaration of `fast call'

/usr/src/linux/include/linux/spinlock.h:54: error: syntax error before "_spin_lo ck_irqsave"

/usr/src/linux/include/linux/spinlock.h:55: error: syntax error before "_read_lo ck_irqsave"

/usr/src/linux/include/linux/spinlock.h:56: error: syntax error before "_write_l ock_irqsave"

/usr/src/linux/include/linux/spinlock.h:58: error: conflicting types for `fastca ll'

/usr/src/linux/include/linux/spinlock.h:56: error: previous declaration of `fast call'

/usr/src/linux/include/linux/spinlock.h:58: error: syntax error before "_spin_lo ck_irq"

/usr/src/linux/include/linux/spinlock.h:59: error: syntax error before "_spin_lo ck_bh"

/usr/src/linux/include/linux/spinlock.h:60: error: syntax error before "_read_lo ck_irq"

/usr/src/linux/include/linux/spinlock.h:61: error: syntax error before "_read_lo ck_bh"

/usr/src/linux/include/linux/spinlock.h:62: error: syntax error before "_write_l ock_irq"

/usr/src/linux/include/linux/spinlock.h:63: error: syntax error before "_write_l ock_bh"

/usr/src/linux/include/linux/spinlock.h:65: error: syntax error before "_spin_un lock_irqrestore"

/usr/src/linux/include/linux/spinlock.h:66: error: syntax error before "_spin_un lock_irq"

/usr/src/linux/include/linux/spinlock.h:67: error: syntax error before "_spin_un lock_bh"

/usr/src/linux/include/linux/spinlock.h:68: error: syntax error before "_read_un lock_irqrestore"

/usr/src/linux/include/linux/spinlock.h:69: error: syntax error before "_read_un lock_irq"

/usr/src/linux/include/linux/spinlock.h:70: error: syntax error before "_read_un lock_bh"

/usr/src/linux/include/linux/spinlock.h:71: error: syntax error before "_write_u nlock_irqrestore"

/usr/src/linux/include/linux/spinlock.h:72: error: syntax error before "_write_u nlock_irq"

/usr/src/linux/include/linux/spinlock.h:73: error: syntax error before "_write_u nlock_bh"

/usr/src/linux/include/linux/spinlock.h:75: error: conflicting types for `fastca ll'

/usr/src/linux/include/linux/spinlock.h:73: error: previous declaration of `fast call'

/usr/src/linux/include/linux/spinlock.h:75: error: syntax error before "_spin_tr ylock_bh"

In file included from /usr/src/linux/include/linux/time.h:7,

from /usr/src/linux/include/linux/timex.h:58,

from /usr/src/linux/include/linux/sched.h:11,

from /usr/src/linux/include/linux/module.h:10,

from amrmo_init.c:47:

 

((That's just a few from the compile of SLMDM, there's pages & pages of them :())

 

Any help appreciated.

 

-Leezer-

Link to comment
Share on other sites

i agree with devries. there are too many "file/folder not found" error messages. so you need to set up your kernel sources again, i am afraid.

 

Can someone pass me a mallet :D

 

Anyway, Ive got the kernel source in a .tar.gz file, instructions from there please? (Since what i've done obviously hasn't worked)

 

Thanks for your help.

 

-Leezer-

Link to comment
Share on other sites

as i don't really know which steps you have already taken, i suggest you take a look at this howto for the ipw2200:

ipw2200

 

for the kernel, do the following:

download either the kernel package kernel.org or from the ubuntu mirrors or those, patched by the ubuntu developers. for the latter one, type in a terminal:

 

sudo apt-get install linux-tree

 

but i guess this has been already done by you.

now you need to compile the kernel. therefore, grab the following stuff

 

sudo apt-get update

sudo apt-get install build-essential

sudo apt-get install kernel-package

sudo apt-get install gcc

sudo apt-get install libncurses5

sudo apt-get install libncurses5-dev

 

and

 

sudo apt-get install libqt3-mt-dev

 

this will install all necessary packages for the compile process.

now untar the whole package:

 

cd /usr/src sudo tar --bzip2 -xvf linux-2.6.11.tar.bz2 (in case you are using 2.6.11 kernel. if you have another, alter the kernel number)

 

now you need to create a symlink.

 

sudo ln -s /usr/src/linux-2.6.11 /usr/src/linux cd /usr/src/linux

 

then customize your kernel config. type

 

sudo make xconfig

 

or type alternatively:

 

sudo make menuconfig

 

now, you can start the compile process with the following command

 

sudo make-kpkg clean sudo make-kpkg --append-to-version=-custom kernel_image modules_image

 

now there will be a .deb package in /usr/src. this file is ready for installation, just like any other .deb package.

 

sudo dpkg -i kernel-image-2.6.11-custom_10.00.Custom_i386.deb

 

i hope i made no mistake now and i hope this can help you at getting your stuff running step by step. :)

 

good luck :beer:

Link to comment
Share on other sites

Edit:

Sorry, I spoke too soon :oops:

Unknown target: make-kpg

Something else is broken :rolleyes: (Yes, I have installed the kernel packager)

Before I install it, precisely what does it do? (In other words, does it update the kernel version running on the system or what, & if so should it create a new kernel entry in grub as the previous ones did?)

As with the howto, I'd already found that, and was attempting to follow, but it was giving error 2 on attempting to compile. Therefore, I have been trying to fix the kernel source ever since :devil:

 

Thanks for everything!

 

-Leezer-

Edited by leezer3
Link to comment
Share on other sites

it should be make-kpkg, not make-kpg. it'i part of the (debian-specific) kernel-package package and should be the same in ubuntu afaik. Once you've done a make (x|menu)config, you can use make-kpkg to compile the kernel and modules and make the appropriate packages from the result.

Link to comment
Share on other sites

it should be make-kpkg, not make-kpg. it'i part of the (debian-specific) kernel-package package and should be the same in ubuntu afaik.  Once you've done a make (x|menu)config, you can use make-kpkg to compile the kernel and modules and make the appropriate packages from the result.

 

Sorry, my typo. Anyway still the same error. If anyone has binaries for SLMDM & ipw2100, please post, otherwise soon I may be giving up on these, as they are non-essentials at this moment in time. (Still need them to get on the net though)

 

-Leezer-

Link to comment
Share on other sites

Hi once again,

First, sorry for the slight bump, but the situation evolves :P

Anyway, I've fixed kpkg & have compiled & installed 2.6.10 from kernel.org. However, it ceases to surprise me that the SLMDM errors remain the same. Anyone have any ideas on where to proceed from here?

 

Things are looking up on the IPW2100 front though, and these are the only errors I get now:

  CC      drivers/net/wireless/ipw2100/ieee80211_crypt.o

drivers/net/wireless/ipw2100/ieee80211_crypt.c: In function

`ieee80211_crypt_deinit_entries":

drivers/net/wireless/ipw2100/ieee80211_crypt.c:57: warning: dereferencing `void

*" pointer

drivers/net/wireless/ipw2100/ieee80211_crypt.c:57: error: request for member

`deinit" in something not a structure or union

drivers/net/wireless/ipw2100/ieee80211_crypt.c:58: warning: dereferencing `void

*" pointer

drivers/net/wireless/ipw2100/ieee80211_crypt.c:58: error: request for member

`owner" in something nota structure or union

drivers/net/wireless/ipw2100/ieee80211_crypt.c: In function

`ieee80211_register_crypto_ops":

drivers/net/wireless/ipw2100/ieee80211_crypt.c:126: error: dereferencing pointer

to incomplete type

drivers/net/wireless/ipw2100/ieee80211_crypt.c: In function

`ieee80211_crypto_deinit":

drivers/net/wireless/ipw2100/ieee80211_crypt.c:237: error: dereferencing pointer

to incomplete type

drivers/net/wireless/ipw2100/ieee80211_crypt.c: At top level:

drivers/net/wireless/ipw2100/ieee80211_crypt.c:192: error: storage size of

`ieee80211_crypt_null" isn"t known

make[4]: *** [drivers/net/wireless/ipw2100/ieee80211_crypt.o] Error 1

make[3]: *** [drivers/net/wireless/ipw2100] Error 2

make[2]: *** [drivers/net/wireless] Error 2

make[1]: *** [drivers/net] Error 2

make: *** [drivers] Error 2

I'm presuming that this is an error in the driver code itself, rather than in my kernel setup, so progress of a sort!

(At the moment, I've tried disabling all encryption in the makefile, but no go)

 

Thanks for your help :beer:

 

-Leezer-

Link to comment
Share on other sites

sorry, no idea what might cause these errors... :unsure:

 

OK, thanks :D

 

Secondly, I have 99% solved SLMDM- Wrong driver version :rolleyes: ; It's no use trying to compile a driver written for a 2.4 kernel on a 2.6 kernel, hence errors.

 

With regards to the IPW, i'm trying the IRC in a moment, and we shall see what we shall see.

 

Thanks

 

-Leezer-

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...