mkefs buildfile

The syntax of the buildfile is similar to that for mkifs, but mkefs supports a different set of attributes, including the following:

Specifies the block size of the flash device being used; defaults to 64 KB. We'll talk about interleave considerations for flash devices below.
Specifies the maximum size of the flash device; is used to check for overflows. The default is 4 Gbytes.
Specifies the number of spare blocks to set aside for the flash filesystem; see "Spare blocks," below.
Specifies the minimum size of the filesystem. If the resultant image is smaller than tsize, the image is padded out to tsize bytes. The default is unspecified, meaning that the image won't be padded.

Refer to the Utilities Reference for a complete description of the buildfile syntax and attributes supported by mkefs.

Here's a very simple example of a buildfile:

[block_size=128k spare_blocks=1 filter=deflate]

In this example, the attributes specify that the flash devices have a block size of 128 KB, that there should be one spare block, and that all the files should be processed using the deflate utility, which compresses the files. A single directory is given. Just as with mkifs, when we specify a directory, all files and subdirectories beneath it are included in the resulting image. Most of the other filename tricks shown above for mkifs also apply to mkefs.