Skip to content

sof_ri_info: new 'reproducible.ri' feature + test - #4889

Merged
lgirdwood merged 11 commits into
thesofproject:mainfrom
marc-hb:reproducible-ri
Oct 21, 2021
Merged

lgirdwood merged 11 commits into
thesofproject:mainfrom
marc-hb:reproducible-ri

Conversation

@marc-hb

@marc-hb marc-hb commented Oct 19, 2021

Copy link
Copy Markdown
Collaborator

reproducible.ri is sof.ri with variable parts removed.

Finally, different people and CI systems can make sure they're running the same firmware.

Pure comments, no code change.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Also convert 'differ' to all caps 'DIFFER' to highlight different files.
No other functional change.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This broke parsing any extension past the first one.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fixes the adsp_mft_cse_entry Component added by
commit 8885b46 ("tools: sof-ri-info: move parsing adsp mft outside
cse mft").

`adsp_mft_cse_entry.entry_file_offset` did not account for the extended
manifest.

Also fix the large `reader.ext_mft_length + entry_offset`
copy/paste/diverge

That variable did not seem to be used anywhere yet but it's wrong value
was confusing and time-consuming when debugging.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
File offsets were critical in finding the serious begin_off bug fixed in
the same series. The information is already there so just show it.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
stderr is often highlighted with a different color.
This also makes the usual >/dev/null redirection possible.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
These changes are visible only in -v mode.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Add:

... to reduce pylint warnings to a usable amount.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Signature and date are (for now) the only variable fields when
re-signing with the same tool so their locations matter.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
   sof_ri_info.py  --erase_vars reproducible.ri sof.ri

replaces variable fields (signature and date right now) by constants.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Update the scripts/test-repro-build.sh test accordingly.

Finally, different people and CI systems can make sure they're building
the same firmware.

reproducible.ri is sof.ri with variable parts removed.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
@marc-hb

marc-hb commented Oct 19, 2021 •

Copy link
Copy Markdown
Collaborator Author

I wrote a quick and dirty for loop that uses this new sof_ri_info.py version to compare every sof-bin/vN.M/intel-signed/sof-xxx.ri with its corresponding sof-bin/vN.M/intel-community/sof-xxx.ri and they all match. I might clean it and add it to CI later.

https://sof-ci.01.org/sofpr/PR4889/build10762/devicetest/?model=CML_RVP_SDW&testcase=check-suspend-resume-with-capture-5 is the usual TIMEOUT thesofproject/sof-test#650. Everything else is green.

QB is still running the last force-push but a previous version passed everything: https://sof-ci.01.org/sof-pr-viewer/#/build/PR4889/build7677288 EDIT: https://sof-ci.01.org/sof-pr-viewer/#/build/PR4889/build7679835 is all green too.

@lgirdwood lgirdwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @marc-hb - next steps for this tool is adding or validating support for IPC4 manifest (may partially be supported today ?)

@lgirdwood
lgirdwood merged commit 9818410 into thesofproject:main Oct 21, 2021
@marc-hb
marc-hb deleted the reproducible-ri branch October 26, 2021 01:17
@marc-hb

marc-hb commented Oct 26, 2021

Copy link
Copy Markdown
Collaborator Author

@bardliao did you try tools/sof_ri_info with the new manifest? (thesofproject/linux#3176)

I tried enabling IPC4 in Kconfig (interesting compiler warnings...) but that alone makes no difference with respect to rimage and the image file, does it? sof_ri_info seems to show the same thing.

@bardliao

Copy link
Copy Markdown
Collaborator

@bardliao did you try tools/sof_ri_info with the new manifest? (thesofproject/linux#3176)

I tried enabling IPC4 in Kconfig (interesting compiler warnings...) but that alone makes no difference with respect to rimage and the image file, does it? sof_ri_info seems to show the same thing.

@marc-hb Yes, and I do see some difference when I set CONFIG_IPC_MAJOR_4=y See
sof_ri_info_tgl_ipc4.txt
sof_ri_info_tgl.txt
Note that I need to remove -Werror in src/arch/xtensa/CMakeLists.txt to build with CONFIG_IPC_MAJOR_4=y.
@RanderWang FYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants