加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

内核自带norflash的编译与实验

发布时间:2020-12-15 18:39:26 所属栏目:百科 来源:网络整理
导读:内核自带了一个norflash驱动程序,它就是drivers/mtd/maps/physmap.c,下面我们开始实验: 1、通过配置内核支持NOR FLASH ?(1) make menuconfig - Device Drivers ? - Memory Technology Device (MTD) support ? ? - Mapping drivers for chip access ? ?
内核自带了一个norflash驱动程序,它就是drivers/mtd/maps/physmap.c,下面我们开始实验:
1、通过配置内核支持NOR FLASH
?(1)
make menuconfig
-> Device Drivers
? -> Memory Technology Device (MTD) support
? ? -> Mapping drivers for chip access
? ? <M> CFI Flash device in physical memory map?
? ? ( 0x0) Physical start address of flash mapping ?// 物理基地址
? ? ( 0x1000000) Physical length of flash mapping ? // 长度
? ? ( 2) ? Bank width in octets (NEW) ? ? ? ? ? ? ? // 位宽

(2)
make modules
? ?cp drivers/mtd/maps/physmap.ko /work/nfs_root/first_fs

(3)
? 启动开发板
? ?ls /dev/mtd*
? ?insmod physmap.ko
? ?ls /dev/mtd*
? ?cat /proc/mtd

在这个自带的norflash驱动程序里面并没有分区,所以我们自己写的时候还需要添加分区。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读