Commit 411f0252 authored by Chuck Cannon's avatar Chuck Cannon

Add patch image type.

Signed-off-by: default avatarChuck Cannon <chuck.cannon@nxp.com>
(cherry picked from commit e0eade91e2efc8b63b77b067c4ab882a35af82ef)
parent ab91ec14
...@@ -112,10 +112,12 @@ typedef struct { ...@@ -112,10 +112,12 @@ typedef struct {
#define SC_R_OTP 357U #define SC_R_OTP 357U
#define SC_R_DEBUG 354U #define SC_R_DEBUG 354U
#define SC_R_ROM_0 236U #define SC_R_ROM_0 236U
#define SC_R_SNVS 356U
#define MSG_DEBUG_EN SC_R_DEBUG #define MSG_DEBUG_EN SC_R_DEBUG
#define MSG_FUSE SC_R_OTP #define MSG_FUSE SC_R_OTP
#define MSG_FIELD SC_R_ROM_0 #define MSG_FIELD SC_R_ROM_0
#define MSG_PATCH SC_R_SNVS
#define IMG_TYPE_CSF 0x01 /* CSF image type */ #define IMG_TYPE_CSF 0x01 /* CSF image type */
#define IMG_TYPE_SCD 0x02 /* SCD image type */ #define IMG_TYPE_SCD 0x02 /* SCD image type */
......
...@@ -762,6 +762,8 @@ int main(int argc, char **argv) ...@@ -762,6 +762,8 @@ int main(int argc, char **argv)
param_stack[p_idx].ext = SC_R_DEBUG; param_stack[p_idx].ext = SC_R_DEBUG;
else if (!strncmp(argv[optind], "field", 5)) else if (!strncmp(argv[optind], "field", 5))
param_stack[p_idx].ext = SC_R_ROM_0; param_stack[p_idx].ext = SC_R_ROM_0;
else if (!strncmp(argv[optind], "patch", 5))
param_stack[p_idx].ext = SC_R_SNVS;
else { else {
fprintf(stderr, "ERROR: MSG type not found %s\n", argv[optind+2]); fprintf(stderr, "ERROR: MSG type not found %s\n", argv[optind+2]);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
...@@ -772,7 +774,7 @@ int main(int argc, char **argv) ...@@ -772,7 +774,7 @@ int main(int argc, char **argv)
fprintf(stdout, " addr: 0x%08" PRIx64 "\n", param_stack[p_idx++].entry); fprintf(stdout, " addr: 0x%08" PRIx64 "\n", param_stack[p_idx++].entry);
} else { } else {
fprintf(stderr, "\nmsg block option require THREE arguments: filename, debug/fuse/field, start address in hex\n\n"); fprintf(stderr, "\nmsg block option require THREE arguments: filename, debug/fuse/field/patch, start address in hex\n\n");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
break; break;
......
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