History log of /u-boot/tools/binman/test/053_symbols.dts
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 367ecbf2 18-Jun-2022 Alper Nebi Yasak <alpernebiyasak@gmail.com>

spl: binman: Check at runtime if binman symbols were filled in

Binman lets us declare symbols in SPL/TPL that refer to other entries in
the same binman image as them. These symbols are filled in with the
correct values while binman assembles the images, but this is done
in-memory only. Symbols marked as optional can be filled with
BINMAN_SYM_MISSING as an error value if their referred entry is missing.

However, the unmodified SPL/TPL binaries are still available on disk,
and can be used by people. For these files, nothing ensures that the
symbols are set to this error value, and they will be considered valid
when they are not.

Empirically, all symbols show up as zero in a sandbox_vpl build when we
run e.g. tpl/u-boot-tpl directly. On the other hand, zero is a perfectly
fine value for a binman-written symbol, so we cannot say the symbols
have wrong values based on that.

Declare a magic symbol that binman always fills in with a fixed value.
Check this value as an indicator that symbols were filled in correctly.
Return the error value for all symbols when this magic symbol has the
wrong value.

For binman tests, we need to make room for the new symbol in the mocked
SPL/TPL data by extending them by four bytes. This messes up some test
image layouts. Fix the affected values, and check the magic symbol
wherever it makes sense.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>

# f589882a 18-Mar-2021 Simon Glass <sjg@chromium.org>

binman: Support symbols in u-boot-spl-nodtb

Since this is an execuable we should be able insert symbol values into it.
Add support for this.

Use common code for this test and the original testSymbols. Use hex
consistently for the values and add some more comments.

Signed-off-by: Simon Glass <sjg@chromium.org>

# eb0086fa 24-Aug-2019 Simon Glass <sjg@chromium.org>

binman: Increase size of TPL and SPL test data

At present these are large enough to hold 20 bytes of symbol data. Add
four more bytes so we can add another test.

Unfortunately at present this involves changing a few test files to make
room. We could adjust the test files to not specify sizes for entries.
Then we could make the tests check the actual sizes. But for now, leave it
as it is, since the effort is minor.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 741f2d62 01-Oct-2018 Simon Glass <sjg@chromium.org>

binman: Move to three-digit test-file numbers

We now have 99 tests. Before adding any more, rename everything to three
digits. This helps to preserve the ordering of tests and makes it easier
to find things.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f589882a 18-Mar-2021 Simon Glass <sjg@chromium.org>

binman: Support symbols in u-boot-spl-nodtb

Since this is an execuable we should be able insert symbol values into it.
Add support for this.

Use common code for this test and the original testSymbols. Use hex
consistently for the values and add some more comments.

Signed-off-by: Simon Glass <sjg@chromium.org>

# eb0086fa 24-Aug-2019 Simon Glass <sjg@chromium.org>

binman: Increase size of TPL and SPL test data

At present these are large enough to hold 20 bytes of symbol data. Add
four more bytes so we can add another test.

Unfortunately at present this involves changing a few test files to make
room. We could adjust the test files to not specify sizes for entries.
Then we could make the tests check the actual sizes. But for now, leave it
as it is, since the effort is minor.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 741f2d62 01-Oct-2018 Simon Glass <sjg@chromium.org>

binman: Move to three-digit test-file numbers

We now have 99 tests. Before adding any more, rename everything to three
digits. This helps to preserve the ordering of tests and makes it easier
to find things.

Signed-off-by: Simon Glass <sjg@chromium.org>

# eb0086fa 24-Aug-2019 Simon Glass <sjg@chromium.org>

binman: Increase size of TPL and SPL test data

At present these are large enough to hold 20 bytes of symbol data. Add
four more bytes so we can add another test.

Unfortunately at present this involves changing a few test files to make
room. We could adjust the test files to not specify sizes for entries.
Then we could make the tests check the actual sizes. But for now, leave it
as it is, since the effort is minor.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 741f2d62 01-Oct-2018 Simon Glass <sjg@chromium.org>

binman: Move to three-digit test-file numbers

We now have 99 tests. Before adding any more, rename everything to three
digits. This helps to preserve the ordering of tests and makes it easier
to find things.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 741f2d62 01-Oct-2018 Simon Glass <sjg@chromium.org>

binman: Move to three-digit test-file numbers

We now have 99 tests. Before adding any more, rename everything to three
digits. This helps to preserve the ordering of tests and makes it easier
to find things.

Signed-off-by: Simon Glass <sjg@chromium.org>