Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
Hi, I have SUSE Linux 10.1 kernel 2.6.16.21. I copied the source RPM package for the broadcom netxtreme gigabit network adaptor and put it in the location /usr/src/linux as the ...
  1. #1
    Just Joined!
    Join Date
    Oct 2009
    Posts
    6

    how to compile network adaptor source rpm

    Hi,

    I have SUSE Linux 10.1 kernel 2.6.16.21. I copied the source RPM package for the broadcom netxtreme gigabit network adaptor and put it in the location /usr/src/linux as the instructions said. But when I try to build it it is looking in the location 2.6.16.21-0.25-smp as you can see from the stdout shown below. So this version of the kernel is obviously 2.6.16.21-0.25-smp but I got the kernel source code for 2.6.16.21 from kernel.org. So the question is how to find the source code for 2.6.16.21-0.25-smp so that the driver will compile.---regards, WER



    ====================================Installing Source RPM Package=============================


    walker:/usr/src/packages # rpmbuild -bb SPECS/tg3.spec
    Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.64419
    + umask 022
    + cd /usr/src/packages/BUILD
    + cd /usr/src/packages/BUILD
    + rm -rf tg3-3.99k
    + /usr/bin/bzip2 -dc /usr/src/packages/SOURCES/tg3-3.99k.tar.bz2
    + tar -xvvf -
    drwxr-xr-x mcarlson/nseg 0 2009-08-17 13:57:59 tg3-3.99k/
    -rw-r--r-- mcarlson/nseg 394354 2009-08-17 13:57:37 tg3-3.99k/tg3.c
    -rw-r--r-- mcarlson/nseg 107516 2009-08-17 13:55:32 tg3-3.99k/tg3.h
    -rw-r--r-- mcarlson/nseg 25971 2009-07-22 13:50:57 tg3-3.99k/tg3_compat.h
    -rwxr--r-- mcarlson/nseg 5524 2009-07-01 18:49:19 tg3-3.99k/makeflags.sh
    -rw-r--r-- mcarlson/nseg 3424 2009-04-21 19:43:11 tg3-3.99k/Makefile
    -rw-r--r-- mcarlson/nseg 15153 2009-01-09 14:41:43 tg3-3.99k/LICENSE
    -rw-r--r-- mcarlson/nseg 10484 2009-08-17 13:57:58 tg3-3.99k/README.TXT
    -rw-r--r-- mcarlson/nseg 3445 2009-01-09 14:41:43 tg3-3.99k/tg3.4
    -rw-r--r-- mcarlson/nseg 4279 2009-07-10 18:57:27 tg3-3.99k/tg3_compat2.h
    -rw-r--r-- mcarlson/nseg 258454 2009-04-21 19:29:22 tg3-3.99k/ChangeLog
    -rw-r--r-- mcarlson/nseg 43881 2009-02-27 20:05:28 tg3-3.99k/tg3_firmware.h
    + STATUS=0
    + '[' 0 -ne 0 ']'
    + cd tg3-3.99k
    ++ /usr/bin/id -u
    + '[' 0 = 0 ']'
    + /bin/chown -Rhf root .
    ++ /usr/bin/id -u
    + '[' 0 = 0 ']'
    + /bin/chgrp -Rhf root .
    + /bin/chmod -Rf a+rX,u+w,g-w,o-w .
    + exit 0
    Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.64419
    + umask 022
    + cd /usr/src/packages/BUILD
    + /bin/rm -rf /var/tmp/tg3-3.99k-1-buildroot
    ++ dirname /var/tmp/tg3-3.99k-1-buildroot
    + /bin/mkdir -p /var/tmp
    + /bin/mkdir /var/tmp/tg3-3.99k-1-buildroot
    + cd tg3-3.99k
    + value=
    + '[' -z '' ']'
    ++ uname -r
    + KVER=2.6.16.21-0.25-smp
    + make KVER=2.6.16.21-0.25-smp
    sh makeflags.sh /lib/modules/2.6.16.21-0.25-smp/source > tg3_flags.h
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/kernel.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/types.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/types.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/types.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/slab.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/delay.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/delay.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/skbuff.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/pci.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/pci.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/pci.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/pci.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/pci.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/pci.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/pci.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/pci.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/if_ether.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/ethtool.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/ethtool.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/ethtool.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/skbuff.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/skbuff.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/ip.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/net/ip.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/tcp.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/tcp.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/netdevice.h: No such file or directory
    awk: cmd. line:1: fatal: cannot open file `/lib/modules/2.6.16.21-0.25-smp/source/include/linux/n etdevice.h' for reading (No such file or directory)
    makeflags.sh: line 154: [: too many arguments
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/netdevice.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/netdevice.h: No such file or directory
    grep: /lib/modules/2.6.16.21-0.25-smp/source/include/linux/if_vlan.h: No such file or directory
    /bin/sh: line 0: [: 10.1: integer expression expected
    make -C /lib/modules/2.6.16.21-0.25-smp/build SUBDIRS=/usr/src/packages/BUILD/tg3-3.99k modules
    make[1]: Entering directory `/usr/src/linux-2.6.16.21-0.25-obj/i386/smp'
    make[1]: *** No rule to make target `modules'. Stop.
    make[1]: Leaving directory `/usr/src/linux-2.6.16.21-0.25-obj/i386/smp'
    make: *** [default] Error 2
    error: Bad exit status from /var/tmp/rpm-tmp.64419 (%build)


    RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.64419 (%build)


    ============================build from TAR file=================================



    walker:/home/werowe/broadcom/tg3-3.99k # make
    /bin/sh: line 0: [: 10.1: integer expression expected
    make -C /lib/modules/2.6.16.21-0.25-smp/build SUBDIRS=/home/werowe/broadcom/tg3-3.99k modules
    make[1]: Entering directory `/usr/src/linux-2.6.16.21-0.25-obj/i386/smp'
    make[1]: *** No rule to make target `modules'. Stop.
    make[1]: Leaving directory `/usr/src/linux-2.6.16.21-0.25-obj/i386/smp'
    make: *** [default] Error 2

  2. #2
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Please post the output of /sbin/lspci -v just to confirm the chipset of the card.

    Also note that opensuse 10.1 reached end of life May 31st, 2008 and is no longer supported. More recent version of opensuse have this driver included in the kernel, so an upgrade would fix your problems.

    So this version of the kernel is obviously 2.6.16.21-0.25-smp but I got the kernel source code for 2.6.16.21 from kernel.org.
    I'm confused by this. Is this a custom kernel you compiled then? Or are you saying you downloaded the kernel source to compile the driver against?

    You don't need the kernel source, if that's the case. You need the kernel-devel and kernel-headers installed.

  3. #3
    Just Joined!
    Join Date
    Oct 2009
    Posts
    6
    Now sure I understand "You don't need the kernel source, if that's the case. You need the kernel-devel and kernel-headers installed". I am certainly looking to do what is simplest.


    Regarding the kernel I downloaded the software: SUSE-Linux-10.1-GM-x86_64-CD1.iso

    And then I noticed I needed the source code to compile the driver so I got that:

    linux-2.6.16.21.tar.gz

    Basically I need to run SUSE 10.1 because the version of CA Directory I am using requires that version of Linux. So if I can get the network card working there I would like to do that as I now have the CA Directory software working and not sure if it would work with the latest released of SUSE Linux.

    Below is the info you asked for.



    03:00.0 Ethernet controller: Broadcom Corporation Unknown device 167b (rev 02)
    Subsystem: Lenovo Unknown device 1010
    Flags: bus master, fast devsel, latency 0, IRQ 11
    Memory at d0100000 (64-bit, non-prefetchable) [size=64K]
    Capabilities: [48] Power Management version 3
    Capabilities: [50] Vital Product Data
    Capabilities: [58] Vendor Specific Information
    Capabilities: [e8] Message Signalled Interrupts: 64bit+ Queue=0/0 Enable -
    Capabilities: [d0] Express Endpoint IRQ 0
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [13c] Virtual Channel
    Capabilities: [160] Device Serial Number a3-ea-36-fe-ff-41-16-00
    Capabilities: [16c] Power Budgeting

  4. #4
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Normally to build a module against the kernel, you need the kernel headers for that particular kernel. What you downloaded was the vanilla (ie, unpatched by opensuse - distros generally include custom patches to their kernels) source.

    Anyway, it looks like the driver for this card actually should be included in opensuse 10.1. I've seen a couple of references to that, such as this one here.

    Can you post the output of
    Code:
    /sbin/lsmod
    dmesg | grep eth

  5. #5
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105
    Also you need to be sure the headers are where they are expected to be installing form a non Suse source may place them in a different directory

  6. #6
    Just Joined!
    Join Date
    Oct 2009
    Posts
    6
    werowe@walker:~> /sbin/lsmod
    Module Size Used by
    nls_iso8859_1 8064 1
    nls_cp437 9728 1
    vfat 16000 1
    fat 51100 1 vfat
    xt_pkttype 5760 3
    ipt_LOG 9856 8
    xt_limit 6528 8
    snd_pcm_oss 47104 0
    snd_mixer_oss 20224 1 snd_pcm_oss
    snd_seq 53104 0
    snd_seq_device 11916 1 snd_seq
    button 10640 0
    battery 13444 0
    ac 8964 0
    ip6t_REJECT 8960 3
    xt_tcpudp 7040 3
    ipt_REJECT 9216 3
    xt_state 6016 12
    iptable_mangle 6656 0
    iptable_nat 11652 0
    ip_nat 20268 1 iptable_nat
    iptable_filter 6912 1
    ip6table_mangle 6272 0
    ip_conntrack 49880 3 xt_state,iptable_nat,ip_nat
    nfnetlink 10136 2 ip_nat,ip_conntrack
    ip_tables 16196 3 iptable_mangle,iptable_nat,iptable_filter
    ip6table_filter 6656 1
    ip6_tables 17604 2 ip6table_mangle,ip6table_filter
    x_tables 16132 10 xt_pkttype,ipt_LOG,xt_limit,ip6t_REJECT,xt_tcpudp, ipt_REJECT,xt_state,iptable_nat,ip_tables,ip6_tabl es
    ipv6 243296 17 ip6t_REJECT
    apparmor 54552 0
    aamatch_pcre 17408 1 apparmor
    nls_utf8 6016 1
    ntfs 199700 1
    loop 19464 0
    usbhid 44640 0
    dm_mod 57680 0
    usb_storage 74432 1
    ide_core 122700 1 usb_storage
    snd_hda_intel 21652 1
    snd_hda_codec 139136 1 snd_hda_intel
    snd_pcm 86532 3 snd_pcm_oss,snd_hda_intel,snd_hda_codec
    snd_timer 25860 2 snd_seq,snd_pcm
    snd 56708 10 snd_pcm_oss,snd_mixer_oss,snd_seq,snd_seq_device,s nd_hda_intel,snd_hda_codec,snd_pcm,snd_timer
    soundcore 13024 1 snd
    hw_random 9496 0
    snd_page_alloc 13576 2 snd_hda_intel,snd_pcm
    ehci_hcd 31880 0
    uhci_hcd 32400 0
    i2c_i801 12044 0
    i2c_core 23680 1 i2c_i801
    usbcore 115716 5 usbhid,usb_storage,ehci_hcd,uhci_hcd
    parport_pc 39524 1
    lp 14756 0
    parport 36936 2 parport_pc,lp
    reiserfs 216576 2
    edd 12484 0
    fan 8580 0
    thermal 17416 0
    processor 31208 1 thermal
    sr_mod 18596 0
    cdrom 36512 1 sr_mod
    sg 35612 0
    ata_piix 14212 5
    libata 69776 1 ata_piix
    sd_mod 20352 8
    scsi_mod 127880 5 usb_storage,sr_mod,sg,libata,sd_mod

    werowe@walker:~> dmesg | grep eth
    werowe@walker:~>

  7. #7
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    The module isn't loading. Let's see if it's around. Do
    Code:
    su -
    modprobe tg3
    depmod -a
    If the first returns nothing, the module should be loaded.

  8. #8
    Just Joined!
    Join Date
    Oct 2009
    Posts
    6
    Reed,

    I entered the commands you gave with no errors shown so the module must have loaded. What to do from here? I would use yast2 to configure the network connection but the broadcom card is not listed in the list of available devices (that list must be just a text file or something similar).----regards, WER

  9. #9
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Try this
    Code:
    su -
    ifconfig eth0 up
    dhclient eth0
    *The interface is probably called eth0, but it's possible it isn't. Check the output of ifconfig -a to see the names of your interfaces.

    Also, the module will not load after a restart using this method. It looks like you can do that through yast. Kernel module configuration - openSUSE

  10. #10
    Just Joined!
    Join Date
    Oct 2009
    Posts
    6
    Reed,


    Not sure the interface is up because after bouncing the system and after modprobe and depmod ifconfig shows only this one interface (not including the loopback):

    it0 Link encap:IPv6-in-IPv4
    NOARP MTU:1480 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)


    --WER

Page 1 of 2 1 2 LastLast

Posting Permissions

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