From f069303852bdfa1303cd5787667bd7924f0482d9 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 14 Sep 2018 04:57:07 -0600 Subject: binman: Move 'special properties' docs to README.entries This information should be in the entry it relates to, not in the main README. Move it. Signed-off-by: Simon Glass --- tools/binman/README.entries | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools/binman/README.entries') diff --git a/tools/binman/README.entries b/tools/binman/README.entries index c6e7b22609..041e77771e 100644 --- a/tools/binman/README.entries +++ b/tools/binman/README.entries @@ -524,6 +524,9 @@ Entry: u-boot-with-ucode-ptr: U-Boot with embedded microcode pointer Properties / Entry arguments: - filename: Filename of u-boot-nodtb.dtb (default 'u-boot-nodtb.dtb') + - optional-ucode: boolean property to make microcode optional. If the + u-boot.bin image does not include microcode, no error will + be generated. See Entry_u_boot_ucode for full details of the three entries involved in this process. This entry updates U-Boot with the offset and size of the @@ -543,7 +546,7 @@ Properties / Entry arguments: - kernelkey: Name of the kernel key to use (inside keydir) - preamble-flags: Value of the vboot preamble flags (typically 0) -Chromium OS signs the read-write firmware and kernel, writing the signature +Chromium OS signs the read-write firmware and kernel, writing the signature in this block. This allows U-Boot to verify that the next firmware stage and kernel are genuine. -- cgit From 35b384cbe5d40e618391cc076409e89cedf9c863 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 14 Sep 2018 04:57:10 -0600 Subject: binman: Add x86 support for starting TPL Sometimes we want to include TPL for x86 platforms, such as when we want to select between different SPL images (e.g. for Chrome OS verified boot). Add support for this. Signed-off-by: Simon Glass --- tools/binman/README.entries | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tools/binman/README.entries') diff --git a/tools/binman/README.entries b/tools/binman/README.entries index 041e77771e..31bc725d57 100644 --- a/tools/binman/README.entries +++ b/tools/binman/README.entries @@ -586,3 +586,20 @@ For 32-bit U-Boot, the 'x86_start16' entry type is used instead. +Entry: x86-start16-tpl: x86 16-bit start-up code for TPL +-------------------------------------------------------- + +Properties / Entry arguments: + - filename: Filename of tpl/u-boot-x86-16bit-tpl.bin (default + 'tpl/u-boot-x86-16bit-tpl.bin') + +x86 CPUs start up in 16-bit mode, even if they are 64-bit CPUs. This code +must be placed at a particular address. This entry holds that code. It is +typically placed at offset CONFIG_SYS_X86_START16. The code is responsible +for changing to 32-bit mode and starting TPL, which in turn jumps to SPL. + +If TPL is not being used, the 'x86_start16_spl or 'x86_start16' entry types +may be used instead. + + + -- cgit From a326b495cdcfd56507841e38158683e6e4d5894c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 14 Sep 2018 04:57:11 -0600 Subject: binman: Tidy up the vblock entry At present if there are two vblock entries an image their contents are written to the same file in the output directory. This prevents checking the contents of each separately. Fix this by adding part of the entry path to the filename, and add some missing comments. Signed-off-by: Simon Glass --- tools/binman/README.entries | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools/binman/README.entries') diff --git a/tools/binman/README.entries b/tools/binman/README.entries index 31bc725d57..5cb52a92ff 100644 --- a/tools/binman/README.entries +++ b/tools/binman/README.entries @@ -546,6 +546,11 @@ Properties / Entry arguments: - kernelkey: Name of the kernel key to use (inside keydir) - preamble-flags: Value of the vboot preamble flags (typically 0) +Output files: + - input. - input file passed to futility + - vblock. - output file generated by futility (which is + used as the entry contents) + Chromium OS signs the read-write firmware and kernel, writing the signature in this block. This allows U-Boot to verify that the next firmware stage and kernel are genuine. -- cgit From 6ed45ba0a831393ab6c5d3355384238d2b4f47da Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 14 Sep 2018 04:57:24 -0600 Subject: binman: Support updating all device tree files Binman currently supports updating the main device tree with things like the position of each entry. Extend this support to SPL and TPL as well, since they may need (a subset of) this information. Also adjust DTB output files to have a .out extension since this seems clearer than having a .dtb extension with 'out' in the name somwhere. Also add a few missing comments and update the DT setup code to use ReadFile and WriteFile(). Signed-off-by: Simon Glass --- tools/binman/README.entries | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tools/binman/README.entries') diff --git a/tools/binman/README.entries b/tools/binman/README.entries index 5cb52a92ff..091fb5ce2b 100644 --- a/tools/binman/README.entries +++ b/tools/binman/README.entries @@ -26,6 +26,15 @@ example the 'u_boot' entry which provides the filename 'u-boot.bin'. +Entry: blob-dtb: A blob that holds a device tree +------------------------------------------------ + +This is a blob containing a device tree. The contents of the blob are +obtained from the list of available device-tree files, managed by the +'state' module. + + + Entry: blob-named-by-arg: A blob entry which gets its filename property from its subclass ----------------------------------------------------------------------------------------- @@ -309,6 +318,9 @@ This is the U-Boot device tree, containing configuration information for U-Boot. U-Boot needs this to know what devices are present and which drivers to activate. +Note: This is mostly an internal entry type, used by others. This allows +binman to know which entries contain a device tree. + Entry: u-boot-dtb-with-ucode: A U-Boot device tree file, with the microcode removed -- cgit From 83d73c2f7c471c1a7e5a9a2bf0de287491408b2d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 14 Sep 2018 04:57:26 -0600 Subject: binman: Support compressed entries Add support for compressing blob entries. This can help reduce image sizes for many types of data. It requires that the firmware be able to decompress the data at run-time. Signed-off-by: Simon Glass --- tools/binman/README.entries | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/binman/README.entries') diff --git a/tools/binman/README.entries b/tools/binman/README.entries index 091fb5ce2b..2cf7dc0338 100644 --- a/tools/binman/README.entries +++ b/tools/binman/README.entries @@ -19,11 +19,18 @@ class by other entry types. Properties / Entry arguments: - filename: Filename of file to read into entry + - compress: Compression algorithm to use: + none: No compression + lz4: Use lz4 compression (via 'lz4' command-line utility) This entry reads data from a file and places it in the entry. The default filename is often specified specified by the subclass. See for example the 'u_boot' entry which provides the filename 'u-boot.bin'. +If compression is enabled, an extra 'uncomp-size' property is written to +the node (if enabled with -u) which provides the uncompressed size of the +data. + Entry: blob-dtb: A blob that holds a device tree -- cgit From 0a98b28b06800da48f006069fe14e47dd399d2ff Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 14 Sep 2018 04:57:28 -0600 Subject: binman: Support adding files In some cases it is useful to add a group of files to the image and be able to access them at run-time. Of course it is possible to generate the binman config file with a set of blobs each with a filename. But for convenience, add an entry type which can do this. Add required support (for adding nodes and string properties) into the state module. Signed-off-by: Simon Glass --- tools/binman/README.entries | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tools/binman/README.entries') diff --git a/tools/binman/README.entries b/tools/binman/README.entries index 2cf7dc0338..3afc560052 100644 --- a/tools/binman/README.entries +++ b/tools/binman/README.entries @@ -71,6 +71,21 @@ updating the EC on startup via software sync. +Entry: files: Entry containing a set of files +--------------------------------------------- + +Properties / Entry arguments: + - pattern: Filename pattern to match the files to include + - compress: Compression algorithm to use: + none: No compression + lz4: Use lz4 compression (via 'lz4' command-line utility) + +This entry reads a number of files and places each in a separate sub-entry +within this entry. To access these you need to enable device-tree updates +at run-time so you can obtain the file positions. + + + Entry: fill: An entry which is filled to a particular byte value ---------------------------------------------------------------- -- cgit From f025363543636191cfc6d277733317cb0198189f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 14 Sep 2018 04:57:32 -0600 Subject: binman: Support x86 microcode in TPL When TPL is used on x86 we may want to program the microcode (at least for the first CPU) early in boot. Add support for this by refactoring the existing code to be more generic. Signed-off-by: Simon Glass --- tools/binman/README.entries | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tools/binman/README.entries') diff --git a/tools/binman/README.entries b/tools/binman/README.entries index 3afc560052..4dd67d64fa 100644 --- a/tools/binman/README.entries +++ b/tools/binman/README.entries @@ -462,6 +462,8 @@ both SPL and the device tree). Entry: u-boot-spl-with-ucode-ptr: U-Boot SPL with embedded microcode pointer ---------------------------------------------------------------------------- +This is used when SPL must set up the microcode for U-Boot. + See Entry_u_boot_ucode for full details of the entries involved in this process. @@ -503,6 +505,24 @@ to activate. +Entry: u-boot-tpl-dtb-with-ucode: U-Boot TPL with embedded microcode pointer +---------------------------------------------------------------------------- + +This is used when TPL must set up the microcode for U-Boot. + +See Entry_u_boot_ucode for full details of the entries involved in this +process. + + + +Entry: u-boot-tpl-with-ucode-ptr: U-Boot TPL with embedded microcode pointer +---------------------------------------------------------------------------- + +See Entry_u_boot_ucode for full details of the entries involved in this +process. + + + Entry: u-boot-ucode: U-Boot microcode block ------------------------------------------- -- cgit From fe1ae3ecc3a2203babd7837bd2d5cf514a374c1f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 14 Sep 2018 04:57:35 -0600 Subject: binman: Support ELF files for U-Boot and SPL For sandbox we want to put ELF files in the image since that is what we need to execute. Add support for this. Signed-off-by: Simon Glass --- tools/binman/README.entries | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tools/binman/README.entries') diff --git a/tools/binman/README.entries b/tools/binman/README.entries index 4dd67d64fa..69b435f96e 100644 --- a/tools/binman/README.entries +++ b/tools/binman/README.entries @@ -361,6 +361,17 @@ it available to u_boot_ucode. +Entry: u-boot-elf: U-Boot ELF image +----------------------------------- + +Properties / Entry arguments: + - filename: Filename of u-boot (default 'u-boot') + +This is the U-Boot ELF image. It does not include a device tree but can be +relocated to any address for execution. + + + Entry: u-boot-img: U-Boot legacy image -------------------------------------- @@ -444,6 +455,17 @@ to activate. +Entry: u-boot-spl-elf: U-Boot SPL ELF image +------------------------------------------- + +Properties / Entry arguments: + - filename: Filename of SPL u-boot (default 'spl/u-boot') + +This is the U-Boot SPL ELF image. It does not include a device tree but can +be relocated to any address for execution. + + + Entry: u-boot-spl-nodtb: SPL binary without device tree appended ---------------------------------------------------------------- -- cgit