Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: problems compiling fealnx.c

Hybrid View

  1. #1
    jjanela
    Guest

    problems compiling fealnx.c

    Hi,

    Im am trying to compile "fealnx.c" (network card driver) on my system (RedHat 8.0, kernel 2.4.18-14), but am am getting a LOT of errors ( fealnx.c is distributed along with kernel sources).

    The instruction am using is

    gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/net/inet -Wall
    -Wstrict-prototypes -O6 -c fealnx.c


    could anyone give any hints on how to solve this problem ? (it would be GREAT if anyone could sen the "fealnx.o" file for my kernel...)

    thanks for any help,
    joao.

  2. #2
    Aaron_Adams
    Guest

    Re:problems compiling fealnx.c

    Could you post the errors you are getting?

  3. #3
    JimH
    Guest

    Re:problems compiling fealnx.c

    Strange fealnx.c is included in the source, but there doesn't seem to be an entry in xconfig/menuconfig to enable it. ???

    What make/model NIC is this?

    The command you are using to compile the module is outdated and will not work.

    What processor does your system have? For now I will just compile the module for you and post it for you to download.

    Jim H

  4. #4
    jjanela
    Guest

    Re:problems compiling fealnx.c

    Quote Originally Posted by Aaron_Adams
    Could you post the errors you are getting?
    Hi,

    Thanks for your reply! Here go the errors... I didn't inlude them all, but I suppose that most of them (if not all) will disapear once the fundamental one is found...

    root@localhost net]# gcc -DMODULE -D__KERNEL -I/lib/modules/2.4.18-14/kernel/dr
    ivers/net -Wall -Wstrict-prototypes -O6 -c fealnx.c
    In file included from /usr/include/linux/sched.h:14,
    from fealnx.c:73:
    /usr/include/linux/timex.h:173: field `time' has incomplete type
    In file included from /usr/include/linux/bitops.h:69,
    from /usr/include/asm/system.h:7,
    from /usr/include/linux/sched.h:16,
    from fealnx.c:73:
    /usr/include/asm/bitops.h:333:2: warning: #warning This includefile is not avail
    able on all architectures.
    /usr/include/asm/bitops.h:334:2: warning: #warning Using kernel headers in users
    pace.
    In file included from /usr/include/linux/signal.h:4,
    from /usr/include/linux/sched.h:25,
    from fealnx.c:73:
    /usr/include/asm/signal.h:107: parse error before "sigset_t"
    /usr/include/asm/signal.h:110: parse error before '}' token
    In file included from /usr/include/linux/sched.h:81,
    from fealnx.c:73:
    /usr/include/linux/timer.h:32: field `vec' has incomplete type
    /usr/include/linux/timer.h:37: field `vec' has incomplete type
    /usr/include/linux/timer.h:45: parse error before "spinlock_t"
    /usr/include/linux/timer.h:53: parse error before '}' token
    /usr/include/linux/timer.h:63: field `list' has incomplete type
    /usr/include/linux/timer.h:67: parse error before "tvec_base_t"
    /usr/include/linux/timer.h:101: parse error before "tvec_bases"
    /usr/include/linux/timer.h: In function `init_timer':
    /usr/include/linux/timer.h:105: dereferencing pointer to incomplete type
    /usr/include/linux/timer.h:105: dereferencing pointer to incomplete type
    /usr/include/linux/timer.h:106: dereferencing pointer to incomplete type
    /usr/include/linux/timer.h: In function `timer_pending':
    /usr/include/linux/timer.h:121: dereferencing pointer to incomplete type
    In file included from fealnx.c:79:
    /usr/include/linux/interrupt.h:44:25: asm/hardirq.h: No such file or directory
    /usr/include/linux/interrupt.h:45:25: asm/softirq.h: No such file or directory
    In file included from fealnx.c:79:
    /usr/include/linux/interrupt.h: At top level:
    /usr/include/linux/interrupt.h:77: parse error before '(' token
    /usr/include/linux/interrupt.h:78: parse error before '(' token
    /usr/include/linux/interrupt.h:106: parse error before "atomic_t"
    /usr/include/linux/interrupt.h:109: parse error before '}' token
    /usr/include/linux/interrupt.h:127: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here
    (not in a function)
    /usr/include/linux/interrupt.h:127: requested alignment is not a constant
    /usr/include/linux/interrupt.h:154: parse error before '(' token
    /usr/include/linux/interrupt.h: In function `tasklet_schedule':
    /usr/include/linux/interrupt.h:158: dereferencing pointer to incomplete type
    /usr/include/linux/interrupt.h: At top level:
    /usr/include/linux/interrupt.h:162: parse error before '(' token
    /usr/include/linux/interrupt.h: In function `tasklet_hi_schedule':
    /usr/include/linux/interrupt.h:166: dereferencing pointer to incomplete type
    /usr/include/linux/interrupt.h: In function `tasklet_disable_nosync':
    /usr/include/linux/interrupt.h:173: dereferencing pointer to incomplete type
    /usr/include/linux/interrupt.h: In function `tasklet_enable':
    /usr/include/linux/interrupt.h:187: dereferencing pointer to incomplete type
    /usr/include/linux/interrupt.h: In function `tasklet_hi_enable':
    /usr/include/linux/interrupt.h:193: dereferencing pointer to incomplete type
    /usr/include/linux/interrupt.h: At top level:
    /usr/include/linux/interrupt.h:224: parse error before "global_bh_lock"
    /usr/include/linux/interrupt.h: In function `mark_bh':
    /usr/include/linux/interrupt.h:228: invalid use of undefined type `struct taskle
    t_struct'
    fealnx.c:83:27: /linux/skbuff.h: No such file or directory
    In file included from fealnx.c:85:
    /usr/include/linux/mii.h: At top level:
    /usr/include/linux/mii.h:106: parse error before "u16"
    /usr/include/linux/mii.h:108: parse error before "val_in"
    /usr/include/linux/mii.h:109: parse error before "val_out"
    In file included from fealnx.c:86:
    /usr/include/linux/ethtool.h:15: parse error before "u32"
    /usr/include/linux/ethtool.h:17: parse error before "advertising"
    /usr/include/linux/ethtool.h:18: parse error before "speed"
    /usr/include/linux/ethtool.h:19: parse error before "duplex"
    /usr/include/linux/ethtool.h:20: parse error before "port"
    /usr/include/linux/ethtool.h:21: parse error before "phy_address"
    /usr/include/linux/ethtool.h:22: parse error before "transceiver"
    /usr/include/linux/ethtool.h:23: parse error before "autoneg"
    /usr/include/linux/ethtool.h:24: parse error before "maxtxpkt"
    /usr/include/linux/ethtool.h:25: parse error before "maxrxpkt"
    /usr/include/linux/ethtool.h:26: parse error before "reserved"
    /usr/include/linux/ethtool.h:27: parse error before '}' token
    /usr/include/linux/ethtool.h:32: parse error before "u32"
    /usr/include/linux/ethtool.h:40: parse error before "eedump_len"
    /usr/include/linux/ethtool.h:41: parse error before "regdump_len"
    /usr/include/linux/ethtool.h:47: parse error before "u32"
    /usr/include/linux/ethtool.h:49: parse error before "wolopts"
    /usr/include/linux/ethtool.h:50: parse error before "sopass"
    /usr/include/linux/ethtool.h:51: parse error before '}' token
    /usr/include/linux/ethtool.h:55: parse error before "u32"
    /usr/include/linux/ethtool.h:56: conflicting types for `data'
    /usr/include/linux/interrupt.h:108: previous declaration of `data'
    /usr/include/linux/ethtool.h:61: parse error before "u32"
    /usr/include/linux/ethtool.h:62: conflicting types for `version'
    /usr/include/linux/ethtool.h:34: previous declaration of `version'
    /usr/include/linux/ethtool.h:63: parse error before "len"
    /usr/include/linux/ethtool.h:64: parse error before "data"
    /usr/include/linux/ethtool.h:64: conflicting types for `data'
    /usr/include/linux/ethtool.h:56: previous declaration of `data'
    /usr/include/linux/ethtool.h:65: parse error before '}' token
    /usr/include/linux/ethtool.h:69: parse error before "u32"
    /usr/include/linux/ethtool.h:71: parse error before "offset"
    /usr/include/linux/ethtool.h:72: parse error before "len"
    /usr/include/linux/ethtool.h:73: parse error before "data"
    /usr/include/linux/ethtool.h:74: parse error before '}' token
    fealnx.c:87:25: linux/crc32.h: No such file or directory
    fealnx.c:91:25: asm/uaccess.h: No such file or directory
    fealnx.c:94: conflicting types for `version'
    /usr/include/linux/ethtool.h:62: previous declaration of `version'
    fealnx.c:95: `KERN_INFO' undeclared here (not in a function)
    fealnx.c:95: parse error before string constant
    fealnx.c:249: parse error before "s32"
    fealnx.c:249: warning: no semicolon at end of struct or union
    fealnx.c:250: warning: type defaults to `int' in declaration of `control'
    fealnx.c:250: warning: data definition has no type or storage class
    fealnx.c:251: parse error before "buffer"
    fealnx.c:251: warning: type defaults to `int' in declaration of `buffer'
    fealnx.c:251: warning: data definition has no type or storage class
    fealnx.c:252: parse error before "next_desc"
    fealnx.c:252: warning: type defaults to `int' in declaration of `next_desc'
    fealnx.c:252: warning: data definition has no type or storage class
    fealnx.c:255: parse error before "reserved1"
    fealnx.c:255: warning: type defaults to `int' in declaration of `reserved1'
    fealnx.c:255: conflicting types for `reserved1'
    /usr/include/linux/ethtool.h:38: previous declaration of `reserved1'
    fealnx.c:255: warning: data definition has no type or storage class
    fealnx.c:256: parse error before "reserved2"
    fealnx.c:256: warning: type defaults to `int' in declaration of `reserved2'
    fealnx.c:256: conflicting types for `reserved2'
    /usr/include/linux/ethtool.h:39: previous declaration of `reserved2'
    fealnx.c:256: warning: data definition has no type or storage class
    fealnx.c:393: parse error before "dma_addr_t"
    fealnx.c:393: warning: no semicolon at end of struct or union
    fealnx.c:394: warning: type defaults to `int' in declaration of `tx_ring_dma'
    fealnx.c:394: warning: data definition has no type or storage class
    fealnx.c:396: parse error before "lock"
    fealnx.c:396: warning: type defaults to `int' in declaration of `lock'
    fealnx.c:396: warning: data definition has no type or storage class
    fealnx.c:422: parse error before ':' token
    fealnx.c:429: parse error before '}' token
    fealnx.c:432: warning: `struct net_device' declared inside parameter list
    fealnx.c:432: warning: its scope is only this definition or declaration, which i
    s probably not what you want
    fealnx.c:433: warning: `struct net_device' declared inside parameter list
    fealnx.c:434: warning: `struct net_device' declared inside parameter list
    fealnx.c:435: warning: `struct net_device' declared inside parameter list
    fealnx.c:436: warning: `struct net_device' declared inside parameter list
    fealnx.c:438: warning: `struct net_device' declared inside parameter list
    fealnx.c:439: warning: `struct net_device' declared inside parameter list
    fealnx.c:440: warning: `struct net_device' declared inside

  5. #5
    jjanela
    Guest

    Re:problems compiling fealnx.c

    Quote Originally Posted by JimH
    Strange fealnx.c is included in the source, but there doesn't seem to be an entry in xconfig/menuconfig to enable it. ???

    What make/model NIC is this?

    The command you are using to compile the module is outdated and will not work.

    What processor does your system have? For now I will just compile the module for you and post it for you to download.

    Jim H
    Thanks for your reply! It is in fact strange that the driver is included, but not compiled... the NIC is a 10/100 - PCI Lancard from "SafeWay" and I was able to use it without anu problems with both RedHat 7.1 and Mandrake 8.

    My processor is an AMD Athlon 1200. Thanks for posting the driver, but could you please tell me what is the command used for compiling it?

    bye,
    Joćo.

  6. #6
    JimH
    Guest

    Re:problems compiling fealnx.c

    Here is the driver.
    http://www.getlinuxonline.com/Downloads/fealnx.o

    Copy it to /lib/modules/2.4.18-14/kernel/drivers/net
    Then:

    chown root.root /lib/modules/2.4.18-14/kernel/drivers/net/fealnx.o
    chmod 0644 /lib/modules/2.4.18-14/kernel/drivers/net/fealnx.o

    depmod -a

    Now you can try it and see if it works.

    To compile the module you must first prepare the kernel source.

    cd /usr/src/linux-2.4.18-14
    make mrproper

    make xconfig
    click "load configuration from file"
    For your althon processor in the dialog:
    /usr/src/linux-2.4.18-14/configs/kernel-2.4.18-athlon.config
    click "OK"
    click "save & exit"

    Since I don't see a way to enable the fealnx.o module in xconfig (it has to be there) you will have to enable it manually in the .config file. This is only necessary to use use the "long way" below.

    Open /usr/src/linux-2.4.18-14/.config in a text editor.
    Find the line: CONFIG_FEALNX= is not set
    change it to: CONFIG_FEALNX=m
    Save the changes & exit

    Open /usr/src/linux-2.4.18-14/Makefile in a text editor. Remove the word custom at the end of the "EXTRAVERSION" line

    VERSION = 2
    PATCHLEVEL = 4
    SUBLEVEL = 18
    EXTRAVERSION = -14custom

    save the changes & exit

    make dep

    Now there are two ways to compile the module. A "long way" by compiling the entire drivers/net directory or just the module itself. Sometimes if there are other dependancies you are not aware of that must be compiled first, compiling the entire directory is easier.

    Long way:
    make modules SUBDIRS=drivers/net

    Short way. Just the fealnx.o module itself:
    gcc -D__KERNEL__ -I/usr/src/linux-2.4.18-14/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -malign-functions=4 -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.18-14/include/linux/modversions.h -nostdinc -I /usr/lib/gcc-lib/i386-redhat-linux/3.2/include -DKBUILD_BASENAME=fealnx -c -o fealnx.o fealnx.c

    Thats it. ;D
    The fealnx.o module will be in /usr/src/linux-2.4.18-14/drivers/net

    Jim H

  7. #7
    jjanela
    Guest

    Re:problems compiling fealnx.c

    THANKS JimH !

    The NIC is working fine, I am already replying from Linux...

    bye,
    Joao.

  8. #8
    JimH
    Guest

    Re:problems compiling fealnx.c

    Cooooool! 8) ;D

    Jim H

  9. #9
    EL3CTRO
    Guest

    Re:problems compiling fealnx.c

    Hi,

    I'be been having the same problems with the fealnx drivers as jjanela, except none of the fixes you have suggested on here work for me :S

    I have RH Linux 8.0 with kernel 2.4.18-14, as does jjanela too. I ran the same command and got the same errors.. however I am still having troubles.

    I downloaded the version you compiled, but when my system starts, this comes up in the boot process:

    fealnx device does not seem to be present delaying eth0 initalisation

    So I assume this is because it was compiled for an athlon processor (I have a 333Mhz K-6 2) so I take the long was, except this time I use the kernel-2.4.18-i386.config file, same error while booting.

    So I decide to apply the instructions in the readme which came with the drivers, to the fealnx.o file which you provided..

    # insmod fealnx.o

    After this command I got about 10 errors, like:

    fealnx.o: unresolved symbol alloc_skb_r37701013

    I get about 10 lines of them, all with a different thingy at the end (thingy = alloc_skb_r37701013 - I'm kinda new at linux, sue me :P).

    Now i've decided to take the short meathod, first snag i hit with that is this:

    CC1: Invalid Option `prefered_stack_boundry=2'

    Ok, so I checked, and yes I remembered to add the m before it, so I take that out and try again, I get a LOT of these errors:

    fealnx.c:700: Warning: dereferencing pointer to incomplete type

    Right now i'm not of ideas.. could you suggest anything?

  10. #10
    JimH
    Guest

    Re:problems compiling fealnx.c

    Quote Originally Posted by EL3CTRO
    So I assume this is because it was compiled for an athlon processor (I have a 333Mhz K-6 2) so I take the long was, except this time I use the kernel-2.4.18-i386.config file, same error while booting.
    K6-2 333? I don't recall AMD releasing a K6-2 333. Typo?

    Correct the module is compiled with althon optimizations. It will not work with an i386 kernel.

    So I decide to apply the instructions in the readme which came with the drivers, to the fealnx.o file which you provided..
    These won't work because the module will not be compiled with the correct optimizations. Thats why you get the unresolved symbol errors

    Now i've decided to take the short meathod, first snag i hit with that is this:
    Short method from the above will not work because it is for an athlon kernel. The long method above will work.

Similar Threads

  1. boot problems after compiling kernel 2.6.6
    By Buller in forum Linux - General Topics
    Replies: 7
    Last Post: 08-13-2004, 04:45 PM
  2. Compiling problems
    By a.lost.soul in forum Linux - Software, Applications & Programming
    Replies: 3
    Last Post: 04-30-2003, 04:01 PM
  3. compiling
    By friskydrifter in forum Linux - Software, Applications & Programming
    Replies: 5
    Last Post: 07-23-2002, 02:55 AM
  4. Problems compiling KDE3
    By CP in forum Linux - Software, Applications & Programming
    Replies: 3
    Last Post: 06-08-2002, 03:14 AM
  5. LFS - Help - Compiling gcc
    By gmoreno in forum Linux - General Topics
    Replies: 6
    Last Post: 02-10-2002, 02:58 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •