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 | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'tools/binman/README') diff --git a/tools/binman/README b/tools/binman/README index 9d9d1832ee..10dfe5766d 100644 --- a/tools/binman/README +++ b/tools/binman/README @@ -462,17 +462,6 @@ see README.entries. This is generated from the source code using: binman -E >tools/binman/README.entries -Special properties ------------------- - -Some entries support special properties, documented here: - -u-boot-with-ucode-ptr: - optional-ucode: boolean property to make microcode optional. If the - u-boot.bin image does not include microcode, no error will - be generated. - - Order of image creation ----------------------- -- 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 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tools/binman/README') diff --git a/tools/binman/README b/tools/binman/README index 10dfe5766d..d6871946ab 100644 --- a/tools/binman/README +++ b/tools/binman/README @@ -593,6 +593,22 @@ the device tree. These can be used by U-Boot at run-time to find the location of each entry. +Compression +----------- + +Binman support compression for 'blob' entries (those of type 'blob' and +derivatives). To enable this for an entry, add a 'compression' property: + + blob { + filename = "datafile"; + compression = "lz4"; + }; + +The entry will then contain the compressed data, using the 'lz4' compression +algorithm. Currently this is the only one that is supported. + + + Map files --------- -- cgit From ba64a0bbb7b7128479a97fdf58baa9ddfbfe4db6 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 14 Sep 2018 04:57:29 -0600 Subject: binman: Support expanding entries It is useful to have entries which can grow automatically to fill available space. Add support for this. Signed-off-by: Simon Glass --- tools/binman/README | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/binman/README') diff --git a/tools/binman/README b/tools/binman/README index d6871946ab..6aa5b38419 100644 --- a/tools/binman/README +++ b/tools/binman/README @@ -330,6 +330,10 @@ image-pos: for each entry. This makes it easy to find out exactly where the entry ended up in the image, regardless of parent sections, etc. +expand-size: + Expand the size of this entry to fit available space. This space is only + limited by the size of the image/section and the position of the next + entry. The attributes supported for images are described below. Several are similar to those for entries. -- cgit From 9c888cca5e87e28e9addcffae9810fee481428a8 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 14 Sep 2018 04:57:30 -0600 Subject: binman: Mention section attributes in docs Images and sections have the same attributes, since an image is mostly just a top-level section. Update the docs to explain this. Signed-off-by: Simon Glass --- tools/binman/README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/binman/README') diff --git a/tools/binman/README b/tools/binman/README index 6aa5b38419..cf1a06d164 100644 --- a/tools/binman/README +++ b/tools/binman/README @@ -335,8 +335,8 @@ expand-size: limited by the size of the image/section and the position of the next entry. -The attributes supported for images are described below. Several are similar -to those for entries. +The attributes supported for images and sections are described below. Several +are similar to those for entries. size: Sets the image size in bytes, for example 'size = <0x100000>' for a -- cgit From e0e5df9310d3a0e1fc0eda86ff43fd3e782e61f1 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 14 Sep 2018 04:57:31 -0600 Subject: binman: Support hashing entries Sometimesi it us useful to be able to verify the content of entries with a hash. Add an easy way to do this in binman. The hash information can be retrieved from the device tree at run time. Signed-off-by: Simon Glass --- tools/binman/README | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tools/binman/README') diff --git a/tools/binman/README b/tools/binman/README index cf1a06d164..088f3a63d9 100644 --- a/tools/binman/README +++ b/tools/binman/README @@ -466,6 +466,28 @@ see README.entries. This is generated from the source code using: binman -E >tools/binman/README.entries +Hashing Entries +--------------- + +It is possible to ask binman to hash the contents of an entry and write that +value back to the device-tree node. For example: + + binman { + u-boot { + hash { + algo = "sha256"; + }; + }; + }; + +Here, a new 'value' property will be written to the 'hash' node containing +the hash of the 'u-boot' entry. Only SHA256 is supported at present. Whole +sections can be hased if desired, by adding the 'hash' node to the section. + +The has value can be chcked at runtime by hashing the data actually read and +comparing this has to the value in the device tree. + + Order of image creation ----------------------- -- cgit