안녕하세요

최근 라우터를 하나 가지고 놀고 있는데

이 라우터의 CPU가 RTL8198 입니다.


$ cat /proc/cpuinfo

system type : RTL8198

processor : 0

cpu model : 56322

BogoMIPS : 498.07

tlb_entries : 32

mips16 implemented : yes



이 라우터에 GDB를 붙여보고 싶은데

처음엔  MIPS 인줄 알고 MIPS용 gdb나 gdbserver를 구해서 실행시켜봤는데

전부 실패했습니다.


이유를 알아보니 RTL819x 코어가 lexra 종류 코어인데

이 놈이 완전히 MIPS랑 같은 instruction을 쓰는게 아니더군요..


그래서 이놈들 전용 gdb를 찾아보려고 했는데 결국 못 찾았고 

간신히 찾은게 RTL819x용 toolchain입니다.


https://github.com/KrabbyPatty/rtl819x-toolchain/


위 링크에서 발견했는데,

문제는 제가 이 쪽으로는 거의 완전 초보라

어떻게 빌드를 해줘야하는지 잘 모르겠습니다.


make menuconfig 해서 

RTL8198로 설정 맞추고, 

users/ 에서는 다 설정해제하고 gdbserver만 선택한뒤

make를 하면


/home/freestar/tools/rtl819x-toolchain-master/users/gdb/gdb-6.8/bfd/configure: 11150: .: Can't open .././bfd/configure.host

make[5]: *** [configure-bfd] 오류 1

make[5]: Leaving directory `/home/freestar/tools/rtl819x-toolchain-master/users/gdb/gdb-6.8'

make[4]: *** [all] 오류 2

make[4]: Leaving directory `/home/freestar/tools/rtl819x-toolchain-master/users/gdb/gdb-6.8'

make[4]: Entering directory `/home/freestar/tools/rtl819x-toolchain-master/users/gdb/gdb-6.8'

make[5]: Entering directory `/home/freestar/tools/rtl819x-toolchain-master/users/gdb/gdb-6.8'



위와 같은 에러가 나면서 make가 중단됩니다.

configure.host를 보면 파일이 있긴 있는데 심볼릭 링크로 있고

그 심볼링 링크가 가르키는것이 파일이 아니라 무슨 주석같이 말이 적혀있더군요


lrwxrwxrwx 1 freestar freestar 2620 Aug  1 23:26 users/gdb/gdb-6.8/bfd/configure.host -> # This file is a shell script that overrides some of the tools and?# flags used on a host specific basis.??# Since the "bfd/hosts" directory is shared by the bfd, opcodes, and?# binutils directories (at least), the index to it is also shared.?# This is that index.  Each configure.in file should source this file?# in its per-host part.??# This sets ...............


이거 뒤로 한참 길게 적혀있습니다.


이런 파일은 처음봐서 당황스럽기도 하고..





여튼 말이 길었는데

목적은 단하나입니다.


RTL8198 환경에서 gdb/gdbserver를 사용하고 싶습니다.


위의 toolchain의 build 방법에 대해 알려주실 수 있으신 분이 계신다거나 (gdb만 build되도 좋습니다.)

혹은 다른 방법을 아시는 분이 계시면 답변 부탁드립니다.


몇주째 틈틈히 알아보고 있는데

최근 몇일은 도저히 진전이 없네요



아, 아니라면 혹시 lexra core들이 사용하는 instruction set 전체라던가

MIPS instruction과의 정확한 차이라고 아시는 분 계시면 답변 부탁드리겠습니다.


감사합니다.