1.总是出现MACH_TYPE = 1999
NOW, Booting Linux......
Uncompressing Linux...................................................................................... done, booting the kernel.
停止的情况
下面的是tools/mach-types中关于体系的参数定义
s3c2440 ARCH_S3C2440 S3C2440 362
mini2440 MACH_MINI2440 MINI2440 1999
解决方法:将第一行改成 s3c2440 ARCH_S3C2440 S3C2440 1999
2.内核的配置
1..[*] Enable loadable module support --->
[*] Module unloading
2. System Type ---->
[*] S3C2410 DMA support [*] Support ARM920T processor
S3C2440 Machines --->
[*] SMDK2440
[*] SMDK2440 with S3C2440 CPU moduleq
其他的比如2410,2443相关的全部去掉
3.Boot options --->
将 (root=/dev/hda1 ro init=/bin/bash console=ttySAC0) Default kernel command string
改成 (noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0 )
其中 mtdblock2 表示 MTD 分区的第二个分区存文件系统; Linuxrc 为启动的首个脚本。
4关掉nand ecc .因为bootload中已经有ecc校验算法
Device Drivers --->
<*> Memory Technology Device (MTD) support --->
[*] MTD partitioning support
<*> NAND Device Support --->
<*> NAND Flash support for S3C2410/S3C2440 SoC
[ ] S3C2410 NAND Hardware ECC // 这个要去掉
3.添加nand flash驱动(可参考arm/plat-s3c24xx/common-smdk.c)
在arm/mach-mini2440.c
中添加static struct mtd_partition mini2440_default_nand_part[] = {
[0] = {
.name = "supervivi",
.size = 0x00040000,//dev/mdkbloack0
.offset = 0,
},
[1] = {
.name = "param",
.offset = 0x00040000,
.size = 0x00020000,
},
[2] = {
.name = "Kernel",
.offset = 0x00560000,
.size =1024 * 1024 * 1024,
},
[3] = {
.name = "nand",
.offset = 0x00000000,
.size = 1024 * 1024 * 1024,
},
};
static struct s3c2410_nand_set mini2440_nand_sets[] = {
[0] = {
.name = "NAND",
.nr_chips = 1,
.nr_partitions = ARRAY_SIZE(mini2440_default_nand_part),
.partitions =mini2440_default_nand_part,
},
};
static struct s3c2410_platform_nand mini2440_nand_info = {
.tacls = 20,
.twrph0 = 60,
.twrph1 = 20,
.nr_sets = ARRAY_SIZE(mini2440_nand_sets),
.sets = mini2440_nand_sets,
.ignore_unset_ecc = 1,
};
更改下列函数: