我不知道友善linux2.6.32的内核是否支持了mini2440的norflash,我在这里还是亲自的把mini2440的norflash支持上。移植过程分享如下:
一.添加配置项
1、修改 drivers/mtd/maps/Kconfig文件,在config_EDB7312配置项下添加如下内容:
config MTD_MINI2440
tristate "CFI Flash device mapped onMINI2440"
depends on ARM && MTD_CFI
help
This enables access to the CFI Flash on the CogentMINI2440 board.
If you have such a board, say 'Y' here.
2、修改 drivers/mtd/maps/Makefile文件,在obj-$(CONFIG_MTD_EDB7312)+= edb7312.o下添加如下内容:
obj-$(CONFIG_MTD_MINI2440)+= mini2440.o
3、复制驱动文件mini2440.c到drivers/mtd/maps目录下
二.配置编译内核
# make menuconfig
以下内容必选:
Memory Technology Devices(MTD)-->
<*>Memory Technology Device (MTD) support
[*]MTD partitioning support
<*>Direct char device access to MTD devices
<*>Caching block device access to MTD devices
RAM/ROM/Flash chip drivers-->
<*>Detect flash chips by Common Flash Interface (CFI) probe
<*>Support for Inter/Sharp flash chips
<*>Supportfor AMD/Fujitsu/Spansion flash chips
<*>CFI flash device mapped on mini2440
下列内容(在flash上架fat16/fat32/ntfs/ext2等文件系统时才需要选上)不要选,否则会出现加载驱动模块时会出现ftl_cs:FTL header not found.
DeviceDrivers ->
Memory Technology Devices (MTD) ->
<>FTL (Flash Translation Layer) support
<> NFTL(NAND Flash Translation Layer) support
<>INFTL(Inverse NAND Flash Translation Layer) support