sign_cr50_firmware: improve error reporting

In case jq does not find a node in the JSON file, it still returns
with exit code of 0, it just prints 'null' instead of the expected
node value.

This patch adds processing this error condition, which makes it easier
to troubleshoot the case of misconfigured Cr50 signing manifest.

TEST=tried using the script with a manifest which does not have the
     node of board_id_flags defined. Observed error message of ERROR  : bid_flags not found in...

     instead of previous error reported as line 53: null: unbound variable

Change-Id: I70acff7a3331b01f0f964f2942bf2806a2af8691
Signed-off-by: Vadim Bendebury <>
Reviewed-by: Mike Frysinger <>
1 file changed