ARM(Cortex-A8, TCC8801)보드 커널 크로스컴파일 에러

   조회 6221   추천 0    

 안녕하세요.


어찌하다 Telechips TCC8801(Cortex-A8 호환)이 들어있는 안드로이드 셋탑이 손에 들어왔습니다.

(http://xellojunil.tistory.com/84 요런 녀석입니다.)

그런데 개발사는 없어졌고, 안드로이드 진저브레드가 올라가 있고, 할수있는건 별로 없고 해서

리눅스를 올리고 외장하드 달아서 써볼까 하다가 ICS로 판올림 해보려고 커널 컴파일을 해보려는데 자꾸 에러가 나네요.


http://www.cnx-software.com/2012/07/18/building-linux-kernel-3-0-8-for-telechips-tcc8925-mini-pcs-cx-01-z900-tizzbird-n1/

위의 사이트를 참고해서



$ git clone git://github.com/cnxsoft/telechips-linux.git

일단 telechips에서 공개한 kernel-3.0.8 소스를 다운로드하고



$ make ARCH=arm tcc880x_defconfig

$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j2 uImage


명령으로 컴파일 하는데 


init/do_mounts_initrd.o: In function `return_address':
/home/nasadmin/telechips-linux/arch/arm/include/asm/ftrace.h:51: multiple definition of `return_address'
init/do_mounts.o:/home/nasadmin/telechips-linux/arch/arm/include/asm/ftrace.h:51: first defined here
scripts/Makefile.build:427: recipe for target 'init/mounts.o' failed
make[1]: *** [init/mounts.o] Error 1
Makefile:946: recipe for target 'init' failed
make: *** [init] Error 2
make: *** Waiting for unfinished jobs....
  CC      arch/arm/kernel/ptrace.o
  CC      arch/arm/kernel/return_address.o
  CC      arch/arm/kernel/setup.o
arch/arm/kernel/return_address.c:62:2: warning: #warning "TODO: return_address should use unwind tables" [-Wcpp]
 #warning "TODO: return_address should use unwind tables"
  ^
arch/arm/kernel/return_address.c:65:7: error: redefinition of ‘return_address’
 void *return_address(unsigned int level)
       ^
In file included from include/linux/ftrace.h:20:0,
                 from arch/arm/kernel/return_address.c:12:
/home/nasadmin/telechips-linux/arch/arm/include/asm/ftrace.h:48:21: note: previous definition of ‘return_address’ was here
 extern inline void *return_address(unsigned int level)
                     ^
scripts/Makefile.build:305: recipe for target 'arch/arm/kernel/return_address.o' failed
make[1]: *** [arch/arm/kernel/return_address.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:946: recipe for target 'arch/arm/kernel' failed
make: *** [arch/arm/kernel] Error 2



이런 메시지를 뿜고 진전이 없네요 ㅠㅠ

시간있을때 이쪽 공부좀 해둘걸 그랬습니다.


문제는 return_address.c 의 62, 65번째 라인과 ftrace.h 20번째 라인을 봐도 크게 문제 없어보이는데 

진행이 안되네요.

혹시 관련분야의 전문가 계시면 도움 부탁드릴께요.


걍 집어치우고 라즈베리파이로 갈까봐요 ㅠㅠ




============================

추가 

ftrace.h 파일의 해당부분은

#if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND)
/*
 * return_address uses walk_stackframe to do it's work.  If both
 * CONFIG_FRAME_POINTER=y and CONFIG_ARM_UNWIND=y walk_stackframe uses unwind
 * information.  For this to work in the function tracer many functions would
 * have to be marked with __notrace.  So for now just depend on
 * !CONFIG_ARM_UNWIND.
 */

void *return_address(unsigned int);

#else

extern inline void *return_address(unsigned int level)
{
        return NULL;
}

#endif



이렇게 되어 있고


return_address.c 는

void *return_address(unsigned int level)
{
        struct return_address_data data;
        struct stackframe frame;
        register unsigned long current_sp asm ("sp");

        data.level = level + 1;

        frame.fp = (unsigned long)__builtin_frame_address(0);
        frame.sp = current_sp;
        frame.lr = (unsigned long)__builtin_return_address(0);
        frame.pc = (unsigned long)return_address;

        walk_stackframe(&frame, save_return_addr, &data);

        if (!data.level)
                return data.addr;
        else
                return NULL;
}

#else /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) */

#if defined(CONFIG_ARM_UNWIND)
#warning "TODO: return_address should use unwind tables"
#endif

void *return_address(unsigned int level)
{
        return NULL;
}

#endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */



이렇게 되어 있네요.



CONFIG_FRAME_POINTER는 설정 부분이 없고 CONFIG_ARM_UNWIND=y 로 되어 있어서 무조건

#if defined(CONFIG_ARM_UNWIND)
#warning "TODO: return_address should use unwind tables"
#endif

이부분에 걸리는 것 같은데 해당부분의 기능이 무엇인지도 모르겠습니다. ㅠㅠ

2CPU를 시작하려고 합니다. 잘부탁드립니다.
짧은글 일수록 신중하게.
정희섭 2016-11
inline 함수인데 C 파일에 구현체가 있으니 같은 심볼에 구현체가 2개라서 에러 뜨는겁니다.
make menuconfig 들어가셔서 / 누르면 검색 나옵니다. unwind 입력해서 검색하시고 bool tristate 등 옵션 끌수 있는 옵션이면 찾아가서 꺼보세요.
(검색 안되면 grep 이나 ack 등 으로 ARM_UNWIND 로 검색)
     
감사합니다^^ 말씀해주신대로 하니 해당 부분은 넘어갔는데 그 뒤로 암청나게 많은 에러를 뿜어버리네요.
이종 플랫폼에 매일같이 포팅하시는 분들 정말 대단하신 것 같네요.


QnA
제목Page 2200/5729
2014-05   5264736   정은준1
2015-12   1789756   백메가
01-20   824   JJ시스템
01-27   1116   orikingston
2019-02   6752   라면먹고갈래
02-02   1615   죠슈아
2012-09   5278   임종열
2012-09   7776   나우마크
2015-11   12042   블루모션
2017-11   3735   티키
02-11   1345   여수I완스
2009-08   6577   전근현
2023-03   2637   민지파파
2009-08   6108   서윤선
02-27   864   뭐든팔아요
2014-07   9568   세가새턴
2009-09   10376   이병영
2015-11   6597   송진홍
2012-11   5239   장동건2014
2014-07   11768   라온제나
2019-02   4276   한성택
2023-04   1536   그린