From 9dbb02b9d124e03a141de1244c8b4f4843d58840 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 12 Feb 2023 17:11:15 -0700 Subject: binman: Support marking FMAP areas as preserved Add an entry flag called 'preserve' to indicate that an entry should be preserved by firmware updates. Propagate this to FMAP too. Signed-off-by: Simon Glass --- tools/binman/fmap_util.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/binman/fmap_util.py') diff --git a/tools/binman/fmap_util.py b/tools/binman/fmap_util.py index 1ce63d1a832..82e0f74d50f 100644 --- a/tools/binman/fmap_util.py +++ b/tools/binman/fmap_util.py @@ -45,6 +45,9 @@ FMAP_AREA_NAMES = ( 'flags', ) +# Flags supported by areas (bits 2:0 are unused so not included here) +FMAP_AREA_PRESERVE = 1 << 3 # Preserved by any firmware updates + # These are the two data structures supported by flashrom, a header (which # appears once at the start) and an area (which is repeated until the end of # the list of areas) -- cgit v1.2.3 From 4583c00236efd4ee768ff874f92526c229891a05 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 23 Feb 2023 18:18:04 -0700 Subject: patman: Move library functions into a library directory The patman directory has a number of modules which are used by other tools in U-Boot. This makes it hard to package the tools using pypi since the common files must be copied along with the tool that uses them. To address this, move these files into a new u_boot_pylib library. This can be packaged separately and listed as a dependency of each tool. Signed-off-by: Simon Glass --- tools/binman/fmap_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/binman/fmap_util.py') diff --git a/tools/binman/fmap_util.py b/tools/binman/fmap_util.py index 82e0f74d50f..40f2dbfe0f5 100644 --- a/tools/binman/fmap_util.py +++ b/tools/binman/fmap_util.py @@ -10,7 +10,7 @@ import collections import struct import sys -from patman import tools +from u_boot_pylib import tools # constants imported from lib/fmap.h FMAP_SIGNATURE = b'__FMAP__' -- cgit v1.2.3