Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 127300 - net-wireless/orinoco doesn't build against >=gentoo-sources-2.6.16
Summary: net-wireless/orinoco doesn't build against >=gentoo-sources-2.6.16
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Mobile Herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
: 134288 142252 (view as bug list)
Depends on:
Blocks: 172863
  Show dependency tree
 
Reported: 2006-03-23 05:44 UTC by Jared Greenwald
Modified: 2007-05-10 11:11 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to remove owner fields from usb_driver usages (orinoco-9999.patch,740 bytes, patch)
2006-03-23 07:13 UTC, Jared Greenwald
Details | Diff
real patch - applies with -p0 (orinoco.patch,740 bytes, patch)
2006-03-23 19:20 UTC, Jared Greenwald
Details | Diff
better patch (orinoco.patch,1.47 KB, patch)
2006-03-30 08:57 UTC, Jared Greenwald
Details | Diff
orinoco-usb-9999.ebuild (orinoco-usb-9999.ebuild,1.17 KB, text/plain)
2007-01-15 12:21 UTC, Hypnos
Details
orinoco-usb-9999.ebuild (orinoco-usb-9999.ebuild,1.17 KB, text/plain)
2007-01-15 12:30 UTC, Hypnos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jared Greenwald 2006-03-23 05:44:27 UTC
# emerge info
Portage 2.0.54 (default-linux/x86/2006.0, gcc-3.4.5, glibc-2.3.5-r2, 2.6.15-gentoo-r7 i686)
=================================================================
System uname: 2.6.15-gentoo-r7 i686 Intel(R) Pentium(R) III Mobile CPU      1200MHz
Gentoo Base System version 1.12.0_pre16
dev-lang/python:     2.4.2-r1
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=pentium3m -fforce-addr -maccumulate-outgoing-args -pipe -mfpmath=sse"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-Os -march=pentium3m -fforce-addr -maccumulate-outgoing-args -pipe -mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X aac acpi alsa apm arts audiofile avi bash-completion berkdb bitmap-fonts browserplugin bzip2 cairo cddb cdr cli cpudetection crypt cscope css ctype cups curl dba dri dvd dvdread emboss encode esd ethereal exif expat fam fastbuild ffmpeg font-server fontconfig foomaticdb force-cgi-redirect fortran ftp gd gdbm gif gimpprint glitz glut gmp gnutls gpm gstreamer gtk gtk2 gtkhtml hal idn imlib ipv6 java jpeg kde kdeenablefinal kdexdeltas lcms ldap libg++ libwww logitech-mouse mad memlimit mikmod mmx mng motif moznoxft mp3 mpeg ncurses nptl nptlonly nsplugin numeric ogg opengl oss pam pcmcia pcre pda pdf pdflib pdo-external pear perl php png posix ppds python qt quicktime rdesktop readline real ruby samba sdl sensord session simplexml smooth soap sockets spell spl sql sqlite sse ssl subversion svg symlink tcpd theora threads tidy tiff tokenizer truetype truetype-fonts type1-fonts udev usb vcd visualization vorbis wifi win32codecs wmf xine xml xml2 xscreensaver xsl xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY

The orinoco_usb and prism_usb driver sources use the usb_driver.owner structure field.  This field has gone away with the introduction of 2.6.16 (gregkh removed it from the 2.6.16 tree in Nov 2005).  Anyway, the patch is simple and should be forthcoming.
Comment 1 Henrik Brix Andersen 2006-03-23 05:52:02 UTC
You mentioned a patch on IRC...? Please attach it here.
Comment 2 Jared Greenwald 2006-03-23 06:01:22 UTC
I have the files hacked on my system and the fix is really easy, but I'm not sure how to craft the patch properly.  
Comment 3 Jared Greenwald 2006-03-23 07:13:39 UTC
Created attachment 82939 [details, diff]
patch to remove owner fields from usb_driver usages
Comment 4 Jared Greenwald 2006-03-23 07:19:53 UTC
Depending on the way the ebuild is supposed to work (if its supposted to support pre-2.6.16 kernels), then the ebuild would either have to patch or not depending on if the kernel that the driver is being built for is 2.6.16 or not.  That depends on if the patch is taken into cvs.  If that's the case and we support pre-2.6.16, then the reverse patch would probably need to be created/applied.

Just a thought.
Comment 5 Jared Greenwald 2006-03-23 19:20:53 UTC
Created attachment 82974 [details, diff]
real patch - applies with -p0

Ok, so I'm a total n00b to creating patches and someone just explained how to do it better (-Nru).  Anyway, there is still a problen with the orinoo_cs driver as that now doesn't compile.  The strange thing is that the sourecs for the stuff that's in the kernel tree (orinoco_cs, etc.) are not up to date with what the kernel tree has.  I wonder if it would be better to have a mix of the stuff that's in the tree from gentoo-sources plus the stuff that's not in the kernel tree (the usb drivers)...
Comment 6 Jared Greenwald 2006-03-23 19:25:57 UTC
> The strange thing is that the sourecs for the stuff that's in the kernel tree (orinoco_cs, etc.) are not up to date with what the kernel tree has.

This should say that the cvs tree isn't up to date with the kernel tree...
Comment 7 Daniel Drake (RETIRED) gentoo-dev 2006-03-25 05:36:52 UTC
Ideally you should write the patch so that it can be applied unconditionally without breaking compatibility with older kernels.

For an example of how to do this, look at the patch in #119538
Comment 8 Jared Greenwald 2006-03-25 06:25:10 UTC
The larger problem that I've come to realize is that the cvs tree that these orinoco driver from - the only tree that has the orinco_usb and prism_usb drivers - is severely out of date with the kernel mainline.  The reason for this is that all of the other drivers except the *usb drivers are submitted into the main kernel tree and maintained in a different cvs tree.

I would suggest a way more restrictive patch.  One that would also patch the Kbuild file to only enable the *usb drivers to be built by this ebuild.  If people are using this ebuild for something other than that, they would be better served by just using the in-kernel drivers.

I'll put that version check into the patch too.  The thing is that it will still compile against 2.6.14-r7 (the oldest 2.6 in portage) even with the patch.
Comment 9 Daniel Drake (RETIRED) gentoo-dev 2006-03-25 17:10:29 UTC
Sounds good. I'm going to remove the block on bug #126972 as orinoco-9999 is not in the stable tree.
Comment 10 Jared Greenwald 2006-03-30 08:57:35 UTC
Created attachment 83439 [details, diff]
better patch

This a is more complete patch that will enable the ebuild to actually work against 2.6.16.  I also tried compiling with this patch against the 2.6.14-r7 tree and it works just fine without having version checking, so I didn't bother.
Comment 11 Conrad Kostecki gentoo-dev 2006-04-06 11:06:57 UTC
Hello!
How do I apply this Patch?
Comment 12 Jared Greenwald 2006-04-06 11:17:40 UTC
(In reply to comment #11)
> Hello!
> How do I apply this Patch?
> 

Download the patch somewhere (left-click on the link above and then save the resulting page). Then go to the directory where the cvs sources are.  (If you used the orinoco-9999 ebuild that would be /var/tmp/portage/orinoco-9999/work/orinoco.)  Then run patch as "patch -p0 </path/to/patch/file".  Then run "make clean && make && make install" and that should get you orinoco and orinoco_usb into the correct places for modprobe to find them for the running kernel.  If you want to make for a kernel other than the running kernel you need to put KERNEL_PATH=/path/to/kernel/source before the make and make install.

I suppose I should create a patched ebuild at some point, but no one other than me seems to actually care that this is broken.
Comment 13 Conrad Kostecki gentoo-dev 2006-04-06 16:34:52 UTC
Hi!
Thanks for Info ..

But it does not work ??

When i try to apply you patch i get:

N620c orinoco # patch -p0 < orinoco.patch
patching file orinoco_usb.c
patching file prism_usb.c
patching file Kbuild
Hunk #1 FAILED at 12.
1 out of 1 hunk FAILED -- saving rejects to file Kbuild.rej

When I now try make clean and then make is does not work:
So what I am doing wrong !?

N620c orinoco # make
make -C /usr/src/linux-2.6.16-gentoo-r1 M=/var/tmp/portage/orinoco-9999/work/orinoco KERNELRELEASE=2.6.16-gentoo-r1 modules
make[1]: Entering directory `/usr/src/linux-2.6.16-gentoo-r1'
  CC [M]  /var/tmp/portage/orinoco-9999/work/orinoco/orinoco_nortel.o
  CC [M]  /var/tmp/portage/orinoco-9999/work/orinoco/orinoco_pci.o
  CC [M]  /var/tmp/portage/orinoco-9999/work/orinoco/orinoco_plx.o
  CC [M]  /var/tmp/portage/orinoco-9999/work/orinoco/orinoco_tmd.o
  CC [M]  /var/tmp/portage/orinoco-9999/work/orinoco/orinoco_cs.o
/var/tmp/portage/orinoco-9999/work/orinoco/orinoco_cs.c: In Funktion 
Comment 14 Conrad Kostecki gentoo-dev 2006-04-06 16:34:52 UTC
Hi!
Thanks for Info ..

But it does not work ??

When i try to apply you patch i get:

N620c orinoco # patch -p0 < orinoco.patch
patching file orinoco_usb.c
patching file prism_usb.c
patching file Kbuild
Hunk #1 FAILED at 12.
1 out of 1 hunk FAILED -- saving rejects to file Kbuild.rej

When I now try make clean and then make is does not work:
So what I am doing wrong !?

N620c orinoco # make
make -C /usr/src/linux-2.6.16-gentoo-r1 M=/var/tmp/portage/orinoco-9999/work/orinoco KERNELRELEASE=2.6.16-gentoo-r1 modules
make[1]: Entering directory `/usr/src/linux-2.6.16-gentoo-r1'
  CC [M]  /var/tmp/portage/orinoco-9999/work/orinoco/orinoco_nortel.o
  CC [M]  /var/tmp/portage/orinoco-9999/work/orinoco/orinoco_pci.o
  CC [M]  /var/tmp/portage/orinoco-9999/work/orinoco/orinoco_plx.o
  CC [M]  /var/tmp/portage/orinoco-9999/work/orinoco/orinoco_tmd.o
  CC [M]  /var/tmp/portage/orinoco-9999/work/orinoco/orinoco_cs.o
/var/tmp/portage/orinoco-9999/work/orinoco/orinoco_cs.c: In Funktion »orinoco_cs_attach«:
/var/tmp/portage/orinoco-9999/work/orinoco/orinoco_cs.c:175: Warnung: implizite Deklaration der Funktion »pcmcia_register_client«
/var/tmp/portage/orinoco-9999/work/orinoco/orinoco_cs.c: In Funktion »orinoco_cs_detach«:
/var/tmp/portage/orinoco-9999/work/orinoco/orinoco_cs.c:208: Warnung: implizite Deklaration der Funktion »pcmcia_deregister_client«
/var/tmp/portage/orinoco-9999/work/orinoco/orinoco_cs.c: Auf höchster Ebene:
/var/tmp/portage/orinoco-9999/work/orinoco/orinoco_cs.c:671: Fehler: unknown field »attach« specified in initializer
/var/tmp/portage/orinoco-9999/work/orinoco/orinoco_cs.c:671: Warnung: Elementüberschreitung in struct-Initialisierung
/var/tmp/portage/orinoco-9999/work/orinoco/orinoco_cs.c:671: Warnung: (nahe der Initialisierung für »orinoco_driver«)
/var/tmp/portage/orinoco-9999/work/orinoco/orinoco_cs.c:672: Fehler: unknown field »detach« specified in initializer
/var/tmp/portage/orinoco-9999/work/orinoco/orinoco_cs.c:672: Warnung: Elementüberschreitung in struct-Initialisierung
/var/tmp/portage/orinoco-9999/work/orinoco/orinoco_cs.c:672: Warnung: (nahe der Initialisierung für »orinoco_driver«)
/var/tmp/portage/orinoco-9999/work/orinoco/orinoco_cs.c:674: Fehler: unknown field »event« specified in initializer
/var/tmp/portage/orinoco-9999/work/orinoco/orinoco_cs.c:674: Warnung: Elementüberschreitung in struct-Initialisierung
/var/tmp/portage/orinoco-9999/work/orinoco/orinoco_cs.c:674: Warnung: (nahe der Initialisierung für »orinoco_driver«)
make[2]: *** [/var/tmp/portage/orinoco-9999/work/orinoco/orinoco_cs.o] Fehler 1
make[1]: *** [_module_/var/tmp/portage/orinoco-9999/work/orinoco] Fehler 2
make[1]: Leaving directory `/usr/src/linux-2.6.16-gentoo-r1'
make: *** [modules] Fehler 2
Comment 15 Jared Greenwald 2006-04-06 19:23:53 UTC
(In reply to comment #13)
> But it does not work ??

Had you made any changes to the Kbuild file.  If your Kbuild file didn't match the virgin copy (which is what I based the diff on), then that would explain why the patch failed.  What is the content of the Kbuild.rej file that was created from the failed patch command?

I suspect that if you just comment out the line in the Kbuild file that refers to the orinoco_cs module it should work...
Comment 16 Conrad Kostecki gentoo-dev 2006-04-07 02:16:55 UTC
Hi!
Thanks!

I comented out orinoco_cs and now it works.

No, i never modified my Kbuild!

Here is my Kbuild.rej :
N620c orinoco # cat Kbuild.rej
***************
*** 12,31 ****
  # Compatibility headers
  EXTRA_CFLAGS := -I$(M)

- tmp-m := hermes.o orinoco.o
  tmp-m := orinoco.o
  tmp-y :=

- tmp-$(CONFIG_PPC_PMAC) += airport.o

- tmp-$(CONFIG_PCI) += orinoco_nortel.o orinoco_pci.o orinoco_plx.o orinoco_tmd.o

- tmp-$(CONFIG_PCMCIA) += orinoco_cs.o

  tmp-$(CONFIG_USB) += prism_usb.o

  ifdef CONFIG_FW_LOADER
- tmp-$(CONFIG_PCMCIA) += spectrum_cs.o
  tmp-$(CONFIG_USB) += orinoco_usb.o
  endif

--- 12,31 ----
  # Compatibility headers
  EXTRA_CFLAGS := -I$(M)

+ #tmp-m := hermes.o orinoco.o
  tmp-m := orinoco.o
  tmp-y :=

+ #tmp-$(CONFIG_PPC_PMAC) += airport.o

+ #tmp-$(CONFIG_PCI) += orinoco_nortel.o orinoco_pci.o orinoco_plx.o orinoco_tmd.o

+ #tmp-$(CONFIG_PCMCIA) += orinoco_cs.o

  tmp-$(CONFIG_USB) += prism_usb.o

  ifdef CONFIG_FW_LOADER
+ #tmp-$(CONFIG_PCMCIA) += spectrum_cs.o
  tmp-$(CONFIG_USB) += orinoco_usb.o
  endif

But, now I get in dmesg:
orinoco_usb: No firmware to download
orinoco_usb: probe of 4-1:1.0 failed with error -14

So I guest, that i got to copy the Firmware.
I used get_ezusb_fw.

I copied 2 Files to /usr/lib/hotplug/firmware

But it does not work? Same Error in dmesg ...
Comment 17 Jared Greenwald 2006-04-07 04:01:18 UTC
I have my firmware in /lib/firmware.  The only file there is orinoco_ezusb_fw.  I just upgraded to udev-89 which subsumed the coldplug package, so I'm not sure if this is going to change for that, but put your firmware in there.
Comment 18 Conrad Kostecki gentoo-dev 2006-04-07 04:39:29 UTC
Super!

/lib/firmware

I got to create this directory, but now it works!

Thanks for Help!

WLAN is working now with my Compaq W200 Multiport.
Comment 19 Jared Greenwald 2006-04-07 05:15:09 UTC
> 
> WLAN is working now with my Compaq W200 Multiport.
> 

...and there was much rejoicing...
Comment 20 Steev Klimaszewski (RETIRED) gentoo-dev 2006-05-03 21:05:56 UTC
I will be re-visiting this soon, as orinoco has moved to svn, and been split out to usb, standalone, and for_linus(in kernel)
Comment 21 Henrik Brix Andersen 2006-05-25 02:13:09 UTC
*** Bug 134288 has been marked as a duplicate of this bug. ***
Comment 22 William Keaney 2006-07-23 14:10:13 UTC
As of 7/23/06, the version in CVS will not compile against kernel 2.6.17.4, and the patch in this bug report does not apply.
After commenting lines related to spectrum_cs.o and orinoco_cs.o, the drivers built successfully.  However, make install and modprobe both complain about unresolved symbol 'register_firmware'.
Comment 23 William Keaney 2006-07-23 14:41:34 UTC
FWIW, I tried enabling #define EZUSB_FW_INCLUDED to compile the firmware directly into the driver.  I still get "/orinoco_usb.c:1643: warning: implicit declaration of function 'register_firmware'" and "WARNING: "register_firmware" [orinoco/orinoco_usb.ko] undefined!" when compiling, and "orinoco_usb: Unknown symbol register_firmware" when probing the module.
Comment 24 William Keaney 2006-08-31 05:23:28 UTC
UPDATE: The problem is that this ebuild checks out the source from CVS, which is dead.  All the new, functional, up-to-date code is now in SVN, hosted on Sourceforge.  I don't know how to get an ebuild to use SVN, but I've manually compiled and installed these drivers without any problems so if someone fixes the ebuild this issue will be resolved.
For the USB-only drivers:  
svn co https://svn.sourceforge.net/svnroot/orinoco/branches/usb orinoco
cd orinoco
make
sudo make install
Comment 25 Jared Greenwald 2006-08-31 05:59:45 UTC
(In reply to comment #23)

Even the SVN still only works against 2.6.16, right?
Comment 26 William Keaney 2006-08-31 06:21:02 UTC
I built it against 2.6.17.4.  I haven't upgraded to 2.6.18 yet, but I'll give it a shot.
Comment 27 William Keaney 2006-08-31 07:40:20 UTC
The SVN usb and standalone branches, as well as the trunk, all build against kernel 2.6.18-rc4 without issue.
Comment 28 Jared Greenwald 2006-08-31 08:41:56 UTC
(In reply to comment #26)
> The SVN usb and standalone branches, as well as the trunk, all build against
> kernel 2.6.18-rc4 without issue.

These are trunk kernel versions, or the gentoo-sources package versions?  The last time I tried against the gentoo-sources-2.6.17-r4, if I even got the module built, it wouldn't insmod.

Comment 29 William Keaney 2006-08-31 08:47:18 UTC
Sorry, forgot to specify.  I'm using vanilla sources.  I'll try gentoo-sources, but unless there is something specific in the gentoo-sources that you need, try emerging vanilla-sources.
Comment 30 William Keaney 2006-08-31 10:30:23 UTC
SVN sources build against gentoo-sources-2.6.17-r5.  Installed and modprobed, no errors in dmesg and my device comes up just fine.
Comment 31 Steev Klimaszewski (RETIRED) gentoo-dev 2006-08-31 14:03:26 UTC
Thanks for all the work guys, I know I have been slacking and I apologize - I am going to try and request a usb orinoco card from adopt-a-dev so I can really start working on this again.  The standalone is kind of pointless at this point as it mirrors the kernel driver, though I would like to at least get the usb version into portage soon.
Comment 32 Hypnos 2007-01-15 12:21:42 UTC
Created attachment 107053 [details]
orinoco-usb-9999.ebuild

This is an ebuild for the USB branch of the standalone orinoco driver.  Works well with Compaq W200 USB wireless thingie and suspend2-sources 2.6.18.

An interested party can write an analogous ebuild for the non-USB branch, which contains non-USB drivers which have not yet made it into the main kernel tree.
Comment 33 Hypnos 2007-01-15 12:30:10 UTC
Created attachment 107055 [details]
orinoco-usb-9999.ebuild

(sorry, typo in kernel config check for USB)
Comment 34 Jakub Moc (RETIRED) gentoo-dev 2007-03-31 10:20:44 UTC
*** Bug 142252 has been marked as a duplicate of this bug. ***
Comment 35 Stefan Schweizer (RETIRED) gentoo-dev 2007-05-10 11:11:06 UTC
Thank you, now fixed in orinoco-usb/orinoco-sn