View Single Post
Old 12-01-2015, 07:09 PM   #171
donB006
Connoisseur
donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.
 
Posts: 86
Karma: 186294
Join Date: Jun 2011
Device: Kindle k3G 3.4.2; DXG 2.5.8; DXG 3.1; Iriver Story HD
Quote:
Originally Posted by knc1 View Post
A horrible example.
You are erasing and re-programming every erase block 4096 times for each block written.

The 'conv' option to dd does text file conversions, these are binary files, so 'conv=' is a sure way to trash the image.

And since the ibs default size is one byte ...

Translation:
Remove the 'conv=sync' option -
Add the bs=4096 option
Thanks for the observation knc1. The proper use of dd is very important and my errors are inexcusable in this case as dd is very unforgiving. I really should know better.

In reality, I was just trying to flush the write buffer in case that was left unfinished before copying the rootfs.img across the USB. That is probably unneccesary for the kindle dx because that is not a hard disk. If I knew more about the emmc I would probably want to match the giant block erase size except I don't really know what that is. I have had no problem before using the defaults even though probably not the most efficient.

According to the dd man page:
Code:
       ibs=BYTES
              read up to BYTES bytes at a time (default: 512)

       obs=BYTES
              write BYTES bytes at a time (default: 512)

    sync   pad every input block with NULs to ibs-size; when used with block or unblock, pad with spaces rather than NULs
I didn't really study the man page before being so sloppy but doesn't the sync just fill the very last block out to 512 bytes if that is left unfilled?

What I really meant was this:
dd if=/dev/mmcblk0p1 of=/mnt/us/rootfs.img; sync

I have frequently used this without problems:
dd if=/dev/mmcblk0p1 of=/mnt/us/rootfs.img

I have no problem recommending this:
dd if=/dev/mmcblk0p1 of=/mnt/us/rootfs.img bs=4096

Hey, Kaan88, glad you have things working so far. Let us know how things turn out. And give knc1 a little space. We all know his way after so many posts and is still good for a smile most of the time. Of course, we probably aren't so frustrated with the kindle at the moment unlike too many here and might fail to understand sometimes. Have fun with the project.

Last edited by donB006; 12-01-2015 at 07:26 PM.
donB006 is offline   Reply With Quote