sof/zephyr
Kai Vehmanen 14c4e86757 audio: base_fw: add platform layer to IPC4 hw_config data
Some of the IPC4 HW_CONFIG fields are platform specific and cannot be
filled with generic code.

Handle this functionality by separating platform specific parts of
base_fw to a new base_fw_platform.h interface. Move out existing code
for Intel cAVS and ACE platforms. Add a new stub implementation for
posix platform. This posix stub can be also used as a starting point
when adding IPC4 support to new platforms.

This platform construct can be later used to move out other
vendor and platform data out from base_fw.c.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-17 16:20:48 +01:00
..
include platform: remove platform/drivers/idc.h for Intel platforms 2024-04-16 14:12:34 +03:00
lib zephyr: lib: dma: adapt imx93 Kconfig name to HWMv2 name 2024-03-13 10:23:43 +02:00
scripts xtensa-build-zephyr.py: add new rimage_west_configuration() 2023-05-26 10:47:51 +03:00
test vmh_tests: Add set of parametrized tests and test suit 2024-03-05 11:11:20 +01:00
CMakeLists.txt audio: base_fw: add platform layer to IPC4 hw_config data 2024-04-17 16:20:48 +01:00
FindZephyr-sdk.cmake .github: de-hardcode zephyr SDK version in sparse build 2022-10-10 11:29:05 +01:00
Kconfig test: add boot-time ztest-based testing 2023-12-08 15:29:06 +02:00
README
boot_test.c boot_test: change call of boot tests 2024-03-05 11:11:20 +01:00
docker-build.sh zephyr/docker-build.sh: explain why we autodetect with FindZephyr-sdk 2024-02-19 14:20:07 +00:00
docker-run.sh workflows: Upgrade docker container to v0.26.6 2023-12-14 11:34:12 +02:00
edf_schedule.c zephyr: edf-schedule: fix CONTAINER_OF type 2023-08-31 22:14:37 +03:00
lib.c zephyr: Add zephyr lib.c standalone file 2022-11-11 15:57:50 +02:00
module.yml
schedule.c
wrapper.c zephyr/wrapper.c: dereference NULL in POSIX for better k_panic() trace 2024-02-28 15:39:56 +00: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.