
On 08/02/2022 21:49, Simon Glass wrote:
At present the 'args' property of the mkimage entry type is a string. This makes it difficult to include CONFIG options in that property. In particular, this does not work:
args = "-n CONFIG_SYS_SOC -E"
since the preprocessor does not operate within strings, nor does this:
args = "-n" CONFIG_SYS_SOC" "-E"
since the device tree compiler does not understand string concatenation.
Fun fact, I got something like this roughly working:
#define _QUOTE(x) #x #define QUOTE(x) _QUOTE(x)
#define MKIMAGE_ARGS QUOTE( \ -A arm -T kernel -C none -O linux -n U-Boot \ -a CONFIG_SYS_TEXT_BASE -e CONFIG_SYS_TEXT_BASE \ )
But obviously a string list is the better choice.
With this new feature, we can do:
args = "-n", CONFIG_SYS_SOC, "-E";
Signed-off-by: Simon Glass sjg@chromium.org
tools/binman/entries.rst | 11 +++++++++++ tools/binman/etype/mkimage.py | 13 ++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-)
Applied to u-boot-dm, thanks!