현구님이 주신 웹문서대로, 어제 컴파일을 시도했는데, 에러가 나네요..
제가 뭘 잘못한건지??
[root@localhost linux-2.6.20]# make ARCH=x86_64 CC=amd64-linux-gcc
CHK include/linux/version.h
CHK include/linux/utsrelease.h
CC arch/x86_64/kernel/asm-offsets.s
arch/x86_64/kernel/asm-offsets.c:1: error: code model `kernel' not supported in the 32 bit mode
arch/x86_64/kernel/asm-offsets.c:1: sorry, unimplemented: 64-bit mode not compiled in
make[1]: *** [arch/x86_64/kernel/asm-offsets.s] ?ㅻ쪟 1
make: *** [prepare0] ?ㅻ쪟 2
제가 뭘 잘못한건지??
[root@localhost linux-2.6.20]# make ARCH=x86_64 CC=amd64-linux-gcc
CHK include/linux/version.h
CHK include/linux/utsrelease.h
CC arch/x86_64/kernel/asm-offsets.s
arch/x86_64/kernel/asm-offsets.c:1: error: code model `kernel' not supported in the 32 bit mode
arch/x86_64/kernel/asm-offsets.c:1: sorry, unimplemented: 64-bit mode not compiled in
make[1]: *** [arch/x86_64/kernel/asm-offsets.s] ?ㅻ쪟 1
make: *** [prepare0] ?ㅻ쪟 2
댓글 4
-
선준규
2007.04.17 18:23
음.. 저도 해봤는데 오류나네요 ㅡ0ㅡ; -
맥주
2007.04.18 07:32
ubuntu 에서 ARCH=x86_64 만 지정해도 컴파일이 되었습니다.
제가 한 방법은..
cp arch/x86_64/defconfig .config
make ARCH=x86_64 menuconfig
Processor type and features -> Processor family -> [x] Generic-x86-64
make V=1 ARCH=x86_64 bzImage
:
$ file vmlinux
vmlinux: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), statically linked, not stripped
$ nm vmlinux | grep -w end
$ nm vmlinux | grep -w _end
ffffffff808335a8 A _end
$cd arch/x86_64/boot/compressed
$file vmlinux
vmlinux: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, not stripped
$nm vmlinux | grep -w end
00382fc4 A end
$ nm vmlinux | grep -w _end
00382fc4 A _end
컴파일 옵션은 아래와 같네요..
gcc -Wp,-MD,init/.main.o.d -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.1.2/include -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -mtune=generic -m64 -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -maccumulate-outgoing-args -fomit-frame-pointer -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(main)" -D"KBUILD_MODNAME=KBUILD_STR(main)" -c -o init/main.o init/main.c
:
-
송형주
2007.04.18 22:54
오..정말..우분투에서는 컴파일이 되는데요... ^^
감사합니다....
그런데.. make V=1 ARCH=x86_64 bzImage 에서
V=1의 의미가 뭔가요??? -
맥주
2007.04.18 23:19
아..네.. Makefile 에 보면
Use 'make V=1' to see the full commands 라고 되어 있는데요.
저거 안하면, 컴파일 과정이 간략하게 나와요.
저는 쭉~ redhat 만 사용하다가.. gcc 버젼이 4.0 이상이여 한다고 해서, gcc 업그레이드 하는거 얼마나 어려운지 아실거에요. 그래서 그냥 어제 처음 우분투라는 넘을 설치해 보았습니다. 근데, 환경이 마이 다르네요.. 갑갑해요.. ㅠ.ㅠ
.