summaryrefslogtreecommitdiff
path: root/doc/uImage.FIT
AgeCommit message (Collapse)AuthorFilesLines
2021-07-29mkimage: use environment variable MKIMAGE_SIGN_PIN to set pin for OpenSSL EngineMarc Kleine-Budde1-2/+2
This patch adds the possibility to pass the PIN the OpenSSL Engine used during signing via the environment variable MKIMAGE_SIGN_PIN. This follows the approach used during kernel module signing ("KBUILD_SIGN_PIN") or UBIFS image signing ("MKIMAGE_SIGN_PIN"). Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2021-07-12doc: fix typo in signature.txtThomas Perrot1-2/+2
Fix value fields in signature nodes. Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-04-14doc: FIT image: Update FPGA example to make use of "loadables"Alexandru Gagniuc1-1/+2
The new correct way to load an FPGA image is to declare it in the list of "loadables". multi-with-fpga.its used the now deprecated "fpga" property. Since this example most likely intended to use u-boot's generic FPGA loading code, compatible = "u-boot,fpga-legacy" is also appropriate here. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-04-14doc: FIT image: Introduce "u-boot, fpga-legacy" propertyAlexandru Gagniuc1-0/+1
Commit 4afc4f37c70e ("doc: FIT image: Clarify format and simplify syntax") introduced a "compatible" property for loadable images. It did not define its contents. Use "u-boot,fpga-legacy" compatible string to specify that fpga_load() should be used to load the image. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-04-14doc: signature.txt: Document the keydir and keyfile argumentsAlexandru Gagniuc1-0/+13
After lots of debating, this documents how we'd like mkimage to treat 'keydir' and 'keyfile' arguments. The rest is in the docs. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-04-14doc: signature.txt: Document devicetree format for ECDSA keysAlexandru Gagniuc1-1/+6
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-23doc: FIT image: Clarify format and simplify syntaxAlexandru Gagniuc1-19/+14
** Introduction There are currently four ways to load an OS image with u-boot 1. SPL -> u-boot -> bootm 2. SPL blue falcon mode 3. "Basic" FIT image (CONFIG_LOAD_FIT) 4. "Full-featured" FIT image (CONFIG_LOAD_FIT_FULL) These four code paths were developed independently, and share very little code. (3) and (4), behave very differently, are littered with special cases. They even have different DTS syntax and properties. The cause of this divergence is that the FIT format specification leaves a number of things open to interpretation. The purpose of this change is to enable the reduction of code size, duplication, and complexity by updating and streamlining the FIT format. We are only marginally concerned with backwards compatibility, because we don't have inter-compatibility. For example, CONFIG_LOAD_FIT is able to load images that CONFIG_LOAD_FIT_FULL won't. This is a direct result of the incompatible syntax between the two implementations. Ideally, these changes would enable "simple" FIT to be a subset of the "full" fit implementation, and share most code. These changes should also eliminate the need for falcon mode (although we are not advocating for the removal of falcon mode at this time). ** Description of changes * The "configurations" node is now mandatory Guessing how to load components based on their "os" and "type" invites confusion and superfluous heuristics. Instead, require each FIT image to be explicit on how components should be loaded. * Eliminate "ramdisk", "setup", "standalone", and "fpga" properties Having too many special purpose properties requires special-casing FIT loading code. When a special property can be handled by another property, it is redundant. - A "ramdisk" is identical to a loadable. Thus ramdisk images should be placed under "loadables". - A "setup" node can be achieved by using a "kernel" or "firmware" property instead. - "standalone" is used for u-boot nodes. The correct property to use in this case is "firmware". - "fpga" is a loadable * Prioritize control between "firmware" and "kernel" "firmware" and "kernel" are special nodes in that control is passed to the "entry-point" of the image. Both can be present, for example, an OP-TEE firmware with a linux kernel. When both are present, control is passed to the "firmware" image. ** Further generalizations (not included herein) The "firmware" and "kernel" properties could be generalized as a "next-boot-stage", or similar name. This "next" stage would be special in that it is both executable, and is the stage that is passed control. For example, "next-stage" could be an op-tee image, with linux as a loadable, or a u-boot image. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2020-12-18doc: Fix typo in FIT documentationSean Anderson1-1/+1
u_boot should be u-boot Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2020-10-27spl: Use standard FIT entriesMichal Simek1-0/+84
SPL is creating fit-images DT node when loadables are recorded in selected configuration. Entries which are created are using entry-point and load-addr property names. But there shouldn't be a need to use non standard properties because entry/load are standard FIT properties. But using standard FIT properties enables option to use generic FIT functions to descrease SPL size. Here is result for ZynqMP virt configuration: xilinx_zynqmp_virt: spl/u-boot-spl:all -82 spl/u-boot-spl:rodata -22 spl/u-boot-spl:text -60 The patch causes change in run time fit image record. Before: fit-images { uboot { os = "u-boot"; type = "firmware"; size = <0xfd520>; entry-point = <0x8000000>; load-addr = <0x8000000>; }; }; After: fit-images { uboot { os = "u-boot"; type = "firmware"; size = <0xfd520>; entry = <0x8000000>; load = <0x8000000>; }; }; Replacing calling fdt_getprop_u32() by fit_image_get_entry/load() also enables support for reading entry/load properties recorded in 64bit format. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-10-13doc: verified-boot: add required-mode informationThirupathaiah Annapureddy1-0/+14
Add documentation about 'required-mode' property in /signature node in U-Boot's control FDT. Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-07-17doc: fit: Write hex address as hex instead of intMichal Simek1-1/+1
When update_uboot.its is used directly there is syntax error for no reason. Error report: mkimage -f update_uboot.its boot Error: update_uboot.its:18.12-13 syntax error FATAL ERROR: Unable to parse input tree mkimage: Can't read boot.tmp: Invalid argument Fixes: 4bae90904b69 ("Automatic software update from TFTP server") Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-06-03arm: ti: Remove ARCH= references from documentationTom Rini1-1/+0
When building U-Boot we select the architecture via Kconfig and not ARCH being passed in via the environment or make cmdline. Cc: Lokesh Vutla <lokeshvutla@ti.com> Cc: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2020-05-15lib: rsa: avoid overriding the object name when already specifiedJan Luebbe1-3/+5
If "object=" is specified in "keydir" when using the pkcs11 engine do not append another "object=<key-name-hint>". This makes it possible to use object names other than the key name hint. These two string identifiers are not necessarily equal. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Bastian Krause <bst@pengutronix.de> Reviewed-by: George McCollister <george.mccollister@gmail.com>
2020-04-24mkimage: fit_image: Add option to make fit header alignKever Yang1-0/+5
The image is usually stored in block device like emmc, SD card, make the offset of image data aligned to block(512 byte) can avoid data copy during boot process. eg. SPL boot from FIT image with external data: - SPL read the first block of FIT image, and then parse the header; - SPL read image data separately; - The first image offset is the base_offset which is the header size; - The second image offset is just after the first image; - If the offset of imge does not aligned, SPL will do memcpy; The header size is a ramdon number, which is very possible not aligned, so add '-B size'to specify the align size in hex for better performance. example usage: ./tools/mkimage -E -f u-boot.its -B 0x200 u-boot.itb Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp> Reviewed-by: Tom Rini <trini@konsulko.com>
2020-01-07doc: Add sample uefi.its image description fileCristian Ciocaltea1-0/+67
This patch adds an example FIT image description file demonstrating the usage of bootm command to securely launch UEFI binaries. Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-12-13doc: fitImage: example of a signature nodeHeinrich Schuchardt1-0/+62
Describe that a signature node can be added to a binary device tree using the mkimage tool. Provide an example device tree node. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-12-03cosmetic: Fix spelling and whitespace errorsThomas Hebb1-1/+1
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
2019-07-29fit: Support compat string property in configuration nodeJulius Werner2-0/+80
This patch adds support for an optional optimization to compatible string matching where the compatible string property from the root node of the kernel FDT can be copied into the configuration node of the FIT image. This is most useful when using compressed FDTs or when using FDT overlays, where the traditional extraction of the compatible string from the kernel FDT itself is not easily possible. Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-07-24doc: fitImage: Cosmetics break linesMickaël Tansorier1-0/+3
Add missing newline before title and subtitle. Signed-off-by: Mickaël Tansorier <mickael.tansorier@smile.fr>
2019-07-24doc: fitImage: Fix conf number incrementationMickaël Tansorier1-2/+2
Increment conf id to avoid to have two same conf name into one configuration description. Signed-off-by: Mickaël Tansorier <mickael.tansorier@smile.fr>
2019-07-18lib: rsa: add support to other openssl engine types than pkcs11Vesa Jääskeläinen1-4/+33
There are multiple other openssl engines used by HSMs that can be used to sign FIT images instead of forcing users to use pkcs11 type of service. Relax engine selection so that other openssl engines can be specified and use generic key id definition formula. Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Cc: Tom Rini <trini@konsulko.com>
2019-07-11configs: Rename CONFIG_IMAGE_FORMAT_LEGACY to CONFIG_LEGACY_IMAGE_FORMATTom Rini1-1/+1
The name CONFIG_LEGACY_IMAGE_FORMAT reads slightly better along with allowing us to avoid a rather nasty Kbuild/Kconfig issue down the line with CONFIG_IS_ENABLED(IMAGE_FORMAT_LEGACY). In a few places outside of cmd/ switch to using CONFIG_IS_ENABLED() to test what is set. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-12-03doc: uImage.FIT: signature.txt: add option paddingPhilippe Reynes1-0/+3
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-20doc: FIT image: fix typoPierre-Jean Texier1-1/+1
Fix typo in beaglebone verified boot documentation. Signed-off-by: Pierre-Jean Texier <texier.pj2@gmail.com>
2018-08-10doc: FIT image: clarify usage of "compression" propertySimon Goldschmidt1-1/+3
Compressed images should have their compression property set to "none" if U-Boot should leave them compressed. This is especially the case for compressed ramdisks that should be uncompressed by the kernel only. Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
2018-05-09armv8: sec_firmware: Add support for multiple loadablesSumit Garg1-0/+49
Enable support for multiple loadable images in SEC firmware FIT image. Also add example "sec_firmware_ppa.its" file. Signed-off-by: Sumit Garg <sumit.garg@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
2018-01-16doc: FIT image: fix incorrect examples of DT node unit addressAndre Przywara10-117/+117
The DT spec demands a unit-address of a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case. Fix all occurences in the FIT image example files where this was not observed, to not give bad examples to the reader. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2018-01-16doc: FIT image: fix incorrect description of DT node unit addressAndre Przywara7-196/+196
The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case. Fix all occurences in the FIT image documentation files where this was not observed, to not give bad examples to the reader. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2017-12-13SPL: Add FIT data-position property supportPeng Fan1-1/+2
For external data, FIT has a optional property "data-position" which can set the external data to a fixed offset to FIT beginning. Add the support for this property in SPL FIT. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tomas Melin <tomas.melin@vaisala.com> Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Cc: "Andrew F. Davis" <afd@ti.com> Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: "tomas.melin@vaisala.com" <tomas.melin@vaisala.com> Cc: Kever Yang <kever.yang@rock-chips.com> Cc: Andre Przywara <andre.przywara@arm.com> Cc: York Sun <york.sun@nxp.com> Cc: Lokesh Vutla <lokeshvutla@ti.com> Cc: "Cooper Jr., Franklin" <fcooper@ti.com> Cc: George McCollister <george.mccollister@gmail.com> Cc: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Cc: Jean-Jacques Hiblot <jjhiblot@ti.com> Cc: Rick Altherr <raltherr@google.com> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: York Sun <york.sun@nxp.com>
2017-10-24doc: verified-boot: fix crypto algorithm examplesMasahiro Yamada1-2/+2
As you see in crypto_algos in common/image-sig.c, the algorithm should be either "rsa2048" or "rsa4096". "rs2048" is a typo. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-15doc: overlays: Tweak documentation regarding overlaysFranklin S Cooper Jr1-2/+6
Pull some information regarding overlays from commit messages and put them directly within the documentation. Also add some information regarding required dtc version to properly use overlays. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-09-15fit: fdt overlays docPantelis Antoniou3-3/+236
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Reviewed-by: Łukasz Majewski Acked-by: Simon Glass <sjg@chromium.org>
2017-09-11spl: fit: Add booting OS firstYork Sun1-0/+7
If CONFIG_SPL_OS_BOOT is enabled, boot OS if kernel image is found in FIT structure. Signed-off-by: York Sun <york.sun@nxp.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-11spl: fit: Support both external and embedded dataYork Sun1-0/+4
SPL supports U-Boot image in FIT format which has data outside of FIT structure. This adds support for embedded data for normal FIT images. Signed-off-by: York Sun <york.sun@nxp.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-26doc: verified-boot: fix typosMasahiro Yamada2-6/+6
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-07-26FIT: List kernel_noload in the list of typesTom Rini1-2/+2
In the source_file_format.txt file we talk about how to construct a valid FIT image. While it already says to look at the source for the full list, add kernel_noload to the explicit list of types. This is arguably the most important type to use as most often we are including a kernel that will run from wherever it is loaded into memory and execute. This for example, allows you to create a single FIT image for Linux that can be used on both OMAP and i.MX devices as the kernel will not need to be moved in memory. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-05-17SPL: FIT: allow loading multiple imagesAndre Przywara2-0/+110
So far we were not using the FIT image format to its full potential: The SPL FIT loader was just loading the first image from the /images node plus one of the listed DTBs. Now with the refactored loader code it's easy to load an arbitrary number of images in addition to the two mentioned above. As described in the FIT image source file format description, iterate over all images listed at the "loadables" property in the configuration node and load every image at its desired location. This allows to load any kind of images: - firmware images to execute before U-Boot proper (for instance ARM Trusted Firmware (ATF)) - firmware images for management processors (SCP, arisc, ...) - firmware images for devices like WiFi controllers - bit files for FPGAs - additional configuration data - kernels and/or ramdisks The actual usage of this feature would be platform and/or board specific. Also update the FIT documentation to mention the new SPL feature and provide an example .its file to demonstrate its features. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Lokesh Vutla <lokeshvuta@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Tested-by: Kever Yang <kever.yang@rock-chips.com> Tested-by: Jagan Teki <jagan@openedev.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-01-15mkimage: Add support for signing with pkcs11George McCollister1-0/+143
Add support for signing with the pkcs11 engine. This allows FIT images to be signed with keys securely stored on a smartcard, hardware security module, etc without exposing the keys. Support for other engines can be added in the future by modifying rsa_engine_get_pub_key() and rsa_engine_get_priv_key() to construct correct key_id strings. Signed-off-by: George McCollister <george.mccollister@gmail.com>
2016-12-03image: Add FIT image loadable section custom processingAndrew F. Davis1-1/+3
To help automate the loading of custom image types we add the ability to define custom handlers for the loadable section types. When we find a compatible type while loading a "loadable" image from a FIT image we run its associated handlers to perform any additional steps needed for loading this image. Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-08-16x86: Mention how to boot a 64-bit kernel from U-BootSimon Glass2-9/+9
The README indicates that this is not supported, but this is no-longer true. Update the text to indicate this and describe the FIT changes required. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2016-06-25mkimage: fit: spl: Add an optional static offset for external dataTeddy Reed1-0/+3
When building a FIT with external data (-E), U-Boot proper may require absolute positioning for executing the external firmware. To acheive this use the (-p) switch, which will replace the amended 'data-offset' with 'data-position' indicating the absolute position of external data. It is considered an error if the requested absolute position overlaps with the initial data required for the compact FIT. Signed-off-by: Teddy Reed <teddy.reed@gmail.com>
2016-05-24mkimage: Report information about fpgaMichal Simek2-0/+70
Add FIT_FPGA_PROP that user can identify an optional entry for fpga. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-04-02doc: clarify openssl-based key and certificate generation processAndreas Dannenberg1-4/+4
Add some basic clarification that the dev.key file generated by OpenSSL contains both the public and private key, and further highlight that the certificate generated here contains the public key only. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
2016-04-02doc: fix file extension for flattened image tree blobAndreas Dannenberg1-1/+1
Different sections in the document suggest flattened image tree blob files have a file name extension of .itb. Fix the list of file extensions to reflect that. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
2016-03-15mkimage: Support placing data outside the FITSimon Glass1-1/+19
One limitation of FIT is that all the data is 'inline' within it, using a 'data' property in each image node. This means that to find out what is in the FIT it is necessary to scan the entire file. Once loaded it can be scanned and then the images can be copied to the correct place in memory. In SPL it can take a significant amount of time to copy images around in memory. Also loading data that does not end up being used is wasteful. It would be useful if the FIT were small, acting as a directory, with the actual data stored elsewhere. This allows SPL to load the entire FIT, without the images, then load the images it wants later. Add a -E option to mkimage to request that it output an 'external' FIT. Signed-off-by: Simon Glass <sjg@chromium.org>
2016-02-06Use correct spelling of "U-Boot"Bin Meng4-10/+10
Correct spelling of "U-Boot" shall be used in all written text (documentation, comments in source files etc.). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
2015-05-28mkimage will now report information about loadableKarl Apsite2-0/+93
Added FIT_LOADABLE_PROP, so the user can identify an optional entry named "loadables" in their .its configuration. "loadables" is a comma separated list in the .its Documentation can be found in doc/uImage.FIT/source_file_format.txt and doc/uImage.Fit/multi-with-loadables.its Signed-off-by: Karl Apsite <Karl.Apsite@dornerworks.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2015-01-29doc: fix misspellingsGuilherme Maciel Ferreira2-3/+3
Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
2015-01-29doc: "os" is also mandatory for "ramdisk" FIT image componentsGuilherme Maciel Ferreira1-4/+4
According to fit_image_print(), the "os" property from "image" node is required also when "type=ramdisk". Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
2014-10-22x86: Support loading kernel setup from a FITSimon Glass3-0/+328
Add a new setup@ section to the FIT which can be used to provide a setup binary for booting Linux on x86. This makes it possible to boot x86 from a FIT. Signed-off-by: Simon Glass <sjg@chromium.org>