Skip to content

Prepare builder.py to kernel-mode builds - #23

Merged
xiaoxiang781216 merged 3 commits into
apache:mainfrom
raiden00pl:kernel-mode-support-pr4
Sep 1, 2026
Merged

Prepare builder.py to kernel-mode builds#23
xiaoxiang781216 merged 3 commits into
apache:mainfrom
raiden00pl:kernel-mode-support-pr4

Conversation

@raiden00pl

Copy link
Copy Markdown
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
@xiaoxiang781216
xiaoxiang781216 merged commit a5f250e into apache:main Sep 1, 2026
6 checks passed
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.

2 participants