Kernel Compile

Posted by NodeC
2016. 6. 2. 16:53 카테고리 없음

 

혹시나 해서….지금 보고 있는 책은

"ARM으로 배우는 임베디드 리눅스 시스템" 개정판이다.

 

우선 커널소스 압축 해제.

# tar jxvf linux linux-3.6.9.tar.bz2

 

MakeFile 수정

 

# Alternatively CROSS_COMPILE can be set in the environment.

# A third alternative is to store a setting in .config so that plain

# "make" in the configured kernel build directory always uses that.

# Default value for CROSS_COMPILE is not to prefix executables

# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile

export KBUILD_BUILDHOST := $(SUBARCH)

#ARCH        ?= $(SUBARCH)

#CROSS_COMPILE    ?= $(CONFIG_CROSS_COMPILE:"%"=%)

ARCH        = arm

CROSS_COMPILE    = arm-none-linux-gnueabi-

 

 

보드 설정

# make exynos4_defconfig

#

# configuration written to .config

#

 

 

커널컴파일

# make zImage è 여기서 에러가 났는데 bash_profile을 수정하면 된다.

 

그런데 GCC 설치는 root이고, 사용자계정에서 하니

make: execvp: arm-none-linux-gnueabi-gcc: Permission denied

CHK include/linux/version.h

CHK include/generated/utsrelease.h

make[1]: `include/generated/mach-types.h' is up to date.

CC kernel/bounds.s

/bin/sh: arm-none-linux-gnueabi-gcc: command not found

make[1]: *** [kernel/bounds.s] Error 127

make: *** [prepare0] Error 2

 

 

이렇게 된다..왜지…