[geeks] Flash booting.

Joshua D. Boyd jdboyd at jdboyd.net
Fri Apr 18 15:38:18 CDT 2008


On Fri, 2008-04-18 at 16:15 -0400, Shannon Hendrix wrote:
> On Apr 18, 2008, at 15:51 , Joshua D. Boyd wrote:
> 
> > I don't know why the adapter would matter at all.  The CF adapters I
> > have here are completely passive devices.
> >
> > I think that some CF cards don't support DMA at all, and some CF cards
> > have busted DMA support.
> 
> Makes sense.
> 
> They can't even be bothered to agree on some kind of size standard  
> either.  We constantly have to change our custom fdisk parameter files  
> because even the same brand of CF can vary in size for different model  
> variations.

They can vary in size in the same model.  I can buy 10 cards that are
supposed to be the same and find 2 brands of flash chips inside, and of
the 10 cards, I find 4-5 different card sizes by a few blocks/sectors of
variation.

I think size has something to do with errors on the flash chips.  Since
there is a controller in between the flash and the IDE interface, the
controller can map out bad sections, so they can buy the defective but
functioning flash chips that we would refuse buy to talk to directly
(say, using it as a ROM bank directly attached to the memory bus of a
microcontroller, or attached directly to an FPGA).

One trick I thought of (but haven't implemented) would be to make your
image to be say 800 megs (assuming 1 gig flash cards), then after dd'ing
the image, you could grow the FS on the flash card to the maximum size
the card will take.

> > However, I hate using CF cards and I really want to move to those IDC
> > header modules.
> 
> You mean those "disk on module" things that plug into an IDE slot?
> 
> I've had DMA errors on those too.

I know of no reason that the controller inside a DOM would have to be
any different then the controller inside a CF card.  However, hopefully
one could find a Disk on Module that doesn't resort to keeping the same
model # while constantly swapping the internal parts for whatever is
cheapest at the moment.  I haven't had a lot of time to explore all the
options, and as I mentioned, the first unit I did try does have DMA
issues of some sort.

Another option for some more serios people would be to make a PCI flash
card.  Intel released the verilog code for doing this a few years ago.
They also released schematics for making the cards, but the schematics
aren't really all that useful since the FPGA they use is badly out of
date.

This would only be good for systems with a spare PCI slot.  However, if
someone wanted to make something themselves, I think this would involve
a lot less voodoo than trying to build your own USB flash or IDE flash
unit.  Such a unit would be fairly expensive though.  In small
quantities, I would hazard to guess that it would be in the range of
$80-$100 for a 4 gigabyte card.  Cutting that to 2 gigs would only save
$10 or so.  Of course, it one were to make 1000 of them, it would
probably cut the per unit cost by $20 or so.  But then I'd need more
than $50,000 in cash up front.

> Plus, the advantage of using CF cards is that we can use the same  
> cards in several different systems that have multiple ways of mounting  
> CF drives.
> 
> IDC/DOM will only work on IDE equipped machines, for example.

I would imagine that it wouldn't be all that hard to make a IDC/DOM work
with a SATA<->IDE adapter, if the DOM really did behave correctly just
like an IDE drive.  And the same would go for a USB->IDE adapter.

For myself, I only need to worry about one batch of motherboards at a
time, and IDE isn't likely to completely disappear all that quickly
(except on Dell servers).

> During testing we often need to plug/unplug a lot, and sometimes a  
> customer might have to change the flash as well.

Currently we are having a service person change the flash.  In the
future I hope to have a USB updater worked out.



More information about the geeks mailing list