Kernel mode support - #13
Closed
raiden00pl wants to merge 8 commits into
Closed
Conversation
raiden00pl
force-pushed
the
kernel-mode-support
branch
3 times, most recently
from
August 11, 2026 13:43
beb9b3e to
38d33ba
Compare
Member
Author
|
this patchset is too big, I'll break it into smaller PRs |
raiden00pl
force-pushed
the
kernel-mode-support
branch
4 times, most recently
from
August 25, 2026 11:44
81b32f0 to
cb413d8
Compare
raiden00pl
force-pushed
the
kernel-mode-support
branch
from
August 31, 2026 09:43
cb413d8 to
7123112
Compare
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
With app_bindir configured, cmd_check resolves commands against the application binary directory first and falls back to symbol lookups over bin_debug for names that are not applications (NSH builtins like cmd_df, cmocka entries). Flat-mode behavior is unchanged. Signed-off-by: raiden00pl <raiden00@railab.me> Assisted-by: Claude Code
Runtime checks searched the core ELF or the NSH help output, neither of which lists kernel-mode applications. Route check_cmd through CoreConfig.cmd_check when the core is a kernel build with a known application directory, so runtime checks agree with collection-time filtering. Signed-off-by: raiden00pl <raiden00@railab.me> Assisted-by: Claude Code
With exec_cwd set, QEMU resolved a relative '-kernel' path against the spawn directory instead of the NTFC working directory it is expressed in, so boot timed out. Absolutize the image path in the qemu and sim start paths when a custom spawn directory is configured. 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
Prebuilt kernel-mode images have no host application directory, so check_cmd could not resolve commands. List CONFIG_PATH_INITIAL (default /system/bin) once on the running target, cache it, and match cmd_check patterns against it with the matcher shared with AppBinDir. A failed listing is not cached and is retried. 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
raiden00pl
force-pushed
the
kernel-mode-support
branch
from
September 1, 2026 08:19
7123112 to
8c2a7c9
Compare
add kernel-mode reference configs Signed-off-by: raiden00pl <raiden00@railab.me> Assisted-by: Claude Code
raiden00pl
force-pushed
the
kernel-mode-support
branch
from
September 1, 2026 08:21
8c2a7c9 to
0b7cfd4
Compare
Member
Author
|
all moved to separate PRs |
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.
changes required for testing nuttx in kernel build