모듈소스를 컴파일하는중에 에러가 납니다.
kernel 2.6.11 입니다.
필요한 랜카드모듈이 있어 모듈컴파일만을 해서 올려볼려고
다음과 같이 했는데요; 에러가 납니다.
gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/net/inet -Wall -Wstrict-prototypes -O6 -c 3c59x.c `[ -
f /usr/include/linux/modversions.h ] && echo -DMODVERSIONS`
/usr/src/linux는 2.6.11소스 링크가 걸려있고요
/usr/src/linux/kernel/driver/net 아래서 실행했어요
/usr/include의 asm linux scsi asm-generic 모두 /usr/src/linux/include의 해당디렉토리들로 링크가 걸려 있어요
실행시 내용은 다음과 같습니다.
In file included from /usr/include/asm/smp.h:18,
from /usr/include/linux/smp.h:19,
from /usr/include/linux/sched.h:25,
from /usr/include/linux/module.h:10,
from 3c59x.c:37:
/usr/include/asm/mpspec.h:6:25: mach_mpspec.h: No such file or directory
In file included from /usr/include/asm/smp.h:18,
from /usr/include/linux/smp.h:19,
from /usr/include/linux/sched.h:25,
from /usr/include/linux/module.h:10,
from 3c59x.c:37:
/usr/include/asm/mpspec.h:8: error: `MAX_MP_BUSSES' undeclared here (not in a function)
/usr/include/asm/mpspec.h:22: error: `MAX_IRQ_SOURCES' undeclared here (not in a function)
In file included from /usr/include/linux/smp.h:19,
from /usr/include/linux/sched.h:25,
from /usr/include/linux/module.h:10,
from 3c59x.c:37:
/usr/include/asm/smp.h:73:26: mach_apicdef.h: No such file or directory
In file included from /usr/include/linux/irq.h:21,
from /usr/include/asm/hardirq.h:6,
from /usr/include/linux/hardirq.h:6,
from /usr/include/linux/interrupt.h:11,
from 3c59x.c:40:
/usr/include/asm/irq.h:16:25: irq_vectors.h: No such file or directory
In file included from /usr/include/asm/hardirq.h:6,
from /usr/include/linux/hardirq.h:6,
from /usr/include/linux/interrupt.h:11,
from 3c59x.c:40:
/usr/include/linux/irq.h:72: error: `NR_IRQS' undeclared here (not in a function)
In file included from /usr/include/linux/irq.h:74,
from /usr/include/asm/hardirq.h:6,
from /usr/include/linux/hardirq.h:6,
from /usr/include/linux/interrupt.h:11,
from 3c59x.c:40:
/usr/include/asm/hw_irq.h:28: error: `NR_IRQ_VECTORS' undeclared here (not in a function)
In file included from /usr/include/linux/if_ether.h:107,
from /usr/include/linux/netdevice.h:29,
from 3c59x.c:46:
/usr/include/linux/skbuff.h:30:26: net/checksum.h: No such file or directory
여기서 멈춥니다.
처음해보는 거라 잘 안되네요
필요한 모듈만 컴파일해서 쓰고싶은데 제가 하는 방법이 맞긴한가요?
조언좀 부탁드립니다.
Re:
커널소스트리 최상위에서
make drivers/net/3c59x.o
감사합니다.
순식간에 만들어지는군요 ^^
졸린눈을 비벼가며......삽질-_-b
댓글 달기