aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-08-27 08:07:09 -0400
committerTom Rini <trini@konsulko.com>2022-08-27 08:07:09 -0400
commit1573b6a86993fcf80d4badc866a46b78df7e6bda (patch)
treed56567f58fac5b9cd1578df9e0bd5a8982a27235
parentcd3872ce7e5bf90424a10eda0fe405d04e82adb9 (diff)
parentc2ee5ee7b3393770dbe809ca36814083feffaf83 (diff)
downloadu-boot-WIP/27Aug2022.zip
u-boot-WIP/27Aug2022.tar.gz
u-boot-WIP/27Aug2022.tar.bz2
Merge tag 'dm-pull-26aug22' of https://source.denx.de/u-boot/custodians/u-boot-dmWIP/27Aug2022
binman/patman documentation improvements other minor fixes
-rw-r--r--boot/bootmeth_distro.c6
-rw-r--r--boot/bootmeth_pxe.c6
-rw-r--r--boot/vbe.c2
-rw-r--r--boot/vbe_simple.c7
-rw-r--r--cmd/Kconfig2
-rw-r--r--cmd/dm.c2
-rw-r--r--doc/Makefile1
-rw-r--r--doc/develop/bootstd.rst2
-rw-r--r--tools/binman/binman.rst54
-rw-r--r--tools/binman/ftest.py113
-rw-r--r--tools/binman/test/230_dev.key (renamed from tools/binman/test/225_dev.key)0
-rw-r--r--tools/binman/test/230_pre_load.dts (renamed from tools/binman/test/225_pre_load.dts)2
-rw-r--r--tools/binman/test/231_pre_load_pkcs.dts (renamed from tools/binman/test/226_pre_load_pkcs.dts)2
-rw-r--r--tools/binman/test/232_pre_load_pss.dts (renamed from tools/binman/test/227_pre_load_pss.dts)2
-rw-r--r--tools/binman/test/233_pre_load_invalid_padding.dts (renamed from tools/binman/test/228_pre_load_invalid_padding.dts)2
-rw-r--r--tools/binman/test/234_pre_load_invalid_sha.dts (renamed from tools/binman/test/229_pre_load_invalid_sha.dts)2
-rw-r--r--tools/binman/test/235_pre_load_invalid_algo.dts (renamed from tools/binman/test/230_pre_load_invalid_algo.dts)2
-rw-r--r--tools/binman/test/236_pre_load_invalid_key.dts (renamed from tools/binman/test/231_pre_load_invalid_key.dts)2
-rw-r--r--tools/binman/test/237_unique_names.dts (renamed from tools/binman/test/230_unique_names.dts)0
-rw-r--r--tools/binman/test/238_unique_names_multi.dts (renamed from tools/binman/test/231_unique_names_multi.dts)0
-rw-r--r--tools/binman/test/239_replace_with_bintool.dts (renamed from tools/binman/test/232_replace_with_bintool.dts)0
-rw-r--r--tools/binman/test/240_fit_extract_replace.dts (renamed from tools/binman/test/233_fit_extract_replace.dts)0
-rw-r--r--tools/binman/test/241_replace_section_simple.dts (renamed from tools/binman/test/234_replace_section_simple.dts)0
-rw-r--r--tools/binman/test/242_mkimage_name.dts (renamed from tools/binman/test/235_mkimage_name.dts)0
-rw-r--r--tools/binman/test/243_mkimage_image.dts (renamed from tools/binman/test/236_mkimage_image.dts)0
-rw-r--r--tools/binman/test/244_mkimage_image_no_content.dts (renamed from tools/binman/test/237_mkimage_image_no_content.dts)0
-rw-r--r--tools/binman/test/245_mkimage_image_bad.dts (renamed from tools/binman/test/238_mkimage_image_bad.dts)0
-rw-r--r--tools/binman/test/246_collection_other.dts (renamed from tools/binman/test/239_collection_other.dts)0
-rw-r--r--tools/binman/test/247_mkimage_coll.dts (renamed from tools/binman/test/240_mkimage_coll.dts)0
-rw-r--r--tools/binman/test/248_compress_dtb_prepend_invalid.dts (renamed from tools/binman/test/235_compress_dtb_prepend_invalid.dts)0
-rw-r--r--tools/binman/test/249_compress_dtb_prepend_length.dts (renamed from tools/binman/test/236_compress_dtb_prepend_length.dts)0
-rw-r--r--tools/binman/test/250_compress_dtb_invalid.dts (renamed from tools/binman/test/237_compress_dtb_invalid.dts)0
-rw-r--r--tools/binman/test/251_compress_dtb_zstd.dts (renamed from tools/binman/test/238_compress_dtb_zstd.dts)0
-rw-r--r--tools/patman/patman.rst47
34 files changed, 148 insertions, 108 deletions
diff --git a/boot/bootmeth_distro.c b/boot/bootmeth_distro.c
index fea09b2..5c6c687 100644
--- a/boot/bootmeth_distro.c
+++ b/boot/bootmeth_distro.c
@@ -35,8 +35,8 @@ static int distro_get_state_desc(struct udevice *dev, char *buf, int maxsize)
return 0;
}
-static int disto_getfile(struct pxe_context *ctx, const char *file_path,
- char *file_addr, ulong *sizep)
+static int distro_getfile(struct pxe_context *ctx, const char *file_path,
+ char *file_addr, ulong *sizep)
{
struct distro_info *info = ctx->userdata;
ulong addr;
@@ -113,7 +113,7 @@ static int distro_boot(struct udevice *dev, struct bootflow *bflow)
addr = map_to_sysmem(bflow->buf);
info.dev = dev;
info.bflow = bflow;
- ret = pxe_setup_ctx(&ctx, &cmdtp, disto_getfile, &info, true,
+ ret = pxe_setup_ctx(&ctx, &cmdtp, distro_getfile, &info, true,
bflow->subdir);
if (ret)
return log_msg_ret("ctx", -EINVAL);
diff --git a/boot/bootmeth_pxe.c b/boot/bootmeth_pxe.c
index f1e2b4c..e699216 100644
--- a/boot/bootmeth_pxe.c
+++ b/boot/bootmeth_pxe.c
@@ -23,8 +23,8 @@
#include <net.h>
#include <pxe_utils.h>
-static int disto_pxe_getfile(struct pxe_context *ctx, const char *file_path,
- char *file_addr, ulong *sizep)
+static int distro_pxe_getfile(struct pxe_context *ctx, const char *file_path,
+ char *file_addr, ulong *sizep)
{
struct distro_info *info = ctx->userdata;
ulong addr;
@@ -142,7 +142,7 @@ static int distro_pxe_boot(struct udevice *dev, struct bootflow *bflow)
info.dev = dev;
info.bflow = bflow;
info.cmdtp = &cmdtp;
- ret = pxe_setup_ctx(ctx, &cmdtp, disto_pxe_getfile, &info, false,
+ ret = pxe_setup_ctx(ctx, &cmdtp, distro_pxe_getfile, &info, false,
bflow->subdir);
if (ret)
return log_msg_ret("ctx", -EINVAL);
diff --git a/boot/vbe.c b/boot/vbe.c
index e6ee087..52b3283 100644
--- a/boot/vbe.c
+++ b/boot/vbe.c
@@ -40,7 +40,7 @@ int vbe_find_next_device(struct udevice **devp)
int vbe_find_first_device(struct udevice **devp)
{
uclass_find_first_device(UCLASS_BOOTMETH, devp);
- if (*devp && is_vbe(*devp))
+ if (!*devp || is_vbe(*devp))
return 0;
return vbe_find_next_device(devp);
diff --git a/boot/vbe_simple.c b/boot/vbe_simple.c
index a395bc2..0fc5738 100644
--- a/boot/vbe_simple.c
+++ b/boot/vbe_simple.c
@@ -225,17 +225,16 @@ static int bootmeth_vbe_simple_ft_fixup(void *ctx, struct event *event)
{
oftree tree = event->data.ft_fixup.tree;
struct udevice *dev;
- ofnode node;
- int ret;
/*
* Ideally we would have driver model support for fixups, but that does
* not exist yet. It is a step too far to try to do this before VBE is
* in place.
*/
- for (ret = vbe_find_first_device(&dev); dev;
- ret = vbe_find_next_device(&dev)) {
+ for (vbe_find_first_device(&dev); dev; vbe_find_next_device(&dev)) {
struct simple_state state;
+ ofnode node;
+ int ret;
if (strcmp("vbe_simple", dev->driver->name))
continue;
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 211ebe9..8ea064b 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -333,7 +333,7 @@ config BOOTM_RTEMS
config CMD_VBE
bool "vbe - Verified Boot for Embedded"
depends on BOOTMETH_VBE
- default y
+ default y if BOOTSTD_FULL
help
Provides various subcommands related to VBE, such as listing the
available methods, looking at the state and changing which method
diff --git a/cmd/dm.c b/cmd/dm.c
index eb40f08..218be85 100644
--- a/cmd/dm.c
+++ b/cmd/dm.c
@@ -87,7 +87,7 @@ static char dm_help_text[] =
"dm drivers Dump list of drivers with uclass and instances\n"
DM_MEM_HELP
"dm static Dump list of drivers with static platform data\n"
- "dn tree Dump tree of driver model devices ('*' = activated)\n"
+ "dm tree Dump tree of driver model devices ('*' = activated)\n"
"dm uclass Dump list of instances for each uclass"
;
#endif
diff --git a/doc/Makefile b/doc/Makefile
index 6081858..f5de65e 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -58,6 +58,7 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
$(SPHINXBUILD) \
-j$(shell nproc) \
-b $2 \
+ -j auto \
-c $(abspath $(srctree)/$(src)) \
-d $(abspath $(BUILDDIR)/.doctrees/$3) \
-D version=$(KERNELVERSION) -D release=$(KERNELRELEASE) \
diff --git a/doc/develop/bootstd.rst b/doc/develop/bootstd.rst
index f7fc725..1ccc494 100644
--- a/doc/develop/bootstd.rst
+++ b/doc/develop/bootstd.rst
@@ -322,7 +322,7 @@ look like this::
The `sf-bootdev` driver can implement a way to read from the SPI flash, using
the offset and size provided, and return that bootflow file back to the caller.
-When distro boot wants to read the kernel it calls disto_getfile() which must
+When distro boot wants to read the kernel it calls distro_getfile() which must
provide a way to read from the SPI flash. See `distro_boot()` at distro_boot_
for more details.
diff --git a/tools/binman/binman.rst b/tools/binman/binman.rst
index f94fd7e..4ee6f41 100644
--- a/tools/binman/binman.rst
+++ b/tools/binman/binman.rst
@@ -236,6 +236,10 @@ variable. Within binman, this EntryArg is picked up by the `Entry_atf_bl31`
etype. An EntryArg is simply an argument to the entry. The `atf-bl31-path`
name is documented in :ref:`etype_atf_bl31`.
+Taking this a little further, when binman is used to create a FIT, it supports
+using an ELF file, e.g. `bl31.elf` and splitting it into separate pieces (with
+`fit,operation = "split-elf"`), each with its own load address.
+
Invoking binman outside U-Boot
------------------------------
@@ -854,6 +858,55 @@ allow-repack:
image description to be stored in the FDT and fdtmap.
+Image dependencies
+------------------
+
+Binman does not currently support images that depend on each other. For example,
+if one image creates `fred.bin` and then the next uses this `fred.bin` to
+produce a final `image.bin`, then the behaviour is undefined. It may work, or it
+may produce an error about `fred.bin` being missing, or it may use a version of
+`fred.bin` from a previous run.
+
+Often this can be handled by incorporating the dependency into the second
+image. For example, instead of::
+
+ binman {
+ multiple-images;
+
+ fred {
+ u-boot {
+ };
+ fill {
+ size = <0x100>;
+ };
+ };
+
+ image {
+ blob {
+ filename = "fred.bin";
+ };
+ u-boot-spl {
+ };
+ };
+
+you can do this::
+
+ binman {
+ image {
+ fred {
+ type = "section";
+ u-boot {
+ };
+ fill {
+ size = <0x100>;
+ };
+ };
+ u-boot-spl {
+ };
+ };
+
+
+
Hashing Entries
---------------
@@ -1684,6 +1737,7 @@ Some ideas:
- Figure out how to make Fdt support changing the node order, so that
Node.AddSubnode() can support adding a node before another, existing node.
Perhaps it should completely regenerate the flat tree?
+- Support images which depend on each other
--
Simon Glass <sjg@chromium.org>
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index 0b17740..5422940 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -5351,16 +5351,6 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
"Node '/binman/u-boot': Please use 'extend-size' instead of 'expand-size'",
str(e.exception))
- def testMkimageMissingBlob(self):
- """Test using mkimage to build an image"""
- with test_util.capture_sys_output() as (stdout, stderr):
- self._DoTestFile('229_mkimage_missing.dts', allow_missing=True,
- allow_fake_blobs=True)
- err = stderr.getvalue()
- self.assertRegex(
- err,
- "Image '.*' has faked external blobs and is non-functional: .*")
-
def testFitSplitElf(self):
"""Test an image with an FIT with an split-elf operation"""
if not elf.ELF_TOOLS:
@@ -5461,24 +5451,6 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
"Node '/binman/fit': subnode 'images/@atf-SEQ': Failed to read ELF file: Magic number does not match",
str(exc.exception))
- def testFitSplitElfBadDirective(self):
- """Test a FIT split-elf invalid fit,xxx directive in an image node"""
- if not elf.ELF_TOOLS:
- self.skipTest('Python elftools not available')
- err = self._check_bad_fit('227_fit_bad_dir.dts')
- self.assertIn(
- "Node '/binman/fit': subnode 'images/@atf-SEQ': Unknown directive 'fit,something'",
- err)
-
- def testFitSplitElfBadDirectiveConfig(self):
- """Test a FIT split-elf with invalid fit,xxx directive in config"""
- if not elf.ELF_TOOLS:
- self.skipTest('Python elftools not available')
- err = self._check_bad_fit('228_fit_bad_dir_config.dts')
- self.assertEqual(
- "Node '/binman/fit': subnode 'configurations/@config-SEQ': Unknown directive 'fit,config'",
- err)
-
def checkFitSplitElf(self, **kwargs):
"""Test an split-elf FIT with a missing ELF file
@@ -5505,6 +5477,25 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
err = stderr.getvalue()
return out, err
+ def testFitSplitElfBadDirective(self):
+ """Test a FIT split-elf invalid fit,xxx directive in an image node"""
+ if not elf.ELF_TOOLS:
+ self.skipTest('Python elftools not available')
+ err = self._check_bad_fit('227_fit_bad_dir.dts')
+ self.assertIn(
+ "Node '/binman/fit': subnode 'images/@atf-SEQ': Unknown directive 'fit,something'",
+ err)
+
+ def testFitSplitElfBadDirectiveConfig(self):
+ """Test a FIT split-elf with invalid fit,xxx directive in config"""
+ if not elf.ELF_TOOLS:
+ self.skipTest('Python elftools not available')
+ err = self._check_bad_fit('228_fit_bad_dir_config.dts')
+ self.assertEqual(
+ "Node '/binman/fit': subnode 'configurations/@config-SEQ': Unknown directive 'fit,config'",
+ err)
+
+
def testFitSplitElfMissing(self):
"""Test an split-elf FIT with a missing ELF file"""
if not elf.ELF_TOOLS:
@@ -5531,31 +5522,41 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
fname = tools.get_output_filename('binman-fake/missing.elf')
self.assertTrue(os.path.exists(fname))
+ def testMkimageMissingBlob(self):
+ """Test using mkimage to build an image"""
+ with test_util.capture_sys_output() as (stdout, stderr):
+ self._DoTestFile('229_mkimage_missing.dts', allow_missing=True,
+ allow_fake_blobs=True)
+ err = stderr.getvalue()
+ self.assertRegex(
+ err,
+ "Image '.*' has faked external blobs and is non-functional: .*")
+
def testPreLoad(self):
"""Test an image with a pre-load header"""
entry_args = {
'pre-load-key-path': '.',
}
- data, _, _, _ = self._DoReadFileDtb('225_pre_load.dts',
+ data, _, _, _ = self._DoReadFileDtb('230_pre_load.dts',
entry_args=entry_args)
self.assertEqual(PRE_LOAD_MAGIC, data[:len(PRE_LOAD_MAGIC)])
self.assertEqual(PRE_LOAD_VERSION, data[4:4 + len(PRE_LOAD_VERSION)])
self.assertEqual(PRE_LOAD_HDR_SIZE, data[8:8 + len(PRE_LOAD_HDR_SIZE)])
- data = self._DoReadFile('225_pre_load.dts')
+ data = self._DoReadFile('230_pre_load.dts')
self.assertEqual(PRE_LOAD_MAGIC, data[:len(PRE_LOAD_MAGIC)])
self.assertEqual(PRE_LOAD_VERSION, data[4:4 + len(PRE_LOAD_VERSION)])
self.assertEqual(PRE_LOAD_HDR_SIZE, data[8:8 + len(PRE_LOAD_HDR_SIZE)])
def testPreLoadPkcs(self):
"""Test an image with a pre-load header with padding pkcs"""
- data = self._DoReadFile('226_pre_load_pkcs.dts')
+ data = self._DoReadFile('231_pre_load_pkcs.dts')
self.assertEqual(PRE_LOAD_MAGIC, data[:len(PRE_LOAD_MAGIC)])
self.assertEqual(PRE_LOAD_VERSION, data[4:4 + len(PRE_LOAD_VERSION)])
self.assertEqual(PRE_LOAD_HDR_SIZE, data[8:8 + len(PRE_LOAD_HDR_SIZE)])
def testPreLoadPss(self):
"""Test an image with a pre-load header with padding pss"""
- data = self._DoReadFile('227_pre_load_pss.dts')
+ data = self._DoReadFile('232_pre_load_pss.dts')
self.assertEqual(PRE_LOAD_MAGIC, data[:len(PRE_LOAD_MAGIC)])
self.assertEqual(PRE_LOAD_VERSION, data[4:4 + len(PRE_LOAD_VERSION)])
self.assertEqual(PRE_LOAD_HDR_SIZE, data[8:8 + len(PRE_LOAD_HDR_SIZE)])
@@ -5563,22 +5564,22 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
def testPreLoadInvalidPadding(self):
"""Test an image with a pre-load header with an invalid padding"""
with self.assertRaises(ValueError) as e:
- data = self._DoReadFile('228_pre_load_invalid_padding.dts')
+ data = self._DoReadFile('233_pre_load_invalid_padding.dts')
def testPreLoadInvalidSha(self):
"""Test an image with a pre-load header with an invalid hash"""
with self.assertRaises(ValueError) as e:
- data = self._DoReadFile('229_pre_load_invalid_sha.dts')
+ data = self._DoReadFile('234_pre_load_invalid_sha.dts')
def testPreLoadInvalidAlgo(self):
"""Test an image with a pre-load header with an invalid algo"""
with self.assertRaises(ValueError) as e:
- data = self._DoReadFile('230_pre_load_invalid_algo.dts')
+ data = self._DoReadFile('235_pre_load_invalid_algo.dts')
def testPreLoadInvalidKey(self):
"""Test an image with a pre-load header with an invalid key"""
with self.assertRaises(ValueError) as e:
- data = self._DoReadFile('231_pre_load_invalid_key.dts')
+ data = self._DoReadFile('236_pre_load_invalid_key.dts')
def _CheckSafeUniqueNames(self, *images):
"""Check all entries of given images for unsafe unique names"""
@@ -5593,7 +5594,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
def testSafeUniqueNames(self):
"""Test entry unique names are safe in single image configuration"""
- data = self._DoReadFileRealDtb('230_unique_names.dts')
+ data = self._DoReadFileRealDtb('237_unique_names.dts')
orig_image = control.images['image']
image_fname = tools.get_output_filename('image.bin')
@@ -5603,7 +5604,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
def testSafeUniqueNamesMulti(self):
"""Test entry unique names are safe with multiple images"""
- data = self._DoReadFileRealDtb('231_unique_names_multi.dts')
+ data = self._DoReadFileRealDtb('238_unique_names_multi.dts')
orig_image = control.images['image']
image_fname = tools.get_output_filename('image.bin')
@@ -5613,7 +5614,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
def testReplaceCmdWithBintool(self):
"""Test replacing an entry that needs a bintool to pack"""
- data = self._DoReadFileRealDtb('232_replace_with_bintool.dts')
+ data = self._DoReadFileRealDtb('239_replace_with_bintool.dts')
expected = U_BOOT_DATA + b'aa'
self.assertEqual(expected, data[:len(expected)])
@@ -5632,7 +5633,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
def testReplaceCmdOtherWithBintool(self):
"""Test replacing an entry when another needs a bintool to pack"""
- data = self._DoReadFileRealDtb('232_replace_with_bintool.dts')
+ data = self._DoReadFileRealDtb('239_replace_with_bintool.dts')
expected = U_BOOT_DATA + b'aa'
self.assertEqual(expected, data[:len(expected)])
@@ -5672,7 +5673,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
def testExtractFit(self):
"""Test extracting a FIT section"""
- self._DoReadFileRealDtb('233_fit_extract_replace.dts')
+ self._DoReadFileRealDtb('240_fit_extract_replace.dts')
image_fname = tools.get_output_filename('image.bin')
fit_data = control.ReadEntry(image_fname, 'fit')
@@ -5691,7 +5692,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
def testExtractFitSubentries(self):
"""Test extracting FIT section subentries"""
- self._DoReadFileRealDtb('233_fit_extract_replace.dts')
+ self._DoReadFileRealDtb('240_fit_extract_replace.dts')
image_fname = tools.get_output_filename('image.bin')
for entry_path, expected in [
@@ -5710,7 +5711,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
new_data = b'x' * len(U_BOOT_DATA)
data, expected_fdtmap, _ = self._RunReplaceCmd(
'fit/kernel/u-boot', new_data,
- dts='233_fit_extract_replace.dts')
+ dts='240_fit_extract_replace.dts')
self.assertEqual(new_data, data)
path, fdtmap = state.GetFdtContents('fdtmap')
@@ -5722,7 +5723,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
new_data = b'ub' * len(U_BOOT_NODTB_DATA)
data, expected_fdtmap, _ = self._RunReplaceCmd(
'fit/fdt-1/u-boot-nodtb', new_data,
- dts='233_fit_extract_replace.dts')
+ dts='240_fit_extract_replace.dts')
self.assertEqual(new_data, data)
# Will be repacked, so fdtmap must change
@@ -5736,7 +5737,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
expected = new_data.ljust(len(U_BOOT_NODTB_DATA), b'\0')
data, expected_fdtmap, _ = self._RunReplaceCmd(
'fit/fdt-1/u-boot-nodtb', new_data,
- dts='233_fit_extract_replace.dts')
+ dts='240_fit_extract_replace.dts')
self.assertEqual(expected, data)
path, fdtmap = state.GetFdtContents('fdtmap')
@@ -5748,14 +5749,14 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
new_data = b'w' * len(COMPRESS_DATA + U_BOOT_DATA)
with self.assertRaises(ValueError) as exc:
self._RunReplaceCmd('section', new_data,
- dts='234_replace_section_simple.dts')
+ dts='241_replace_section_simple.dts')
self.assertIn(
"Node '/section': Replacing sections is not implemented yet",
str(exc.exception))
def testMkimageImagename(self):
"""Test using mkimage with -n holding the data too"""
- data = self._DoReadFile('235_mkimage_name.dts')
+ data = self._DoReadFile('242_mkimage_name.dts')
# Check that the data appears in the file somewhere
self.assertIn(U_BOOT_SPL_DATA, data)
@@ -5772,7 +5773,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
def testMkimageImage(self):
"""Test using mkimage with -n holding the data too"""
- data = self._DoReadFile('236_mkimage_image.dts')
+ data = self._DoReadFile('243_mkimage_image.dts')
# Check that the data appears in the file somewhere
self.assertIn(U_BOOT_SPL_DATA, data)
@@ -5793,20 +5794,20 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
def testMkimageImageNoContent(self):
"""Test using mkimage with -n and no data"""
with self.assertRaises(ValueError) as exc:
- self._DoReadFile('237_mkimage_image_no_content.dts')
+ self._DoReadFile('244_mkimage_image_no_content.dts')
self.assertIn('Could not complete processing of contents',
str(exc.exception))
def testMkimageImageBad(self):
"""Test using mkimage with imagename node and data-to-imagename"""
with self.assertRaises(ValueError) as exc:
- self._DoReadFile('238_mkimage_image_bad.dts')
+ self._DoReadFile('245_mkimage_image_bad.dts')
self.assertIn('Cannot use both imagename node and data-to-imagename',
str(exc.exception))
def testCollectionOther(self):
"""Test a collection where the data comes from another section"""
- data = self._DoReadFile('239_collection_other.dts')
+ data = self._DoReadFile('246_collection_other.dts')
self.assertEqual(U_BOOT_NODTB_DATA + U_BOOT_DTB_DATA +
tools.get_bytes(0xff, 2) + U_BOOT_NODTB_DATA +
tools.get_bytes(0xfe, 3) + U_BOOT_DTB_DATA,
@@ -5814,20 +5815,20 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
def testMkimageCollection(self):
"""Test using a collection referring to an entry in a mkimage entry"""
- data = self._DoReadFile('240_mkimage_coll.dts')
+ data = self._DoReadFile('247_mkimage_coll.dts')
expect = U_BOOT_SPL_DATA + U_BOOT_DATA
self.assertEqual(expect, data[:len(expect)])
def testCompressDtbPrependInvalid(self):
"""Test that invalid header is detected"""
with self.assertRaises(ValueError) as e:
- self._DoReadFileDtb('235_compress_dtb_prepend_invalid.dts')
+ self._DoReadFileDtb('248_compress_dtb_prepend_invalid.dts')
self.assertIn("Node '/binman/u-boot-dtb': Invalid prepend in "
"'u-boot-dtb': 'invalid'", str(e.exception))
def testCompressDtbPrependLength(self):
"""Test that compress with length header works as expected"""
- data = self._DoReadFileRealDtb('236_compress_dtb_prepend_length.dts')
+ data = self._DoReadFileRealDtb('249_compress_dtb_prepend_length.dts')
image = control.images['image']
entries = image.GetEntries()
self.assertIn('u-boot-dtb', entries)
@@ -5860,7 +5861,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
def testInvalidCompress(self):
"""Test that invalid compress algorithm is detected"""
with self.assertRaises(ValueError) as e:
- self._DoTestFile('237_compress_dtb_invalid.dts')
+ self._DoTestFile('250_compress_dtb_invalid.dts')
self.assertIn("Unknown algorithm 'invalid'", str(e.exception))
def testCompUtilCompressions(self):
@@ -5893,7 +5894,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
def testCompressDtbZstd(self):
"""Test that zstd compress of device-tree files failed"""
with self.assertRaises(ValueError) as e:
- self._DoTestFile('238_compress_dtb_zstd.dts')
+ self._DoTestFile('251_compress_dtb_zstd.dts')
self.assertIn("Node '/binman/u-boot-dtb': The zstd compression "
"requires a length header", str(e.exception))
diff --git a/tools/binman/test/225_dev.key b/tools/binman/test/230_dev.key
index b36bad2..b36bad2 100644
--- a/tools/binman/test/225_dev.key
+++ b/tools/binman/test/230_dev.key
diff --git a/tools/binman/test/225_pre_load.dts b/tools/binman/test/230_pre_load.dts
index c1ffe1a..c0c2472 100644
--- a/tools/binman/test/225_pre_load.dts
+++ b/tools/binman/test/230_pre_load.dts
@@ -10,7 +10,7 @@
pre-load {
content = <&image>;
algo-name = "sha256,rsa2048";
- key-name = "tools/binman/test/225_dev.key";
+ key-name = "tools/binman/test/230_dev.key";
header-size = <4096>;
version = <0x11223344>;
};
diff --git a/tools/binman/test/226_pre_load_pkcs.dts b/tools/binman/test/231_pre_load_pkcs.dts
index 3db0a37..530638c 100644
--- a/tools/binman/test/226_pre_load_pkcs.dts
+++ b/tools/binman/test/231_pre_load_pkcs.dts
@@ -11,7 +11,7 @@
content = <&image>;
algo-name = "sha256,rsa2048";
padding-name = "pkcs-1.5";
- key-name = "tools/binman/test/225_dev.key";
+ key-name = "tools/binman/test/230_dev.key";
header-size = <4096>;
version = <0x11223344>;
};
diff --git a/tools/binman/test/227_pre_load_pss.dts b/tools/binman/test/232_pre_load_pss.dts
index b1b01d5..371e0fd 100644
--- a/tools/binman/test/227_pre_load_pss.dts
+++ b/tools/binman/test/232_pre_load_pss.dts
@@ -11,7 +11,7 @@
content = <&image>;
algo-name = "sha256,rsa2048";
padding-name = "pss";
- key-name = "tools/binman/test/225_dev.key";
+ key-name = "tools/binman/test/230_dev.key";
header-size = <4096>;
version = <0x11223344>;
};
diff --git a/tools/binman/test/228_pre_load_invalid_padding.dts b/tools/binman/test/233_pre_load_invalid_padding.dts
index 84fe289..9cb4cb5 100644
--- a/tools/binman/test/228_pre_load_invalid_padding.dts
+++ b/tools/binman/test/233_pre_load_invalid_padding.dts
@@ -11,7 +11,7 @@
content = <&image>;
algo-name = "sha256,rsa2048";
padding-name = "padding";
- key-name = "tools/binman/test/225_dev.key";
+ key-name = "tools/binman/test/230_dev.key";
header-size = <4096>;
version = <1>;
};
diff --git a/tools/binman/test/229_pre_load_invalid_sha.dts b/tools/binman/test/234_pre_load_invalid_sha.dts
index a2b6725..8ded98d 100644
--- a/tools/binman/test/229_pre_load_invalid_sha.dts
+++ b/tools/binman/test/234_pre_load_invalid_sha.dts
@@ -11,7 +11,7 @@
content = <&image>;
algo-name = "sha2560,rsa2048";
padding-name = "pkcs-1.5";
- key-name = "tools/binman/test/225_dev.key";
+ key-name = "tools/binman/test/230_dev.key";
header-size = <4096>;
version = <1>;
};
diff --git a/tools/binman/test/230_pre_load_invalid_algo.dts b/tools/binman/test/235_pre_load_invalid_algo.dts
index 34c8d34..145286c 100644
--- a/tools/binman/test/230_pre_load_invalid_algo.dts
+++ b/tools/binman/test/235_pre_load_invalid_algo.dts
@@ -11,7 +11,7 @@
content = <&image>;
algo-name = "sha256,rsa20480";
padding-name = "pkcs-1.5";
- key-name = "tools/binman/test/225_dev.key";
+ key-name = "tools/binman/test/230_dev.key";
header-size = <4096>;
version = <1>;
};
diff --git a/tools/binman/test/231_pre_load_invalid_key.dts b/tools/binman/test/236_pre_load_invalid_key.dts
index 08d5a75..df858c3 100644
--- a/tools/binman/test/231_pre_load_invalid_key.dts
+++ b/tools/binman/test/236_pre_load_invalid_key.dts
@@ -11,7 +11,7 @@
content = <&image>;
algo-name = "sha256,rsa4096";
padding-name = "pkcs-1.5";
- key-name = "tools/binman/test/225_dev.key";
+ key-name = "tools/binman/test/230_dev.key";
header-size = <4096>;
version = <1>;
};
diff --git a/tools/binman/test/230_unique_names.dts b/tools/binman/test/237_unique_names.dts
index 6780d37..6780d37 100644
--- a/tools/binman/test/230_unique_names.dts
+++ b/tools/binman/test/237_unique_names.dts
diff --git a/tools/binman/test/231_unique_names_multi.dts b/tools/binman/test/238_unique_names_multi.dts
index db63afb..db63afb 100644
--- a/tools/binman/test/231_unique_names_multi.dts
+++ b/tools/binman/test/238_unique_names_multi.dts
diff --git a/tools/binman/test/232_replace_with_bintool.dts b/tools/binman/test/239_replace_with_bintool.dts
index d7fabd2..d7fabd2 100644
--- a/tools/binman/test/232_replace_with_bintool.dts
+++ b/tools/binman/test/239_replace_with_bintool.dts
diff --git a/tools/binman/test/233_fit_extract_replace.dts b/tools/binman/test/240_fit_extract_replace.dts
index b44d05a..b44d05a 100644
--- a/tools/binman/test/233_fit_extract_replace.dts
+++ b/tools/binman/test/240_fit_extract_replace.dts
diff --git a/tools/binman/test/234_replace_section_simple.dts b/tools/binman/test/241_replace_section_simple.dts
index c9d5c32..c9d5c32 100644
--- a/tools/binman/test/234_replace_section_simple.dts
+++ b/tools/binman/test/241_replace_section_simple.dts
diff --git a/tools/binman/test/235_mkimage_name.dts b/tools/binman/test/242_mkimage_name.dts
index fbc82f1..fbc82f1 100644
--- a/tools/binman/test/235_mkimage_name.dts
+++ b/tools/binman/test/242_mkimage_name.dts
diff --git a/tools/binman/test/236_mkimage_image.dts b/tools/binman/test/243_mkimage_image.dts
index 6b8f4a4..6b8f4a4 100644
--- a/tools/binman/test/236_mkimage_image.dts
+++ b/tools/binman/test/243_mkimage_image.dts
diff --git a/tools/binman/test/237_mkimage_image_no_content.dts b/tools/binman/test/244_mkimage_image_no_content.dts
index 7306c06..7306c06 100644
--- a/tools/binman/test/237_mkimage_image_no_content.dts
+++ b/tools/binman/test/244_mkimage_image_no_content.dts
diff --git a/tools/binman/test/238_mkimage_image_bad.dts b/tools/binman/test/245_mkimage_image_bad.dts
index 54d2c99..54d2c99 100644
--- a/tools/binman/test/238_mkimage_image_bad.dts
+++ b/tools/binman/test/245_mkimage_image_bad.dts
diff --git a/tools/binman/test/239_collection_other.dts b/tools/binman/test/246_collection_other.dts
index 09de20e..09de20e 100644
--- a/tools/binman/test/239_collection_other.dts
+++ b/tools/binman/test/246_collection_other.dts
diff --git a/tools/binman/test/240_mkimage_coll.dts b/tools/binman/test/247_mkimage_coll.dts
index 3086011..3086011 100644
--- a/tools/binman/test/240_mkimage_coll.dts
+++ b/tools/binman/test/247_mkimage_coll.dts
diff --git a/tools/binman/test/235_compress_dtb_prepend_invalid.dts b/tools/binman/test/248_compress_dtb_prepend_invalid.dts
index ee32670..ee32670 100644
--- a/tools/binman/test/235_compress_dtb_prepend_invalid.dts
+++ b/tools/binman/test/248_compress_dtb_prepend_invalid.dts
diff --git a/tools/binman/test/236_compress_dtb_prepend_length.dts b/tools/binman/test/249_compress_dtb_prepend_length.dts
index 1570233..1570233 100644
--- a/tools/binman/test/236_compress_dtb_prepend_length.dts
+++ b/tools/binman/test/249_compress_dtb_prepend_length.dts
diff --git a/tools/binman/test/237_compress_dtb_invalid.dts b/tools/binman/test/250_compress_dtb_invalid.dts
index 2281390..2281390 100644
--- a/tools/binman/test/237_compress_dtb_invalid.dts
+++ b/tools/binman/test/250_compress_dtb_invalid.dts
diff --git a/tools/binman/test/238_compress_dtb_zstd.dts b/tools/binman/test/251_compress_dtb_zstd.dts
index 90cf85d..90cf85d 100644
--- a/tools/binman/test/238_compress_dtb_zstd.dts
+++ b/tools/binman/test/251_compress_dtb_zstd.dts
diff --git a/tools/patman/patman.rst b/tools/patman/patman.rst
index 9226b66..8c5c9cc 100644
--- a/tools/patman/patman.rst
+++ b/tools/patman/patman.rst
@@ -3,7 +3,7 @@
.. Simon Glass <sjg@chromium.org>
.. v1, v2, 19-Oct-11
.. revised v3 24-Nov-11
-.. revised v4 04-Jul-2020, with Patchwork integration
+.. revised v4 Independence Day 2020, with Patchwork integration
Patman patch manager
====================
@@ -11,21 +11,15 @@ Patman patch manager
This tool is a Python script which:
- Creates patch directly from your branch
-
- Cleans them up by removing unwanted tags
-
- Inserts a cover letter with change lists
-
- Runs the patches through checkpatch.pl and its own checks
-
- Optionally emails them out to selected people
It also has some Patchwork features:
- shows review tags from Patchwork so you can update your local patches
-
- pulls these down into a new branch on request
-
- lists comments received on a series
It is intended to automate patch creation and make it a less
@@ -53,15 +47,12 @@ This tool requires a certain way of working:
- Maintain a number of branches, one for each patch series you are
working on
-
- Add tags into the commits within each branch to indicate where the
series should be sent, cover letter, version, etc. Most of these are
normally in the top commit so it is easy to change them with 'git
commit --amend'
-
- Each branch tracks the upstream branch, so that this script can
automatically determine the number of commits in it (optional)
-
- Check out a branch, and run this script to create and send out your
patches. Weeks later, change the patches and repeat, knowing that you
will get a consistent result each time.
@@ -623,41 +614,35 @@ and it will create and send the version 2 series.
General points
--------------
-1. When you change back to the us-cmd branch days or weeks later all your
+#. When you change back to the us-cmd branch days or weeks later all your
information is still there, safely stored in the commits. You don't need
to remember what version you are up to, who you sent the last lot of patches
to, or anything about the change logs.
-
-2. If you put tags in the subject, patman will Cc the maintainers
+#. If you put tags in the subject, patman will Cc the maintainers
automatically in many cases.
-
-3. If you want to keep the commits from each series you sent so that you can
+#. If you want to keep the commits from each series you sent so that you can
compare change and see what you did, you can either create a new branch for
each version, or just tag the branch before you start changing it:
-.. code-block:: bash
+ .. code-block:: bash
git tag sent/us-cmd-rfc
# ...later...
git tag sent/us-cmd-v2
-4. If you want to modify the patches a little before sending, you can do
+#. If you want to modify the patches a little before sending, you can do
this in your editor, but be careful!
-
-5. If you want to run git send-email yourself, use the -n flag which will
+#. If you want to run git send-email yourself, use the -n flag which will
print out the command line patman would have used.
-
-6. It is a good idea to add the change log info as you change the commit,
+#. It is a good idea to add the change log info as you change the commit,
not later when you can't remember which patch you changed. You can always
go back and change or remove logs from commits.
-
-7. Some mailing lists have size limits and when we add binary contents to
+#. Some mailing lists have size limits and when we add binary contents to
our patches it's easy to exceed the size limits. Use "--no-binary" to
generate patches without any binary contents. You are supposed to include
a link to a git repository in your "Commit-notes", "Series-notes" or
"Cover-letter" for maintainers to fetch the original commit.
-
-8. Patches will have no changelog entries for revisions where they did not
+#. Patches will have no changelog entries for revisions where they did not
change. For clarity, if there are no changes for this patch in the most
recent revision of the series, a note will be added. For example, a patch
with the following tags in the commit::
@@ -669,15 +654,15 @@ General points
Series-changes: 4
- Another change
-would have a changelog of:::
+ would have a changelog of:::
- (no changes since v4)
+ (no changes since v4)
- Changes in v4:
- - Another change
+ Changes in v4:
+ - Another change
- Changes in v2:
- - Some change
+ Changes in v2:
+ - Some change
Other thoughts