Skip to content

add per-core kernel-mode options - #16

Open
raiden00pl wants to merge 4 commits into
apache:mainfrom
raiden00pl:kernel-mode-support-pr2
Open

add per-core kernel-mode options#16
raiden00pl wants to merge 4 commits into
apache:mainfrom
raiden00pl:kernel-mode-support-pr2

Conversation

@raiden00pl

@raiden00pl raiden00pl commented Aug 24, 2026

Copy link
Copy Markdown
Member
  1. envconfig: remove unused reboot_timeout recovery option
  2. coreconfig.py: add per-core kernel-mode options
  3. lib/elf: add AppBinDir for kernel-mode application discovery
  4. device: honor per-core exec_cwd and boot_timeout when starting targets

extracted from #13

@raiden00pl
raiden00pl force-pushed the kernel-mode-support-pr2 branch from 5f437a0 to 933a953 Compare August 24, 2026 08:06
reboot_timeout was defined in the recovery default config and documented,
but never read: _device_reboot() only uses max_retries and base_delay.
Remove the dead option and its documentation.

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
Kernel builds install every application as a standalone ELF binary, so
the command name is the file name; entry points are renamed to main and
flat-mode symbols like hello_main do not exist. AppBinDir lists the
application directory as the command set, supports the cmd_check marker
syntax (alternatives, regex, trailing _main), and falls back to symbol
lookups over the unstripped binaries in bin_debug for names that are
not files (NSH builtins, cmocka entries).

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
Options needed to describe kernel-mode targets, where applications are
standalone ELF binaries installed on the target filesystem and resolved
from PATH rather than linked into the kernel image:

- is_kernel_build: core .config selects CONFIG_BUILD_KERNEL
- exec_cwd: working directory for spawned sim/qemu processes; a
  semihosting hostfs mount (qemu arm/riscv) resolves relative to it
- boot_timeout: seconds to wait for the first shell prompt (default 5)
- app_bindir: application binaries, bin/ next to the ELF unless set

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
Host devices were spawned with cwd=None. Targets that mount a
semihosting hostfs relative to the process working directory (qemu
arm/riscv) then cannot find their applications, and the boot wait was
fixed at 5s, too short for a kernel-mode boot. Use CoreConfig.exec_cwd
for the spawn and CoreConfig.boot_timeout for the boot wait on the host
and serial paths.

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
@raiden00pl
raiden00pl force-pushed the kernel-mode-support-pr2 branch from 933a953 to d4426f2 Compare August 24, 2026 11:49
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