linux内核最小系统,使用内核版本:https://www.kernel.org/pub/linux/kernel/v3.0/linux-3.8.1.tar.bz2
1,FL2440板子的基本硬件:晶振12MHZ
CPU |
型号为S3C2440,基于ARM920T,指令集ARMV4,时钟主频400MHz |
SDRAM |
H57V2562GTR-75C 2片*32MB=64MB,挂载于nGCS6 (0x3000 0000) |
NANDFLASH |
型号:K9F2G08U0B 大小:256MB |
Network Adapter |
DM9000AEP 10/100M自适应,挂载于nGCS4 (0x2000 0000) |
LED |
5个LED(LED0~3)I/O口指示灯,LED5电源指示灯,LED9核心板3.3V指示灯 LED0~LED3分别接GPB6,GPB6,GPB8,GPB10 |
BEEP(蜂鸣器) |
接在GPB0/TOUT0 |
2,首先说明make menuconfig,Kconfig,.config之间的关系:
1)make menuconfig首先读取顶层Kconfig文件,生成选择界面。
2)使能arch/$SRCARCH/Kconfig,最终生成.config(控制编译)
Kconfig文件:
#
# For a description of the syntax of this configuration file,
# see Documentation/kbuild/kconfig-language.txt.
#
mainmenu "Linux/$ARCH $KERNELVERSION Kernel Configuration"
config SRCARCH
string
option env="SRCARCH"
source "arch/$SRCARCH/Kconfig"
相当于使能arch/arm/Kconfig,并且递归进入各个目录Kconfig,生成选项界面。
3)当make编译,就会读出生成的.config文件,根据其中的选项编译相应模块。
若选择<y>编译入内核中;<M>编译成驱动模块,需要的时候加载 ;否则不编译。
3,linux-3.8内核配置
1)修改顶层Makefile
# CROSS_COMPILE specify the prefix used for all executables used
# during compilation. Only gcc and related bin-utils executables
# are prefixed with $(CROSS_COMPILE).
# CROSS_COMPILE can be set on the command line
# make CROSS_COMPILE=ia64-linux-
# 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 := $(SU