kernel: run kernel_copy_extra_sources hooks after kernel_maybe_clean#9830
Conversation
- otherwise changes done to kernel dir go away if cleaning is requested, which has been forcing family and board code to use unrelated hooks to workaround it, which in turn requires causes CONFIG_DEFS_ONLY=yes hacks which then causes hashes to differ from actual build runs - with this, now any source-level changes (incl generating patches) can now be done using `kernel_copy_extra_sources`; make sure to include all hashing-related code and references (eg: source SHA1 from external repos) into that hook, so changes there cause a change to the `-HK` - Fixes: c47c937 "Add new hook to allow copying code into kernel"
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR reorders two build preparation steps in the kernel compilation function. The conditional clean operation now executes before copying extra kernel sources, rather than after. This changes the sequence of kernel tree preparation without modifying function signatures or logic. ChangesKernel Build Preparation Order
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The reorder only solves half of the problem. After
With this PR the pipeline becomes:
Concrete example: Proposed fix: invoke
In this ordering the copy survives all the way to the build, and the hash-folding responsibility you call out in the commit message (extension authors must fold the source SHA into the artifact hash) remains intact. Surfaced by Codex review on our mirror PR iav/armbian#121. |
|
Indeed. I had not fully considered this, despite having written it that way. Wifi-drivers overcome this with a special exception. I'll reconsider... |
kernel_copy_extra_sources; make sure to include all hashing-related code and references (eg: source SHA1 from external repos) into that hook, so changes there cause a change to the-HKSummary by CodeRabbit