xref: /openbmc/u-boot/tools/binman/README.entries (revision d24c1d0f4da3b081a4fedf7ae2a08790871f08d0)
15a5da7ceSSimon GlassBinman Entry Documentation
25a5da7ceSSimon Glass===========================
35a5da7ceSSimon Glass
45a5da7ceSSimon GlassThis file describes the entry types supported by binman. These entry types can
55a5da7ceSSimon Glassbe placed in an image one by one to build up a final firmware image. It is
65a5da7ceSSimon Glassfairly easy to create new entry types. Just add a new file to the 'etype'
75a5da7ceSSimon Glassdirectory. You can use the existing entries as examples.
85a5da7ceSSimon Glass
95a5da7ceSSimon GlassNote that some entries are subclasses of others, using and extending their
105a5da7ceSSimon Glassfeatures to produce new behaviours.
115a5da7ceSSimon Glass
125a5da7ceSSimon Glass
135a5da7ceSSimon Glass
145a5da7ceSSimon GlassEntry: blob: Entry containing an arbitrary binary blob
155a5da7ceSSimon Glass------------------------------------------------------
165a5da7ceSSimon Glass
175a5da7ceSSimon GlassNote: This should not be used by itself. It is normally used as a parent
185a5da7ceSSimon Glassclass by other entry types.
195a5da7ceSSimon Glass
205a5da7ceSSimon GlassProperties / Entry arguments:
215a5da7ceSSimon Glass    - filename: Filename of file to read into entry
2283d73c2fSSimon Glass    - compress: Compression algorithm to use:
2383d73c2fSSimon Glass        none: No compression
2483d73c2fSSimon Glass        lz4: Use lz4 compression (via 'lz4' command-line utility)
255a5da7ceSSimon Glass
265a5da7ceSSimon GlassThis entry reads data from a file and places it in the entry. The
275a5da7ceSSimon Glassdefault filename is often specified specified by the subclass. See for
285a5da7ceSSimon Glassexample the 'u_boot' entry which provides the filename 'u-boot.bin'.
295a5da7ceSSimon Glass
3083d73c2fSSimon GlassIf compression is enabled, an extra 'uncomp-size' property is written to
3183d73c2fSSimon Glassthe node (if enabled with -u) which provides the uncompressed size of the
3283d73c2fSSimon Glassdata.
3383d73c2fSSimon Glass
345a5da7ceSSimon Glass
355a5da7ceSSimon Glass
366ed45ba0SSimon GlassEntry: blob-dtb: A blob that holds a device tree
376ed45ba0SSimon Glass------------------------------------------------
386ed45ba0SSimon Glass
396ed45ba0SSimon GlassThis is a blob containing a device tree. The contents of the blob are
406ed45ba0SSimon Glassobtained from the list of available device-tree files, managed by the
416ed45ba0SSimon Glass'state' module.
426ed45ba0SSimon Glass
435a5da7ceSSimon Glass
445a5da7ceSSimon Glass
45ec127af0SSimon GlassEntry: blob-named-by-arg: A blob entry which gets its filename property from its subclass
46ec127af0SSimon Glass-----------------------------------------------------------------------------------------
47ec127af0SSimon Glass
48ec127af0SSimon GlassProperties / Entry arguments:
49ec127af0SSimon Glass    - <xxx>-path: Filename containing the contents of this entry (optional,
50ec127af0SSimon Glass        defaults to 0)
51ec127af0SSimon Glass
52ec127af0SSimon Glasswhere <xxx> is the blob_fname argument to the constructor.
53ec127af0SSimon Glass
54ec127af0SSimon GlassThis entry cannot be used directly. Instead, it is used as a parent class
55ec127af0SSimon Glassfor another entry, which defined blob_fname. This parameter is used to
56ec127af0SSimon Glassset the entry-arg or property containing the filename. The entry-arg or
57ec127af0SSimon Glassproperty is in turn used to set the actual filename.
58ec127af0SSimon Glass
59ec127af0SSimon GlassSee cros_ec_rw for an example of this.
60ec127af0SSimon Glass
61ec127af0SSimon Glass
62ec127af0SSimon Glass
63ec127af0SSimon GlassEntry: cros-ec-rw: A blob entry which contains a Chromium OS read-write EC image
64ec127af0SSimon Glass--------------------------------------------------------------------------------
65ec127af0SSimon Glass
66ec127af0SSimon GlassProperties / Entry arguments:
67ec127af0SSimon Glass    - cros-ec-rw-path: Filename containing the EC image
68ec127af0SSimon Glass
69ec127af0SSimon GlassThis entry holds a Chromium OS EC (embedded controller) image, for use in
70ec127af0SSimon Glassupdating the EC on startup via software sync.
71ec127af0SSimon Glass
72ec127af0SSimon Glass
73ec127af0SSimon Glass
740a98b28bSSimon GlassEntry: files: Entry containing a set of files
750a98b28bSSimon Glass---------------------------------------------
760a98b28bSSimon Glass
770a98b28bSSimon GlassProperties / Entry arguments:
780a98b28bSSimon Glass    - pattern: Filename pattern to match the files to include
790a98b28bSSimon Glass    - compress: Compression algorithm to use:
800a98b28bSSimon Glass        none: No compression
810a98b28bSSimon Glass        lz4: Use lz4 compression (via 'lz4' command-line utility)
820a98b28bSSimon Glass
830a98b28bSSimon GlassThis entry reads a number of files and places each in a separate sub-entry
840a98b28bSSimon Glasswithin this entry. To access these you need to enable device-tree updates
850a98b28bSSimon Glassat run-time so you can obtain the file positions.
860a98b28bSSimon Glass
870a98b28bSSimon Glass
880a98b28bSSimon Glass
893af8e49cSSimon GlassEntry: fill: An entry which is filled to a particular byte value
903af8e49cSSimon Glass----------------------------------------------------------------
913af8e49cSSimon Glass
923af8e49cSSimon GlassProperties / Entry arguments:
933af8e49cSSimon Glass    - fill-byte: Byte to use to fill the entry
943af8e49cSSimon Glass
953af8e49cSSimon GlassNote that the size property must be set since otherwise this entry does not
963af8e49cSSimon Glassknow how large it should be.
973af8e49cSSimon Glass
983af8e49cSSimon GlassYou can often achieve the same effect using the pad-byte property of the
993af8e49cSSimon Glassoverall image, in that the space between entries will then be padded with
1003af8e49cSSimon Glassthat byte. But this entry is sometimes useful for explicitly setting the
1013af8e49cSSimon Glassbyte value of a region.
1023af8e49cSSimon Glass
1033af8e49cSSimon Glass
1043af8e49cSSimon Glass
10511e36cceSSimon GlassEntry: fmap: An entry which contains an Fmap section
10611e36cceSSimon Glass----------------------------------------------------
10711e36cceSSimon Glass
10811e36cceSSimon GlassProperties / Entry arguments:
10911e36cceSSimon Glass    None
11011e36cceSSimon Glass
11111e36cceSSimon GlassFMAP is a simple format used by flashrom, an open-source utility for
11211e36cceSSimon Glassreading and writing the SPI flash, typically on x86 CPUs. The format
11311e36cceSSimon Glassprovides flashrom with a list of areas, so it knows what it in the flash.
11411e36cceSSimon GlassIt can then read or write just a single area, instead of the whole flash.
11511e36cceSSimon Glass
11611e36cceSSimon GlassThe format is defined by the flashrom project, in the file lib/fmap.h -
11711e36cceSSimon Glasssee www.flashrom.org/Flashrom for more information.
11811e36cceSSimon Glass
11911e36cceSSimon GlassWhen used, this entry will be populated with an FMAP which reflects the
12011e36cceSSimon Glassentries in the current image. Note that any hierarchy is squashed, since
12111e36cceSSimon GlassFMAP does not support this.
12211e36cceSSimon Glass
12311e36cceSSimon Glass
12411e36cceSSimon Glass
1250ef87aa3SSimon GlassEntry: gbb: An entry which contains a Chromium OS Google Binary Block
1260ef87aa3SSimon Glass---------------------------------------------------------------------
1270ef87aa3SSimon Glass
1280ef87aa3SSimon GlassProperties / Entry arguments:
1290ef87aa3SSimon Glass    - hardware-id: Hardware ID to use for this build (a string)
1300ef87aa3SSimon Glass    - keydir: Directory containing the public keys to use
1310ef87aa3SSimon Glass    - bmpblk: Filename containing images used by recovery
1320ef87aa3SSimon Glass
1330ef87aa3SSimon GlassChromium OS uses a GBB to store various pieces of information, in particular
1340ef87aa3SSimon Glassthe root and recovery keys that are used to verify the boot process. Some
1350ef87aa3SSimon Glassmore details are here:
1360ef87aa3SSimon Glass
1370ef87aa3SSimon Glass    https://www.chromium.org/chromium-os/firmware-porting-guide/2-concepts
1380ef87aa3SSimon Glass
1390ef87aa3SSimon Glassbut note that the page dates from 2013 so is quite out of date. See
1400ef87aa3SSimon GlassREADME.chromium for how to obtain the required keys and tools.
1410ef87aa3SSimon Glass
1420ef87aa3SSimon Glass
1430ef87aa3SSimon Glass
1445a5da7ceSSimon GlassEntry: intel-cmc: Entry containing an Intel Chipset Micro Code (CMC) file
1455a5da7ceSSimon Glass-------------------------------------------------------------------------
1465a5da7ceSSimon Glass
1475a5da7ceSSimon GlassProperties / Entry arguments:
1485a5da7ceSSimon Glass    - filename: Filename of file to read into entry
1495a5da7ceSSimon Glass
1505a5da7ceSSimon GlassThis file contains microcode for some devices in a special format. An
1515a5da7ceSSimon Glassexample filename is 'Microcode/C0_22211.BIN'.
1525a5da7ceSSimon Glass
1535a5da7ceSSimon GlassSee README.x86 for information about x86 binary blobs.
1545a5da7ceSSimon Glass
1555a5da7ceSSimon Glass
1565a5da7ceSSimon Glass
1575a5da7ceSSimon GlassEntry: intel-descriptor: Intel flash descriptor block (4KB)
1585a5da7ceSSimon Glass-----------------------------------------------------------
1595a5da7ceSSimon Glass
1605a5da7ceSSimon GlassProperties / Entry arguments:
1615a5da7ceSSimon Glass    filename: Filename of file containing the descriptor. This is typically
1625a5da7ceSSimon Glass        a 4KB binary file, sometimes called 'descriptor.bin'
1635a5da7ceSSimon Glass
1645a5da7ceSSimon GlassThis entry is placed at the start of flash and provides information about
1655a5da7ceSSimon Glassthe SPI flash regions. In particular it provides the base address and
1665a5da7ceSSimon Glasssize of the ME (Management Engine) region, allowing us to place the ME
1675a5da7ceSSimon Glassbinary in the right place.
1685a5da7ceSSimon Glass
1695a5da7ceSSimon GlassWith this entry in your image, the position of the 'intel-me' entry will be
1705a5da7ceSSimon Glassfixed in the image, which avoids you needed to specify an offset for that
1715a5da7ceSSimon Glassregion. This is useful, because it is not possible to change the position
1725a5da7ceSSimon Glassof the ME region without updating the descriptor.
1735a5da7ceSSimon Glass
1745a5da7ceSSimon GlassSee README.x86 for information about x86 binary blobs.
1755a5da7ceSSimon Glass
1765a5da7ceSSimon Glass
1775a5da7ceSSimon Glass
1785a5da7ceSSimon GlassEntry: intel-fsp: Entry containing an Intel Firmware Support Package (FSP) file
1795a5da7ceSSimon Glass-------------------------------------------------------------------------------
1805a5da7ceSSimon Glass
1815a5da7ceSSimon GlassProperties / Entry arguments:
1825a5da7ceSSimon Glass    - filename: Filename of file to read into entry
1835a5da7ceSSimon Glass
1845a5da7ceSSimon GlassThis file contains binary blobs which are used on some devices to make the
1855a5da7ceSSimon Glassplatform work. U-Boot executes this code since it is not possible to set up
1865a5da7ceSSimon Glassthe hardware using U-Boot open-source code. Documentation is typically not
1875a5da7ceSSimon Glassavailable in sufficient detail to allow this.
1885a5da7ceSSimon Glass
1895a5da7ceSSimon GlassAn example filename is 'FSP/QUEENSBAY_FSP_GOLD_001_20-DECEMBER-2013.fd'
1905a5da7ceSSimon Glass
1915a5da7ceSSimon GlassSee README.x86 for information about x86 binary blobs.
1925a5da7ceSSimon Glass
1935a5da7ceSSimon Glass
1945a5da7ceSSimon Glass
1955a5da7ceSSimon GlassEntry: intel-me: Entry containing an Intel Management Engine (ME) file
1965a5da7ceSSimon Glass----------------------------------------------------------------------
1975a5da7ceSSimon Glass
1985a5da7ceSSimon GlassProperties / Entry arguments:
1995a5da7ceSSimon Glass    - filename: Filename of file to read into entry
2005a5da7ceSSimon Glass
2015a5da7ceSSimon GlassThis file contains code used by the SoC that is required to make it work.
2025a5da7ceSSimon GlassThe Management Engine is like a background task that runs things that are
2035a5da7ceSSimon Glassnot clearly documented, but may include keyboard, deplay and network
2045a5da7ceSSimon Glassaccess. For platform that use ME it is not possible to disable it. U-Boot
2055a5da7ceSSimon Glassdoes not directly execute code in the ME binary.
2065a5da7ceSSimon Glass
2075a5da7ceSSimon GlassA typical filename is 'me.bin'.
2085a5da7ceSSimon Glass
2095a5da7ceSSimon GlassSee README.x86 for information about x86 binary blobs.
2105a5da7ceSSimon Glass
2115a5da7ceSSimon Glass
2125a5da7ceSSimon Glass
2135a5da7ceSSimon GlassEntry: intel-mrc: Entry containing an Intel Memory Reference Code (MRC) file
2145a5da7ceSSimon Glass----------------------------------------------------------------------------
2155a5da7ceSSimon Glass
2165a5da7ceSSimon GlassProperties / Entry arguments:
2175a5da7ceSSimon Glass    - filename: Filename of file to read into entry
2185a5da7ceSSimon Glass
2195a5da7ceSSimon GlassThis file contains code for setting up the SDRAM on some Intel systems. This
2205a5da7ceSSimon Glassis executed by U-Boot when needed early during startup. A typical filename
2215a5da7ceSSimon Glassis 'mrc.bin'.
2225a5da7ceSSimon Glass
2235a5da7ceSSimon GlassSee README.x86 for information about x86 binary blobs.
2245a5da7ceSSimon Glass
2255a5da7ceSSimon Glass
2265a5da7ceSSimon Glass
2275a5da7ceSSimon GlassEntry: intel-vbt: Entry containing an Intel Video BIOS Table (VBT) file
2285a5da7ceSSimon Glass-----------------------------------------------------------------------
2295a5da7ceSSimon Glass
2305a5da7ceSSimon GlassProperties / Entry arguments:
2315a5da7ceSSimon Glass    - filename: Filename of file to read into entry
2325a5da7ceSSimon Glass
2335a5da7ceSSimon GlassThis file contains code that sets up the integrated graphics subsystem on
2345a5da7ceSSimon Glasssome Intel SoCs. U-Boot executes this when the display is started up.
2355a5da7ceSSimon Glass
2365a5da7ceSSimon GlassSee README.x86 for information about Intel binary blobs.
2375a5da7ceSSimon Glass
2385a5da7ceSSimon Glass
2395a5da7ceSSimon Glass
2405a5da7ceSSimon GlassEntry: intel-vga: Entry containing an Intel Video Graphics Adaptor (VGA) file
2415a5da7ceSSimon Glass-----------------------------------------------------------------------------
2425a5da7ceSSimon Glass
2435a5da7ceSSimon GlassProperties / Entry arguments:
2445a5da7ceSSimon Glass    - filename: Filename of file to read into entry
2455a5da7ceSSimon Glass
2465a5da7ceSSimon GlassThis file contains code that sets up the integrated graphics subsystem on
2475a5da7ceSSimon Glasssome Intel SoCs. U-Boot executes this when the display is started up.
2485a5da7ceSSimon Glass
2495a5da7ceSSimon GlassThis is similar to the VBT file but in a different format.
2505a5da7ceSSimon Glass
2515a5da7ceSSimon GlassSee README.x86 for information about Intel binary blobs.
2525a5da7ceSSimon Glass
2535a5da7ceSSimon Glass
2545a5da7ceSSimon Glass
2559d368f32SJagdish GediyaEntry: powerpc-mpc85xx-bootpg-resetvec: PowerPC mpc85xx bootpg + resetvec code for U-Boot
2569d368f32SJagdish Gediya-----------------------------------------------------------------------------------------
2579d368f32SJagdish Gediya
2589d368f32SJagdish GediyaProperties / Entry arguments:
2599d368f32SJagdish Gediya    - filename: Filename of u-boot-br.bin (default 'u-boot-br.bin')
2609d368f32SJagdish Gediya
2619d368f32SJagdish GediyaThis enrty is valid for PowerPC mpc85xx cpus. This entry holds
2629d368f32SJagdish Gediya'bootpg + resetvec' code for PowerPC mpc85xx CPUs which needs to be
2639d368f32SJagdish Gediyaplaced at offset 'RESET_VECTOR_ADDRESS - 0xffc'.
2649d368f32SJagdish Gediya
2659d368f32SJagdish Gediya
2669d368f32SJagdish Gediya
2675a5da7ceSSimon GlassEntry: section: Entry that contains other entries
2685a5da7ceSSimon Glass-------------------------------------------------
2695a5da7ceSSimon Glass
2705a5da7ceSSimon GlassProperties / Entry arguments: (see binman README for more information)
2715a5da7ceSSimon Glass    - size: Size of section in bytes
2725a5da7ceSSimon Glass    - align-size: Align size to a particular power of two
2735a5da7ceSSimon Glass    - pad-before: Add padding before the entry
2745a5da7ceSSimon Glass    - pad-after: Add padding after the entry
2755a5da7ceSSimon Glass    - pad-byte: Pad byte to use when padding
2765a5da7ceSSimon Glass    - sort-by-offset: Reorder the entries by offset
2775a5da7ceSSimon Glass    - end-at-4gb: Used to build an x86 ROM which ends at 4GB (2^32)
2785a5da7ceSSimon Glass    - name-prefix: Adds a prefix to the name of every entry in the section
2795a5da7ceSSimon Glass        when writing out the map
2805a5da7ceSSimon Glass
2815a5da7ceSSimon GlassA section is an entry which can contain other entries, thus allowing
2825a5da7ceSSimon Glasshierarchical images to be created. See 'Sections and hierarchical images'
2835a5da7ceSSimon Glassin the binman README for more information.
2845a5da7ceSSimon Glass
2855a5da7ceSSimon Glass
2865a5da7ceSSimon Glass
2875a5da7ceSSimon GlassEntry: text: An entry which contains text
2885a5da7ceSSimon Glass-----------------------------------------
2895a5da7ceSSimon Glass
2905a5da7ceSSimon GlassThe text can be provided either in the node itself or by a command-line
2915a5da7ceSSimon Glassargument. There is a level of indirection to allow multiple text strings
2925a5da7ceSSimon Glassand sharing of text.
2935a5da7ceSSimon Glass
2945a5da7ceSSimon GlassProperties / Entry arguments:
2955a5da7ceSSimon Glass    text-label: The value of this string indicates the property / entry-arg
2965a5da7ceSSimon Glass        that contains the string to place in the entry
2975a5da7ceSSimon Glass    <xxx> (actual name is the value of text-label): contains the string to
2985a5da7ceSSimon Glass        place in the entry.
2995a5da7ceSSimon Glass
3005a5da7ceSSimon GlassExample node:
3015a5da7ceSSimon Glass
3025a5da7ceSSimon Glass    text {
3035a5da7ceSSimon Glass        size = <50>;
3045a5da7ceSSimon Glass        text-label = "message";
3055a5da7ceSSimon Glass    };
3065a5da7ceSSimon Glass
3075a5da7ceSSimon GlassYou can then use:
3085a5da7ceSSimon Glass
3095a5da7ceSSimon Glass    binman -amessage="this is my message"
3105a5da7ceSSimon Glass
3115a5da7ceSSimon Glassand binman will insert that string into the entry.
3125a5da7ceSSimon Glass
3135a5da7ceSSimon GlassIt is also possible to put the string directly in the node:
3145a5da7ceSSimon Glass
3155a5da7ceSSimon Glass    text {
3165a5da7ceSSimon Glass        size = <8>;
3175a5da7ceSSimon Glass        text-label = "message";
3185a5da7ceSSimon Glass        message = "a message directly in the node"
3195a5da7ceSSimon Glass    };
3205a5da7ceSSimon Glass
3215a5da7ceSSimon GlassThe text is not itself nul-terminated. This can be achieved, if required,
3225a5da7ceSSimon Glassby setting the size of the entry to something larger than the text.
3235a5da7ceSSimon Glass
3245a5da7ceSSimon Glass
3255a5da7ceSSimon Glass
3265a5da7ceSSimon GlassEntry: u-boot: U-Boot flat binary
3275a5da7ceSSimon Glass---------------------------------
3285a5da7ceSSimon Glass
3295a5da7ceSSimon GlassProperties / Entry arguments:
3305a5da7ceSSimon Glass    - filename: Filename of u-boot.bin (default 'u-boot.bin')
3315a5da7ceSSimon Glass
3325a5da7ceSSimon GlassThis is the U-Boot binary, containing relocation information to allow it
3335a5da7ceSSimon Glassto relocate itself at runtime. The binary typically includes a device tree
3345a5da7ceSSimon Glassblob at the end of it. Use u_boot_nodtb if you want to package the device
3355a5da7ceSSimon Glasstree separately.
3365a5da7ceSSimon Glass
3375a5da7ceSSimon GlassU-Boot can access binman symbols at runtime. See:
3385a5da7ceSSimon Glass
3395a5da7ceSSimon Glass    'Access to binman entry offsets at run time (fdt)'
3405a5da7ceSSimon Glass
3415a5da7ceSSimon Glassin the binman README for more information.
3425a5da7ceSSimon Glass
3435a5da7ceSSimon Glass
3445a5da7ceSSimon Glass
3455a5da7ceSSimon GlassEntry: u-boot-dtb: U-Boot device tree
3465a5da7ceSSimon Glass-------------------------------------
3475a5da7ceSSimon Glass
3485a5da7ceSSimon GlassProperties / Entry arguments:
3495a5da7ceSSimon Glass    - filename: Filename of u-boot.dtb (default 'u-boot.dtb')
3505a5da7ceSSimon Glass
3515a5da7ceSSimon GlassThis is the U-Boot device tree, containing configuration information for
3525a5da7ceSSimon GlassU-Boot. U-Boot needs this to know what devices are present and which drivers
3535a5da7ceSSimon Glassto activate.
3545a5da7ceSSimon Glass
3556ed45ba0SSimon GlassNote: This is mostly an internal entry type, used by others. This allows
3566ed45ba0SSimon Glassbinman to know which entries contain a device tree.
3576ed45ba0SSimon Glass
3585a5da7ceSSimon Glass
3595a5da7ceSSimon Glass
3605a5da7ceSSimon GlassEntry: u-boot-dtb-with-ucode: A U-Boot device tree file, with the microcode removed
3615a5da7ceSSimon Glass-----------------------------------------------------------------------------------
3625a5da7ceSSimon Glass
3635a5da7ceSSimon GlassProperties / Entry arguments:
3645a5da7ceSSimon Glass    - filename: Filename of u-boot.dtb (default 'u-boot.dtb')
3655a5da7ceSSimon Glass
3665a5da7ceSSimon GlassSee Entry_u_boot_ucode for full details of the three entries involved in
3675a5da7ceSSimon Glassthis process. This entry provides the U-Boot device-tree file, which
3685a5da7ceSSimon Glasscontains the microcode. If the microcode is not being collated into one
3695a5da7ceSSimon Glassplace then the offset and size of the microcode is recorded by this entry,
3705a5da7ceSSimon Glassfor use by u_boot_with_ucode_ptr. If it is being collated, then this
3715a5da7ceSSimon Glassentry deletes the microcode from the device tree (to save space) and makes
3725a5da7ceSSimon Glassit available to u_boot_ucode.
3735a5da7ceSSimon Glass
3745a5da7ceSSimon Glass
3755a5da7ceSSimon Glass
376*fe1ae3ecSSimon GlassEntry: u-boot-elf: U-Boot ELF image
377*fe1ae3ecSSimon Glass-----------------------------------
378*fe1ae3ecSSimon Glass
379*fe1ae3ecSSimon GlassProperties / Entry arguments:
380*fe1ae3ecSSimon Glass    - filename: Filename of u-boot (default 'u-boot')
381*fe1ae3ecSSimon Glass
382*fe1ae3ecSSimon GlassThis is the U-Boot ELF image. It does not include a device tree but can be
383*fe1ae3ecSSimon Glassrelocated to any address for execution.
384*fe1ae3ecSSimon Glass
385*fe1ae3ecSSimon Glass
386*fe1ae3ecSSimon Glass
3875a5da7ceSSimon GlassEntry: u-boot-img: U-Boot legacy image
3885a5da7ceSSimon Glass--------------------------------------
3895a5da7ceSSimon Glass
3905a5da7ceSSimon GlassProperties / Entry arguments:
3915a5da7ceSSimon Glass    - filename: Filename of u-boot.img (default 'u-boot.img')
3925a5da7ceSSimon Glass
3935a5da7ceSSimon GlassThis is the U-Boot binary as a packaged image, in legacy format. It has a
3945a5da7ceSSimon Glassheader which allows it to be loaded at the correct address for execution.
3955a5da7ceSSimon Glass
3965a5da7ceSSimon GlassYou should use FIT (Flat Image Tree) instead of the legacy image for new
3975a5da7ceSSimon Glassapplications.
3985a5da7ceSSimon Glass
3995a5da7ceSSimon Glass
4005a5da7ceSSimon Glass
4015a5da7ceSSimon GlassEntry: u-boot-nodtb: U-Boot flat binary without device tree appended
4025a5da7ceSSimon Glass--------------------------------------------------------------------
4035a5da7ceSSimon Glass
4045a5da7ceSSimon GlassProperties / Entry arguments:
4055a5da7ceSSimon Glass    - filename: Filename of u-boot.bin (default 'u-boot-nodtb.bin')
4065a5da7ceSSimon Glass
4075a5da7ceSSimon GlassThis is the U-Boot binary, containing relocation information to allow it
4085a5da7ceSSimon Glassto relocate itself at runtime. It does not include a device tree blob at
4095a5da7ceSSimon Glassthe end of it so normally cannot work without it. You can add a u_boot_dtb
4105a5da7ceSSimon Glassentry after this one, or use a u_boot entry instead (which contains both
4115a5da7ceSSimon GlassU-Boot and the device tree).
4125a5da7ceSSimon Glass
4135a5da7ceSSimon Glass
4145a5da7ceSSimon Glass
4155a5da7ceSSimon GlassEntry: u-boot-spl: U-Boot SPL binary
4165a5da7ceSSimon Glass------------------------------------
4175a5da7ceSSimon Glass
4185a5da7ceSSimon GlassProperties / Entry arguments:
4195a5da7ceSSimon Glass    - filename: Filename of u-boot-spl.bin (default 'spl/u-boot-spl.bin')
4205a5da7ceSSimon Glass
4215a5da7ceSSimon GlassThis is the U-Boot SPL (Secondary Program Loader) binary. This is a small
4225a5da7ceSSimon Glassbinary which loads before U-Boot proper, typically into on-chip SRAM. It is
4235a5da7ceSSimon Glassresponsible for locating, loading and jumping to U-Boot. Note that SPL is
4245a5da7ceSSimon Glassnot relocatable so must be loaded to the correct address in SRAM, or written
425b8ef5b6bSSimon Glassto run from the correct address if direct flash execution is possible (e.g.
4265a5da7ceSSimon Glasson x86 devices).
4275a5da7ceSSimon Glass
4285a5da7ceSSimon GlassSPL can access binman symbols at runtime. See:
4295a5da7ceSSimon Glass
4305a5da7ceSSimon Glass    'Access to binman entry offsets at run time (symbols)'
4315a5da7ceSSimon Glass
4325a5da7ceSSimon Glassin the binman README for more information.
4335a5da7ceSSimon Glass
4345a5da7ceSSimon GlassThe ELF file 'spl/u-boot-spl' must also be available for this to work, since
4355a5da7ceSSimon Glassbinman uses that to look up symbols to write into the SPL binary.
4365a5da7ceSSimon Glass
4375a5da7ceSSimon Glass
4385a5da7ceSSimon Glass
4395a5da7ceSSimon GlassEntry: u-boot-spl-bss-pad: U-Boot SPL binary padded with a BSS region
4405a5da7ceSSimon Glass---------------------------------------------------------------------
4415a5da7ceSSimon Glass
4425a5da7ceSSimon GlassProperties / Entry arguments:
4435a5da7ceSSimon Glass    None
4445a5da7ceSSimon Glass
4455a5da7ceSSimon GlassThis is similar to u_boot_spl except that padding is added after the SPL
4465a5da7ceSSimon Glassbinary to cover the BSS (Block Started by Symbol) region. This region holds
4475a5da7ceSSimon Glassthe various used by SPL. It is set to 0 by SPL when it starts up. If you
4485a5da7ceSSimon Glasswant to append data to the SPL image (such as a device tree file), you must
4495a5da7ceSSimon Glasspad out the BSS region to avoid the data overlapping with U-Boot variables.
4505a5da7ceSSimon GlassThis entry is useful in that case. It automatically pads out the entry size
4515a5da7ceSSimon Glassto cover both the code, data and BSS.
4525a5da7ceSSimon Glass
4535a5da7ceSSimon GlassThe ELF file 'spl/u-boot-spl' must also be available for this to work, since
4545a5da7ceSSimon Glassbinman uses that to look up the BSS address.
4555a5da7ceSSimon Glass
4565a5da7ceSSimon Glass
4575a5da7ceSSimon Glass
4585a5da7ceSSimon GlassEntry: u-boot-spl-dtb: U-Boot SPL device tree
4595a5da7ceSSimon Glass---------------------------------------------
4605a5da7ceSSimon Glass
4615a5da7ceSSimon GlassProperties / Entry arguments:
4625a5da7ceSSimon Glass    - filename: Filename of u-boot.dtb (default 'spl/u-boot-spl.dtb')
4635a5da7ceSSimon Glass
4645a5da7ceSSimon GlassThis is the SPL device tree, containing configuration information for
4655a5da7ceSSimon GlassSPL. SPL needs this to know what devices are present and which drivers
4665a5da7ceSSimon Glassto activate.
4675a5da7ceSSimon Glass
4685a5da7ceSSimon Glass
4695a5da7ceSSimon Glass
470*fe1ae3ecSSimon GlassEntry: u-boot-spl-elf: U-Boot SPL ELF image
471*fe1ae3ecSSimon Glass-------------------------------------------
472*fe1ae3ecSSimon Glass
473*fe1ae3ecSSimon GlassProperties / Entry arguments:
474*fe1ae3ecSSimon Glass    - filename: Filename of SPL u-boot (default 'spl/u-boot')
475*fe1ae3ecSSimon Glass
476*fe1ae3ecSSimon GlassThis is the U-Boot SPL ELF image. It does not include a device tree but can
477*fe1ae3ecSSimon Glassbe relocated to any address for execution.
478*fe1ae3ecSSimon Glass
479*fe1ae3ecSSimon Glass
480*fe1ae3ecSSimon Glass
4815a5da7ceSSimon GlassEntry: u-boot-spl-nodtb: SPL binary without device tree appended
4825a5da7ceSSimon Glass----------------------------------------------------------------
4835a5da7ceSSimon Glass
4845a5da7ceSSimon GlassProperties / Entry arguments:
4855a5da7ceSSimon Glass    - filename: Filename of spl/u-boot-spl-nodtb.bin (default
4865a5da7ceSSimon Glass        'spl/u-boot-spl-nodtb.bin')
4875a5da7ceSSimon Glass
4885a5da7ceSSimon GlassThis is the U-Boot SPL binary, It does not include a device tree blob at
4895a5da7ceSSimon Glassthe end of it so may not be able to work without it, assuming SPL needs
4905a5da7ceSSimon Glassa device tree to operation on your platform. You can add a u_boot_spl_dtb
4915a5da7ceSSimon Glassentry after this one, or use a u_boot_spl entry instead (which contains
4925a5da7ceSSimon Glassboth SPL and the device tree).
4935a5da7ceSSimon Glass
4945a5da7ceSSimon Glass
4955a5da7ceSSimon Glass
4965a5da7ceSSimon GlassEntry: u-boot-spl-with-ucode-ptr: U-Boot SPL with embedded microcode pointer
4975a5da7ceSSimon Glass----------------------------------------------------------------------------
4985a5da7ceSSimon Glass
499f0253635SSimon GlassThis is used when SPL must set up the microcode for U-Boot.
500f0253635SSimon Glass
5015a5da7ceSSimon GlassSee Entry_u_boot_ucode for full details of the entries involved in this
5025a5da7ceSSimon Glassprocess.
5035a5da7ceSSimon Glass
5045a5da7ceSSimon Glass
5055a5da7ceSSimon Glass
506b8ef5b6bSSimon GlassEntry: u-boot-tpl: U-Boot TPL binary
507b8ef5b6bSSimon Glass------------------------------------
508b8ef5b6bSSimon Glass
509b8ef5b6bSSimon GlassProperties / Entry arguments:
510b8ef5b6bSSimon Glass    - filename: Filename of u-boot-tpl.bin (default 'tpl/u-boot-tpl.bin')
511b8ef5b6bSSimon Glass
512b8ef5b6bSSimon GlassThis is the U-Boot TPL (Tertiary Program Loader) binary. This is a small
513b8ef5b6bSSimon Glassbinary which loads before SPL, typically into on-chip SRAM. It is
514b8ef5b6bSSimon Glassresponsible for locating, loading and jumping to SPL, the next-stage
515b8ef5b6bSSimon Glassloader. Note that SPL is not relocatable so must be loaded to the correct
516b8ef5b6bSSimon Glassaddress in SRAM, or written to run from the correct address if direct
517b8ef5b6bSSimon Glassflash execution is possible (e.g. on x86 devices).
518b8ef5b6bSSimon Glass
519b8ef5b6bSSimon GlassSPL can access binman symbols at runtime. See:
520b8ef5b6bSSimon Glass
521b8ef5b6bSSimon Glass    'Access to binman entry offsets at run time (symbols)'
522b8ef5b6bSSimon Glass
523b8ef5b6bSSimon Glassin the binman README for more information.
524b8ef5b6bSSimon Glass
525b8ef5b6bSSimon GlassThe ELF file 'tpl/u-boot-tpl' must also be available for this to work, since
526b8ef5b6bSSimon Glassbinman uses that to look up symbols to write into the TPL binary.
527b8ef5b6bSSimon Glass
528b8ef5b6bSSimon Glass
529b8ef5b6bSSimon Glass
530b8ef5b6bSSimon GlassEntry: u-boot-tpl-dtb: U-Boot TPL device tree
531b8ef5b6bSSimon Glass---------------------------------------------
532b8ef5b6bSSimon Glass
533b8ef5b6bSSimon GlassProperties / Entry arguments:
534b8ef5b6bSSimon Glass    - filename: Filename of u-boot.dtb (default 'tpl/u-boot-tpl.dtb')
535b8ef5b6bSSimon Glass
536b8ef5b6bSSimon GlassThis is the TPL device tree, containing configuration information for
537b8ef5b6bSSimon GlassTPL. TPL needs this to know what devices are present and which drivers
538b8ef5b6bSSimon Glassto activate.
539b8ef5b6bSSimon Glass
540b8ef5b6bSSimon Glass
541b8ef5b6bSSimon Glass
542f0253635SSimon GlassEntry: u-boot-tpl-dtb-with-ucode: U-Boot TPL with embedded microcode pointer
543f0253635SSimon Glass----------------------------------------------------------------------------
544f0253635SSimon Glass
545f0253635SSimon GlassThis is used when TPL must set up the microcode for U-Boot.
546f0253635SSimon Glass
547f0253635SSimon GlassSee Entry_u_boot_ucode for full details of the entries involved in this
548f0253635SSimon Glassprocess.
549f0253635SSimon Glass
550f0253635SSimon Glass
551f0253635SSimon Glass
552f0253635SSimon GlassEntry: u-boot-tpl-with-ucode-ptr: U-Boot TPL with embedded microcode pointer
553f0253635SSimon Glass----------------------------------------------------------------------------
554f0253635SSimon Glass
555f0253635SSimon GlassSee Entry_u_boot_ucode for full details of the entries involved in this
556f0253635SSimon Glassprocess.
557f0253635SSimon Glass
558f0253635SSimon Glass
559f0253635SSimon Glass
5605a5da7ceSSimon GlassEntry: u-boot-ucode: U-Boot microcode block
5615a5da7ceSSimon Glass-------------------------------------------
5625a5da7ceSSimon Glass
5635a5da7ceSSimon GlassProperties / Entry arguments:
5645a5da7ceSSimon Glass    None
5655a5da7ceSSimon Glass
5665a5da7ceSSimon GlassThe contents of this entry are filled in automatically by other entries
5675a5da7ceSSimon Glasswhich must also be in the image.
5685a5da7ceSSimon Glass
5695a5da7ceSSimon GlassU-Boot on x86 needs a single block of microcode. This is collected from
5705a5da7ceSSimon Glassthe various microcode update nodes in the device tree. It is also unable
5715a5da7ceSSimon Glassto read the microcode from the device tree on platforms that use FSP
5725a5da7ceSSimon Glass(Firmware Support Package) binaries, because the API requires that the
5735a5da7ceSSimon Glassmicrocode is supplied before there is any SRAM available to use (i.e.
5745a5da7ceSSimon Glassthe FSP sets up the SRAM / cache-as-RAM but does so in the call that
5755a5da7ceSSimon Glassrequires the microcode!). To keep things simple, all x86 platforms handle
5765a5da7ceSSimon Glassmicrocode the same way in U-Boot (even non-FSP platforms). This is that
5775a5da7ceSSimon Glassa table is placed at _dt_ucode_base_size containing the base address and
5785a5da7ceSSimon Glasssize of the microcode. This is either passed to the FSP (for FSP
5795a5da7ceSSimon Glassplatforms), or used to set up the microcode (for non-FSP platforms).
5805a5da7ceSSimon GlassThis all happens in the build system since it is the only way to get
5815a5da7ceSSimon Glassthe microcode into a single blob and accessible without SRAM.
5825a5da7ceSSimon Glass
5835a5da7ceSSimon GlassThere are two cases to handle. If there is only one microcode blob in
5845a5da7ceSSimon Glassthe device tree, then the ucode pointer it set to point to that. This
5855a5da7ceSSimon Glassentry (u-boot-ucode) is empty. If there is more than one update, then
5865a5da7ceSSimon Glassthis entry holds the concatenation of all updates, and the device tree
5875a5da7ceSSimon Glassentry (u-boot-dtb-with-ucode) is updated to remove the microcode. This
5885a5da7ceSSimon Glasslast step ensures that that the microcode appears in one contiguous
5895a5da7ceSSimon Glassblock in the image and is not unnecessarily duplicated in the device
5905a5da7ceSSimon Glasstree. It is referred to as 'collation' here.
5915a5da7ceSSimon Glass
5925a5da7ceSSimon GlassEntry types that have a part to play in handling microcode:
5935a5da7ceSSimon Glass
5945a5da7ceSSimon Glass    Entry_u_boot_with_ucode_ptr:
5955a5da7ceSSimon Glass        Contains u-boot-nodtb.bin (i.e. U-Boot without the device tree).
5965a5da7ceSSimon Glass        It updates it with the address and size of the microcode so that
5975a5da7ceSSimon Glass        U-Boot can find it early on start-up.
5985a5da7ceSSimon Glass    Entry_u_boot_dtb_with_ucode:
5995a5da7ceSSimon Glass        Contains u-boot.dtb. It stores the microcode in a
6005a5da7ceSSimon Glass        'self.ucode_data' property, which is then read by this class to
6015a5da7ceSSimon Glass        obtain the microcode if needed. If collation is performed, it
6025a5da7ceSSimon Glass        removes the microcode from the device tree.
6035a5da7ceSSimon Glass    Entry_u_boot_ucode:
6045a5da7ceSSimon Glass        This class. If collation is enabled it reads the microcode from
6055a5da7ceSSimon Glass        the Entry_u_boot_dtb_with_ucode entry, and uses it as the
6065a5da7ceSSimon Glass        contents of this entry.
6075a5da7ceSSimon Glass
6085a5da7ceSSimon Glass
6095a5da7ceSSimon Glass
6105a5da7ceSSimon GlassEntry: u-boot-with-ucode-ptr: U-Boot with embedded microcode pointer
6115a5da7ceSSimon Glass--------------------------------------------------------------------
6125a5da7ceSSimon Glass
6135a5da7ceSSimon GlassProperties / Entry arguments:
6145a5da7ceSSimon Glass    - filename: Filename of u-boot-nodtb.dtb (default 'u-boot-nodtb.dtb')
615f0693038SSimon Glass    - optional-ucode: boolean property to make microcode optional. If the
616f0693038SSimon Glass        u-boot.bin image does not include microcode, no error will
617f0693038SSimon Glass        be generated.
6185a5da7ceSSimon Glass
6195a5da7ceSSimon GlassSee Entry_u_boot_ucode for full details of the three entries involved in
6205a5da7ceSSimon Glassthis process. This entry updates U-Boot with the offset and size of the
6215a5da7ceSSimon Glassmicrocode, to allow early x86 boot code to find it without doing anything
6225a5da7ceSSimon Glasscomplicated. Otherwise it is the same as the u_boot entry.
6235a5da7ceSSimon Glass
6245a5da7ceSSimon Glass
6255a5da7ceSSimon Glass
62624d0d3c3SSimon GlassEntry: vblock: An entry which contains a Chromium OS verified boot block
62724d0d3c3SSimon Glass------------------------------------------------------------------------
62824d0d3c3SSimon Glass
62924d0d3c3SSimon GlassProperties / Entry arguments:
63024d0d3c3SSimon Glass    - keydir: Directory containing the public keys to use
63124d0d3c3SSimon Glass    - keyblock: Name of the key file to use (inside keydir)
63224d0d3c3SSimon Glass    - signprivate: Name of provide key file to use (inside keydir)
63324d0d3c3SSimon Glass    - version: Version number of the vblock (typically 1)
63424d0d3c3SSimon Glass    - kernelkey: Name of the kernel key to use (inside keydir)
63524d0d3c3SSimon Glass    - preamble-flags: Value of the vboot preamble flags (typically 0)
63624d0d3c3SSimon Glass
637a326b495SSimon GlassOutput files:
638a326b495SSimon Glass    - input.<unique_name> - input file passed to futility
639a326b495SSimon Glass    - vblock.<unique_name> - output file generated by futility (which is
640a326b495SSimon Glass        used as the entry contents)
641a326b495SSimon Glass
64224d0d3c3SSimon GlassChromium OS signs the read-write firmware and kernel, writing the signature
64324d0d3c3SSimon Glassin this block. This allows U-Boot to verify that the next firmware stage
64424d0d3c3SSimon Glassand kernel are genuine.
64524d0d3c3SSimon Glass
64624d0d3c3SSimon Glass
64724d0d3c3SSimon Glass
6485a5da7ceSSimon GlassEntry: x86-start16: x86 16-bit start-up code for U-Boot
6495a5da7ceSSimon Glass-------------------------------------------------------
6505a5da7ceSSimon Glass
6515a5da7ceSSimon GlassProperties / Entry arguments:
6525a5da7ceSSimon Glass    - filename: Filename of u-boot-x86-16bit.bin (default
6535a5da7ceSSimon Glass        'u-boot-x86-16bit.bin')
6545a5da7ceSSimon Glass
6555a5da7ceSSimon Glassx86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
6565a5da7ceSSimon Glassmust be placed at a particular address. This entry holds that code. It is
6575a5da7ceSSimon Glasstypically placed at offset CONFIG_SYS_X86_START16. The code is responsible
6585a5da7ceSSimon Glassfor changing to 32-bit mode and jumping to U-Boot's entry point, which
6595a5da7ceSSimon Glassrequires 32-bit mode (for 32-bit U-Boot).
6605a5da7ceSSimon Glass
6615a5da7ceSSimon GlassFor 64-bit U-Boot, the 'x86_start16_spl' entry type is used instead.
6625a5da7ceSSimon Glass
6635a5da7ceSSimon Glass
6645a5da7ceSSimon Glass
6655a5da7ceSSimon GlassEntry: x86-start16-spl: x86 16-bit start-up code for SPL
6665a5da7ceSSimon Glass--------------------------------------------------------
6675a5da7ceSSimon Glass
6685a5da7ceSSimon GlassProperties / Entry arguments:
6695a5da7ceSSimon Glass    - filename: Filename of spl/u-boot-x86-16bit-spl.bin (default
6705a5da7ceSSimon Glass        'spl/u-boot-x86-16bit-spl.bin')
6715a5da7ceSSimon Glass
6725a5da7ceSSimon Glassx86 CPUs start up in 16-bit mode, even if they are 64-bit CPUs. This code
6735a5da7ceSSimon Glassmust be placed at a particular address. This entry holds that code. It is
6745a5da7ceSSimon Glasstypically placed at offset CONFIG_SYS_X86_START16. The code is responsible
6755a5da7ceSSimon Glassfor changing to 32-bit mode and starting SPL, which in turn changes to
6765a5da7ceSSimon Glass64-bit mode and jumps to U-Boot (for 64-bit U-Boot).
6775a5da7ceSSimon Glass
6785a5da7ceSSimon GlassFor 32-bit U-Boot, the 'x86_start16' entry type is used instead.
6795a5da7ceSSimon Glass
6805a5da7ceSSimon Glass
6815a5da7ceSSimon Glass
68235b384cbSSimon GlassEntry: x86-start16-tpl: x86 16-bit start-up code for TPL
68335b384cbSSimon Glass--------------------------------------------------------
68435b384cbSSimon Glass
68535b384cbSSimon GlassProperties / Entry arguments:
68635b384cbSSimon Glass    - filename: Filename of tpl/u-boot-x86-16bit-tpl.bin (default
68735b384cbSSimon Glass        'tpl/u-boot-x86-16bit-tpl.bin')
68835b384cbSSimon Glass
68935b384cbSSimon Glassx86 CPUs start up in 16-bit mode, even if they are 64-bit CPUs. This code
69035b384cbSSimon Glassmust be placed at a particular address. This entry holds that code. It is
69135b384cbSSimon Glasstypically placed at offset CONFIG_SYS_X86_START16. The code is responsible
69235b384cbSSimon Glassfor changing to 32-bit mode and starting TPL, which in turn jumps to SPL.
69335b384cbSSimon Glass
69435b384cbSSimon GlassIf TPL is not being used, the 'x86_start16_spl or 'x86_start16' entry types
69535b384cbSSimon Glassmay be used instead.
69635b384cbSSimon Glass
69735b384cbSSimon Glass
69835b384cbSSimon Glass
699