подсказли сделать symlink c /usr/src/linux-2.4.27/include/linux в
/usr/include и назвать его linux. После этого идут следующие ошибки:
> [root@www pentanet]# make
> make all-recursive
> make[1]: Entering directory `/usr/src/pentanet'
> Making all in driver
> make[2]: Entering directory `/usr/src/pentanet/driver'
> gcc -march=i486 -DCPU=486 -D__SMP__ -DMODVERSIONS -DMODULE -D__KERNEL__ -O2 -Wall -Wstrict-prototypes
> -fomit-frame-pointer -fno-strength-reduce -pipe -falign-loops=2 -falign-jumps=2 -falign-functions=2 -c pentaif.c
> pentaif.c:9:64: linux/modversions.h: No such file or directory
> In file included from /usr/include/linux/module.h:10,
> from pentaif.c:10:
> /usr/include/linux/config.h:4:28: linux/autoconf.h: No such file or directory
> In file included from /usr/include/linux/kernel.h:13,
> from /usr/include/asm/system.h:4,
> from /usr/include/linux/spinlock.h:6,
> from /usr/include/linux/module.h:12,
> from pentaif.c:10:
> /usr/include/linux/types.h:21: error: syntax error before "dev_t"
> In file included from /usr/include/linux/kernel.h:15,
> from /usr/include/asm/system.h:4,
> from /usr/include/linux/spinlock.h:6,
> from /usr/include/linux/module.h:12,
> from pentaif.c:10:
> /usr/include/asm/byteorder.h:9: error: syntax error before "__u32"
> /usr/include/asm/byteorder.h:15: error: syntax error before "__u64"
> In file included from /usr/include/asm/math_emu.h:4,
> from /usr/include/asm/processor.h:13,
> from /usr/include/linux/prefetch.h:13,
> from /usr/include/linux/list.h:6,
> from /usr/include/linux/module.h:13,
> from pentaif.c:10:
> /usr/include/asm/sigcontext.h:79: error: syntax error before '*' token
> /usr/include/asm/sigcontext.h:82: error: syntax error before '}' token
> In file included from /usr/include/asm/processor.h:13,
> from /usr/include/linux/prefetch.h:13,
> from /usr/include/linux/list.h:6,
> from /usr/include/linux/module.h:13,
> from pentaif.c:10:
> /usr/include/asm/math_emu.h:6: error: syntax error before '*' token
> /usr/include/asm/math_emu.h:7: error: syntax error before '*' token
> In file included from /usr/include/linux/prefetch.h:13,
> from /usr/include/linux/list.h:6,
> from /usr/include/linux/module.h:13,
> from pentaif.c:10:
> /usr/include/asm/processor.h:415: error: syntax error before '*' token
> /usr/include/asm/processor.h:421: error: syntax error before '}' token
> /usr/include/asm/processor.h: In function `load_esp0':
> /usr/include/asm/processor.h:447: error: dereferencing pointer to incomplete type
> /usr/include/asm/processor.h:449: error: dereferencing pointer to incomplete type
> /usr/include/asm/processor.h:450: error: dereferencing pointer to incomplete type
> /usr/include/asm/processor.h:451: error: dereferencing pointer to incomplete type
> In file included from /usr/include/linux/capability.h:17,
> from /usr/include/linux/binfmts.h:4,
> from /usr/include/linux/sched.h:10,
> from /usr/include/linux/mm.h:4,
> from /usr/include/asm/pci.h:7,
> from /usr/include/linux/pci.h:682,
> from pentaif.c:13:
> /usr/include/linux/fs.h: At top level:
> /usr/include/linux/fs.h:428: error: syntax error before "dev_t"
> /usr/include/linux/fs.h:431: error: syntax error before '}' token
> /usr/include/linux/fs.h:437: error: syntax error before "dev_t"
> /usr/include/linux/fs.h:445: error: syntax error before '}' token
> In file included from /usr/include/linux/reiserfs_fs_sb.h:8,
> from /usr/include/linux/fs.h:739,
> from /usr/include/linux/capability.h:17,
> from /usr/include/linux/binfmts.h:4,
> from /usr/include/linux/sched.h:10,
> from /usr/include/linux/mm.h:4,
> from /usr/include/asm/pci.h:7,
> from /usr/include/linux/pci.h:682,
> from pentaif.c:13:
> /usr/include/linux/tqueue.h: In function `queue_task':
> /usr/include/linux/tqueue.h:107: error: syntax error before "unsigned"
> In file included from /usr/include/linux/capability.h:17,
> from /usr/include/linux/binfmts.h:4,
> from /usr/include/linux/sched.h:10,
> from /usr/include/linux/mm.h:4,
> from /usr/include/asm/pci.h:7,
> from /usr/include/linux/pci.h:682,
> from pentaif.c:13:
> /usr/include/linux/fs.h: At top level:
> /usr/include/linux/fs.h:831: error: syntax error before "dev_t"
> In file included from /usr/include/linux/signal.h:4,
> from /usr/include/linux/sched.h:27,
> from /usr/include/linux/mm.h:4,
> from /usr/include/asm/pci.h:7,
> from /usr/include/linux/pci.h:682,
> from pentaif.c:13:
> /usr/include/asm/signal.h:133: error: syntax error before '*' token
> /usr/include/asm/signal.h:136: error: syntax error before '*' token
> /usr/include/asm/signal.h:144: error: syntax error before "__sighandler_t"
> /usr/include/asm/signal.h:147: error: syntax error before "sa_restorer"
> /usr/include/asm/signal.h:151: error: syntax error before "__sighandler_t"
> /usr/include/asm/signal.h:153: error: syntax error before "sa_restorer"
> /usr/include/asm/signal.h:154: error: conflicting types for 'sa_mask'
> /usr/include/asm/signal.h:145: error: previous declaration of 'sa_mask' was here
> /usr/include/asm/signal.h:155: error: syntax error before '}' token
> /usr/include/asm/signal.h:158: error: field `sa' has incomplete type
> /usr/include/asm/signal.h:179: error: variable or field `__user' declared void
> /usr/include/asm/signal.h:179: error: syntax error before '*' token
> /usr/include/asm/signal.h:182: error: syntax error before '}' token
> In file included from /usr/include/asm/siginfo.h:4,
> from /usr/include/linux/signal.h:5,
> from /usr/include/linux/sched.h:27,
> from /usr/include/linux/mm.h:4,
> from /usr/include/asm/pci.h:7,
> from /usr/include/linux/pci.h:682,
> from pentaif.c:13:
> /usr/include/asm-generic/siginfo.h:9: error: variable or field `__user' declared void
> /usr/include/asm-generic/siginfo.h:9: error: syntax error before '*' token
> /usr/include/asm-generic/siginfo.h:56: error: syntax error before "timer_t"
> /usr/include/asm-generic/siginfo.h:59: error: syntax error before "sigval_t"
> /usr/include/asm-generic/siginfo.h:61: error: syntax error before '}' token
> /usr/include/asm-generic/siginfo.h:67: error: syntax error before "sigval_t"
> /usr/include/asm-generic/siginfo.h:81: error: variable or field `__user' declared void
> /usr/include/asm-generic/siginfo.h:81: error: syntax error before '*' token
> /usr/include/asm-generic/siginfo.h:92: error: syntax error before '}' token
> /usr/include/asm-generic/siginfo.h:93: error: syntax error before '}' token
> /usr/include/asm-generic/siginfo.h:250: error: syntax error before "sigval_t"
> /usr/include/asm-generic/siginfo.h:262: error: syntax error before '}' token
> /usr/include/asm-generic/siginfo.h: In function `copy_siginfo':
> /usr/include/asm-generic/siginfo.h:281: error: dereferencing pointer to incomplete type
> /usr/include/asm-generic/siginfo.h:282: error: dereferencing pointer to incomplete type
> /usr/include/asm-generic/siginfo.h:282: error: dereferencing pointer to incomplete type
> /usr/include/asm-generic/siginfo.h:282: error: dereferencing pointer to incomplete type
> /usr/include/asm-generic/siginfo.h:285: error: dereferencing pointer to incomplete type
> /usr/include/asm-generic/siginfo.h:285: error: dereferencing pointer to incomplete type
> /usr/include/asm-generic/siginfo.h:285: error: dereferencing pointer to incomplete type
> /usr/include/asm-generic/siginfo.h: At top level:
> /usr/include/asm-generic/siginfo.h:290: error: syntax error before '*' token
> In file included from /usr/include/linux/sched.h:27,
> from /usr/include/linux/mm.h:4,
> from /usr/include/asm/pci.h:7,
> from /usr/include/linux/pci.h:682,
> from pentaif.c:13:
> /usr/include/linux/signal.h:14: error: syntax error before "siginfo_t"
> /usr/include/linux/signal.h:225: error: syntax error before '*' token
> In file included from /usr/include/linux/mm.h:4,
> from /usr/include/asm/pci.h:7,
> from /usr/include/linux/pci.h:682,
> from pentaif.c:13:
> /usr/include/linux/sched.h:488: error: `NGROUPS' undeclared here (not in a function)
> /usr/include/linux/sched.h:504: error: field `thread' has incomplete type
> /usr/include/linux/sched.h:536: error: syntax error before "siginfo_t"
> /usr/include/linux/sched.h:732: error: field `task' has incomplete type
> In file included from /usr/include/linux/sched.h:747,
> from /usr/include/linux/mm.h:4,
> from /usr/include/asm/pci.h:7,
> from /usr/include/linux/pci.h:682,
> from pentaif.c:13:
> /usr/include/asm/current.h:4:31: linux/thread_info.h: No such file or directory
> In file included from /usr/include/linux/sched.h:747,
> from /usr/include/linux/mm.h:4,
> from /usr/include/asm/pci.h:7,
> from /usr/include/linux/pci.h:682,
> from pentaif.c:13:
> /usr/include/asm/current.h: In function `get_current':
> /usr/include/asm/current.h:10: error: invalid type argument of `->'
> In file included from /usr/include/linux/mm.h:4,
> from /usr/include/asm/pci.h:7,
> from /usr/include/linux/pci.h:682,
> from pentaif.c:13:
> /usr/include/linux/sched.h: At top level:
> /usr/include/linux/sched.h:791: error: syntax error before "siginfo_t"
> /usr/include/linux/sched.h:811: error: syntax error before '*' token
> /usr/include/linux/sched.h: In function `signal_pending':
> /usr/include/linux/sched.h:815: error: dereferencing pointer to incomplete type
> /usr/include/linux/sched.h: In function `on_sig_stack':
> /usr/include/linux/sched.h:822: error: dereferencing pointer to incomplete type
> /usr/include/linux/sched.h:822: error: dereferencing pointer to incomplete type
> /usr/include/linux/sched.h: In function `sas_ss_flags':
> /usr/include/linux/sched.h:827: error: dereferencing pointer to incomplete type
> /usr/include/linux/sched.h: In function `suser':
> /usr/include/linux/sched.h:852: error: dereferencing pointer to incomplete type
> /usr/include/linux/sched.h:853: error: dereferencing pointer to incomplete type
> /usr/include/linux/sched.h: In function `fsuser':
> /usr/include/linux/sched.h:861: error: dereferencing pointer to incomplete type
> /usr/include/linux/sched.h:862: error: dereferencing pointer to incomplete type
> /usr/include/linux/sched.h: In function `capable':
> /usr/include/linux/sched.h:877: error: dereferencing pointer to incomplete type
> /usr/include/linux/sched.h:882: error: dereferencing pointer to incomplete type
> /usr/include/linux/sched.h: At top level:
> /usr/include/linux/sched.h:957: error: conflicting types for 'kernel_thread'
> /usr/include/asm/processor.h:479: error: previous declaration of 'kernel_thread' was here
> /usr/include/linux/sched.h:957: error: conflicting types for 'kernel_thread'
> /usr/include/asm/processor.h:479: error: previous declaration of 'kernel_thread' was here
> /usr/include/linux/sched.h: In function `thread_group_empty':
> /usr/include/linux/sched.h:1085: error: dereferencing pointer to incomplete type
> /usr/include/linux/sched.h: In function `task_lock':
> /usr/include/linux/sched.h:1098: error: dereferencing pointer to incomplete type
> /usr/include/linux/sched.h: In function `get_task_mm':
> /usr/include/linux/sched.h:1117: error: dereferencing pointer to incomplete type
> /usr/include/linux/sched.h: In function `d_path':
> /usr/include/linux/sched.h:1132: error: dereferencing pointer to incomplete type
> /usr/include/linux/sched.h:1133: error: dereferencing pointer to incomplete type
> /usr/include/linux/sched.h:1134: error: dereferencing pointer to incomplete type
> /usr/include/linux/sched.h: In function `set_need_resched':
> /usr/include/linux/sched.h:1146: error: dereferencing pointer to incomplete type
> /usr/include/linux/sched.h: In function `clear_need_resched':
> /usr/include/linux/sched.h:1151: error: dereferencing pointer to incomplete type
> /usr/include/linux/sched.h: In function `set_tsk_need_resched':
> /usr/include/linux/sched.h:1156: error: dereferencing pointer to incomplete type
> /usr/include/linux/sched.h: In function `clear_tsk_need_resched':
> /usr/include/linux/sched.h:1161: error: dereferencing pointer to incomplete type
> /usr/include/linux/sched.h: In function `need_resched':
> /usr/include/linux/sched.h:1166: error: dereferencing pointer to incomplete type
> In file included from /usr/include/linux/mm.h:12,
> from /usr/include/asm/pci.h:7,
> from /usr/include/linux/pci.h:682,
> from pentaif.c:13:
> /usr/include/linux/mmzone.h: At top level:
> /usr/include/linux/mmzone.h:44: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
> /usr/include/linux/mmzone.h:44: error: requested alignment is not a constant
> In file included from /usr/include/asm/pci.h:7,
> from /usr/include/linux/pci.h:682,
> from pentaif.c:13:
> /usr/include/linux/mm.h: In function `pf_gfp_mask':
> /usr/include/linux/mm.h:638: error: dereferencing pointer to incomplete type
> In file included from /usr/include/linux/vmalloc.h:8,
> from /usr/include/asm/io.h:46,
> from /usr/include/asm/pci.h:42,
> from /usr/include/linux/pci.h:682,
> from pentaif.c:13:
> /usr/include/linux/highmem.h:87:29: macro "clear_user_page" requires 3 arguments, but only 2 given
> In file included from /usr/include/linux/vmalloc.h:8,
> from /usr/include/asm/io.h:46,
> from /usr/include/asm/pci.h:42,
> from /usr/include/linux/pci.h:682,
> from pentaif.c:13:
> /usr/include/linux/highmem.h: In function `clear_user_highpage':
> /usr/include/linux/highmem.h:87: error: `clear_user_page' undeclared (first use in this function)
> /usr/include/linux/highmem.h:87: error: (Each undeclared identifier is reported only once
> /usr/include/linux/highmem.h:87: error: for each function it appears in.)
> /usr/include/linux/highmem.h:119:34: macro "copy_user_page" requires 4 arguments, but only 3 given
> /usr/include/linux/highmem.h: In function `copy_user_highpage':
> /usr/include/linux/highmem.h:119: error: `copy_user_page' undeclared (first use in this function)
> In file included from /usr/include/asm/pci.h:105,
> from /usr/include/linux/pci.h:682,
> from pentaif.c:13:
> /usr/include/asm-generic/pci-dma-compat.h:7:31: linux/dma-mapping.h: No such file or directory
> In file included from /usr/include/asm/pci.h:105,
> from /usr/include/linux/pci.h:682,
> from pentaif.c:13:
> /usr/include/asm-generic/pci-dma-compat.h: In function `pci_dma_supported':
> /usr/include/asm-generic/pci-dma-compat.h:15: error: structure has no member named `dev'
> /usr/include/asm-generic/pci-dma-compat.h: In function `pci_alloc_consistent':
> /usr/include/asm-generic/pci-dma-compat.h:22: error: structure has no member named `dev'
> /usr/include/asm-generic/pci-dma-compat.h: In function `pci_free_consistent':
> /usr/include/asm-generic/pci-dma-compat.h:29: error: structure has no member named `dev'
> /usr/include/asm-generic/pci-dma-compat.h: In function `pci_map_single':
> /usr/include/asm-generic/pci-dma-compat.h:35: error: structure has no member named `dev'
> /usr/include/asm-generic/pci-dma-compat.h:35: error: conversion to incomplete type
> /usr/include/asm-generic/pci-dma-compat.h: In function `pci_unmap_single':
> /usr/include/asm-generic/pci-dma-compat.h:42: error: structure has no member named `dev'
> /usr/include/asm-generic/pci-dma-compat.h:42: error: conversion to incomplete type
> /usr/include/asm-generic/pci-dma-compat.h: In function `pci_map_page':
> /usr/include/asm-generic/pci-dma-compat.h:49: error: structure has no member named `dev'
> /usr/include/asm-generic/pci-dma-compat.h:49: error: conversion to incomplete type
> /usr/include/asm-generic/pci-dma-compat.h: In function `pci_unmap_page':
> /usr/include/asm-generic/pci-dma-compat.h:56: error: structure has no member named `dev'
> /usr/include/asm-generic/pci-dma-compat.h:56: error: conversion to incomplete type
> /usr/include/asm-generic/pci-dma-compat.h: In function `pci_map_sg':
> /usr/include/asm-generic/pci-dma-compat.h:63: error: structure has no member named `dev'
> /usr/include/asm-generic/pci-dma-compat.h:63: error: conversion to incomplete type
> /usr/include/asm-generic/pci-dma-compat.h: In function `pci_unmap_sg':
> /usr/include/asm-generic/pci-dma-compat.h:70: error: structure has no member named `dev'
> /usr/include/asm-generic/pci-dma-compat.h:70: error: conversion to incomplete type
> /usr/include/asm-generic/pci-dma-compat.h: In function `pci_dma_sync_single_for_cpu':
> /usr/include/asm-generic/pci-dma-compat.h:77: error: structure has no member named `dev'
> /usr/include/asm-generic/pci-dma-compat.h:77: error: conversion to incomplete type
> /usr/include/asm-generic/pci-dma-compat.h: In function `pci_dma_sync_single_for_device':
> /usr/include/asm-generic/pci-dma-compat.h:84: error: structure has no member named `dev'
> /usr/include/asm-generic/pci-dma-compat.h:84: error: conversion to incomplete type
> /usr/include/asm-generic/pci-dma-compat.h: In function `pci_dma_sync_sg_for_cpu':
> /usr/include/asm-generic/pci-dma-compat.h:91: error: structure has no member named `dev'
> /usr/include/asm-generic/pci-dma-compat.h:91: error: conversion to incomplete type
> /usr/include/asm-generic/pci-dma-compat.h: In function `pci_dma_sync_sg_for_device':
> /usr/include/asm-generic/pci-dma-compat.h:98: error: structure has no member named `dev'
> /usr/include/asm-generic/pci-dma-compat.h:98: error: conversion to incomplete type
> In file included from /usr/include/asm/pci.h:108,
> from /usr/include/linux/pci.h:682,
> from pentaif.c:13:
> /usr/include/asm-generic/pci.h: In function `pcibios_resource_to_bus':
> /usr/include/asm-generic/pci.h:21: error: dereferencing pointer to incomplete type
> /usr/include/asm-generic/pci.h:22: error: dereferencing pointer to incomplete type
> In file included from pentaif.c:15:
> /usr/include/asm/uaccess.h: In function `verify_area':
> /usr/include/asm/uaccess.h:104: error: invalid type argument of `->'
> {standard input}: Assembler messages:
> {standard input}:33: Warning: size of "sa_mask" is already 4; not changing to 8
> make[2]: *** [pentaif.o] Error 1
> make[2]: Leaving directory `/usr/src/pentanet/driver'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/usr/src/pentanet'
> make: *** [all-recursive-am] Error 2
> [root@www pentanet]#
По аналогии я сделал симлинки на каталоги asm и asm-generic. Теперь
так:
> [root@www pentanet]# make
> make all-recursive
> make[1]: Entering directory `/usr/src/pentanet'
> Making all in driver
> make[2]: Entering directory `/usr/src/pentanet/driver'
> gcc -march=i486 -DCPU=486 -D__SMP__ -DMODVERSIONS -DMODULE -D__KERNEL__ -O2 -Wall -Wstrict-prototypes
> -fomit-frame-pointer -fno-strength-reduce -pipe -falign-loops=2 -falign-jumps=2 -falign-functions=2 -c pentaif.c
> pentaif.c:9:64: linux/modversions.h: No such file or directory
> In file included from /usr/include/linux/module.h:10,
> from pentaif.c:10:
> /usr/include/linux/config.h:4:28: linux/autoconf.h: No such file or directory
> In file included from /usr/include/linux/prefetch.h:13,
> from /usr/include/linux/list.h:6,
> from /usr/include/linux/module.h:13,
> from pentaif.c:10:
> /usr/include/asm/processor.h:65: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
> /usr/include/asm/processor.h:65: error: requested alignment is not a constant
> In file included from /usr/include/linux/mm.h:12,
> from /usr/include/linux/slab.h:14,
> from /usr/include/asm/pci.h:38,
> from /usr/include/linux/pci.h:682,
> from pentaif.c:13:
> /usr/include/linux/mmzone.h:44: error: requested alignment is not a constant
> make[2]: *** [pentaif.o] Error 1
> make[2]: Leaving directory `/usr/src/pentanet/driver'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/usr/src/pentanet'
> make: *** [all-recursive-am] Error 2
> [root@www linux]# #
Как мне быть?