Configuration
This page collects the Kconfig options, PC CMake config, macro defaults, and runtime storage configuration used by the current brookesia_system_core implementation.
Kconfig
ESP platform configuration lives in system/brookesia_system_core/Kconfig.
Option |
Default |
Description |
|---|---|---|
|
|
Maximum |
|
|
Register the runtime async timeout debug probe |
|
|
Master switch for core component debug log |
|
|
Enable system module debug log once the master switch is on |
|
|
Enable service module debug log once the master switch is on |
|
|
System task scheduler worker thread name prefix |
|
|
System task scheduler worker priority |
|
|
System task scheduler worker stack size |
|
|
Whether to place the worker stack in external memory |
|
|
Worker poll interval |
|
|
Worker count, range |
|
|
Worker 0 core affinity; |
|
|
Worker 1 core affinity; |
|
|
Worker 2 core affinity; |
|
|
Worker 3 core affinity; |
System no longer specifies a legacy resource root through Kconfig. At runtime it enumerates storage filesystems from the Device service and builds an Android-like storage layout.
Host Platform Config
PC platform configuration lives in system/brookesia_system_core/cmake/pc_platform.cmake.
CMake Variable |
Default |
Description |
|---|---|---|
|
|
PC debug log master switch |
|
|
PC system debug log default |
|
|
PC service debug log default |
|
|
PC runtime async timeout debug probe default |
|
|
PC staged internal storage root |
|
|
PC build-time app staging directory |
|
|
PC build-time system resource staging directory |
|
|
Maximum |
|
|
PC worker thread name prefix |
|
|
PC worker priority |
|
|
PC worker stack size |
|
|
Whether the PC worker uses an external memory stack |
|
|
PC worker poll interval |
|
|
PC worker count |
|
|
PC Worker 0 core affinity |
|
|
PC Worker 1 core affinity |
|
|
PC Worker 2 core affinity |
|
|
PC Worker 3 core affinity |
The PC_STAGE_* variables are only for build-time staging. The runtime storage layout is still determined by the Device service or by System::Config::storage overrides.
Macro Configs
The public macros live in include/brookesia/system_core/macro_configs.h.
Macro |
Current Value or Source |
Description |
|---|---|---|
|
|
Log tag |
|
|
System service name |
|
|
GUI service name |
|
|
Timer service name |
|
|
Default system type |
|
|
Default app screen path |
|
Kconfig/PC config/default |
Whether to register the runtime async timeout debug probe |
|
Kconfig/PC config/default |
Maximum |
|
Kconfig/PC config/default |
System task scheduler worker configuration |
Storage Layout
During System init, the Device service is queried for all storage filesystems, producing one internal volume and zero or more external volumes.
The internal auto-selection priority is:
Flash + LittleFS
Flash + FATFS
SDCard + FATFS
Other LittleFS
Other FATFS
External includes all SDCard storage volumes. System::Config::storage can override the internal, external, preferred external id, and default install target.
System automatically creates the following fixed directories:
internal/external:
apps,music,download,movies,pictures,documentsinternal only:
systemper app:
apps/<manifest_id>/cache,apps/<manifest_id>/data,apps/<manifest_id>/files
The runtime app scan directories are apps under internal and all external volumes. Duplicate manifest ids are deduplicated in the order internal, preferred external, then other external.
The default runtime app install target is Auto: prefer the preferred external, then the first external, then fall back to internal. A native app can change the default via SystemApi::set_default_install_storage(); System saves it to Storage KV and restores it on the next startup.
System::Config
System::Config is the runtime configuration entry:
gui_backend: the GUI backend. No GUI runtime is created when empty.environment: the screen environment passed to the JSON UI parser/runtime.storage: overrides the internal/external volume, preferred external id, and default install target.system_type: defaults to"core".start_service_manager: whether to startServiceManagerduring init.install_registered_apps: whether to install apps from theIAppProviderregistry.install_package_apps: whether to scan theappsdirectory of the storage layout and install runtime apps.enable_gui_view_debug: whether to enable the view debug outline after creating the GUI runtime; off by default.enable_gui_live_preview: whether to auto-enable live preview for file-backed GUI documents; off by default.gui_live_preview_options: options passed togui::Runtime::enable_live_preview().gui_live_preview_poll_interval_ms: the period of the internal live preview poll task; defaults to100ms.startup_overlay: an optional system startup overlay; shown after the GUI runtime is created and before app install and Shell startup, hidden afterstart()completes.app_launch_transition: an optional app launch transition; shown before app GUI resource registration and document loading, with its origin set bystart_app(app_id, AppStartOptions{.launch_origin_frame = ...}).
Directory and File Interface
A native app can access the following through AppContext::system_service():
auto layout = context.system_service().get_storage_layout();
auto app_dirs = context.system_service().get_app_storage_paths();
auto public_dirs = context.system_service().get_public_storage_paths();
A runtime app uses the equivalent JSON API through the SystemCore service. File operations must pass a StoragePathKind, a volume id, and a relative path; absolute paths and .. are rejected and cannot escape into another app's directory.