Commit 0d08a216 authored by Marek Vasut's avatar Marek Vasut

mxssb: Rename image processing function

Rename the functions to better match their purpose. This will come
helpful when implementing image verification.
Signed-off-by: Marek Vasut's avatarMarek Vasut <marex@denx.de>
parent 99830d57
...@@ -264,7 +264,7 @@ static void sb_encrypt_tag(struct sb_image_ctx *ictx, ...@@ -264,7 +264,7 @@ static void sb_encrypt_tag(struct sb_image_ctx *ictx,
EVP_DigestUpdate(md_ctx, &cctx->c_payload, sizeof(*cmd)); EVP_DigestUpdate(md_ctx, &cctx->c_payload, sizeof(*cmd));
} }
static int sb_create_image(struct sb_image_ctx *ictx) static int sb_encrypt_image(struct sb_image_ctx *ictx)
{ {
/* Start image-wide crypto. */ /* Start image-wide crypto. */
EVP_MD_CTX_init(&ictx->md_ctx); EVP_MD_CTX_init(&ictx->md_ctx);
...@@ -336,7 +336,7 @@ static int sb_create_image(struct sb_image_ctx *ictx) ...@@ -336,7 +336,7 @@ static int sb_create_image(struct sb_image_ctx *ictx)
char *output_filename = NULL; char *output_filename = NULL;
static int sb_assemble_image(struct sb_image_ctx *ictx) static int sb_write_image(struct sb_image_ctx *ictx)
{ {
struct sb_boot_image_header *sb_header = &ictx->payload; struct sb_boot_image_header *sb_header = &ictx->payload;
struct sb_section_ctx *sctx; struct sb_section_ctx *sctx;
...@@ -1306,7 +1306,7 @@ err_open: ...@@ -1306,7 +1306,7 @@ err_open:
} }
static int sb_parse_image(struct sb_image_ctx *ictx) static int sb_build_tree_from_cfg(struct sb_image_ctx *ictx)
{ {
int ret; int ret;
...@@ -1402,13 +1402,13 @@ int main(int argc, char **argv) ...@@ -1402,13 +1402,13 @@ int main(int argc, char **argv)
return -EINVAL; return -EINVAL;
} }
ret = sb_parse_image(&ctx); ret = sb_build_tree_from_cfg(&ctx);
if (ret) if (ret)
goto fail; goto fail;
ret = sb_create_image(&ctx); ret = sb_encrypt_image(&ctx);
if (!ret) if (!ret)
ret = sb_assemble_image(&ctx); ret = sb_write_image(&ctx);
fail: fail:
sb_free_image(&ctx); sb_free_image(&ctx);
......
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