-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sample: openamp_rsc_table: enable colibri imx7d #72970
base: main
Are you sure you want to change the base?
sample: openamp_rsc_table: enable colibri imx7d #72970
Conversation
16d6573
to
2972e30
Compare
Sorry for the noise, and force-pushes I had to fix typos in the comments 🙃 |
eca2b23
to
a86e909
Compare
229ff2f
to
d1ed834
Compare
Apparently the latest rebase on the latest main fails CI on the frdm_k64f.
|
d1ed834
to
487c5b6
Compare
@ithinuel Are you willing to give another look at this PR now that it passes CI ? |
@danieldegrasse Are you interested in reviewing this PR too ? 😄 |
@@ -9,6 +9,9 @@ zephyr_sources( | |||
soc_clk_freq.c | |||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/ressource/resource
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you found anything ? 🙃
I don't think I have misspelled resource in the sources have I ?
#Copy zephyr_openamp_rsc_table.elf to /lib/firmware on your board | ||
modprobe imx_rproc | ||
modprobe virtio_rpmsg_bus | ||
modprobe rpmsg_tty | ||
|
||
#Request RPROC to load the M4 image | ||
echo stop > /sys/class/remoteproc/remoteproc0/state | ||
echo zephyr_openamp_rsc_table.elf > /sys/class/remoteproc/remoteproc0/firmware | ||
echo start > /sys/class/remoteproc/remoteproc0/state | ||
|
||
#dmesg will detail the boot process: | ||
dmesg | ||
[ 497.120499] remoteproc remoteproc0: stopped remote processor imx-rproc | ||
[ 497.138938] remoteproc remoteproc0: powering up imx-rproc | ||
[ 497.168735] remoteproc remoteproc0: Booting fw image zephyr_openamp_rsc_table.elf, size 1267076 | ||
[ 497.184826] rproc-virtio rproc-virtio.1.auto: assigned reserved memory node vdev0buffer0@90002000 | ||
[ 497.221395] virtio_rpmsg_bus virtio0: rpmsg host is online | ||
[ 497.233806] virtio_rpmsg_bus virtio0: creating channel rpmsg-tty addr 0x400 | ||
[ 497.236666] rproc-virtio rproc-virtio.1.auto: registered virtio0 (type 7) | ||
[ 497.259822] remoteproc remoteproc0: remote processor imx-rproc is now up | ||
[ 497.293913] virtio_rpmsg_bus virtio0: creating channel rpmsg-client-sample addr 0x401 | ||
[ 497.308388] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.1025: new channel: 0x401 -> 0x401! | ||
[ 497.337969] virtio_rpmsg_bus virtio0: creating channel rpmsg-tty addr 0x402 | ||
|
||
ls /dev | grep ttyRPMSG | ||
ttyRPMSG0 -> used for zephyr shell interface | ||
ttyRPMSG1 -> used for sample interface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The below should provide better syntax coloring
#Copy zephyr_openamp_rsc_table.elf to /lib/firmware on your board | |
modprobe imx_rproc | |
modprobe virtio_rpmsg_bus | |
modprobe rpmsg_tty | |
#Request RPROC to load the M4 image | |
echo stop > /sys/class/remoteproc/remoteproc0/state | |
echo zephyr_openamp_rsc_table.elf > /sys/class/remoteproc/remoteproc0/firmware | |
echo start > /sys/class/remoteproc/remoteproc0/state | |
#dmesg will detail the boot process: | |
dmesg | |
[ 497.120499] remoteproc remoteproc0: stopped remote processor imx-rproc | |
[ 497.138938] remoteproc remoteproc0: powering up imx-rproc | |
[ 497.168735] remoteproc remoteproc0: Booting fw image zephyr_openamp_rsc_table.elf, size 1267076 | |
[ 497.184826] rproc-virtio rproc-virtio.1.auto: assigned reserved memory node vdev0buffer0@90002000 | |
[ 497.221395] virtio_rpmsg_bus virtio0: rpmsg host is online | |
[ 497.233806] virtio_rpmsg_bus virtio0: creating channel rpmsg-tty addr 0x400 | |
[ 497.236666] rproc-virtio rproc-virtio.1.auto: registered virtio0 (type 7) | |
[ 497.259822] remoteproc remoteproc0: remote processor imx-rproc is now up | |
[ 497.293913] virtio_rpmsg_bus virtio0: creating channel rpmsg-client-sample addr 0x401 | |
[ 497.308388] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.1025: new channel: 0x401 -> 0x401! | |
[ 497.337969] virtio_rpmsg_bus virtio0: creating channel rpmsg-tty addr 0x402 | |
ls /dev | grep ttyRPMSG | |
ttyRPMSG0 -> used for zephyr shell interface | |
ttyRPMSG1 -> used for sample interface | |
#Copy zephyr_openamp_rsc_table.elf to /lib/firmware on your board | |
$ modprobe imx_rproc | |
$ modprobe virtio_rpmsg_bus | |
$ modprobe rpmsg_tty | |
#Request RPROC to load the M4 image | |
$ echo stop > /sys/class/remoteproc/remoteproc0/state | |
$ echo zephyr_openamp_rsc_table.elf > /sys/class/remoteproc/remoteproc0/firmware | |
$ echo start > /sys/class/remoteproc/remoteproc0/state | |
#dmesg will detail the boot process: | |
$ dmesg | |
[ 497.120499] remoteproc remoteproc0: stopped remote processor imx-rproc | |
[ 497.138938] remoteproc remoteproc0: powering up imx-rproc | |
[ 497.168735] remoteproc remoteproc0: Booting fw image zephyr_openamp_rsc_table.elf, size 1267076 | |
[ 497.184826] rproc-virtio rproc-virtio.1.auto: assigned reserved memory node vdev0buffer0@90002000 | |
[ 497.221395] virtio_rpmsg_bus virtio0: rpmsg host is online | |
[ 497.233806] virtio_rpmsg_bus virtio0: creating channel rpmsg-tty addr 0x400 | |
[ 497.236666] rproc-virtio rproc-virtio.1.auto: registered virtio0 (type 7) | |
[ 497.259822] remoteproc remoteproc0: remote processor imx-rproc is now up | |
[ 497.293913] virtio_rpmsg_bus virtio0: creating channel rpmsg-client-sample addr 0x401 | |
[ 497.308388] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.1025: new channel: 0x401 -> 0x401! | |
[ 497.337969] virtio_rpmsg_bus virtio0: creating channel rpmsg-tty addr 0x402 | |
$ ls /dev | grep ttyRPMSG | |
ttyRPMSG0 -> used for zephyr shell interface | |
ttyRPMSG1 -> used for sample interface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm gonna try that and rebuild the docs to see how it looks :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solved
Add RPMSG/OpenAMP ressource table definition for the IMX7d SOC. Signed-off-by: Jérémy LOCHE - MAKEEN Energy <jlh@makeenenergy.com>
Add a prompt to ROMSTART_RELOCATION_ROM configs to allow projects config file selection. This simplifies the usage in samples/app for board porting. Signed-off-by: Jérémy LOCHE - MAKEEN Energy <jlh@makeenenergy.com>
Enable openamp sample for Toradex Colibri IMX7D. Tested with LTS BSP 6.6.0 on kernel 6.1.83. Signed-off-by: Jérémy LOCHE - MAKEEN Energy <jlh@makeenenergy.com>
a652555
487c5b6
to
a652555
Compare
Took a chance to rebase, correct the docs and tested building docs to check the updates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for docs, thanks for addressing the requested changes!
Any more comments on this PR ? |
Assignee approval is needed for PRs to merge- @carlocaione can you refresh your +1 if everything looks good? |
@carlocaione Hope you can get time to give a last look at this PR :) |
Following PR #71684 we can now properly boot the M4 core on IMX7D using Linux RPROC.
Adds prompts to the PR #71684 config flags so they can be used in the board's config files.
Adds the necessary definition for the .resource_table for the imx7d soc.
Adds support for the Toradex Colibri IMX7D board for openamp_rsc_table.
This is the first IMX7D board to be officially supported in a openamp_rsc_table sample.
It provides a template for porting other board by providing documentation and a base configuration for the SOC.
Note that this sample is supposed to be loaded using Linux RPROC as we only use the .elf file to boot it from Linux.
This makes sure Linux has fine control over the M4 core state.
Booting from U-boot is not directly supported.
It might be possible to boot from U-boot if ROMSTART_RELOCATION_ROM is disabled and BUILD_OUTPUT_BIN is enabled.
Tested on official Colibri IMX7D on Viola Carrier board running BSP 6.6.0 Minimal image with Linux Kernel 6.1.83.