How much flash space should I reserve for device tree blobs?

Arnd Bergmann arnd at arndb.de
Tue Dec 16 04:44:58 PST 2014


On Tuesday 16 December 2014 07:22:24 Jason Cooper wrote:
> 
> On Mon, Dec 15, 2014 at 03:33:50PM -0500, Brian Hutchinson wrote:
> > Reflecting back on the famous quote of "Nobody needs more than 640K",
> > how much space should I reserve in flash to 'future proof' my MTD map
> > in regards to dtb's?
> > 
> > Looking at the current flavors of dtb's built in a recent mainline
> > kernel, the biggest one I see is 66K.
> > 
> > How big do you all see these getting?  I know, it's probably a loaded
> > question.  Would just like to bounce this off the list as a sanity
> > check ... measure twice cut once kind of thing.
> 
> There's probably better folks to answer this than me (former powerpc
> folks, eg Arnd, Olof), but since I've had to consider it as well, I'll
> tell you my thoughts.

I thought that these days a lot of boot loaders can just access file
systems. If you use a FAT or ext4 file system (on block based storage)
or something like UBI (on raw flash) to store both the kernel and DT,
you should be able to avoid hardcoding sizes.

It also depends on how much space you have total. On an eMMC, I would
just round up to whole megabytes, but if you have only 4MB of NOR flash
available, you have to be more conservative.

	Arnd



More information about the linux-arm-kernel mailing list