You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] Ability to use Zephyr shell with SOF #9081
Is your feature request related to a problem? Please describe.
Add overlay (or build option) to implement Zephyr shell (https://docs.zephyrproject.org/latest/services/shell/index.html) support to SOF, and a backend that allows to attach to the shell from host CPU (over e.g. a memory window backend). This offers a new debugging and development option for SOF development, opening up possibility to observe system state and execute test sequences on the DSP.
This sounds cool. Ironically I've never been a shell person on the Zephyr side (almost always if you're chasing a bug it's easier to just rebuild/reflash the whole app rather than trying to "use it interactively").
But one big feature it would add here is the ability to do whitebox testing on live audio firmware, something that the kernel driver normally tries its hardest to prevent. Having a backchannel from userspace would be really nice, even if you have to use the slightly crufty shell API to do it.
But one big feature it would add here is the ability to do whitebox testing on live audio firmware, something that the kernel driver normally tries its hardest to prevent. Having a backchannel from userspace would be really nice, even if you have to use the slightly crufty shell API to do it.
Ack, we were thinking things like injecting errors in pipelines, dumping state during tuning- really a method to help increase technical velocity in many ways.
First Zephyr PR submitted for review zephyrproject-rtos/zephyr#72738 . SOF PR to add a config overlay and (possible) Linux SOF client to create the pty, will come later.
Main feature completed and merged to v2.10. The SOF side config overlay (convenience to build with shell) and additional SOF custom commands, are still in progress, but these goes go out of the scope for this original feature request.
Activity
kv2019i commentedon Apr 25, 2024
Working on this now,
lgirdwood commentedon Apr 25, 2024
@andyross @cujomalainey fyi
cujomalainey commentedon Apr 26, 2024
Interesting, would it just appear as a tty to the kernel?
lgirdwood commentedon Apr 26, 2024
That's the intention. The kernel tty would just be a passthrough from the DSP. Similar to how GDB would work.
andyross commentedon May 1, 2024
Ended up here after commenting on this Zephyr PR: (zephyrproject-rtos/zephyr#72158)
This sounds cool. Ironically I've never been a shell person on the Zephyr side (almost always if you're chasing a bug it's easier to just rebuild/reflash the whole app rather than trying to "use it interactively").
But one big feature it would add here is the ability to do whitebox testing on live audio firmware, something that the kernel driver normally tries its hardest to prevent. Having a backchannel from userspace would be really nice, even if you have to use the slightly crufty shell API to do it.
lgirdwood commentedon May 2, 2024
Ack, we were thinking things like injecting errors in pipelines, dumping state during tuning- really a method to help increase technical velocity in many ways.
kv2019i commentedon May 14, 2024
First Zephyr PR submitted for review zephyrproject-rtos/zephyr#72738 . SOF PR to add a config overlay and (possible) Linux SOF client to create the pty, will come later.
cujomalainey commentedon May 14, 2024
@johnylin76 with relation to #5521
kv2019i commentedon May 17, 2024
Current set of PRs in progress (updated May 31)
kv2019i commentedon May 24, 2024
Dependencies merged, now waiting for the zephyrproject-rtos/zephyr#72738 to be merged in Zephyr.
Uploaded a sof-docs PR to thesofproject/sof-docs#496 to document shell usage with some examples.
kv2019i commentedon May 28, 2024
While waiting for Zephyr side PR to be merged, here's one more draft on SOF side that adds first custom command:
#9174
kv2019i commentedon May 31, 2024
Shell backend now merged to Zephyr. Next step is to bring in the changes to SOF main via #9179
kv2019i commentedon Jun 4, 2024
SOF main now has shell support, overlay support marked ready for review: #9133
kv2019i commentedon Jun 5, 2024
Main feature completed and merged to v2.10. The SOF side config overlay (convenience to build with shell) and additional SOF custom commands, are still in progress, but these goes go out of the scope for this original feature request.
Follow-up PRs: