개발자료/Kernel Programming
ARM Linux Kernel 분석 (1) - Kernel 분석환경 구축
배경남
2013. 4. 28. 12:38
ARM 컴파일 및 분석 방법
vi 설정은 vundle을 이용한 vi 설정하기 참고
1. 커널 다운도르- https://www.kernel.org/
v3.x 다운로드 - ftp://ftp.kernel.org/pub/linux/kernel/v3.x/
2013. 04. 28. 최신인 v3.8.10 다운로드
# wget ftp://ftp.kernel.org/pub/linux/kernel/v3.x/linux-3.8.10.tar.bz2
# tar xjf linux-3.8.10.tar.bz2
# apt-get install ctags
# make tags
# vi ~/.vimrc
set tags+=tags위치
2. ARM Tool chain 설치
1. ARM Processors > Download the GNU/Linux Release 다운로드 [바로링크]
http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/
2. 압축 풀기 = 설치
# tar xvf arm-2013.05-23-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
3. 환경변수 추가
# vi ~/.bash_profile
Tool chain 압축 푼 폴더의 bin 폴더를 자신 설정에 맞게 지정할 것.
export PATH=$PATH:/root/kernel/toolchain/arm-2013.05/bin/
# source ~/.bash_profile
4. 64bit 운영체제인 경우는 ia32-libs 설치
# apt-get install ia32-libs
3. Compile 환경변수 추가
export ARCH=arm
export CROSS_COMPILE=/root/kernel/toolchain/arm-2013.05/bin/arm-none-eabi-
4. Compile
# cd 커널디렉터리
# make distclean
# make exynos_defconfig (자신에게 알맞는 defconfig 파일을 arch/arm/configs 에서 찾아 입력)
# make V=1 > make.out 2>&1 (컴파일 내용을 make.out에 저장하되 Error 가 발생하면 표준출력으로)
5. tags - 분석을 위한 ctags 설정
# make tags
# vi ~/.vimrc
set tags += 생성된tag위치
이후 각 개별 파일 컴파일 시 분석 팁