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 436ed45ba0SSimon Glass 446ed45ba0SSimon 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 74*0a98b28bSSimon GlassEntry: files: Entry containing a set of files 75*0a98b28bSSimon Glass--------------------------------------------- 76*0a98b28bSSimon Glass 77*0a98b28bSSimon GlassProperties / Entry arguments: 78*0a98b28bSSimon Glass - pattern: Filename pattern to match the files to include 79*0a98b28bSSimon Glass - compress: Compression algorithm to use: 80*0a98b28bSSimon Glass none: No compression 81*0a98b28bSSimon Glass lz4: Use lz4 compression (via 'lz4' command-line utility) 82*0a98b28bSSimon Glass 83*0a98b28bSSimon GlassThis entry reads a number of files and places each in a separate sub-entry 84*0a98b28bSSimon Glasswithin this entry. To access these you need to enable device-tree updates 85*0a98b28bSSimon Glassat run-time so you can obtain the file positions. 86*0a98b28bSSimon Glass 87*0a98b28bSSimon Glass 88*0a98b28bSSimon 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 2555a5da7ceSSimon GlassEntry: section: Entry that contains other entries 2565a5da7ceSSimon Glass------------------------------------------------- 2575a5da7ceSSimon Glass 2585a5da7ceSSimon GlassProperties / Entry arguments: (see binman README for more information) 2595a5da7ceSSimon Glass - size: Size of section in bytes 2605a5da7ceSSimon Glass - align-size: Align size to a particular power of two 2615a5da7ceSSimon Glass - pad-before: Add padding before the entry 2625a5da7ceSSimon Glass - pad-after: Add padding after the entry 2635a5da7ceSSimon Glass - pad-byte: Pad byte to use when padding 2645a5da7ceSSimon Glass - sort-by-offset: Reorder the entries by offset 2655a5da7ceSSimon Glass - end-at-4gb: Used to build an x86 ROM which ends at 4GB (2^32) 2665a5da7ceSSimon Glass - name-prefix: Adds a prefix to the name of every entry in the section 2675a5da7ceSSimon Glass when writing out the map 2685a5da7ceSSimon Glass 2695a5da7ceSSimon GlassA section is an entry which can contain other entries, thus allowing 2705a5da7ceSSimon Glasshierarchical images to be created. See 'Sections and hierarchical images' 2715a5da7ceSSimon Glassin the binman README for more information. 2725a5da7ceSSimon Glass 2735a5da7ceSSimon Glass 2745a5da7ceSSimon Glass 2755a5da7ceSSimon GlassEntry: text: An entry which contains text 2765a5da7ceSSimon Glass----------------------------------------- 2775a5da7ceSSimon Glass 2785a5da7ceSSimon GlassThe text can be provided either in the node itself or by a command-line 2795a5da7ceSSimon Glassargument. There is a level of indirection to allow multiple text strings 2805a5da7ceSSimon Glassand sharing of text. 2815a5da7ceSSimon Glass 2825a5da7ceSSimon GlassProperties / Entry arguments: 2835a5da7ceSSimon Glass text-label: The value of this string indicates the property / entry-arg 2845a5da7ceSSimon Glass that contains the string to place in the entry 2855a5da7ceSSimon Glass <xxx> (actual name is the value of text-label): contains the string to 2865a5da7ceSSimon Glass place in the entry. 2875a5da7ceSSimon Glass 2885a5da7ceSSimon GlassExample node: 2895a5da7ceSSimon Glass 2905a5da7ceSSimon Glass text { 2915a5da7ceSSimon Glass size = <50>; 2925a5da7ceSSimon Glass text-label = "message"; 2935a5da7ceSSimon Glass }; 2945a5da7ceSSimon Glass 2955a5da7ceSSimon GlassYou can then use: 2965a5da7ceSSimon Glass 2975a5da7ceSSimon Glass binman -amessage="this is my message" 2985a5da7ceSSimon Glass 2995a5da7ceSSimon Glassand binman will insert that string into the entry. 3005a5da7ceSSimon Glass 3015a5da7ceSSimon GlassIt is also possible to put the string directly in the node: 3025a5da7ceSSimon Glass 3035a5da7ceSSimon Glass text { 3045a5da7ceSSimon Glass size = <8>; 3055a5da7ceSSimon Glass text-label = "message"; 3065a5da7ceSSimon Glass message = "a message directly in the node" 3075a5da7ceSSimon Glass }; 3085a5da7ceSSimon Glass 3095a5da7ceSSimon GlassThe text is not itself nul-terminated. This can be achieved, if required, 3105a5da7ceSSimon Glassby setting the size of the entry to something larger than the text. 3115a5da7ceSSimon Glass 3125a5da7ceSSimon Glass 3135a5da7ceSSimon Glass 3145a5da7ceSSimon GlassEntry: u-boot: U-Boot flat binary 3155a5da7ceSSimon Glass--------------------------------- 3165a5da7ceSSimon Glass 3175a5da7ceSSimon GlassProperties / Entry arguments: 3185a5da7ceSSimon Glass - filename: Filename of u-boot.bin (default 'u-boot.bin') 3195a5da7ceSSimon Glass 3205a5da7ceSSimon GlassThis is the U-Boot binary, containing relocation information to allow it 3215a5da7ceSSimon Glassto relocate itself at runtime. The binary typically includes a device tree 3225a5da7ceSSimon Glassblob at the end of it. Use u_boot_nodtb if you want to package the device 3235a5da7ceSSimon Glasstree separately. 3245a5da7ceSSimon Glass 3255a5da7ceSSimon GlassU-Boot can access binman symbols at runtime. See: 3265a5da7ceSSimon Glass 3275a5da7ceSSimon Glass 'Access to binman entry offsets at run time (fdt)' 3285a5da7ceSSimon Glass 3295a5da7ceSSimon Glassin the binman README for more information. 3305a5da7ceSSimon Glass 3315a5da7ceSSimon Glass 3325a5da7ceSSimon Glass 3335a5da7ceSSimon GlassEntry: u-boot-dtb: U-Boot device tree 3345a5da7ceSSimon Glass------------------------------------- 3355a5da7ceSSimon Glass 3365a5da7ceSSimon GlassProperties / Entry arguments: 3375a5da7ceSSimon Glass - filename: Filename of u-boot.dtb (default 'u-boot.dtb') 3385a5da7ceSSimon Glass 3395a5da7ceSSimon GlassThis is the U-Boot device tree, containing configuration information for 3405a5da7ceSSimon GlassU-Boot. U-Boot needs this to know what devices are present and which drivers 3415a5da7ceSSimon Glassto activate. 3425a5da7ceSSimon Glass 3436ed45ba0SSimon GlassNote: This is mostly an internal entry type, used by others. This allows 3446ed45ba0SSimon Glassbinman to know which entries contain a device tree. 3456ed45ba0SSimon Glass 3465a5da7ceSSimon Glass 3475a5da7ceSSimon Glass 3485a5da7ceSSimon GlassEntry: u-boot-dtb-with-ucode: A U-Boot device tree file, with the microcode removed 3495a5da7ceSSimon Glass----------------------------------------------------------------------------------- 3505a5da7ceSSimon Glass 3515a5da7ceSSimon GlassProperties / Entry arguments: 3525a5da7ceSSimon Glass - filename: Filename of u-boot.dtb (default 'u-boot.dtb') 3535a5da7ceSSimon Glass 3545a5da7ceSSimon GlassSee Entry_u_boot_ucode for full details of the three entries involved in 3555a5da7ceSSimon Glassthis process. This entry provides the U-Boot device-tree file, which 3565a5da7ceSSimon Glasscontains the microcode. If the microcode is not being collated into one 3575a5da7ceSSimon Glassplace then the offset and size of the microcode is recorded by this entry, 3585a5da7ceSSimon Glassfor use by u_boot_with_ucode_ptr. If it is being collated, then this 3595a5da7ceSSimon Glassentry deletes the microcode from the device tree (to save space) and makes 3605a5da7ceSSimon Glassit available to u_boot_ucode. 3615a5da7ceSSimon Glass 3625a5da7ceSSimon Glass 3635a5da7ceSSimon Glass 3645a5da7ceSSimon GlassEntry: u-boot-img: U-Boot legacy image 3655a5da7ceSSimon Glass-------------------------------------- 3665a5da7ceSSimon Glass 3675a5da7ceSSimon GlassProperties / Entry arguments: 3685a5da7ceSSimon Glass - filename: Filename of u-boot.img (default 'u-boot.img') 3695a5da7ceSSimon Glass 3705a5da7ceSSimon GlassThis is the U-Boot binary as a packaged image, in legacy format. It has a 3715a5da7ceSSimon Glassheader which allows it to be loaded at the correct address for execution. 3725a5da7ceSSimon Glass 3735a5da7ceSSimon GlassYou should use FIT (Flat Image Tree) instead of the legacy image for new 3745a5da7ceSSimon Glassapplications. 3755a5da7ceSSimon Glass 3765a5da7ceSSimon Glass 3775a5da7ceSSimon Glass 3785a5da7ceSSimon GlassEntry: u-boot-nodtb: U-Boot flat binary without device tree appended 3795a5da7ceSSimon Glass-------------------------------------------------------------------- 3805a5da7ceSSimon Glass 3815a5da7ceSSimon GlassProperties / Entry arguments: 3825a5da7ceSSimon Glass - filename: Filename of u-boot.bin (default 'u-boot-nodtb.bin') 3835a5da7ceSSimon Glass 3845a5da7ceSSimon GlassThis is the U-Boot binary, containing relocation information to allow it 3855a5da7ceSSimon Glassto relocate itself at runtime. It does not include a device tree blob at 3865a5da7ceSSimon Glassthe end of it so normally cannot work without it. You can add a u_boot_dtb 3875a5da7ceSSimon Glassentry after this one, or use a u_boot entry instead (which contains both 3885a5da7ceSSimon GlassU-Boot and the device tree). 3895a5da7ceSSimon Glass 3905a5da7ceSSimon Glass 3915a5da7ceSSimon Glass 3925a5da7ceSSimon GlassEntry: u-boot-spl: U-Boot SPL binary 3935a5da7ceSSimon Glass------------------------------------ 3945a5da7ceSSimon Glass 3955a5da7ceSSimon GlassProperties / Entry arguments: 3965a5da7ceSSimon Glass - filename: Filename of u-boot-spl.bin (default 'spl/u-boot-spl.bin') 3975a5da7ceSSimon Glass 3985a5da7ceSSimon GlassThis is the U-Boot SPL (Secondary Program Loader) binary. This is a small 3995a5da7ceSSimon Glassbinary which loads before U-Boot proper, typically into on-chip SRAM. It is 4005a5da7ceSSimon Glassresponsible for locating, loading and jumping to U-Boot. Note that SPL is 4015a5da7ceSSimon Glassnot relocatable so must be loaded to the correct address in SRAM, or written 402b8ef5b6bSSimon Glassto run from the correct address if direct flash execution is possible (e.g. 4035a5da7ceSSimon Glasson x86 devices). 4045a5da7ceSSimon Glass 4055a5da7ceSSimon GlassSPL can access binman symbols at runtime. See: 4065a5da7ceSSimon Glass 4075a5da7ceSSimon Glass 'Access to binman entry offsets at run time (symbols)' 4085a5da7ceSSimon Glass 4095a5da7ceSSimon Glassin the binman README for more information. 4105a5da7ceSSimon Glass 4115a5da7ceSSimon GlassThe ELF file 'spl/u-boot-spl' must also be available for this to work, since 4125a5da7ceSSimon Glassbinman uses that to look up symbols to write into the SPL binary. 4135a5da7ceSSimon Glass 4145a5da7ceSSimon Glass 4155a5da7ceSSimon Glass 4165a5da7ceSSimon GlassEntry: u-boot-spl-bss-pad: U-Boot SPL binary padded with a BSS region 4175a5da7ceSSimon Glass--------------------------------------------------------------------- 4185a5da7ceSSimon Glass 4195a5da7ceSSimon GlassProperties / Entry arguments: 4205a5da7ceSSimon Glass None 4215a5da7ceSSimon Glass 4225a5da7ceSSimon GlassThis is similar to u_boot_spl except that padding is added after the SPL 4235a5da7ceSSimon Glassbinary to cover the BSS (Block Started by Symbol) region. This region holds 4245a5da7ceSSimon Glassthe various used by SPL. It is set to 0 by SPL when it starts up. If you 4255a5da7ceSSimon Glasswant to append data to the SPL image (such as a device tree file), you must 4265a5da7ceSSimon Glasspad out the BSS region to avoid the data overlapping with U-Boot variables. 4275a5da7ceSSimon GlassThis entry is useful in that case. It automatically pads out the entry size 4285a5da7ceSSimon Glassto cover both the code, data and BSS. 4295a5da7ceSSimon Glass 4305a5da7ceSSimon GlassThe ELF file 'spl/u-boot-spl' must also be available for this to work, since 4315a5da7ceSSimon Glassbinman uses that to look up the BSS address. 4325a5da7ceSSimon Glass 4335a5da7ceSSimon Glass 4345a5da7ceSSimon Glass 4355a5da7ceSSimon GlassEntry: u-boot-spl-dtb: U-Boot SPL device tree 4365a5da7ceSSimon Glass--------------------------------------------- 4375a5da7ceSSimon Glass 4385a5da7ceSSimon GlassProperties / Entry arguments: 4395a5da7ceSSimon Glass - filename: Filename of u-boot.dtb (default 'spl/u-boot-spl.dtb') 4405a5da7ceSSimon Glass 4415a5da7ceSSimon GlassThis is the SPL device tree, containing configuration information for 4425a5da7ceSSimon GlassSPL. SPL needs this to know what devices are present and which drivers 4435a5da7ceSSimon Glassto activate. 4445a5da7ceSSimon Glass 4455a5da7ceSSimon Glass 4465a5da7ceSSimon Glass 4475a5da7ceSSimon GlassEntry: u-boot-spl-nodtb: SPL binary without device tree appended 4485a5da7ceSSimon Glass---------------------------------------------------------------- 4495a5da7ceSSimon Glass 4505a5da7ceSSimon GlassProperties / Entry arguments: 4515a5da7ceSSimon Glass - filename: Filename of spl/u-boot-spl-nodtb.bin (default 4525a5da7ceSSimon Glass 'spl/u-boot-spl-nodtb.bin') 4535a5da7ceSSimon Glass 4545a5da7ceSSimon GlassThis is the U-Boot SPL binary, It does not include a device tree blob at 4555a5da7ceSSimon Glassthe end of it so may not be able to work without it, assuming SPL needs 4565a5da7ceSSimon Glassa device tree to operation on your platform. You can add a u_boot_spl_dtb 4575a5da7ceSSimon Glassentry after this one, or use a u_boot_spl entry instead (which contains 4585a5da7ceSSimon Glassboth SPL and the device tree). 4595a5da7ceSSimon Glass 4605a5da7ceSSimon Glass 4615a5da7ceSSimon Glass 4625a5da7ceSSimon GlassEntry: u-boot-spl-with-ucode-ptr: U-Boot SPL with embedded microcode pointer 4635a5da7ceSSimon Glass---------------------------------------------------------------------------- 4645a5da7ceSSimon Glass 4655a5da7ceSSimon GlassSee Entry_u_boot_ucode for full details of the entries involved in this 4665a5da7ceSSimon Glassprocess. 4675a5da7ceSSimon Glass 4685a5da7ceSSimon Glass 4695a5da7ceSSimon Glass 470b8ef5b6bSSimon GlassEntry: u-boot-tpl: U-Boot TPL binary 471b8ef5b6bSSimon Glass------------------------------------ 472b8ef5b6bSSimon Glass 473b8ef5b6bSSimon GlassProperties / Entry arguments: 474b8ef5b6bSSimon Glass - filename: Filename of u-boot-tpl.bin (default 'tpl/u-boot-tpl.bin') 475b8ef5b6bSSimon Glass 476b8ef5b6bSSimon GlassThis is the U-Boot TPL (Tertiary Program Loader) binary. This is a small 477b8ef5b6bSSimon Glassbinary which loads before SPL, typically into on-chip SRAM. It is 478b8ef5b6bSSimon Glassresponsible for locating, loading and jumping to SPL, the next-stage 479b8ef5b6bSSimon Glassloader. Note that SPL is not relocatable so must be loaded to the correct 480b8ef5b6bSSimon Glassaddress in SRAM, or written to run from the correct address if direct 481b8ef5b6bSSimon Glassflash execution is possible (e.g. on x86 devices). 482b8ef5b6bSSimon Glass 483b8ef5b6bSSimon GlassSPL can access binman symbols at runtime. See: 484b8ef5b6bSSimon Glass 485b8ef5b6bSSimon Glass 'Access to binman entry offsets at run time (symbols)' 486b8ef5b6bSSimon Glass 487b8ef5b6bSSimon Glassin the binman README for more information. 488b8ef5b6bSSimon Glass 489b8ef5b6bSSimon GlassThe ELF file 'tpl/u-boot-tpl' must also be available for this to work, since 490b8ef5b6bSSimon Glassbinman uses that to look up symbols to write into the TPL binary. 491b8ef5b6bSSimon Glass 492b8ef5b6bSSimon Glass 493b8ef5b6bSSimon Glass 494b8ef5b6bSSimon GlassEntry: u-boot-tpl-dtb: U-Boot TPL device tree 495b8ef5b6bSSimon Glass--------------------------------------------- 496b8ef5b6bSSimon Glass 497b8ef5b6bSSimon GlassProperties / Entry arguments: 498b8ef5b6bSSimon Glass - filename: Filename of u-boot.dtb (default 'tpl/u-boot-tpl.dtb') 499b8ef5b6bSSimon Glass 500b8ef5b6bSSimon GlassThis is the TPL device tree, containing configuration information for 501b8ef5b6bSSimon GlassTPL. TPL needs this to know what devices are present and which drivers 502b8ef5b6bSSimon Glassto activate. 503b8ef5b6bSSimon Glass 504b8ef5b6bSSimon Glass 505b8ef5b6bSSimon Glass 5065a5da7ceSSimon GlassEntry: u-boot-ucode: U-Boot microcode block 5075a5da7ceSSimon Glass------------------------------------------- 5085a5da7ceSSimon Glass 5095a5da7ceSSimon GlassProperties / Entry arguments: 5105a5da7ceSSimon Glass None 5115a5da7ceSSimon Glass 5125a5da7ceSSimon GlassThe contents of this entry are filled in automatically by other entries 5135a5da7ceSSimon Glasswhich must also be in the image. 5145a5da7ceSSimon Glass 5155a5da7ceSSimon GlassU-Boot on x86 needs a single block of microcode. This is collected from 5165a5da7ceSSimon Glassthe various microcode update nodes in the device tree. It is also unable 5175a5da7ceSSimon Glassto read the microcode from the device tree on platforms that use FSP 5185a5da7ceSSimon Glass(Firmware Support Package) binaries, because the API requires that the 5195a5da7ceSSimon Glassmicrocode is supplied before there is any SRAM available to use (i.e. 5205a5da7ceSSimon Glassthe FSP sets up the SRAM / cache-as-RAM but does so in the call that 5215a5da7ceSSimon Glassrequires the microcode!). To keep things simple, all x86 platforms handle 5225a5da7ceSSimon Glassmicrocode the same way in U-Boot (even non-FSP platforms). This is that 5235a5da7ceSSimon Glassa table is placed at _dt_ucode_base_size containing the base address and 5245a5da7ceSSimon Glasssize of the microcode. This is either passed to the FSP (for FSP 5255a5da7ceSSimon Glassplatforms), or used to set up the microcode (for non-FSP platforms). 5265a5da7ceSSimon GlassThis all happens in the build system since it is the only way to get 5275a5da7ceSSimon Glassthe microcode into a single blob and accessible without SRAM. 5285a5da7ceSSimon Glass 5295a5da7ceSSimon GlassThere are two cases to handle. If there is only one microcode blob in 5305a5da7ceSSimon Glassthe device tree, then the ucode pointer it set to point to that. This 5315a5da7ceSSimon Glassentry (u-boot-ucode) is empty. If there is more than one update, then 5325a5da7ceSSimon Glassthis entry holds the concatenation of all updates, and the device tree 5335a5da7ceSSimon Glassentry (u-boot-dtb-with-ucode) is updated to remove the microcode. This 5345a5da7ceSSimon Glasslast step ensures that that the microcode appears in one contiguous 5355a5da7ceSSimon Glassblock in the image and is not unnecessarily duplicated in the device 5365a5da7ceSSimon Glasstree. It is referred to as 'collation' here. 5375a5da7ceSSimon Glass 5385a5da7ceSSimon GlassEntry types that have a part to play in handling microcode: 5395a5da7ceSSimon Glass 5405a5da7ceSSimon Glass Entry_u_boot_with_ucode_ptr: 5415a5da7ceSSimon Glass Contains u-boot-nodtb.bin (i.e. U-Boot without the device tree). 5425a5da7ceSSimon Glass It updates it with the address and size of the microcode so that 5435a5da7ceSSimon Glass U-Boot can find it early on start-up. 5445a5da7ceSSimon Glass Entry_u_boot_dtb_with_ucode: 5455a5da7ceSSimon Glass Contains u-boot.dtb. It stores the microcode in a 5465a5da7ceSSimon Glass 'self.ucode_data' property, which is then read by this class to 5475a5da7ceSSimon Glass obtain the microcode if needed. If collation is performed, it 5485a5da7ceSSimon Glass removes the microcode from the device tree. 5495a5da7ceSSimon Glass Entry_u_boot_ucode: 5505a5da7ceSSimon Glass This class. If collation is enabled it reads the microcode from 5515a5da7ceSSimon Glass the Entry_u_boot_dtb_with_ucode entry, and uses it as the 5525a5da7ceSSimon Glass contents of this entry. 5535a5da7ceSSimon Glass 5545a5da7ceSSimon Glass 5555a5da7ceSSimon Glass 5565a5da7ceSSimon GlassEntry: u-boot-with-ucode-ptr: U-Boot with embedded microcode pointer 5575a5da7ceSSimon Glass-------------------------------------------------------------------- 5585a5da7ceSSimon Glass 5595a5da7ceSSimon GlassProperties / Entry arguments: 5605a5da7ceSSimon Glass - filename: Filename of u-boot-nodtb.dtb (default 'u-boot-nodtb.dtb') 561f0693038SSimon Glass - optional-ucode: boolean property to make microcode optional. If the 562f0693038SSimon Glass u-boot.bin image does not include microcode, no error will 563f0693038SSimon Glass be generated. 5645a5da7ceSSimon Glass 5655a5da7ceSSimon GlassSee Entry_u_boot_ucode for full details of the three entries involved in 5665a5da7ceSSimon Glassthis process. This entry updates U-Boot with the offset and size of the 5675a5da7ceSSimon Glassmicrocode, to allow early x86 boot code to find it without doing anything 5685a5da7ceSSimon Glasscomplicated. Otherwise it is the same as the u_boot entry. 5695a5da7ceSSimon Glass 5705a5da7ceSSimon Glass 5715a5da7ceSSimon Glass 57224d0d3c3SSimon GlassEntry: vblock: An entry which contains a Chromium OS verified boot block 57324d0d3c3SSimon Glass------------------------------------------------------------------------ 57424d0d3c3SSimon Glass 57524d0d3c3SSimon GlassProperties / Entry arguments: 57624d0d3c3SSimon Glass - keydir: Directory containing the public keys to use 57724d0d3c3SSimon Glass - keyblock: Name of the key file to use (inside keydir) 57824d0d3c3SSimon Glass - signprivate: Name of provide key file to use (inside keydir) 57924d0d3c3SSimon Glass - version: Version number of the vblock (typically 1) 58024d0d3c3SSimon Glass - kernelkey: Name of the kernel key to use (inside keydir) 58124d0d3c3SSimon Glass - preamble-flags: Value of the vboot preamble flags (typically 0) 58224d0d3c3SSimon Glass 583a326b495SSimon GlassOutput files: 584a326b495SSimon Glass - input.<unique_name> - input file passed to futility 585a326b495SSimon Glass - vblock.<unique_name> - output file generated by futility (which is 586a326b495SSimon Glass used as the entry contents) 587a326b495SSimon Glass 58824d0d3c3SSimon GlassChromium OS signs the read-write firmware and kernel, writing the signature 58924d0d3c3SSimon Glassin this block. This allows U-Boot to verify that the next firmware stage 59024d0d3c3SSimon Glassand kernel are genuine. 59124d0d3c3SSimon Glass 59224d0d3c3SSimon Glass 59324d0d3c3SSimon Glass 5945a5da7ceSSimon GlassEntry: x86-start16: x86 16-bit start-up code for U-Boot 5955a5da7ceSSimon Glass------------------------------------------------------- 5965a5da7ceSSimon Glass 5975a5da7ceSSimon GlassProperties / Entry arguments: 5985a5da7ceSSimon Glass - filename: Filename of u-boot-x86-16bit.bin (default 5995a5da7ceSSimon Glass 'u-boot-x86-16bit.bin') 6005a5da7ceSSimon Glass 6015a5da7ceSSimon Glassx86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code 6025a5da7ceSSimon Glassmust be placed at a particular address. This entry holds that code. It is 6035a5da7ceSSimon Glasstypically placed at offset CONFIG_SYS_X86_START16. The code is responsible 6045a5da7ceSSimon Glassfor changing to 32-bit mode and jumping to U-Boot's entry point, which 6055a5da7ceSSimon Glassrequires 32-bit mode (for 32-bit U-Boot). 6065a5da7ceSSimon Glass 6075a5da7ceSSimon GlassFor 64-bit U-Boot, the 'x86_start16_spl' entry type is used instead. 6085a5da7ceSSimon Glass 6095a5da7ceSSimon Glass 6105a5da7ceSSimon Glass 6115a5da7ceSSimon GlassEntry: x86-start16-spl: x86 16-bit start-up code for SPL 6125a5da7ceSSimon Glass-------------------------------------------------------- 6135a5da7ceSSimon Glass 6145a5da7ceSSimon GlassProperties / Entry arguments: 6155a5da7ceSSimon Glass - filename: Filename of spl/u-boot-x86-16bit-spl.bin (default 6165a5da7ceSSimon Glass 'spl/u-boot-x86-16bit-spl.bin') 6175a5da7ceSSimon Glass 6185a5da7ceSSimon Glassx86 CPUs start up in 16-bit mode, even if they are 64-bit CPUs. This code 6195a5da7ceSSimon Glassmust be placed at a particular address. This entry holds that code. It is 6205a5da7ceSSimon Glasstypically placed at offset CONFIG_SYS_X86_START16. The code is responsible 6215a5da7ceSSimon Glassfor changing to 32-bit mode and starting SPL, which in turn changes to 6225a5da7ceSSimon Glass64-bit mode and jumps to U-Boot (for 64-bit U-Boot). 6235a5da7ceSSimon Glass 6245a5da7ceSSimon GlassFor 32-bit U-Boot, the 'x86_start16' entry type is used instead. 6255a5da7ceSSimon Glass 6265a5da7ceSSimon Glass 6275a5da7ceSSimon Glass 62835b384cbSSimon GlassEntry: x86-start16-tpl: x86 16-bit start-up code for TPL 62935b384cbSSimon Glass-------------------------------------------------------- 63035b384cbSSimon Glass 63135b384cbSSimon GlassProperties / Entry arguments: 63235b384cbSSimon Glass - filename: Filename of tpl/u-boot-x86-16bit-tpl.bin (default 63335b384cbSSimon Glass 'tpl/u-boot-x86-16bit-tpl.bin') 63435b384cbSSimon Glass 63535b384cbSSimon Glassx86 CPUs start up in 16-bit mode, even if they are 64-bit CPUs. This code 63635b384cbSSimon Glassmust be placed at a particular address. This entry holds that code. It is 63735b384cbSSimon Glasstypically placed at offset CONFIG_SYS_X86_START16. The code is responsible 63835b384cbSSimon Glassfor changing to 32-bit mode and starting TPL, which in turn jumps to SPL. 63935b384cbSSimon Glass 64035b384cbSSimon GlassIf TPL is not being used, the 'x86_start16_spl or 'x86_start16' entry types 64135b384cbSSimon Glassmay be used instead. 64235b384cbSSimon Glass 64335b384cbSSimon Glass 64435b384cbSSimon Glass 645