질문&답변
클라우드/리눅스에 관한 질문과 답변을 주고 받는 곳입니다.
리눅스 분류

우분투14.04 32비트에서 커널2.4 컴파일 문제 질문이요..

작성자 정보

  • 땀흘리는 작성
  • 작성일

컨텐츠 정보

본문

현재 우분투 14.04LTS 32bit로 커널 2.4.21 버전을 루트디렉터리에 새로 디렉터리 만들어서 테스트 해보려고 하고 있습니다.

IT EXPERT 리눅스 디바이스 드라이버 책 커널2.4 컴파일이 안되서 질문 올립니다.

예제 학습용 디렉터리 /project/kernel에 ftp.kernel.org에서 받은 kernel2.4.21.tar.bz2 를 받아서 압축 다 풀었습니다.

커널을 컴파일 하기 위해 libncurses 라이브러리 설치,
make menuconfig 명령으로 Loadable module support 설정에서 전부 체크 후
make dep 의존성 검사는 마치고
make bzImage 명령을 실행하는데 오류가 뜹니다...
커널 컴파일이 안된 것 같은데

어떤 문제인지 감이 안잡혀서 도움을 구하고 싶습니다.
에러 메세지는 아래와 같습니다.
gcc -D__KERNEL__ -I/project/kernel/linux-2.4.21/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -DKBUILD_BASENAME=main -c -o init/main.o init/main.c
In file included from /project/kernel/linux-2.4.21/include/linux/prefetch.h:13:0,
from /project/kernel/linux-2.4.21/include/linux/list.h:6,
from /project/kernel/linux-2.4.21/include/linux/wait.h:14,
from /project/kernel/linux-2.4.21/include/linux/fs.h:12,
from /project/kernel/linux-2.4.21/include/linux/capability.h:17,
from /project/kernel/linux-2.4.21/include/linux/binfmts.h:5,
from /project/kernel/linux-2.4.21/include/linux/sched.h:9,
from /project/kernel/linux-2.4.21/include/linux/mm.h:4,
from /project/kernel/linux-2.4.21/include/linux/slab.h:14,
from /project/kernel/linux-2.4.21/include/linux/proc_fs.h:5,
from init/main.c:15:
/project/kernel/linux-2.4.21/include/asm/processor.h:75:26: error: array type has incomplete element type
extern struct tss_struct init_tss[NR_CPUS];
^
In file included from /project/kernel/linux-2.4.21/include/linux/spinlock.h:56:0,
from /project/kernel/linux-2.4.21/include/linux/wait.h:16,
from /project/kernel/linux-2.4.21/include/linux/fs.h:12,
from /project/kernel/linux-2.4.21/include/linux/capability.h:17,
from /project/kernel/linux-2.4.21/include/linux/binfmts.h:5,
from /project/kernel/linux-2.4.21/include/linux/sched.h:9,
from /project/kernel/linux-2.4.21/include/linux/mm.h:4,
from /project/kernel/linux-2.4.21/include/linux/slab.h:14,
from /project/kernel/linux-2.4.21/include/linux/proc_fs.h:5,
from init/main.c:15:
/project/kernel/linux-2.4.21/include/asm/spinlock.h:9:12: error: conflicting types for ‘printk’
extern int printk(const char * fmt, ...)
^
In file included from /project/kernel/linux-2.4.21/include/linux/wait.h:13:0,
from /project/kernel/linux-2.4.21/include/linux/fs.h:12,
from /project/kernel/linux-2.4.21/include/linux/capability.h:17,
from /project/kernel/linux-2.4.21/include/linux/binfmts.h:5,
from /project/kernel/linux-2.4.21/include/linux/sched.h:9,
from /project/kernel/linux-2.4.21/include/linux/mm.h:4,
from /project/kernel/linux-2.4.21/include/linux/slab.h:14,
from /project/kernel/linux-2.4.21/include/linux/proc_fs.h:5,
from init/main.c:15:
/project/kernel/linux-2.4.21/include/linux/kernel.h:91:16: note: previous declaration of ‘printk’ was here
asmlinkage int printk(const char * fmt, ...)
^
In file included from /project/kernel/linux-2.4.21/include/linux/fs.h:318:0,
from /project/kernel/linux-2.4.21/include/linux/capability.h:17,
from /project/kernel/linux-2.4.21/include/linux/binfmts.h:5,
from /project/kernel/linux-2.4.21/include/linux/sched.h:9,
from /project/kernel/linux-2.4.21/include/linux/mm.h:4,
from /project/kernel/linux-2.4.21/include/linux/slab.h:14,
from /project/kernel/linux-2.4.21/include/linux/proc_fs.h:5,
from init/main.c:15:
/project/kernel/linux-2.4.21/include/linux/ncp_fs_i.h:26:2: warning: ‘packed’ attribute ignored for field of type ‘__u8’ [-Wattributes]
__u8 open_create_action __attribute__((packed));
^
/project/kernel/linux-2.4.21/include/linux/ncp_fs_i.h:27:2: warning: ‘packed’ attribute ignored for field of type ‘__u8[6]’ [-Wattributes]
__u8 file_handle[6] __attribute__((packed));
^
In file included from /project/kernel/linux-2.4.21/include/linux/ncp_mount.h:12:0,
from /project/kernel/linux-2.4.21/include/linux/ncp_fs_sb.h:12,
from /project/kernel/linux-2.4.21/include/linux/fs.h:704,
from /project/kernel/linux-2.4.21/include/linux/capability.h:17,
from /project/kernel/linux-2.4.21/include/linux/binfmts.h:5,
from /project/kernel/linux-2.4.21/include/linux/sched.h:9,
from /project/kernel/linux-2.4.21/include/linux/mm.h:4,
from /project/kernel/linux-2.4.21/include/linux/slab.h:14,
from /project/kernel/linux-2.4.21/include/linux/proc_fs.h:5,
from init/main.c:15:
/project/kernel/linux-2.4.21/include/linux/ncp.h:24:2: warning: ‘packed’ attribute ignored for field of type ‘__u8’ [-Wattributes]
__u8 sequence __attribute__((packed));
^
/project/kernel/linux-2.4.21/include/linux/ncp.h:25:2: warning: ‘packed’ attribute ignored for field of type ‘__u8’ [-Wattributes]
__u8 conn_low __attribute__((packed));
^
/project/kernel/linux-2.4.21/include/linux/ncp.h:26:2: warning: ‘packed’ attribute ignored for field of type ‘__u8’ [-Wattributes]
__u8 task __attribute__((packed));
^
/project/kernel/linux-2.4.21/include/linux/ncp.h:27:2: warning: ‘packed’ attribute ignored for field of type ‘__u8’ [-Wattributes]
__u8 conn_high __attribute__((packed));
^
/project/kernel/linux-2.4.21/include/linux/ncp.h:28:2: warning: ‘packed’ attribute ignored for field of type ‘__u8’ [-Wattributes]
__u8 function __attribute__((packed));
^
/project/kernel/linux-2.4.21/include/linux/ncp.h:29:2: warning: ‘packed’ attribute ignored for field of type ‘__u8[]’ [-Wattributes]
__u8 data[0] __attribute__((packed));
^
/project/kernel/linux-2.4.21/include/linux/ncp.h:37:2: warning: ‘packed’ attribute ignored for field of type ‘__u8’ [-Wattributes]
__u8 sequence __attribute__((packed));
^
/project/kernel/linux-2.4.21/include/linux/ncp.h:38:2: warning: ‘packed’ attribute ignored for field of type ‘__u8’ [-Wattributes]
__u8 conn_low __attribute__((packed));
^
/project/kernel/linux-2.4.21/include/linux/ncp.h:39:2: warning: ‘packed’ attribute ignored for field of type ‘__u8’ [-Wattributes]
__u8 task __attribute__((packed));
^
/project/kernel/linux-2.4.21/include/linux/ncp.h:40:2: warning: ‘packed’ attribute ignored for field of type ‘__u8’ [-Wattributes]
__u8 conn_high __attribute__((packed));
^
/project/kernel/linux-2.4.21/include/linux/ncp.h:41:2: warning: ‘packed’ attribute ignored for field of type ‘__u8’ [-Wattributes]
__u8 completion_code __attribute__((packed));
^
/project/kernel/linux-2.4.21/include/linux/ncp.h:42:2: warning: ‘packed’ attribute ignored for field of type ‘__u8’ [-Wattributes]
__u8 connection_state __attribute__((packed));
^
/project/kernel/linux-2.4.21/include/linux/ncp.h:43:2: warning: ‘packed’ attribute ignored for field of type ‘__u8[]’ [-Wattributes]
__u8 data[0] __attribute__((packed));
^
/project/kernel/linux-2.4.21/include/linux/ncp.h:137:2: warning: ‘packed’ attribute ignored for field of type ‘__u8’ [-Wattributes]
__u8 nameLen __attribute__((packed));
^
/project/kernel/linux-2.4.21/include/linux/ncp.h:138:2: warning: ‘packed’ attribute ignored for field of type ‘__u8[256]’ [-Wattributes]
__u8 entryName[256] __attribute__((packed));
^
/project/kernel/linux-2.4.21/include/linux/ncp.h:174:2: warning: ‘packed’ attribute ignored for field of type ‘__u8’ [-Wattributes]
__u8 volNumber __attribute__((packed));
^
In file included from /project/kernel/linux-2.4.21/include/asm/smp.h:17:0,
from /project/kernel/linux-2.4.21/include/linux/smp.h:14,
from /project/kernel/linux-2.4.21/include/linux/sched.h:23,
from /project/kernel/linux-2.4.21/include/linux/mm.h:4,
from /project/kernel/linux-2.4.21/include/linux/slab.h:14,
from /project/kernel/linux-2.4.21/include/linux/proc_fs.h:5,
from init/main.c:15:
/project/kernel/linux-2.4.21/include/asm/mpspec.h:87:2: warning: ‘packed’ attribute ignored for field of type ‘unsigned char[6]’ [-Wattributes]
unsigned char mpc_bustype[6] __attribute((packed));
^
In file included from /project/kernel/linux-2.4.21/include/linux/wait.h:13:0,
from /project/kernel/linux-2.4.21/include/linux/fs.h:12,
from /project/kernel/linux-2.4.21/include/linux/capability.h:17,
from /project/kernel/linux-2.4.21/include/linux/binfmts.h:5,
from /project/kernel/linux-2.4.21/include/linux/sched.h:9,
from /project/kernel/linux-2.4.21/include/linux/mm.h:4,
from /project/kernel/linux-2.4.21/include/linux/slab.h:14,
from /project/kernel/linux-2.4.21/include/linux/proc_fs.h:5,
from init/main.c:15:
/project/kernel/linux-2.4.21/include/linux/smp.h:29:22: error: conflicting types for ‘smp_send_reschedule’
extern void FASTCALL(smp_send_reschedule(int cpu));
^
/project/kernel/linux-2.4.21/include/linux/kernel.h:53:21: note: in definition of macro ‘FASTCALL’
#define FASTCALL(x) x __attribute__((regparm(3)))
^
In file included from /project/kernel/linux-2.4.21/include/linux/smp.h:14:0,
from /project/kernel/linux-2.4.21/include/linux/sched.h:23,
from /project/kernel/linux-2.4.21/include/linux/mm.h:4,
from /project/kernel/linux-2.4.21/include/linux/slab.h:14,
from /project/kernel/linux-2.4.21/include/linux/proc_fs.h:5,
from init/main.c:15:
/project/kernel/linux-2.4.21/include/asm/smp.h:42:13: note: previous declaration of ‘smp_send_reschedule’ was here
extern void smp_send_reschedule(int cpu);
^
In file included from /project/kernel/linux-2.4.21/include/linux/unistd.h:9:0,
from init/main.c:17:
/project/kernel/linux-2.4.21/include/asm/unistd.h:375:29: warning: conflicting types for built-in function ‘_exit’ [enabled by default]
static inline _syscall1(int,_exit,int,exitcode)
^
/project/kernel/linux-2.4.21/include/asm/unistd.h:284:6: note: in definition of macro ‘_syscall1’
type name(type1 arg1) \
^
init/main.c: In function ‘start_kernel’:
init/main.c:357:2: warning: format not a string literal and no format arguments [-Wformat-security]
printk(linux_banner);
^
make: *** [init/main.o] 오류 1

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,065 명
  • 현재 강좌수 :  35,969 개
  • 현재 접속자 :  263 명