mirror of https://github.com/thesofproject/sof.git
logger: when FW is loaded, show the expected checksum in -d output
Sample output: logger ABI Version is 5:3:0 ldc_file ABI Version is 5:3:0 ldc_file src checksum 0x07d4f1ad Loaded FW expects chksum 0x07d4f1ad <=== NEW! Components uuid dictionary size: 2400 bytes Components uuid base address: 0x1fffa000 ... Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
parent
4aaffbe9a2
commit
352ed2ca4b
|
@ -959,9 +959,6 @@ static int verify_ldc_checksum(const uint32_t ldc_sum)
|
|||
struct sof_ipc_fw_version ver;
|
||||
int count;
|
||||
|
||||
if (!global_config->version_fw) /* -n option */
|
||||
return 0;
|
||||
|
||||
/* here fw verification should be exploited */
|
||||
count = fread(&ver, sizeof(ver), 1, global_config->version_fd);
|
||||
if (!count) {
|
||||
|
@ -997,9 +994,17 @@ static int dump_ldc_info(void)
|
|||
SOF_ABI_VERSION_MAJOR(global_config->logs_header->version.abi_version),
|
||||
SOF_ABI_VERSION_MINOR(global_config->logs_header->version.abi_version),
|
||||
SOF_ABI_VERSION_PATCH(global_config->logs_header->version.abi_version));
|
||||
fprintf(out_fd, "ldc_file src checksum\t0x%08x\n",
|
||||
fprintf(out_fd, "ldc_file src checksum\t\t0x%08x\n",
|
||||
global_config->logs_header->version.src_hash);
|
||||
|
||||
if (global_config->version_fd) {
|
||||
struct sof_ipc_fw_version ver;
|
||||
|
||||
if (fread(&ver, sizeof(ver), 1, global_config->version_fd))
|
||||
fprintf(out_fd, "Loaded FW expects checksum\t0x%08x\n",
|
||||
ver.src_hash);
|
||||
}
|
||||
|
||||
fprintf(out_fd, "\n");
|
||||
fprintf(out_fd, "Components uuid dictionary size:\t%zd bytes\n",
|
||||
remaining);
|
||||
|
@ -1050,9 +1055,12 @@ int convert(struct convert_config *config)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = verify_ldc_checksum(global_config->logs_header->version.src_hash);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (global_config->version_fw && /* -n option */
|
||||
!global_config->dump_ldc) {
|
||||
ret = verify_ldc_checksum(global_config->logs_header->version.src_hash);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* default logger and ldc_file abi verification */
|
||||
if (SOF_ABI_VERSION_INCOMPATIBLE(SOF_ABI_DBG_VERSION,
|
||||
|
|
|
@ -270,7 +270,6 @@ int main(int argc, char *argv[])
|
|||
usage();
|
||||
}
|
||||
config.dump_ldc = 1;
|
||||
config.version_fw = 0;
|
||||
config.ldc_file = optarg;
|
||||
break;
|
||||
case 'F':
|
||||
|
@ -307,7 +306,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
if (config.version_fw) {
|
||||
config.version_fd = fopen(config.version_file, "rb");
|
||||
if (!config.version_fd) {
|
||||
if (!config.version_fd && !config.dump_ldc) {
|
||||
ret = errno;
|
||||
fprintf(stderr,
|
||||
"error: Unable to open version file %s: %s\n",
|
||||
|
|
Loading…
Reference in New Issue