添加平台设备列表
在smdkc100_device[]结构体数组中添加如下内容:
#if defined(CONFIG_MTD_NAND_S3C) &s5pc100_device_nand, #endif
- 修改 arch/arm/plat-samsung/include/plat/nand.h 添加如下内容:
struct s3c_nand_mtd_info { uint chip_nr; uint mtd_part_nr; struct matd_partition *partition; };
5、 配置内核
$ make menuconfig
修改
Device Drivers --->
<*> Memory Technology Device (MTD) support --->
[*] MTD partitioning support
<*> Caching block device access to MTD devices
<*> NAND Device Support --->
<*> NAND Flash support for S3C SoCs
[*] S3C NAND Hardware ECC
File System --->
Partition Types --->
[*] Advanced partitioin selection
[*] PC BIOS (MSDOS partition tables) support
[*] BSD disklabel (FreeBSD partition tables) support
---------------------------------------------------------------------
三、编译内核并拷贝到tftpboot下
$ make zImage
$ cp arch/arm/boot/zImage /tftpboot---------------------------------------------------------------------
四、测试
启动目标板,查看系统信息:
# cat /proc/mtd dev: size erasesize name mtd0: 00100000 00020000 "bootloader" mtd1: 00300000 00020000 "kernel" mtd2: 00400000 00020000 "rootfs" mtd3: 0f800000 00020000 "usrfs"
