歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> Linux編程 >> mini2440 Norflash驅動移植過程

mini2440 Norflash驅動移植過程

日期:2017/3/1 10:02:42   编辑:Linux編程

我不知道友善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

Copyright © Linux教程網 All Rights Reserved