wolfssh/zephyr
John Safranek 8d97ee9250 Port Zephyr test sample to 3.4.0 and 4.4.0
Zephyr 3.5 moved the RAM disk driver from Kconfig to devicetree and 4.1
replaced CONFIG_NET_SOCKETS_POSIX_NAMES with CONFIG_POSIX_API. Port the
sample to the new APIs while keeping it buildable on older Zephyr.

- add ramdisk.overlay (zephyr,ram-disk node) for the FS scenarios;
  drop CONFIG_DISK_RAM_VOLUME_SIZE
- switch to CONFIG_POSIX_API; include the POSIX time/select/socket/netdb
  headers in test.h and port.h, gated on ZEPHYR_VERSION_CODE >= 4.1.0 so
  older Zephyr keeps the BSD names from <zephyr/net/socket.h>
- select RAM disk (overlay >= 3.5, else CONFIG_DISK_RAM_VOLUME_SIZE) and
  POSIX (CONFIG_POSIX_API >= 4.1, else the legacy symbols) in
  CMakeLists.txt, with ramdisk_legacy.conf / posix_legacy.conf fallbacks
- tests, nofs and kbi scenarios pass on qemu_x86 with Zephyr 3.4.0
  (SDK 0.16.1) and 4.4.0 (SDK 1.0.0)
2026-07-14 13:58:43 -07:00
..
samples/tests Port Zephyr test sample to 3.4.0 and 4.4.0 2026-07-14 13:58:43 -07:00
CMakeLists.txt Init zephyr support 2023-10-02 20:38:21 +02:00
Kconfig Init zephyr support 2023-10-02 20:38:21 +02:00
README.md Init zephyr support 2023-10-02 20:38:21 +02:00
module.yml Init zephyr support 2023-10-02 20:38:21 +02:00

README.md

Zephyr Project Port

Overview

This port is for the Zephyr RTOS Project, available here.

It provides the following zephyr code.

  • modules/lib/wolfssh
    • wolfSSH library code
  • modules/lib/wolfssh/zephyr/
    • Configuration and CMake files for wolfSSH as a Zephyr module
  • modules/lib/wolfssh/zephyr/samples/tests
    • wolfSSH tests

How to setup as a Zephyr Module

Follow the instructions to setup a zephyr project.

Modify your project's west manifest

Add wolfSSH as a project to your west.yml:

manifest:
  remotes:
    # <your other remotes>
    - name: wolfssh
      url-base: https://github.com/wolfssl

  projects:
    # <your other projects>
    - name: wolfssh
      path: modules/lib/wolfssh
      revision: master
      remote: wolfssh

Update west's modules:

west update

Now west recognizes 'wolfssh' as a module, and will include it's Kconfig and CMakeFiles.txt in the build system.

Build and Run Samples

If you want to run build apps without running west zephyr-export then it is possible by setting the CMAKE_PREFIX_PATH variable to the location of the zephyr sdk and building from the zephyr directory. For example:

CMAKE_PREFIX_PATH=/path/to/zephyr-sdk-<VERSION> west build -p always -b qemu_x86 ../modules/lib/wolfssh/zephyr/samples/tests/

Build and Run Tests

build and execute tests

cd [zephyrproject]
west build -p auto -b qemu_x86 modules/lib/wolfssh/zephyr/samples/tests
west build -t run