binman: Use the fake SPL/TPL only if requested
authorSimon Glass <sjg@chromium.org>
Thu, 18 Mar 2021 07:25:00 +0000 (20:25 +1300)
committerSimon Glass <sjg@chromium.org>
Fri, 26 Mar 2021 04:03:09 +0000 (17:03 +1300)
commit7697170e780bb13e7ace7035d8995190f79fc2f3
tree9a7b26f10b16fde7af4422b8a14380aeee1eac06
parent30e1b0944ffc7c5ca5bae9344fe3f21c66b3f86d
binman: Use the fake SPL/TPL only if requested

At present we always use the main devicetree for SPL/TPL as well when
setting up the state. But this it not needed if there is a real devicetree
for SPL or TPL. In fact it confuses things since we cannot distinguish
between one being provided and using the fake one.

Update the code to create the fakes only when requested. Put the mapping
in a constant so we can use it elsewhere.

Rename 'other_fname' to 'fname' while we are here since there is nothing
'other' about it.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/binman/state.py