]> git.baikalelectronics.ru Git - uboot.git/commit
binman: Refuse to replace sections for now
authorAlper Nebi Yasak <alpernebiyasak@gmail.com>
Sun, 27 Mar 2022 15:31:50 +0000 (18:31 +0300)
committerTom Rini <trini@konsulko.com>
Mon, 25 Apr 2022 14:11:05 +0000 (10:11 -0400)
commit35a35a46d4b93a6506b8e258dabcce1148fa6384
treec20fced1d8ddff5fae5a2843b73b79ce9bb187da
parentaf13df46253c6fd5325d4d64ee663e5abf94683d
binman: Refuse to replace sections for now

Binman interfaces allow attempts to replace any entry in the image with
arbitrary data. When trying to replace sections, the changes in the
section entry's data are not propagated to its child entries. This,
combined with how sections rebuild their contents from its children,
eventually causes the replaced contents to be silently overwritten by
rebuilt contents equivalent to the original data.

Add a simple test for replacing a section that is currently failing due
to this behaviour, and mark it as an expected failure. Also, raise an
error when replacing a section instead of silently pretending it was
replaced.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
tools/binman/etype/section.py
tools/binman/ftest.py
tools/binman/test/234_replace_section_simple.dts [new file with mode: 0644]