Commit 9504b2fc authored by Marek Vasut's avatar Marek Vasut

mxssb: Wrap the verbose boot flag into image context

The verbose boot flag should be part of the image context, make it so.
Signed-off-by: Marek Vasut's avatarMarek Vasut <marex@denx.de>
parent 558ee873
......@@ -66,7 +66,7 @@ struct sb_section_ctx {
struct sb_image_ctx {
enum sb_target_cpu target_cpu;
int verbose_boot;
unsigned int verbose_boot:1;
struct sb_section_ctx *sect;
EVP_CIPHER_CTX cipher_ctx;
......@@ -79,8 +79,6 @@ struct sb_image_ctx {
struct sb_boot_image_header payload;
};
static int verbose_boot = 0;
#define SB_IVT_LOAD_ADDR 0x8000
#define SB_SPL_LOAD_ADDR 0x0
#define SB_SPL_ENTRY_ADDR 0x14
......@@ -744,7 +742,7 @@ static int sb_prefill_image_header(struct sb_image_ctx *ictx)
hdr->timestamp_us = sb_get_timestamp() * 1000000;
/* FIXME -- add proper config option */
hdr->flags = verbose_boot ? SB_IMAGE_FLAG_VERBOSE : 0,
hdr->flags = ictx->verbose_boot ? SB_IMAGE_FLAG_VERBOSE : 0,
/* FIXME -- We support only default key */
hdr->key_count = 1;
......@@ -980,7 +978,7 @@ int main(int argc, char **argv)
output_filename = optarg;
break;
case 'v':
verbose_boot = 1;
ctx.verbose_boot = 1;
break;
case 'h':
print_help(argv[0]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment