Skip to content

Conversation

@fgr-17
Copy link
Contributor

@fgr-17 fgr-17 commented Dec 15, 2025

Description

This PR adds a simple banner that shows basic info from the host system and the container, for example:

═══════════════════════════════════════════════════════
  Ocre Runtime v0.99.0-dev
═══════════════════════════════════════════════════════
  Zephyr:    4.2.0
  Board:     native_sim/native
  SoC:       native (undefined)
  Arch:      posix
  RAM:       64 KB heap
  WAMR:      500 KB
═══════════════════════════════════════════════════════

The banner is wrapped under kconfig variable called CONFIG_OCRE_PRINT_BANNER

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code cleanup/refactoring
  • This change requires a documentation update
  • CI system update
  • Test Coverage update

How Has This Been Tested?

Tested output on native_sim, running:

./build.sh -t z -f <path-to-wasm-blinky>

This command shows the following output:

-- west flash: rebuilding
[2/2] Running utility command for native_runner_executable
-- west flash: using runner native
WARNING: Using a test - not safe - entropy source
E: Cannot create zeth (-2/No such file or directory)
*** Booting Zephyr OS build v4.2.0-32-g8d0d392f8cc7 ***
I: /lfs mount: 0

I: OCRE common initialized successfully
I: Registered cleanup handler for type 0
I: Timer system initialized
I: Registered cleanup handler for type 3
I: Messaging system initialized
I: Container Supervisor started.

ocre:~$

═══════════════════════════════════════════════════════
  Ocre Runtime v0.99.0-dev
═══════════════════════════════════════════════════════
  Zephyr:    4.2.0
  Board:     native_sim/native
  SoC:       native (undefined)
  Arch:      posix
  RAM:       64 KB heap
  WAMR:      500 KB
═══════════════════════════════════════════════════════

I: Request to create new container in slot: 0
I: Request to run container in slot:0
I: EVENT_CREATE_CONTAINER
I: Allocating memory for container 0
I: File path: /lfs/ocre/images/blinky.bin, size: 21068
I: Loaded binary to buffer for container 0
W: Created container:0
I: Created container in slot:0
I: EVENT_RUN_CONTAINER
I: Instantiating WASM runtime for container:0
I: Module registered: 0x80e8b00
W: Running container:0 in dedicated thread
I: Started container in slot:0
I: Container thread 0 started
=== Generic Blinky Example (Printf Only) ===
This example demonstrates software blinking without physical hardware.
I: Registered dispatcher for type 0: timer_callback
I: Incremented resource count: type=0, count=1
I: Created timer 1 for module 0x80e8b00
Timer created. ID: 1, Interval: 1000ms
I: Started timer 1 with interval 1000ms, periodic=1
Generic blinking started. You should see 'blink' messages every 1000ms.
Press Ctrl+C to stop.
blink (count: 1, state: -)
blink (count: 2, state: +)
blink (count: 3, state: -)
blink (count: 4, state: +)
blink (count: 5, state: -)
blink (count: 6, state: +)

Tested also with CONFIG_OCRE_PRINT_BANNER=n and validating that shows the former label

Test Configuration (required):

  • Host OS type, version, and arch: docker container ghcr.io/zephyrproject-rtos/zephyr-build:latest on Ubuntu Server 20.04 (x64)
  • Developer Board make & model: native_sim
  • Board Tools Installed: -

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@fgr-17 fgr-17 force-pushed the froux/add-init-banner branch from 0c76d96 to db3b382 Compare December 16, 2025 04:28
This PR adds a simple banner that shows basic info from the host system
and the container, for example_

~~bash
═══════════════════════════════════════════════════════
  Ocre Runtime v0.99.0-dev
═══════════════════════════════════════════════════════
  Zephyr:    4.2.0
  Board:     native_sim/native
  SoC:       native (undefined)
  Arch:      posix
  RAM:       64 KB heap
  WAMR:      500 KB
═══════════════════════════════════════════════════════
~~

Signed-off-by: Federico Roux <rouxfederico@gmail.com>
@fgr-17 fgr-17 force-pushed the froux/add-init-banner branch from db3b382 to 7f1c7c1 Compare December 16, 2025 04:46
if [[ ${#INPUT_FILES[@]} -gt 0 ]]; then
echo "Input files provided: ${INPUT_FILES[*]}"
rm flash.bin
rm -f flash.bin
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for the rev: this shouldn't crash if flash.bin doesn't exist for some reason

@fgr-17 fgr-17 marked this pull request as ready for review December 16, 2025 04:48
@fgr-17 fgr-17 requested review from kr-t and srberard as code owners December 16, 2025 04:48
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