指定目标板machine、编译器和编译器路径
修改/linux-2.6.32.6/Makefile,将
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?=
修改成
#ARCH ?= $(SUBARCH)
#CROSS_COMPILE ?=
ARCH ?= arm
CROSS_COMPILE ?= /usr/local/arm/3.4.1/bin/arm-linux-
增加devfs文件管理器的支持
我们所用的文件系统使用的是devfs文件管理器。修改/file/fl/linux-2.6.32.6/fs/Kconfig,
找到
menu "Pseudo filesystems"
添加如下语句:
config DEVFS_FS
bool "/dev file system support (OBSOLETE)"
default y
config DEVFS_MOUNT
bool "Automatically mount at boot"
default y
depends on DEVFS_FS
修改晶振频率( 可解决打印信息乱码问题 )
文件:/file/fl/linux-2.6.32.6/arch/arm/mach-s3c2440/mach-smdk2440.c
s3c24xx_init_clocks(12000000);
修改MTD分区
文件: arch/arm/plat-s3c24xx/common-smdk.c
需要和bootloader中的分区信息相同(128M),否则,启动时出错。
static struct mtd_partition smdk_default_nand_part[] = {
[0] = {
.name = "Boot",
.size = 0x00100000,
.offset = 0
},
[1] = {
.name = "MyApp",
.size = 0x003c0000,
.offset = 0x00140000,
},
[2] = {
.name = "Kernel",
.size = 0x00300000,
.offset = 0x00500000,
},
[3] = {
.name = "fs_yaffs",
.size = 0x03c00000, //30M
.offset = 0x00800000,
},
[4] = {
.name = "WINCE",
.size = 0x03c00000,
.offset = 0x04400000,
}
};
关闭ECC校验
文件:/flie/fl/linux-2.6.32.6/drivers/mtd/nand/s3c2410.c
函数:s3c2410_nand_init_chip
chip->ecc.mode = NAND_ECC_NONE;
修改nandflash驱动,支持K9F1G08的nandflash
修改/flie/fl/linux-2.6.32.6/drivers/mtd/nand下面的nand_bbt.c文件:
static struct nand_bbt_descr largepage_memorybased = {
.options = 0,
.offs = 0,
.len = 1, // 原数值为2,支持128M的K9F1G08修改为1
.pattern = scan_ff_pattern
};
static struct nand_bbt_descr largepage_flashbased = {
.options = NAND_BBT_SCAN2NDPAGE,
.offs = 0,
.len = 1, // 原数值为2,支持128M的K9F1G08修改为1
.pattern = scan_ff_pattern
};
下面,开始配置内核。
进入linux-2.6.32.6目录,把s3c2410的默认配置写入config文件。
make s3c2410_defconfig
配置文件系统选项
进入 File systems --->
修改配置如下:
< > Second extended fs support
│ │ < > Ext3 journalling file system support
│ │ < > The Extended 4 (ext4) filesystem
│ │ < > Reiserfs support
│ │ < > JFS filesystem support
│ │ < > XFS filesystem support
│ │
< > GFS2 file system support
│ │ < > OCFS2 file system support
│ │ < > Btrfs filesystem (EXPERIMENTAL) Unstable disk format
│ │ < > NILFS2 file system support (EXPERIMENTAL)