Prepare builder.py to kernel-mode builds - #23
Merged
Conversation
raiden00pl
commented
Sep 1, 2026
Member
- builder.py: register app_bindir and exec_cwd for kernel-mode builds
- builder.py: add application image support for kernel-mode flashing
- builder.py: reconfigure after applying Kconfig overrides
Kernel-mode CMake builds install applications to <build>/bin. On qemu arm/riscv the target mounts them over a semihosting hostfs relative to the spawned process working directory. When the generated .config selects CONFIG_BUILD_KERNEL=y, register app_bindir=<build>/bin and exec_cwd=<build>, keeping values set in YAML. Signed-off-by: raiden00pl <raiden00@railab.me> Assisted-by: Claude Code
Real hardware has no hostfs, so kernel-mode applications must be shipped as a filesystem image. Add the per-core apps_image option, which generates a ROMFS image from app_bindir with genromfs after the build, and the $APPS_BINDIR and $APPS_IMG flash command placeholders. Signed-off-by: raiden00pl <raiden00@railab.me> Assisted-by: Claude Code
CMake registers application targets at configure time from .config, but kv overrides are applied after configuring, so an override enabling a new application changed .config without ever creating its build target: code-level options took effect through the .config -> config.h rule while the application never appeared in the image. Overrides can also unlock suboptions (e.g. *_PROGNAME) whose missing defaults make cmake drop the application silently. Run olddefconfig and configure again after applying overrides. Signed-off-by: raiden00pl <raiden00@railab.me> Assisted-by: Claude Code
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.