查看MTD的源代码
←
MTD
跳转到:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您刚才请求的操作只有这个用户组中的用户才能使用:
用户
您可以查看并复制此页面的源代码:
== Examples == <source lang=bash> root@nec:/root> xxd /dev/mtd4 | head -4 0000000: ffff ffff ffff ffff ffff ffff ffff ffff ................ 0000010: ffff ffff ffff ffff ffff ffff ffff ffff ................ 0000020: ffff ffff ffff ffff ffff ffff ffff ffff ................ 0000030: ffff ffff ffff ffff ffff ffff ffff ffff ................ root@nec:/root> date > /dev/mtd4 root@nec:/root> xxd /dev/mtd4 | head -10 0000000: 5361 7420 4a61 6e20 2031 2030 303a 3137 Sat Jan 1 00:17 0000010: 3a33 3720 474d 5420 3230 3030 0aff ffff :37 GMT 2000.... 0000020: ffff ffff ffff ffff ffff ffff ffff ffff ................ Can use the flash_eraseall (mtd-tools) commands to erase a whole MTD partition: root@nec:/root> flash_eraseall /dev/mtd4 </source> The mkfs.jffs2 tool is used to create a JFFS2 filesystem image; it populates the image with files from a given directory. For instance, to create a JFFS2 image for a flash partition of 3 MB total size and to populate it with the files from the /tmp/flashtools directory you would use: <source lang=bash> # mkfs.jffs2 --pad=3145728 --eraseblock=262144 --root=/tmp/flashtools/ --output image.jffs2 # eraseall /dev/mtd4 Erased 3072 Kibyte @ 0 -- 100% complete. # dd if=image.jffs2 of=/dev/mtd4 bs=256k 12+0 records in 12+0 records out # mount -t jffs2 /dev/mtdblock4 /mnt # df /mnt Filesystem 1k-blocks Used Available Use% Mounted on /dev/mtdblock4 3072 2488 584 81% /mnt </source> <br><br> <br><br> <br><br> <br><br> <br><br> <br><br>
返回到
MTD
。
个人工具
登录
名字空间
页面
讨论
变换
查看
阅读
查看源代码
查看历史
操作
搜索
导航
首页
社区专页
新闻动态
最近更改
随机页面
帮助
工具箱
链入页面
相关更改
特殊页面