-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Allow reusing existing kernel tree as-is #6469
base: main
Are you sure you want to change the base?
WIP: Allow reusing existing kernel tree as-is #6469
Conversation
This skips all git checkout, patching, configuring and cleaning when USE_EXISTING_KERNEL_TREE=yes is passed. This can be useful when doing kernel development by making changes directly to the kernel sourcetree in `cache/sources`, while still allowing to use the `compile.sh` to use the same compilation commands, deb package building, ccache, etc. It is also useful when bisecting a kernel issue. Can be used something like this: USE_EXISTING_KERNEL_TREE=yes ./compile.sh default kernel To produce a kernel deb in a few minutes ready to be installed on a device. This is mostly a proof of concept to explore the usecase. In particular: - I am not happy with the USE_EXISTING_KERNEL_TREE name yet. - I wonder if this variable should maybe be split into different ones (e.g. for skipping git checkout, patching, config, clean already has one that can be used). - Or maybe it would be better to split off some code out of compile_kernel() and expose a kernel_build and/or kernel_package command from ./compile.sh instead?
As the commit message indicates, this PR is mostly a call for feedback on how to properly implement this. While testing this, I already ran into an issue with the current implementation - the
|
Added documentation label to make sure this new option won't be forgotten once implemented. |
Yeah would need to refactor in a such a way that we can do the
yeah, but the calc function should be easy to replace with something that produces the head sha1 from the "current" tree. It's the rest of the versioning that makes no sense -- since it's building & packaging "whatever is in there", and the system is no longer in control of what's in there, the whole versioning is bogus / shouldn't apply. the versioning/hashing exists for consistency (and later when .debs published to repo, for re-versioning), in this scenario it is simply not necessary. maybe it is easier to add a separate CLI command that uses parts of kernel-*.sh but is not an artifact, instead just produces adhoc .deb's. look into maybe the cli-patch -- not saying that's a good example, lotsa duplicated code, but could be a start, since it's essentially a variation of this ("just patch, don't build") |
This skips all git checkout, patching, configuring and cleaning when USE_EXISTING_KERNEL_TREE=yes is passed.
This can be useful when doing kernel development by making changes directly to the kernel sourcetree in
cache/sources
, while still allowing to use thecompile.sh
to use the same compilation commands, deb package building, ccache, etc. It is also useful when bisecting a kernel issue.Can be used something like this:
To produce a kernel deb in a few minutes ready to be installed on a device.
This is mostly a proof of concept to explore the usecase. In particular: