[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#465122: flash-kernel: dd uses a lot of memory



Control: tag -1 +help
Control: severity -1 wishlist

Looking over these old bugs, Joey said:

> I thought that maybe the initramfs flashing code could be modified to
> use less memory, more easily than the kernel code. Since it uses 2
> or 3 times as much memory.
> 
> -	dd if=$ifile of=$tmp ibs=$(($imtdsize - 16)) conv=sync
> +	dd if=$ifile of=$tmp ibs=$(($imtdsize - 16)/8) conv=sync count=8
> 
> But, that won't work, the ibs needs to be the full size of the partition
> so that conv=sync will cause dd to pad fron the end of the file with
> nulls to fill up the partition.
> 
> I don't see a good way to do it, unless something other than dd is used.

Where does the requirement to fill the partition come from? Is it is h/w
specific?

For u-boot uImage/uInitrd cases the header contains the actual length of
the data, so whatever garbage is at the end of the partition shouldn't
really matter. Worst case we could always pad the input image.

Or maybe systems have moved on and have so much more RAM than 5 years
ago that it is no longer worth spending too much time on?

Oh, I notice only now that the only uses of ibs are in the slug specific
stuff, which answers my second question... and reading the code doesn't
this sercomm header thing contain the length for this case too?

I think I'm not too inclined to worry about this bug these days, and I
haven't got a slug anyway so I doubt I'm going to be changing anything.

Ian.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: