settingsLogin | Registersettings
리눅스 관련 모든 질문답변을 올려주세요! 100% 무료입니다! -Ask Ubuntu KR
Show Menu

커널 bzImage 에러

2 좋아요 0 싫어요
우분투 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:

//중략..

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
문의 2016 2월 17 개발 eisen1990
  

1 답변

0 좋아요 0 싫어요

본 질문에 대한 https://www.facebook.com/groups/ubuntu.ko/permalink/953500111354503/ 댓글 답변을 복사하였습니다.

MODULE 재정의는 Makefile 만들때 -DMODULE 적어줘서 그런거였군요..

/usr/include/linux/version.h 의 UTS_RELEASE 선언에 문제가 있었더군요

답변됨 2016 2월 23 janghe11
저 해답을 제가 단거여서..ㅎㅎ;; 여튼 감사합니다

관련 질문

0 좋아요 0 싫어요
0 답변
0 좋아요 0 싫어요
0 답변
1 좋아함 0 싫어요
1 답변
Hosting by Microsoft MeltingPot/maru intermet
...