From owner-freebsd-questions@FreeBSD.ORG Sat Dec 22 20:55:46 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F225D16A41B for ; Sat, 22 Dec 2007 20:55:46 +0000 (UTC) (envelope-from vkalik@yahoo.com) Received: from web31005.mail.mud.yahoo.com (web31005.mail.mud.yahoo.com [68.142.200.168]) by mx1.freebsd.org (Postfix) with SMTP id D0E9013C4E8 for ; Sat, 22 Dec 2007 20:55:46 +0000 (UTC) (envelope-from vkalik@yahoo.com) Received: (qmail 98526 invoked by uid 60001); 22 Dec 2007 20:29:06 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=jDTeyj5Lw4kcGeyeTixhwP7RJyBvBxYvY4IQkkAY0yjh7kzg+EL8vPC2hPPUdzRAuLN0DWU/w6W7eivUqJ1xKDv40FZdbqWSCKMSFKOPMiJGXX8PENm4L+GQlWcrQNyp1q36uUSbb3zn0lLtVnJhH7q30VPLaEvihN4I6Gny2D4=; X-YMail-OSG: foo5rJQVM1nC9WP3Ud4PLmqUc25itI.lmKH0Nfg..SrZSm1.2UKe37Oxxich1mgArzLlqEsX6cituakz47DeEsfPdO2TwDuWfaP8rQGA_UIZVVuECol496d5ajWs0g-- Received: from [212.200.152.180] by web31005.mail.mud.yahoo.com via HTTP; Sat, 22 Dec 2007 12:29:06 PST Date: Sat, 22 Dec 2007 12:29:06 -0800 (PST) From: Velja Kalik To: freebsd-questions@freebsd.org MIME-Version: 1.0 Message-ID: <425876.97873.qm@web31005.mail.mud.yahoo.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Realtek 8101E NIC and FreeBSD 4.11 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Dec 2007 20:55:47 -0000 Hello all, has anyone tried to compile the Realtek driver (rtl_bsd_drv_v174.tgz) on FreeBSD 4.x? From http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=7&PFid=7&Level=5&Conn=4&DownTypeID=3&GetDown=false#RTL8100E/RTL8101E/RTL8102E-GR Readme.txt says: 1. Method 1 advises to just copy the .ko module to /modules, but there is no .ko file in the tgz archive. That is even ok since I guess they would have to put a .ko module in tgz archive for all popular versions of FreeBSD (4.x/5.x/6.x) and their kernel versions. 2. Method 2 advises to go for compilation of kernel modules using the .c, .h and Makefile from the tgz archive. I made backups of original files, compiled new kernel without "rl", rebooted (everything from step 1 and 2), copied everything from tgz archive in place, edited if_rlreg.h so that the first #define lines would look like this (for 4.11): #define VERSION(_MainVer,_MinorVer) ((_MainVer)*10+(_MinorVer)) #define OS_VER VERSION(4,11) /*#if __FreeBSD_version < 500000*/ /*#define VERSION(_MainVer,_MinorVer) ((_MainVer)*100000+(_MinorVer)*10000)*/ /*#else*/ /*#define VERSION(_MainVer,_MinorVer) ((_MainVer)*100000+(_MinorVer)*1000)*/ /*#endif*/ /*#define OS_VER __FreeBSD_version*/ (uncommented first 2 lines, commented next 6 lines). Then in the /usr/src/sys/modules/rl I ran "make clean" (which is ok) and then "make" and it started to complain: host# make Warning: Object directory not changed from original /usr/src/sys/modules/rl @ -> /usr/src/sys machine -> /usr/src/sys/i386/include touch opt_bdg.h perl @/kern/makeops.pl -h @/kern/device_if.m perl @/kern/makeops.pl -h @/kern/bus_if.m perl @/kern/makeops.pl -h @/pci/pci_if.m cc -O -pipe -D_KERNEL -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -ansi -DKLD_MODULE -nostdinc -I- -I. -I@ -I@/../include -I/usr/include -mpreferred-stack-boundary=2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -ansi -c /usr/src/sys/modules/rl/../../pci/if_rl.c In file included from /usr/src/sys/modules/rl/../../pci/if_rl.c:73: @/pci/if_rlreg.h:506: field `mtx' has incomplete type /usr/src/sys/modules/rl/../../pci/if_rl.c: In function `rl_attach': /usr/src/sys/modules/rl/../../pci/if_rl.c:257: warning: implicit declaration of function `mtx_init' /usr/src/sys/modules/rl/../../pci/if_rl.c:257: `MTX_NETWORK_LOCK' undeclared (first use in this function) /usr/src/sys/modules/rl/../../pci/if_rl.c:257: (Each undeclared identifier is reported only once /usr/src/sys/modules/rl/../../pci/if_rl.c:257: for each function it appears in.) /usr/src/sys/modules/rl/../../pci/if_rl.c:257: `MTX_DEF' undeclared (first use in this function) /usr/src/sys/modules/rl/../../pci/if_rl.c:524: warning: passing arg 2 of `ether_ifattach' makes integer from pointer without a cast /usr/src/sys/modules/rl/../../pci/if_rl.c:555: `IFM_1000_T' undeclared (first use in this function) /usr/src/sys/modules/rl/../../pci/if_rl.c: In function `rl_detach': /usr/src/sys/modules/rl/../../pci/if_rl.c:588: warning: implicit declaration of function `mtx_lock' /usr/src/sys/modules/rl/../../pci/if_rl.c:590: warning: implicit declaration of function `mtx_unlock' /usr/src/sys/modules/rl/../../pci/if_rl.c:596: too few arguments to function `ether_ifdetach' /usr/src/sys/modules/rl/../../pci/if_rl.c:618: warning: implicit declaration of function `mtx_destroy' /usr/src/sys/modules/rl/../../pci/if_rl.c: In function `rl_start': /usr/src/sys/modules/rl/../../pci/if_rl.c:993: warning: passing arg 1 of `bpf_mtap' from incompatible pointertype /usr/src/sys/modules/rl/../../pci/if_rl.c:1067: warning: passing arg 1 of `bpf_mtap' from incompatible pointer type /usr/src/sys/modules/rl/../../pci/if_rl.c: In function `rl_rxeof': /usr/src/sys/modules/rl/../../pci/if_rl.c:1533: structure has no member named `if_input' /usr/src/sys/modules/rl/../../pci/if_rl.c:1630: structure has no member named `if_input' /usr/src/sys/modules/rl/../../pci/if_rl.c: In function `rl_intr': /usr/src/sys/modules/rl/../../pci/if_rl.c:1723: structure has no member named `if_link_state' /usr/src/sys/modules/rl/../../pci/if_rl.c:1723: `LINK_STATE_UP' undeclared (first use in this function) /usr/src/sys/modules/rl/../../pci/if_rl.c:1724: syntax error before `/' /usr/src/sys/modules/rl/../../pci/if_rl.c:1729: structure has no member named `if_link_state' /usr/src/sys/modules/rl/../../pci/if_rl.c:1729: `LINK_STATE_DOWN' undeclared (first use in this function) /usr/src/sys/modules/rl/../../pci/if_rl.c:1730: syntax error before `/' /usr/src/sys/modules/rl/../../pci/if_rl.c: In function `rl_setmulti': /usr/src/sys/modules/rl/../../pci/if_rl.c:1830: structure has no member named `tqh_first' /usr/src/sys/modules/rl/../../pci/if_rl.c:1830: structure has no member named `tqe_next' /usr/src/sys/modules/rl/../../pci/if_rl.c:1800: warning: `ifma' might be used uninitialized in this function /usr/src/sys/modules/rl/../../pci/if_rl.c: In function `rl_ifmedia_sts': /usr/src/sys/modules/rl/../../pci/if_rl.c:2061: `IFM_1000_T' undeclared (first use in this function) *** Error code 1 Stop in /usr/src/sys/modules/rl. host# and gives out an error for compiling of course. Do you have a suggestion how can I solve MTX_* error problems, since it looks like mutexes are used in code and "man mutex" on FreeBSD web says that mutex.h is introduced in FreeBSD 5.0 (and this is 4.11)? For IFM_* errors where are those IFM variables/constants supposed to be included from? I guess all would be easy if I had used FreeBSD 5.x or 6.x, but all nodes have to be 4.11 (comercial compiler on system for FreeBSD 4.x) so its not like I can choose other verions :) NIC is integrated Realtek 8101E (PCIEx). No reply from Bill Paul or Yves... Thank you for any kind of help or information! Regards, Velja --------------------------------- Looking for last minute shopping deals? Find them fast with Yahoo! Search.