LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Makefile help needed for linksys WPC11 v.4 (https://www.linuxquestions.org/questions/linux-newbie-8/makefile-help-needed-for-linksys-wpc11-v-4-a-124066/)

duziq 12-08-2003 09:57 PM

Makefile help needed for linksys WPC11 v.4
 
I've gone over the bulk of the "WPC11 version 4!" thread, but I need more basic help. I haven't found anything there that will help me get over the hump to compile the source code from Realtek's site as recommended. It provides a makefile that needs to be edited according to one's environment, but I'm hitting a wall.

One of the parameters is INCLUDEPATH and the provided readme lists /usr/scr/linux-2.4.18-14/ as an example. One question is, how do I find where is my include path is located?

In terminal I ran the make command with INCLUDEPATH as /usr/include/, but I received a huge number of errors. Also any hints on the proper use of the make command would be appreciated.

The source code I downloaded is for RH 9, and I am running kernel 2.4.20-24.9.

Many thanks

ugob 12-09-2003 12:41 AM

Isn't there a configure script?

duziq 12-09-2003 09:05 AM

Some output
 
Thanks for the reply ugob.

There are two configuration script files, ones that end in .c

After looking inside and finding the path of the required files, it seems my INCLUDEPATH is /usr/include/

Here is some output:

ifconfig -a

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2262 errors:0 dropped:0 overruns:0 frame:0
TX packets:2262 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:169752 (165.7 Kb) TX bytes:169752 (165.7 Kb)

route

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
169.254.0.0 * 255.255.0.0 U 0 0 0 lo
127.0.0.0 * 255.0.0.0 U 0 0 0 lo


make

[root@localhost release]# make
gcc -O6 -Wall -DMODULE -D__KERNEL__ -DLINUX -I /usr/include/ -DRTL_IO_MAP -DRTL_BIG_ENDIAN -DRTL_ACT_AS_STA -DRTL8180_DRV_ON_PC -DENABLE_DBG_PRINT -c -o r8180_pci_init.o r8180_pci_init.c
In file included from /usr/include/linux/fs.h:23,
from /usr/include/linux/capability.h:17,
from /usr/include/linux/binfmts.h:5,
from /usr/include/linux/sched.h:9,
from r8180_pci_init.c:26:
/usr/include/linux/string.h:8:2: warning: #warning Using kernel header in userland!
In file included from /usr/include/linux/sched.h:14,
from r8180_pci_init.c:26:
/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 r8180_pci_init.c:26:
/usr/include/asm/bitops.h:327:2: warning: #warning This includefile is not available on all architectures.
/usr/include/asm/bitops.h:328:2: warning: #warning Using kernel headers in userspace: atomicity not guaranteed
In file included from /usr/include/linux/signal.h:4,
from /usr/include/linux/sched.h:25,
from r8180_pci_init.c:26:
/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 r8180_pci_init.c:26:
/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: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 r8180_pci_init.c:32:
/usr/include/linux/delay.h:13:23: asm/delay.h: No such file or directory
In file included from r8180_pci_init.c:36:
/usr/include/linux/proc_fs.h: At top level:
/usr/include/linux/proc_fs.h:70: parse error before "atomic_t"
/usr/include/linux/proc_fs.h:73: parse error before '}' token
/usr/include/linux/proc_fs.h:203: parse error before "void"
In file included from r8180_pci_init.c:40:
r8180_type.h:149: warning: redefinition of `timer_t'
/usr/include/linux/timer.h:42: warning: `timer_t' previously declared here
r8180_pci_init.c:58: elements of array `rtl8180_pci_id_tbl' have incomplete typer8180_pci_init.c:59: warning: excess elements in struct initializer
r8180_pci_init.c:59: warning: (near initialization for `rtl8180_pci_id_tbl[0]')
r8180_pci_init.c:59: warning: excess elements in struct initializer
r8180_pci_init.c:59: warning: (near initialization for `rtl8180_pci_id_tbl[0]')
r8180_pci_init.c:59: `PCI_ANY_ID' undeclared here (not in a function)
r8180_pci_init.c:59: warning: excess elements in struct initializer
r8180_pci_init.c:59: warning: (near initialization for `rtl8180_pci_id_tbl[0]')
r8180_pci_init.c:59: `PCI_ANY_ID' undeclared here (not in a function)
r8180_pci_init.c:59: warning: excess elements in struct initializer
r8180_pci_init.c:59: warning: (near initialization for `rtl8180_pci_id_tbl[0]')
r8180_pci_init.c:59: warning: excess elements in struct initializer
r8180_pci_init.c:59: warning: (near initialization for `rtl8180_pci_id_tbl[0]')
r8180_pci_init.c:59: warning: excess elements in struct initializer
r8180_pci_init.c:59: warning: (near initialization for `rtl8180_pci_id_tbl[0]')
r8180_pci_init.c:59: warning: excess elements in struct initializer
r8180_pci_init.c:59: warning: (near initialization for `rtl8180_pci_id_tbl[0]')
r8180_pci_init.c:60: warning: excess elements in struct initializer
r8180_pci_init.c:60: warning: (near initialization for `rtl8180_pci_id_tbl[1]')
r8180_pci_init.c:72: variable `rtl8180_pci_driver' has initializer but incomplete type
r8180_pci_init.c:73: unknown field `name' specified in initializer
r8180_pci_init.c:73: warning: excess elements in struct initializer
r8180_pci_init.c:73: warning: (near initialization for `rtl8180_pci_driver')
r8180_pci_init.c:74: unknown field `id_table' specified in initializer
r8180_pci_init.c:74: warning: excess elements in struct initializer
r8180_pci_init.c:74: warning: (near initialization for `rtl8180_pci_driver')
r8180_pci_init.c:75: unknown field `probe' specified in initializer
r8180_pci_init.c:75: warning: excess elements in struct initializer
r8180_pci_init.c:75: warning: (near initialization for `rtl8180_pci_driver')
r8180_pci_init.c:76: unknown field `remove' specified in initializer
r8180_pci_init.c:76: warning: excess elements in struct initializer
r8180_pci_init.c:76: warning: (near initialization for `rtl8180_pci_driver')
r8180_pci_init.c:77: unknown field `suspend' specified in initializer
r8180_pci_init.c:77: warning: excess elements in struct initializer
r8180_pci_init.c:77: warning: (near initialization for `rtl8180_pci_driver')
r8180_pci_init.c:78: unknown field `resume' specified in initializer
r8180_pci_init.c:78: warning: excess elements in struct initializer
r8180_pci_init.c:78: warning: (near initialization for `rtl8180_pci_driver')
r8180_pci_init.c:84: sizeof applied to an incomplete type
r8180_pci_init.c: In function `rtl8180_pci_probe':
r8180_pci_init.c:105: warning: implicit declaration of function `pci_enable_device'
r8180_pci_init.c:106: warning: implicit declaration of function `printk'
r8180_pci_init.c:107: `EIO' undeclared (first use in this function)
r8180_pci_init.c:107: (Each undeclared identifier is reported only once
r8180_pci_init.c:107: for each function it appears in.)
r8180_pci_init.c:113: warning: implicit declaration of function `pci_set_master'r8180_pci_init.c:132: warning: implicit declaration of function `pci_set_drvdata'
r8180_pci_init.c:141: warning: implicit declaration of function `pci_resource_start'
r8180_pci_init.c:142: warning: implicit declaration of function `pci_resource_len'
r8180_pci_init.c:143: warning: implicit declaration of function `pci_resource_flags'
r8180_pci_init.c:146: dereferencing pointer to incomplete type
r8180_pci_init.c:150: dereferencing pointer to incomplete type
r8180_pci_init.c:160: dereferencing pointer to incomplete type
r8180_pci_init.c:198: dereferencing pointer to incomplete type
r8180_pci_init.c:198: dereferencing pointer to incomplete type
r8180_pci_init.c:201: dereferencing pointer to incomplete type
r8180_pci_init.c:202: dereferencing pointer to incomplete type
r8180_pci_init.c:203: dereferencing pointer to incomplete type
r8180_pci_init.c:204: dereferencing pointer to incomplete type
r8180_pci_init.c:206: dereferencing pointer to incomplete type
r8180_pci_init.c:207: dereferencing pointer to incomplete type
r8180_pci_init.c:213: dereferencing pointer to incomplete type
r8180_pci_init.c:250: dereferencing pointer to incomplete type
r8180_pci_init.c:250: dereferencing pointer to incomplete type
r8180_pci_init.c:250: dereferencing pointer to incomplete type
r8180_pci_init.c:250: dereferencing pointer to incomplete type
r8180_pci_init.c:250: dereferencing pointer to incomplete type
r8180_pci_init.c:250: dereferencing pointer to incomplete type
r8180_pci_init.c:250: dereferencing pointer to incomplete type
r8180_pci_init.c:266: dereferencing pointer to incomplete type
r8180_pci_init.c:267: dereferencing pointer to incomplete type
r8180_pci_init.c:268: dereferencing pointer to incomplete type
r8180_pci_init.c:282: warning: implicit declaration of function `kfree'
r8180_pci_init.c:288: `ENOMEM' undeclared (first use in this function)
r8180_pci_init.c: In function `rtl8180_pci_remove':
r8180_pci_init.c:304: warning: implicit declaration of function `pci_get_drvdata'
r8180_pci_init.c:304: warning: initialization makes pointer from integer without a cast
r8180_pci_init.c:323: dereferencing pointer to incomplete type
r8180_pci_init.c:324: dereferencing pointer to incomplete type
r8180_pci_init.c:325: dereferencing pointer to incomplete type
r8180_pci_init.c: In function `rtl8180_pci_module_init':
r8180_pci_init.c:372: `KERN_INFO' undeclared (first use in this function)
r8180_pci_init.c:372: parse error before string constant
r8180_pci_init.c:374: warning: implicit declaration of function `pci_register_driver'
r8180_pci_init.c:376: warning: implicit declaration of function `pci_unregister_driver'
r8180_pci_init.c:377: `ENODEV' undeclared (first use in this function)
r8180_pci_init.c: In function `rtl8180_pci_module_exit':
r8180_pci_init.c:393: `KERN_INFO' undeclared (first use in this function)
r8180_pci_init.c:393: parse error before string constant
r8180_pci_init.c: At top level:
r8180_pci_init.c:72: storage size of `rtl8180_pci_driver' isn't known
make: *** [r8180_pci_init.o] Error 1

duziq 12-10-2003 07:29 AM

Trying thread 61832 also
 
I guess I should post my last message on thread 61832 too.


Thanks

jwspring 12-10-2003 08:29 AM

uname -r gives the current kernel for you to edit into your include path

duziq 12-10-2003 09:10 AM

Include path question
 
jwspring,

Is the include path a directory that already exists, or does it get created in the make process?

I searched for existing directories named include, and the only one that seemed to make sense and contained the files referenced in the configuration script file was /usr/include/.

The only directory with the kernel number as the name was /lib/modules/2.4.20-24.9, but it had no include directory within.

Thanks,

jwspring 12-10-2003 09:38 AM

The include string:
INCLUDEPATH=-I /usr/src/linux-$(KERNELRELEASE)/include/

It is looking for the incluce in the src directory

duziq 12-10-2003 11:19 AM

jwspring,

Thanks for the hint. I'll give it a try tonight after work.

Should I assume you used the makefile with that path and had some degree of success? Did a driver pop out at the end?

jwspring 12-10-2003 11:26 AM

I've managed to compile it twice. Once with an previous version and recently with the 1.4 version.


All times are GMT -5. The time now is 12:13 AM.