Difference between revisions of "Mount jffs2"
From eLinux.org
G1powermac (Talk | contribs) |
Adushistova (Talk | contribs) m |
||
| (One intermediate revision by one user not shown) | |||
| Line 1: | Line 1: | ||
| + | <pre> | ||
#!/bin/sh | #!/bin/sh | ||
| Line 25: | Line 26: | ||
mount -t jffs2 /dev/mtdblock0 $2 | mount -t jffs2 /dev/mtdblock0 $2 | ||
| + | </pre> | ||
| + | |||
| + | [[Category:Tips and Tricks]] | ||
Latest revision as of 10:00, 27 October 2011
#!/bin/sh
if [ -z "$1" ]; then
echo usage: $0 jffs2_image directory
exit
fi
if [ -z "$2" ]; then
echo usage: $0 jffs2_image directory
exit
fi
modprobe mtdcore
modprobe jffs2
SIZE=( `du -h -k $1` )
modprobe mtdram total_size=${SIZE:0} erase_size=256
modprobe mtdchar
modprobe mtdblock
sleep .25
dd if=$1 of=/dev/mtdblock0
mount -t jffs2 /dev/mtdblock0 $2