7.内核裁剪
7.1内核配置文件
将arch/arm/configs/s3c2410_defconfig .config拷到内核目录树根下:
cp arch/arm/configs/s3c2410_defconfig .config
make menuconfig 将s3c2410_defconfig 导入,在s3c2410_defconfig基础上,裁剪内核。
7.2内核选项
Loadable module support >
[*] Enable loadable module support
[*] Automatic kernel module loading
System Type >
[*] S3C2410 DMA support
Floating point emulation >
[*] NWFPE math emulation
接下来要做的是对内核MTD子系统的设置
Device Drivers >
Memory Technology Devices (MTD) >
[*] MTD partitioning support /*支持MTD分区,这样我们在前面设置的分区才有意义*/
[*] Command line partition table parsing /*支持从命令行设置flash分区信息,灵活*/
RAM/ROM/Flash chip drivers >
<*> Detect flash chips by Common Flash Interface (CFI) probe
<*> Detect nonCFI AMD/JEDECcompatible flash chips
<*> Support for Intel/Sharp flash chips
<*> Support for AMD/Fujitsu flash chips
<*> Support for ROM chips in bus mapping
NAND Flash Device Drivers >
<*> NAND Device Support
<*> NAND Flash support for S3C2410/S3C2440 SoC
Character devices >
[*] Nonstandard serial port support
[*] S3C2410 RTC Driver
接下来做的是针对文件系统的设置
File systems >
<> Second extended fs support #去除对ext2的支持
Pseudo filesystems >
[*] /proc file system support
[*] Virtual memory file system support (former shm fs)
[*] /dev file system support (OBSOLETE)
[*] Automatically mount at boot (NEW)
这里会看到我们前先修改fs/Kconfig的成果,devfs已经被支持上了
Miscellaneous filesystems >
Network File Systems >
<*> NFS file system support
7.3编译
make即可。
8.总结
与linux-2.6.30.4移植S3C2440( http://www.linuxidc.com/Linux/2012-12/77126.htm),基本过程很相似。照着这个过程一般都能移植好一个内核,但明白这个过程背后的东西才是王道。