sof/zephyr
Laurentiu Mihalcea bcbb85a29e zephyr: wrapper: Conditionally call platform_boot_complete()
Due to the fact that on i.MX93 the host will initialize the
SOF_IPC_FW_READY sequence there's no need to call
platform_boot_complete() at the end of start_complete(). This
will be handled in the IPC3 handler.

This commit makes sure that aforementioned scenario won't
happen for i.MX93 while keeping the flow constant for the
other platforms.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-05-02 12:19:11 +03:00
..
include zephyr: update SYS_INIT calls 2023-04-24 19:13:47 +03:00
lib zephyr: use system cache API 2023-04-28 10:37:55 +03:00
scripts .github/zephyr: compare Windows and Linux builds 2023-01-23 19:28:51 +02:00
CMakeLists.txt zephyr: CMakeLists.txt: Add support for building SOF for i.MX93 2023-04-25 13:04:58 +03:00
FindZephyr-sdk.cmake
Kconfig kconfig: limit DP scheduler to ACE 2023-04-25 13:23:28 +03:00
README
docker-build.sh zephyr/docker-build.sh: upgrade CMake to 3.21 or above 2022-12-16 15:19:44 -08:00
docker-run.sh zephyr/docker-run.sh: hardcode zephyr-build img to Zephyr SDK 0.15.2 2023-03-13 21:59:42 +00:00
edf_schedule.c schedule: remove schedule_task_complete() 2023-03-06 12:14:14 +00:00
lib.c
module.yml
schedule.c
wrapper.c zephyr: wrapper: Conditionally call platform_boot_complete() 2023-05-02 12:19:11 +03:00

README

SOF with Zephyr RTOS
====================

SOF currently uses the Cadence Xtos/HAL and it's own kernel functions as
its RTOS. SOF is moving to use Zephyr as it's RTOS in parallel to current
releases using xtos.

The initial "alpha" of SOF on Zephyr will use the Zephyr RTOS for boot, IRQs,
scheduling and memory allocation. Subsequent release will use more Zephyr
functionality as code is moved from SOF to Zephyr (i.e. EDF scheduler updates
copied from SOF to Zephyr).

Building SOF on Zephyr
======================

Section promoted to
https://thesofproject.github.io/latest/getting_started/build-guide/build-with-zephyr.html

Testing on Qemu
===============

Get the SOF qemu sof-v4.2 branch here.

git@github.com:thesofproject/qemu.git

Configure as

./configure' '--prefix=.' '--target-list=xtensa-softmmu,x86_64-softmmu' \
             '--enable-gtk' '--enable-sdl' '--enable-spice' \
             '--audio-drv-list=alsa' '--enable-libusb' \
             '--enable-usb-redir' '--enable-coroutine-pool' \
             '--disable-opengl' '--enable-fdt'

 Then run make.

FW can be tested as follows using the qemu helper script.

 ./xtensa-host.sh apl \
     -r ../../sof/sof/build_apl_gcc/src/arch/xtensa/rom-apl.bin \
     -k ../../zephyrproject/zephyr/build/zephyr/zephyr.ri

Where -r and -k are used to specify the ROM and kernel files.

The ROMS can be built from the SOF repo by running

./scripts/xtensa-build-all.sh  -r -a

Using console
-------------

Using logging and simulator backend with processing printk (LOG_PRINTK)
can bring console in qemu.

 - Enable xtensa simulator logging backend (LOG_BACKEND_XTENSA_SIM).
 - Enable printk processing(LOG_PRINTK)
 - Add "-semihosting" to qemu command line. Make sure it goes through scripts to real qemu.