Skip to content

fix(build): set KBUILD_BUILD_VERSION to silence .version warning#5

Merged
appcypher merged 1 commit into
krunfwfrom
appcypher/fix-kbuild-version-warning
Apr 19, 2026
Merged

fix(build): set KBUILD_BUILD_VERSION to silence .version warning#5
appcypher merged 1 commit into
krunfwfrom
appcypher/fix-kbuild-version-warning

Conversation

@appcypher
Copy link
Copy Markdown
Member

@appcypher appcypher commented Apr 19, 2026

Summary

  • Add KERNEL_FLAGS += KBUILD_BUILD_VERSION=1 to the top-level Makefile so the kernel build has an explicit build version.
  • The build deletes linux-6.12.68/.version before invoking the kernel build, but the x86 boot banner later tries to read it via cat .version to render the build number.
  • Without this flag, the build emits a stray cat: .version: No such file or directory warning and the banner renders as Kernel: arch/x86/boot/bzImage is ready (#) with no number.
  • Setting KBUILD_BUILD_VERSION=1 suppresses the warning and makes the banner print (#1), matching the intent of the other KBUILD_BUILD_* flags already set alongside it.

Test Plan

  • Run make and confirm the cat: .version: No such file or directory warning no longer appears.
  • Confirm the final banner line reads Kernel: arch/x86/boot/bzImage is ready (#1) instead of (#).
  • Verify the produced libkrunfw artifact still builds and links as before (no functional change beyond the banner metadata).

The build process deletes linux-6.12.68/.version before invoking the
kernel build, but the x86 boot banner later tries to read it to print
the build number. This caused a stray "cat: .version: No such file or
directory" warning and left the banner rendering as "(#)" with no
number.

Setting KBUILD_BUILD_VERSION=1 provides an explicit build version so
the banner prints "(#1)" and the warning is suppressed.
@appcypher appcypher merged commit 19dfda5 into krunfw Apr 19, 2026
@appcypher appcypher deleted the appcypher/fix-kbuild-version-warning branch April 19, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant