리눅스 디바이스 드라이버 책을 보며 공부하고 있는데요 환경구성이 안되네요...
책예제를 따라하기 위해
커널 2.6 을 컴파일 하려고 하는데
make install 하면
HOSTCC scripts/modpost.o
HOSTLD scripts/modpost
CC arch/i386/kernel/asm-offsets.s
In file included from include/linux/prefetch.h:13,
from include/linux/list.h:7,
from include/linux/signal.h:4,
from arch/i386/kernel/asm-offsets.c:7:
include/asm/processor.h:86: error: array type has incomplete element type
make[1]: *** [arch/i386/kernel/asm-offsets.s] Error 1
make: *** [arch/i386/kernel/asm-offsets.s] Error 2
root@ubuntu:/project/kernel/linux-2.6.4# cd include/asm/
root@ubuntu:/project/kernel/linux-2.6.4/include/asm# vim processor.h
root@ubuntu:/project/kernel/linux-2.6.4/include/asm# cd ..
root@ubuntu:/project/kernel/linux-2.6.4/include# cd ..
root@ubuntu:/project/kernel/linux-2.6.4# make install
CC arch/i386/kernel/asm-offsets.s
CHK include/asm-i386/asm_offsets.h
UPD include/asm-i386/asm_offsets.h
CC init/main.o
In file included from include/asm/mpspec.h:5,
from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/sched.h:23,
from include/linux/module.h:10,
from init/main.c:16:
include/asm/mpspec_def.h:77: warning: ‘packed’ attribute ignored for field of type ‘unsigned char[6]’
In file included from include/linux/fs.h:280,
from include/linux/proc_fs.h:6,
from init/main.c:17:
include/linux/quota.h: In function ‘mark_info_dirty’:
include/linux/quota.h:179: warning: ‘set_bit’ is static but used in inline function ‘mark_info_dirty’ which is not static
init/main.c: In function ‘maxcpus’:
init/main.c:139: warning: pointer targets in passing argument 2 of ‘get_option’ differ in signedness
include/linux/kernel.h:83: note: expected ‘int *’ but argument is of type ‘unsigned int *’
init/main.c: In function ‘start_kernel’:
init/main.c:409: warning: format not a string literal and no format arguments
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
In file included from include/asm/mpspec.h:5,
from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/sched.h:23,
from include/linux/module.h:10,
from init/version.c:10:
include/asm/mpspec_def.h:77: warning: ‘packed’ attribute ignored for field of type ‘unsigned char[6]’
CC init/do_mounts.o
In file included from include/asm/mpspec.h:5,
from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/sched.h:23,
from include/linux/module.h:10,
from init/do_mounts.c:1:
include/asm/mpspec_def.h:77: warning: ‘packed’ attribute ignored for field of type ‘unsigned char[6]’
In file included from include/linux/fs.h:280,
from include/linux/tty.h:20,
from init/do_mounts.c:5:
include/linux/quota.h: In function ‘mark_info_dirty’:
include/linux/quota.h:179: warning: ‘set_bit’ is static but used in inline function ‘mark_info_dirty’ which is not static
CC init/do_mounts_rd.o
In file included from include/asm/mpspec.h:5,
from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/topology.h:33,
from include/linux/mmzone.h:297,
from include/linux/gfp.h:4,
from include/linux/slab.h:15,
from include/linux/percpu.h:4,
from include/linux/rcupdate.h:42,
from include/linux/dcache.h:10,
from include/linux/fs.h:17,
from init/do_mounts_rd.c:3:
include/asm/mpspec_def.h:77: warning: ‘packed’ attribute ignored for field of type ‘unsigned char[6]’
In file included from include/linux/fs.h:280,
from init/do_mounts_rd.c:3:
include/linux/quota.h: In function ‘mark_info_dirty’:
include/linux/quota.h:179: warning: ‘set_bit’ is static but used in inline function ‘mark_info_dirty’ which is not static
init/do_mounts_rd.c: In function ‘identify_ramdisk_image’:
init/do_mounts_rd.c:73: warning: pointer targets in passing argument 2 of ‘read’ differ in signedness
include/asm/unistd.h:394: note: expected ‘char *’ but argument is of type ‘unsigned char *’
init/do_mounts_rd.c:108: warning: pointer targets in passing argument 2 of ‘read’ differ in signedness
include/asm/unistd.h:394: note: expected ‘char *’ but argument is of type ‘unsigned char *’
init/do_mounts_rd.c: In function ‘fill_inbuf’:
init/do_mounts_rd.c:345: warning: pointer targets in passing argument 2 of ‘read’ differ in signedness
include/asm/unistd.h:394: note: expected ‘char *’ but argument is of type ‘uch *’
init/do_mounts_rd.c: In function ‘flush_window’:
init/do_mounts_rd.c:366: warning: pointer targets in passing argument 2 of ‘write’ differ in signedness
include/asm/unistd.h:393: note: expected ‘const char *’ but argument is of type ‘uch *’
CC init/do_mounts_initrd.o
In file included from include/asm/mpspec.h:5,
from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/topology.h:33,
from include/linux/mmzone.h:297,
from include/linux/gfp.h:4,
from include/linux/slab.h:15,
from include/linux/percpu.h:4,
from include/linux/rcupdate.h:42,
from include/linux/dcache.h:10,
from include/linux/fs.h:17,
from init/do_mounts_initrd.c:3:
include/asm/mpspec_def.h:77: warning: ‘packed’ attribute ignored for field of type ‘unsigned char[6]’
In file included from include/linux/fs.h:280,
from init/do_mounts_initrd.c:3:
include/linux/quota.h: In function ‘mark_info_dirty’:
include/linux/quota.h:179: warning: ‘set_bit’ is static but used in inline function ‘mark_info_dirty’ which is not static
CC init/do_mounts_md.o
In file included from include/asm/mpspec.h:5,
from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/sched.h:23,
from include/linux/module.h:10,
from include/linux/device.h:21,
from include/linux/genhd.h:15,
from include/linux/blkdev.h:6,
from include/linux/raid/md.h:21,
from init/do_mounts_md.c:2:
include/asm/mpspec_def.h:77: warning: ‘packed’ attribute ignored for field of type ‘unsigned char[6]’
In file included from include/linux/fs.h:280,
from include/linux/genhd.h:18,
from include/linux/blkdev.h:6,
from include/linux/raid/md.h:21,
from init/do_mounts_md.c:2:
include/linux/quota.h: In function ‘mark_info_dirty’:
include/linux/quota.h:179: warning: ‘set_bit’ is static but used in inline function ‘mark_info_dirty’ which is not static
LD init/mounts.o
CC init/initramfs.o
In file included from include/asm/mpspec.h:5,
from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/topology.h:33,
from include/linux/mmzone.h:297,
from include/linux/gfp.h:4,
from include/linux/slab.h:15,
from include/linux/percpu.h:4,
from include/linux/rcupdate.h:42,
from include/linux/dcache.h:10,
from include/linux/fs.h:17,
from init/initramfs.c:3:
include/asm/mpspec_def.h:77: warning: ‘packed’ attribute ignored for field of type ‘unsigned char[6]’
In file included from include/linux/fs.h:280,
from init/initramfs.c:3:
include/linux/quota.h: In function ‘mark_info_dirty’:
include/linux/quota.h:179: warning: ‘set_bit’ is static but used in inline function ‘mark_info_dirty’ which is not static
init/initramfs.c: In function ‘flush_window’:
init/initramfs.c:403: warning: pointer targets in passing argument 1 of ‘flush_buffer’ differ in signedness
init/initramfs.c:325: note: expected ‘char *’ but argument is of type ‘uch *’
init/initramfs.c: In function ‘unpack_to_rootfs’:
init/initramfs.c:444: warning: pointer targets in assignment differ in signedness
init/initramfs.c: In function ‘populate_rootfs’:
init/initramfs.c:475: warning: format not a string literal and no format arguments
LD init/built-in.o
HOSTCC usr/gen_init_cpio
CPIO usr/initramfs_data.cpio
GZIP usr/initramfs_data.cpio.gz
AS usr/initramfs_data.o
LD usr/built-in.o
CC arch/i386/kernel/process.o
In file included from include/asm/mpspec.h:5,
from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/sched.h:23,
from arch/i386/kernel/process.c:17:
include/asm/mpspec_def.h:77: warning: ‘packed’ attribute ignored for field of type ‘unsigned char[6]’
In file included from include/linux/fs.h:280,
from arch/i386/kernel/process.c:18:
include/linux/quota.h: In function ‘mark_info_dirty’:
include/linux/quota.h:179: warning: ‘set_bit’ is static but used in inline function ‘mark_info_dirty’ which is not static
arch/i386/kernel/process.c: In function ‘show_regs’:
arch/i386/kernel/process.c:244: warning: pointer targets in passing argument 2 of ‘show_trace’ differ in signedness
include/asm/processor.h:490: note: expected ‘long unsigned int *’ but argument is of type ‘long int *’
include/linux/elfcore.h: Assembler messages:
include/linux/elfcore.h:92: Error: suffix or operands invalid for `mov'
include/linux/elfcore.h:92: Error: suffix or operands invalid for `mov'
arch/i386/kernel/process.c:521: Error: suffix or operands invalid for `mov'
arch/i386/kernel/process.c:522: Error: suffix or operands invalid for `mov'
arch/i386/kernel/process.c:529: Error: suffix or operands invalid for `mov'
arch/i386/kernel/process.c:530: Error: suffix or operands invalid for `mov'
arch/i386/kernel/process.c:430: Error: suffix or operands invalid for `mov'
arch/i386/kernel/process.c:431: Error: suffix or operands invalid for `mov'
arch/i386/kernel/process.c:357: Error: suffix or operands invalid for `mov'
arch/i386/kernel/process.c:358: Error: suffix or operands invalid for `mov'
make[1]: *** [arch/i386/kernel/process.o] Error 1
make: *** [arch/i386/kernel] Error 2
다음과 같이 에러가 뜨는데 도와주실분 계신가요???
보고 계신 책의 제목, 판본 사용하시는 배포본,
이런 정보를 추가로 적어 주시면 다른 분들이 댓글을 다는데 도움이 될 것 같습니다.
직접 도움을 못드려서 유감입니다.
--
마잇
IT EXPERT 리눅스 디바이스 드라이버 , 한빛미디어
IT EXPERT 리눅스 디바이스 드라이버 , 한빛미디어
Ubuntu 10.04 LTS 에서 kernel 2.6을 컴파일 하려고 하는데
make menuconfig하고 make install 했는데 저러네요
gcc 버전이 높아서 겠쬬;;;;
gcc 버전 낮추려는것도 힘드네요;;
이거 가능은 한건가요???
댓글에 달린 주소 참조하시면 됩니다.
http://todayis.tistory.com/280
댓글 달기