2011-03-16 3 views
1

커널을 powerpc로 컴파일하려고합니다. 나는 x86_64 Ubuntu 10.04와 i386 Debian Lenny에서이 작업을 시도해 보았습니다. 정확히 같은 문제가 발생합니다. 나는 http://wiki.debian.org/BuildingCrossCompilers의 지시에 따라, 나는 다음과 같은 명령을 제공함으로써 바이너리 유틸리티를 빌드 할 때 :debian에서 크로스 컴파일러를 컴파일 할 때 오류가 발생했습니다.

[snip] 
make[3]: Entering directory `/home/anthony/cross-toolchain/binutils-2.20.1/builddir-powerpc-linux-gnu/libiberty' 
if [ x"-fpic" != x ]; then \ 
gcc -c -DHAVE_CONFIG_H -g -O2 -Wno-format-security -I. -I../../libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic -fpic ../../libiberty/regex.c -o pic/regex.o; \ 
else true; fi 
In file included from /usr/include/stdlib.h:320, 
from ../../libiberty/regex.c:128: 
/usr/include/sys/types.h:100: error: two or more data types in declaration specifiers 
make[3]: *** [regex.o] Error 1 
[snip] 

(형식 정의를 시도 types.h 때문입니다 :

fakeroot debian/rules binary-cross 

을 나는이 결과를 얻을 수 pid_t는 int로 # 정의되어 있습니다. #undef pid_t types.h에서이 문제를 해킹하면 intptr_t가있는 곳에서도 비슷한 문제가 발생합니다.

답변

0

If 당신이해야 할 일은 커널을 크로스 컴파일하는 것입니다. abl이어야합니다. e를 수행하려면 다음을 수행하십시오.

CROSS_COMPILE=<portion of command before gcc> make ARCH=powerpc menuconfig 
make ARCH=powerpc all 
#...other for modules, docs, etc. 

경로에 교차 컴파일러가 있는지 확인하십시오. GCC에 대한 크로스 컴파일러 명령 ppc_74xx-GCC 경우 CROSS_COMPILE 변수를 설정의 경우, 설정 한 것 CROSS_COMPILE = ppc_74xx- 당신은 더 많은 정보를 원하시면이 링크를 좀 걸릴 수 있습니다

http://wiki.ppckernel.org/w/Cross_compiling_a_64-bit_PowerPC_Linux_Kernel

http://trac.cross-lfs.org/이 사이트에서는 자신의 툴체인, 커널, 사용자 공간 등을 포함하여 처음부터 Linux를 크로스 컴파일하는 방법을 보여줍니다.

+0

고마워,하지만 나는 일반적인 해결책이 아닌 데비안 특정 해결책에 관심이 있습니다. 데비안에는 dpkg-cross와 같은 도구가 포함되어 있지만 실제로 작동하는 단계별 지침을 찾을 수 없습니다. –

+0

전체 오류 로그를 게시 할 수 있습니까? –