리눅스 디바이스 드라이버 책을 보며 공부하고 있는데요 환경구성이 안되네요...

llljk의 이미지

책예제를 따라하기 위해

커널 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

다음과 같이 에러가 뜨는데 도와주실분 계신가요???

마잇의 이미지

  • 보고 계신 책의 제목, 판본
  • 사용하시는 배포본, 버전
  • 커널 소스를 설치 하신 방법
    • 소스 통채로 받아서 압축을 풀었다.
    • 배포본에서 제공하는 소스 패키지를 설치했다.
  • make install 하기 전에 했던 작업

이런 정보를 추가로 적어 주시면 다른 분들이 댓글을 다는데 도움이 될 것 같습니다.

직접 도움을 못드려서 유감입니다.


--
마잇

llljk의 이미지

IT EXPERT 리눅스 디바이스 드라이버 , 한빛미디어

Ubuntu 10.04 LTS 에서 kernel 2.6을 컴파일 하려고 하는데

make menuconfig하고 make install 했는데 저러네요

gcc 버전이 높아서 겠쬬;;;;

gcc 버전 낮추려는것도 힘드네요;;

이거 가능은 한건가요???

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.