[Buildroot] Genimage last partition size issue

Peter Korsgaard peter at korsgaard.com
Thu May 26 19:54:08 UTC 2016


>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni at free-electrons.com> writes:

 > Hello,
 > On Tue, 24 May 2016 17:56:50 +0200, Peter Korsgaard wrote:

 >> How should genimage know what the size is of your SD card when you
 >> generate the foo.img image? I guess you would need to add size = 4G
 >> inside image foo.img { }, but notice that this is isn't very efficient
 >> as you will be writing lots of zeros to the sd card.

 > Isn't it possible to generate a sparse file, and then use the sparse
 > capability of dd to avoid writing those lots of zeros?

Can dd detect and do something sensible about sparse files? I thought it
was only able to create sparse files (by seeking)? I would guess you
need a tool that understand the filesystem to know if you can really
skip sequences of zeros when writing.

-- 
Venlig hilsen,
Peter Korsgaard 



More information about the buildroot mailing list