Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So why should this be enabled by default for every build when it provides no use to nearly every zephyr user and those that want to use it can enable it manually with menuconfig or in their prj.conf?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree with @nordicjm .
If someone want to enable this per default, then they can easily do this in a samples
prj.conf
, in their custom board Kconfig, in their custom Zephyr module, etc.I'm not convinced this should default to
y
for everyone.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR has two "insurance" purposes that you have not yet commented on. It's normal to think you don't need insurance against a risk you have never considered.
Reproducible builds and security, see a sample checksumming use in xtensa-build-zephyr.py: install and checksum .elf, .lst and other files thesofproject/sof#6501. Security is not something users generally perceive as "useful", usually the opposite. This PR is special because it will help with security without anyone even noticing - until they are actually targeted by some supply-chain attack and then realize the value.
Making sure everyone in some "task force" is using the exact same binary when trying to reproduce some very elusive failure. Again this is the kind of feature that you don't know you need until you're in this sort of situation. By that time people have much more urgent things to do than figure out how to tweak everyone's configuration and the configuration of automated builds - with the risk of introducing other changes. With a reproducible build catching issues like f896fc2 can become routine instead and happen long before any "task force" is started.
That's too late when trying to reproduce binaries already released and/or built by CI. It's also inconvenient when trying to compare binaries across multiple people including validation people or other non-developers who have never configured anything in Zephyr.
Finally let's also have a look at a sample, current, top-level
build/zephyr/
directory, see below (I omitted the subdirectories). I can see 3.elf
files and 4.map
files. besides to the build system itself, which of these files are useful and to whom? What about all the other files?This PR would add this reproducible file for a totally negligible build time and disk space
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your comments do not convince me of anything useful about this being the default. In the 5/6 years I've used zephyr, I've never needed this feature, as for right now I absolutely do not want to use this feature, you are trying to force a default on everyone and you're not able to convince me with the above that any random zephyr user would get any benefit from this at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand this has no value for you and I'm sorry you don't see the generic problems this helps with. However this is mysterious to me:
It's mysterious because most people would never notice this change. Adding a (reproducible at last) kilobytes-big .elf file in the megabytes-big
build/
directory without affecting any other existing file is really not a "feature".So I understand that you don't see any value but I don't understand why you seem to care so much. What problem(s) does this cause in practice for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not see any value of enabling this by default as well, this does not give us anything, if you need the stripped binary, you can just enable it, if you want to verify reproducibility and check for reproducibility, you can enable it, but build a strpped version of each app/test by default is not going to guarantee reproducibility, so it is some kind of false advertisement: "zephyr.strip is deterministic / reproducible" (If the binary is not reproducible in the first place, the stripped output will not be....)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh the change would be noticeable, especially for CI given that thousands of tests run, adding a completely pointless additional build stage and output file would start having a time impact on all CIs runs for all PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not what I've measured, what makes you think that?