arch/x86_64: kernel build with Cmake - #19694
Open
raiden00pl wants to merge 5 commits into
Open
Conversation
arch_interface exists only for CONFIG_BUILD_PROTECTED, but x86_64 and arm64 referenced it for any non-flat build, breaking CMake configuration of kernel builds. Use the CONFIG_BUILD_PROTECTED guard as arm and risc-v do. Signed-off-by: raiden00pl <raiden00@railab.me> Assisted-by: Claude Code
CMAKE_LD was never set, so application link commands were invalid, and CMAKE_STRIP defaulted to plain 'strip', which removes the symbol and relocation tables required to load CONFIG_BINFMT_ELF_RELOCATABLE binaries. Use the host linker and 'strip --strip-unneeded' as on the other architectures. Signed-off-by: raiden00pl <raiden00@railab.me> Assisted-by: Claude Code
raiden00pl
force-pushed
the
fix-x86_64-cmake-kernel-build
branch
from
August 5, 2026 08:38
1a8b3c9 to
e6eb175
Compare
Match the Application.mk install rule: keep the application attribute symbols (nx_stacksize etc.) through strip as NX_KEEP does, and mark the installed binaries executable, since ld -r output is not and filesystem images built from bin/ refuse to exec. Signed-off-by: raiden00pl <raiden00@railab.me> Assisted-by: Claude Code
The CMake build compiled no ROMFS source, so kernel-mode configurations (knsh_romfs) failed to link with undefined references to romfs_img. Generate the ROMFS image from the applications in <build>/bin with genromfs/xxd and compile it into the board library; other configurations keep the empty stub. Signed-off-by: raiden00pl <raiden00@railab.me> Assisted-by: Claude Code
The CMake build does not need the manual export/import/mkromfsimg steps: applications and the ROMFS image are generated by the normal build. Document the CMake invocation and how to run the image. Signed-off-by: raiden00pl <raiden00@railab.me> Assisted-by: Claude Code
raiden00pl
force-pushed
the
fix-x86_64-cmake-kernel-build
branch
from
August 5, 2026 09:55
e6eb175 to
71de790
Compare
anchao
approved these changes
Aug 5, 2026
xiaoxiang781216
approved these changes
Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Impact
kernel build works now with cmake
Testing
kernel build automate tests with ntfc