cli: introduce rewrite-kernel-patches; fix kernel-patches-to-git; refactor obtain_kernel_git_info_and_makefile()

- `kernel-patches-to-git` wasn't providing the needed `KERNEL_GIT_SHA1` for kernel drivers
  - refactor `obtain_kernel_git_info_and_makefile()` out of `artifact_kernel_prepare_version()` so we can reuse
- introduce `rewrite-kernel-patches`, which is just an alias to `kernel-patches-to-git` with `REWRITE_PATCHES=yes`
This commit is contained in:
Ricardo Pardini
2023-09-28 13:15:28 +02:00
parent 9324d1ec82
commit 71d5548c57
3 changed files with 44 additions and 33 deletions

View File

@@ -38,7 +38,8 @@ function armbian_register_commands() {
["debs-to-repo-download"]="json_info" # implemented in cli_json_info_pre_run and cli_json_info_run
["debs-to-repo-reprepro"]="json_info" # implemented in cli_json_info_pre_run and cli_json_info_run
["kernel-patches-to-git"]="patch_kernel" # implemented in cli_patch_kernel_pre_run and cli_patch_kernel_run
["kernel-patches-to-git"]="patch_kernel" # implemented in cli_patch_kernel_pre_run and cli_patch_kernel_run
["rewrite-kernel-patches"]="patch_kernel" # implemented in cli_patch_kernel_pre_run and cli_patch_kernel_run
["build"]="standard_build" # implemented in cli_standard_build_pre_run and cli_standard_build_run
["distccd"]="distccd" # implemented in cli_distccd_pre_run and cli_distccd_run
@@ -101,6 +102,9 @@ function armbian_register_commands() {
["debs-to-repo-download"]="CLEAN_MATRIX='no' CLEAN_INFO='no'"
["debs-to-repo-reprepro"]="CLEAN_MATRIX='no' CLEAN_INFO='no'"
# patching
["rewrite-kernel-patches"]="REWRITE_PATCHES=yes" # rewrite the patches after round-tripping to git: "rebase patches"
# artifact shortcuts
["rootfs"]="WHAT='rootfs' ${common_cli_artifact_vars}"