Enable loadable module support
Automatic kernel module loading
System Type -->
S3C2410 DMA support
Boot options --> Default kernel command string:
noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0,115200
#说明:mtdblock2代表我的第3个flash分区,它是我的rootfs
# console=ttySAC0,115200使kernel启动期间的信息全部输出到串口0上.
# 2.6内核对于串口的命名改为ttySAC0,但这不影响用户空间的串口编程。
# 用户空间的串口编程针对的仍是/dev/ttyS0等
Floating point emulation -->
NWFPE math emulation
This is necessary to run most binaries!!!
#接下来要做的是对内核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
#接下来做的是针对文件系统的设置,本人实验时目标板上要上的文件系统是cramfs,故做如下配置
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 -->
<*> Compressed ROM file system support (cramfs)
#支持cramfs
Network File Systems -->
<*> NFS file system support
保存退出,产生.config文件.
编译内核
make zImage
注意:若编译内核出现如下情况
LD .tmp_vmlinux1
armlinuxld:
arch/arm/kernel/vmlinux.lds:1439: parse error
make: *** [.tmp_vmlinux1] Error 1
解决方法:修改arch/arm/kernel/vmlinux.lds
vi arch/arm/kernel/vmlinux.lds
将文件尾2条的ASSERT注释掉;
/* ASSERT((__proc_info_end __proc_info_begin), "missing CPU support") */
/* ASSERT((__arch_info_end __arch_info_begin), "no machine record defined") */
然后重新make zImage即可。
编译完成后会在arch/arm/boot/目录下生产zImage内核映象。zImage映象是可引导的,压缩的内核映象,就是我们要移植到开发板上的内核映象文件。