2 modify kernel source
a>add your nand flash partition information modify the arch/arm/mach-s3c2410/devs.c file for example: /***********add here*************/ #include <linux/mtd/partitions.h> #include <asm/arch/nand.h> #include <linux/mtd/nand.h> /***********end add*************/ ... /*****************************add here***************************/ static struct mtd_partition partition_info[] ={ { name: "loader", size: 0x00020000, offset: 0, }, { name: "param", size: 0x00010000, offset: 0x00020000, }, { name: "kernel", size: 0x001c0000, offset: 0x00030000, }, { name: "root", size: 0x00200000, offset: 0x00200000, mask_flags: mtd_writeable, }, { name: "user", size: 0x03af8000, offset: 0x00400000, } }; struct s3c2410_nand_set nandset ={ nr_partitions: 5 , partitions: partition_info , }; struct s3c2410_platform_nand superlpplatform={ tacls:0, twrph0:30, twrph1:0, sets: &nandset, nr_sets: 1, }; /********************************end add****************************/ struct platform_device s3c_device_nand = { .name = "s3c2410-nand", .id = 0xec, .num_resources = array_size(s3c_nand_resource), .resource = s3c_nand_resource, .dev = { .platform_data = &superlpplatform //***********add here***** } };b>add "&s3c_device_nand" to the __initdata in the arch/arm/mach-s3c2410/mach-smdk2410.c
c>disable the ecc modify the drivers/mtd/nand/s3c2410.c for example: /**** chip->eccmode = nand_ecc_soft; **/ chip->eccmode = nand_ecc_none; 3 config the kernel a>modify the makefile for example: ##subarch := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ ## -e s/arm.*/arm/ -e s/sa110/arm/ \ ## -e s/s390x/s390/ -e s/parisc64/parisc/ ) subarch :=arm ##cross_compile ?= ... 下一页