When the kernel head is at a tagged commit, the generated kernel version will have neither the tag nor the commit hash. So, unless we manually set EXTRAVERSION in the Makefile when releasing a new kernel, it is hard to pinpoint the exact kernel release version. Alternatively, let's add an option to keep the tag info when the kernel head is at a tagged commit. This fix only helps when building kernel with build.sh. Since Android 14 has switched to Bazel, and Bazel uses a different mechanism (workspace_status_stamp.py) to set up kernel version, the fix doesn't need to go to Android 14 or newer kernel branches. Bug: 266829022 Test: build kernel and verify the tag is embedded in the kernel version Signed-off-by: Philip Chen <philipchen@google.com> Change-Id: I40bbc414d103567bcc92985f6d63ae27aac8c9b1
68 KiB
68 KiB