Message ID | 0513d382abefaa0cab02bd85e120f544d1ef8e6d.1717599504.git.michal.simek@amd.com |
---|---|
State | Accepted, archived |
Commit | a53fb767cf62b300a6b975bc174c892bc103be17 |
Delegated to: | Heinrich Schuchardt |
Headers | show |
Series | cmd: fwu: Also print information about size | expand |
On Wed, 5 Jun 2024 at 17:58, Michal Simek <michal.simek@amd.com> wrote: > > It is useful when structure is also used for saving vendor data covered > by CRC32. > > Signed-off-by: Michal Simek <michal.simek@amd.com> > --- > > cmd/fwu_mdata.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/cmd/fwu_mdata.c b/cmd/fwu_mdata.c > index 3c8be576ac7a..9c048d69a131 100644 > --- a/cmd/fwu_mdata.c > +++ b/cmd/fwu_mdata.c > @@ -22,6 +22,7 @@ static void print_mdata(struct fwu_data *data) > printf("\tFWU Metadata\n"); > printf("crc32: %#x\n", data->crc32); > printf("version: %#x\n", data->version); > + printf("size: %#x\n", data->metadata_size); That's only available in v2 IS_ENABLED(CONFIG_FWU_MDATA_V1) etc? > printf("active_index: %#x\n", data->active_index); > printf("previous_active_index: %#x\n", data->previous_active_index); > > -- > 2.40.1 > Cheers /Ilias
On 6/5/24 17:09, Ilias Apalodimas wrote: > On Wed, 5 Jun 2024 at 17:58, Michal Simek <michal.simek@amd.com> wrote: >> >> It is useful when structure is also used for saving vendor data covered >> by CRC32. >> >> Signed-off-by: Michal Simek <michal.simek@amd.com> >> --- >> >> cmd/fwu_mdata.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/cmd/fwu_mdata.c b/cmd/fwu_mdata.c >> index 3c8be576ac7a..9c048d69a131 100644 >> --- a/cmd/fwu_mdata.c >> +++ b/cmd/fwu_mdata.c >> @@ -22,6 +22,7 @@ static void print_mdata(struct fwu_data *data) >> printf("\tFWU Metadata\n"); >> printf("crc32: %#x\n", data->crc32); >> printf("version: %#x\n", data->version); >> + printf("size: %#x\n", data->metadata_size); > > That's only available in v2 > IS_ENABLED(CONFIG_FWU_MDATA_V1) etc? This field should be present in v1 and v2 case because it is the part of fwu_data (u-boot private structure) not fwu_mdata (which match the spec). But I have sent v2 and only printing it in v2 case. Thanks, Michal
On Thu, 6 Jun 2024 at 09:38, Michal Simek <michal.simek@amd.com> wrote: > > > > On 6/5/24 17:09, Ilias Apalodimas wrote: > > On Wed, 5 Jun 2024 at 17:58, Michal Simek <michal.simek@amd.com> wrote: > >> > >> It is useful when structure is also used for saving vendor data covered > >> by CRC32. > >> > >> Signed-off-by: Michal Simek <michal.simek@amd.com> > >> --- > >> > >> cmd/fwu_mdata.c | 1 + > >> 1 file changed, 1 insertion(+) > >> > >> diff --git a/cmd/fwu_mdata.c b/cmd/fwu_mdata.c > >> index 3c8be576ac7a..9c048d69a131 100644 > >> --- a/cmd/fwu_mdata.c > >> +++ b/cmd/fwu_mdata.c > >> @@ -22,6 +22,7 @@ static void print_mdata(struct fwu_data *data) > >> printf("\tFWU Metadata\n"); > >> printf("crc32: %#x\n", data->crc32); > >> printf("version: %#x\n", data->version); > >> + printf("size: %#x\n", data->metadata_size); > > > > That's only available in v2 > > IS_ENABLED(CONFIG_FWU_MDATA_V1) etc? > > This field should be present in v1 and v2 case because it is the part of > fwu_data (u-boot private structure) not fwu_mdata (which match the spec). > But I have sent v2 and only printing it in v2 case. Ah you are right, I was looking at an older tree.... Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> > > Thanks, > Michal
diff --git a/cmd/fwu_mdata.c b/cmd/fwu_mdata.c index 3c8be576ac7a..9c048d69a131 100644 --- a/cmd/fwu_mdata.c +++ b/cmd/fwu_mdata.c @@ -22,6 +22,7 @@ static void print_mdata(struct fwu_data *data) printf("\tFWU Metadata\n"); printf("crc32: %#x\n", data->crc32); printf("version: %#x\n", data->version); + printf("size: %#x\n", data->metadata_size); printf("active_index: %#x\n", data->active_index); printf("previous_active_index: %#x\n", data->previous_active_index);
It is useful when structure is also used for saving vendor data covered by CRC32. Signed-off-by: Michal Simek <michal.simek@amd.com> --- cmd/fwu_mdata.c | 1 + 1 file changed, 1 insertion(+)