[embedded]Wrong of kernel while initialling the NAND flash

2017-4-19 写技术

There is something wrong with the kernel while initialling the NAND flash.


brd: module loaded

S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns
s3c24xx-nand s3c2440-nand: NAND soft ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 1878 at 0x00000eac0000
Creating 5 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x000000000000-0x000000060000 : "uboot"
0x000000060000-0x000000080000 : "param"
uncorrectable error : 
0x000000080000-0x000000580000 : "Kernel"
ftl_cs: FTL header not found.
0x000000580000-0x000040580000 : "root"
mtd: partition "root" extends beyond the end of device "NAND 256MiB 3,3V 8-bit" -- size truncated 

to 0xfa80000
ftl_cs: FTL header not found.
0x000000000000-0x000040000000 : "nand"
mtd: partition "nand" extends beyond the end of device "NAND 256MiB 3,3V 8-bit" -- size truncated 

to 0x10000000

Problem 1: Beyond the end of device

Edit u-boot file in /arch/arm/mach-s3c2440/mach-mini2440.c

static struct mtd_partition mini2440_default_nand_part[] = {
        [0] = {
                .name = "uboot",
                .offset = 0,
                .size = 0x00060000,
        },
        [1] = {
                .name = "param",
                .offset = 0x00060000,
                .size = 0x00020000,
        },
        [2] = {
                .name = "Kernel",
                .offset = 0x00080000,
                .size = 0x00500000,
        },
        [3] = {
                .name = "root",
                .offset = 0x00580000,
                .size = 256*1024*1024 - 0x580000, //1024*1024*1024
        },
        [4] = {
                .name = "nand",
                .offset = 0x00000000,
                .size = 256*1024*1024,            //1024*1024*1024
        }
};

Problem 2:ftl_cs: FTL header not found.
make menuconfig
Device Drivers ->
 Memory Technology Devices (MTD) ->
  []FTL (Flash Translation Layer) support
  []NFTL (NAND Flash Translation Layer) support
  []INFTL (Inverse NAND Flash Translation Layer) support
These three items must be unabled.


标签: embedded

发表评论:

Powered by anycle 湘ICP备15001973号-1