Hi3531添加16GByte(128Gbit) NAND Flash支持
2013-08-28 10:23
260 查看
0.板子上已有Nor Flash了,添加的Nand Flash型号为MT29F128G08CJABAWP,进系统挂接NAND作为一个分区
1.修改uboot
u-boot-2010.06/drivers/mtd/nand/nand_spl_ids.c
第108行,添加这个NAND Flash
{ {0x2C, 0x88, 0x05, 0xC6, 0x89, 0x00, 0x00, 0x00}, 8, _16G, NULL, "MT29F128G08CJABA", _4K, _1M, 224, 0 },
2.编译uboot
make ARCH=arm CROSS_COMPILE=arm-hisiv100nptl-linux- godnet_config
make ARCH=arm CROSS_COMPILE=arm-hisiv100nptl-linux-
...
cp ../../../uboot/u-boot-2010.06/u-boot.bin ./
./mkboot.sh reg_info_930_310_620_ddr0_ddr1_slow.bin u-boot.bin
3.修改内核
linux-3.0.y/drivers/mtd/nand/nand_spl_ids.c
第68行,添加这个设备
{ {0x2C, 0x88, 0x05, 0xC6, 0x89, 0x00, 0x00, 0x00}, 8, _16G, NULL, "MT29F128G08CJABA", _4K, _1M, 224, 0 },
4.编译内核
cp arch/arm/configs/godnet_defconfig .config
make ARCH=arm CROSS_COMPILE=arm-hisiv100nptl-linux- menuconfig
make ARCH=arm CROSS_COMPILE=arm-hisiv100nptl-linux- uImage
cp arch/arm/boot/uImage ...
5.烧写u-boot
sf probe 0
mw.b 82000000 ff 100000
tftp 0x82000000 u-boot.bin
sf probe 0
sf erase 0 100000
sf write 82000000 0 100000
reset
6.烧写内核
mw.b 82000000 ff 400000
tftp 82000000 uImage
sf probe 0
sf erase 100000 400000
sf write 82000000 100000 400000
7.烧写文件系统
mw.b 82000000 ff b00000
tftp 0x82000000 rootfs_256k.jffs2
sf erase 500000 b00000
sf write 82000000 500000 b00000
8.设置启动参数
setenv bootargs 'mem=64M console=ttyAMA0,115200 root=/dev/mtdblock2 rootfstype=jffs2 mtdparts=hi_sfc:1M(boot),4M(kernel),11M(rootfs);hinand:16G(nand)'
setenv bootcmd 'sf probe 0;sf read 0x82000000 0x100000 0x400000;bootm 0x82000000'
sa
9.擦除NAND(可选)
nand erase
10.进入系统mount
mount /dev/mtdblock3 /mnt/ -t yaffs2
11.检查
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 11264 4632 6632 41% /
tmpfs 29196 4 29192 0% /dev
/dev/mtdblock3 16777216 13312 16763904 0% /mnt
一共16GByte,拷贝速度很快
12.其实不修改uboot也可以,这样uboot就认不到NAND Flash,也就没法在uboot erase,不过进系统了也可以用。
1.修改uboot
u-boot-2010.06/drivers/mtd/nand/nand_spl_ids.c
第108行,添加这个NAND Flash
{ {0x2C, 0x88, 0x05, 0xC6, 0x89, 0x00, 0x00, 0x00}, 8, _16G, NULL, "MT29F128G08CJABA", _4K, _1M, 224, 0 },
2.编译uboot
make ARCH=arm CROSS_COMPILE=arm-hisiv100nptl-linux- godnet_config
make ARCH=arm CROSS_COMPILE=arm-hisiv100nptl-linux-
...
cp ../../../uboot/u-boot-2010.06/u-boot.bin ./
./mkboot.sh reg_info_930_310_620_ddr0_ddr1_slow.bin u-boot.bin
3.修改内核
linux-3.0.y/drivers/mtd/nand/nand_spl_ids.c
第68行,添加这个设备
{ {0x2C, 0x88, 0x05, 0xC6, 0x89, 0x00, 0x00, 0x00}, 8, _16G, NULL, "MT29F128G08CJABA", _4K, _1M, 224, 0 },
4.编译内核
cp arch/arm/configs/godnet_defconfig .config
make ARCH=arm CROSS_COMPILE=arm-hisiv100nptl-linux- menuconfig
make ARCH=arm CROSS_COMPILE=arm-hisiv100nptl-linux- uImage
cp arch/arm/boot/uImage ...
5.烧写u-boot
sf probe 0
mw.b 82000000 ff 100000
tftp 0x82000000 u-boot.bin
sf probe 0
sf erase 0 100000
sf write 82000000 0 100000
reset
6.烧写内核
mw.b 82000000 ff 400000
tftp 82000000 uImage
sf probe 0
sf erase 100000 400000
sf write 82000000 100000 400000
7.烧写文件系统
mw.b 82000000 ff b00000
tftp 0x82000000 rootfs_256k.jffs2
sf erase 500000 b00000
sf write 82000000 500000 b00000
8.设置启动参数
setenv bootargs 'mem=64M console=ttyAMA0,115200 root=/dev/mtdblock2 rootfstype=jffs2 mtdparts=hi_sfc:1M(boot),4M(kernel),11M(rootfs);hinand:16G(nand)'
setenv bootcmd 'sf probe 0;sf read 0x82000000 0x100000 0x400000;bootm 0x82000000'
sa
9.擦除NAND(可选)
nand erase
10.进入系统mount
mount /dev/mtdblock3 /mnt/ -t yaffs2
11.检查
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 11264 4632 6632 41% /
tmpfs 29196 4 29192 0% /dev
/dev/mtdblock3 16777216 13312 16763904 0% /mnt
一共16GByte,拷贝速度很快
12.其实不修改uboot也可以,这样uboot就认不到NAND Flash,也就没法在uboot erase,不过进系统了也可以用。
相关文章推荐
- Hi3531添加16GByte(128Gbit) NAND Flash支持
- Hi3531添加16GByte(128Gbit) NAND Flash支持 分类: HI3531 2013-08-28 10:23 861人阅读 评论(0) 收藏
- Hi3531添加16GByte(128Gbit) NAND Flash支持
- u-boot-2014.10移植第21天----添加nand flash命令支持(三)
- [置顶] u-boot-2014.10移植第19天----添加nand flash命令支持(一)
- [置顶] u-boot-2014.10移植第20天----添加nand flash命令支持(二)
- 使用QEMU模拟搭建ARM开发平台(三)——添加SCSI和MTD以及NAND flash支持
- u-boot-2014.10移植第22天----添加nand flash命令支持(四)
- 为Hi3531添加4串口支持 分类: HI3531 arm-linux-Ubuntu 2013-12-12 08:34 755人阅读 评论(0) 收藏
- 为Hi3531添加4串口支持
- 为Hi3531添加4串口支持
- TX2440 ARM开发板Uboot移植(三、添加Nand Flash的有关操作支持)
- 为Hi3531添加4串口支持
- 添加nand flash 的支持给osk5912
- bootstrap添加多个模态对话框支持
- 启用Jetty 6.1.24的JMX支持并添加自定义MBean
- VS2010 MFC中在对话框上添加工具栏以及工具栏提示信息并改变图标支持256色
- android 添加 iconv 支持
- 不注册COM在Richedit中使OLE支持复制粘贴
- 基于OpenWrt添加ubus支持的示例分享