From 3fe1a9f5562874e45591b5165546d7d9cbe618e5 Mon Sep 17 00:00:00 2001 From: Sipke Vriend Date: Mon, 31 Aug 2026 09:26:37 +1000 Subject: [PATCH 1/5] examples: zephyr: dual_qemu_ivhmem: remove $ prompt from code blocks Remove the prompt $ symbol from console block command lines, so it is not copied as well when using github or IDE copy button. Signed-off-by: Sipke Vriend --- examples/zephyr/dual_qemu_ivshmem/README.rst | 31 ++++++++++---------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/examples/zephyr/dual_qemu_ivshmem/README.rst b/examples/zephyr/dual_qemu_ivshmem/README.rst index 3e82d9e3..9eabb12d 100644 --- a/examples/zephyr/dual_qemu_ivshmem/README.rst +++ b/examples/zephyr/dual_qemu_ivshmem/README.rst @@ -48,18 +48,18 @@ Preparing IVSHMEM server before doing anything: .. code-block:: console # n = number of vectors - $ sudo ivshmem-server -n 2 - $ *** Example code, do not use in production *** + sudo ivshmem-server -n 2 + *** Example code, do not use in production *** #. Appropriately set ownership of ``/dev/shm/ivshmem`` and ``/tmp/ivshmem_socket`` for your deployment scenario. For instance: .. code-block:: console - $ sudo chgrp $USER /dev/shm/ivshmem - $ sudo chmod 060 /dev/shm/ivshmem - $ sudo chgrp $USER /tmp/ivshmem_socket - $ sudo chmod 060 /tmp/ivshmem_socket + sudo chgrp $USER /dev/shm/ivshmem + sudo chmod 060 /dev/shm/ivshmem + sudo chgrp $USER /tmp/ivshmem_socket + sudo chmod 060 /tmp/ivshmem_socket Building and Running ******************** @@ -68,15 +68,15 @@ open a terminal and then type: .. code-block:: console - $ cd path/to/this-repo/examples/zephyr/dual_qemu_ivshmem/host - $ west build -pauto -bqemu_cortex_a53 + cd path/to/this-repo/examples/zephyr/dual_qemu_ivshmem/host + west build -pauto -bqemu_cortex_a53 For the remote side, open another terminal window and then type: .. code-block:: console - $ cd path/to/this-repo/examples/zephyr/dual_qemu_ivshmem/remote - $ west build -pauto -bqemu_cortex_a53 + cd path/to/this-repo/examples/zephyr/dual_qemu_ivshmem/remote + west build -pauto -bqemu_cortex_a53 * Note: Warnings that appear are from ivshmem-shell subsystem and can be ignored. @@ -89,15 +89,15 @@ For example to run host instance: .. code-block:: console - $ cd path/to/this-repo/examples/zephyr/dual_qemu_ivshmem/host - $ west build -t run + cd path/to/this-repo/examples/zephyr/dual_qemu_ivshmem/host + west build -t run For the remote instance, just go to the remote side directory in another terminal: .. code-block:: console - $ cd path/to/this-repo/examples/zephyr/dual_qemu_ivshmem/remote - $ west build -t run + cd path/to/this-repo/examples/zephyr/dual_qemu_ivshmem/remote + west build -t run Expected output: **************** @@ -106,8 +106,9 @@ in the ``RIGHT ORDER``, that is it, first the host instance followed by remote i go to the host instance terminal, you should see something like this: .. code-block:: console + :caption: Zephyr uart - uart:~$ *** Booting Zephyr OS build v3.4.0-rc2-91-gbf0f58d69816 *** + *** Booting Zephyr OS build v3.4.0-rc2-91-gbf0f58d69816 *** Hello qemu_cortex_a53 - Host Side, the communication over RPMsg is ready to use! If nothing appears, make sure you are running the remote instance after this one, because From 5d6ef8db40ecf7f3d99f429ab7808cd2e7afae0d Mon Sep 17 00:00:00 2001 From: Sipke Vriend Date: Mon, 31 Aug 2026 09:42:40 +1000 Subject: [PATCH 2/5] examples: zephyr: dual_qemu_ivhmem: split Zephyr uart code blocks Split the zephyr console blocks into command line and output blocks to allow the command line to be copied when using github or IDE. Signed-off-by: Sipke Vriend --- examples/zephyr/dual_qemu_ivshmem/README.rst | 37 ++++++++++++++++---- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/examples/zephyr/dual_qemu_ivshmem/README.rst b/examples/zephyr/dual_qemu_ivshmem/README.rst index 9eabb12d..4f5385cc 100644 --- a/examples/zephyr/dual_qemu_ivshmem/README.rst +++ b/examples/zephyr/dual_qemu_ivshmem/README.rst @@ -49,6 +49,9 @@ Preparing IVSHMEM server before doing anything: # n = number of vectors sudo ivshmem-server -n 2 + + .. code-block:: console + *** Example code, do not use in production *** #. Appropriately set ownership of ``/dev/shm/ivshmem`` and @@ -106,7 +109,6 @@ in the ``RIGHT ORDER``, that is it, first the host instance followed by remote i go to the host instance terminal, you should see something like this: .. code-block:: console - :caption: Zephyr uart *** Booting Zephyr OS build v3.4.0-rc2-91-gbf0f58d69816 *** Hello qemu_cortex_a53 - Host Side, the communication over RPMsg is ready to use! @@ -126,9 +128,16 @@ on console you may see something like this: Then go back to the host side terminal window, and issue the custom shell command ``rpmsg_ivshmem send`` and you should see how to use that: +**Command** + + .. code-block:: console + + rpmsg_ivshmem send + +**Output** + .. code-block:: console - uart:~$ rpmsg_ivshmem send send: wrong parameter count send - Usage: rpmsg_ivshmem send @@ -137,9 +146,16 @@ this command will send the data over RPMsg-IVSHMEM backend and the remote side will reply back echoing the sent string, on the host terminal this should take an output similar like the shown below: +**Command** + + .. code-block:: console + + rpmsg_ivshmem send "RPMsg over IVSHMEM" 10 + +**Output** + .. code-block:: console - uart:~$ rpmsg_ivshmem send "RPMsg over IVSHMEM" 10 Remote side echoed the string back: [ RPMsg over IVSHMEM ] at message number 1 @@ -183,13 +199,14 @@ an output similar like the shown below: On the remote side terminal window is possible also to check the messages arriving from host: +**Output** + .. code-block:: console *** Booting Zephyr OS build v3.4.0-rc2-91-gbf0f58d69816 *** Hello qemu_cortex_a53 - Remote Side, the communication over RPMsg is ready to use! - - uart:~$ Host side sent a string: + Host side sent a string: [ RPMsg over IVSHMEM ] Now echoing it back! @@ -234,11 +251,17 @@ This sample supports huge message number in order to do stress testing, somethin this command is blocking and have a 5 second timeout, returning if something goes wrong, for example shutdown the remote side unexpectedly: +**Command** + + .. code-block:: console + + rpmsg_ivshmem send "RPMsg over IVSHMEM" 10 + +**Output** + .. code-block:: console - uart:~$ rpmsg_ivshmem send "RPMsg over IVSHMEM" 10 Remote side response timed out! - uart:~$ Known limitation: ***************** From 548ebe5825182dec9da4ff43b429c812eb85d52a Mon Sep 17 00:00:00 2001 From: Sipke Vriend Date: Mon, 31 Aug 2026 09:46:34 +1000 Subject: [PATCH 3/5] examples: readme: use shell block for command lines Use the markdown shell block so that users can copy the block, or execute lines as supported by IDEs. Signed-off-by: Sipke Vriend --- .../machine/xlnx/microblaze_generic/README.md | 38 +++++++++---------- examples/linux/rpmsg-echo-test/README.md | 2 +- examples/linux/rpmsg-mat-mul/README.md | 2 +- examples/linux/rpmsg-proxy-app/README.md | 2 +- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/examples/legacy_apps/machine/xlnx/microblaze_generic/README.md b/examples/legacy_apps/machine/xlnx/microblaze_generic/README.md index c384e6e3..91954863 100644 --- a/examples/legacy_apps/machine/xlnx/microblaze_generic/README.md +++ b/examples/legacy_apps/machine/xlnx/microblaze_generic/README.md @@ -35,16 +35,16 @@ with RPMSG_NO_IPI flag. include (cross-generic-gcc) ``` - * Compile the libmetal library: +* Compile the libmetal library: - ``` - $ mkdir -p build-libmetal - $ cd build-libmetal - $ BSP="/path/to/your_MicroBlaze_design_BSP/dir" - $ cmake -DCMAKE_TOOLCHAIN_FILE= \ - -DCMAKE_LIBRARY_PATH=$BSP/lib - $ make VERBOSE=1 DESTDIR= install - ``` +```shell +mkdir -p build-libmetal +cd build-libmetal +BSP="/path/to/your_MicroBlaze_design_BSP/dir" +cmake -DCMAKE_TOOLCHAIN_FILE= \ + -DCMAKE_LIBRARY_PATH=$BSP/lib +make VERBOSE=1 DESTDIR= install +``` * build the OpenAMP library on your host as follows: * Create your own cmake toolchain file to compile openamp for your generic @@ -76,16 +76,16 @@ with RPMSG_NO_IPI flag. * Compile the OpenAMP library: - ``` - $ mkdir -p build-openamp - $ cd build-openamp - $ BSP="/path/to/your_MicroBlaze_design_BSP/dir" - - $ cmake -DCMAKE_TOOLCHAIN_FILE= \ - -DCMAKE_INCLUDE_PATH="$LIBMETAL/include;$BSP/include" \ - -DCMAKE_LIBRARY_PATH="$LIBMETAL/lib/;BSP/lib" -DWITH_APPS=on - $ make VERBOSE=1 DESTDIR=$(pwd) install - ``` +```shell +mkdir -p build-openamp +cd build-openamp +BSP="/path/to/your_MicroBlaze_design_BSP/dir" + +cmake -DCMAKE_TOOLCHAIN_FILE= \ + -DCMAKE_INCLUDE_PATH="$LIBMETAL/include;$BSP/include" \ + -DCMAKE_LIBRARY_PATH="$LIBMETAL/lib/;BSP/lib" -DWITH_APPS=on +make VERBOSE=1 DESTDIR=$(pwd) install +``` The OpenAMP library will be built in `build/usr/local/lib` directory, headers will be built in `build/usr/local/include` directory, and the diff --git a/examples/linux/rpmsg-echo-test/README.md b/examples/linux/rpmsg-echo-test/README.md index 7afcb3c5..79673e9d 100644 --- a/examples/linux/rpmsg-echo-test/README.md +++ b/examples/linux/rpmsg-echo-test/README.md @@ -25,7 +25,7 @@ Assume all the binaries are board specific. - ``` + ```shell # Specify remote processor firmware to be loaded. echo image_echo_test > /sys/class/remoteproc/remoteproc0/firmware diff --git a/examples/linux/rpmsg-mat-mul/README.md b/examples/linux/rpmsg-mat-mul/README.md index f81c8d25..a20ab01d 100644 --- a/examples/linux/rpmsg-mat-mul/README.md +++ b/examples/linux/rpmsg-mat-mul/README.md @@ -29,7 +29,7 @@ Assume all the binaries are board specific. - ``` + ```shell # Specify remote processor firmware to be loaded. echo image_matrix_multiply > /sys/class/remoteproc/remoteproc0/firmware diff --git a/examples/linux/rpmsg-proxy-app/README.md b/examples/linux/rpmsg-proxy-app/README.md index cd143cc9..fc83850f 100644 --- a/examples/linux/rpmsg-proxy-app/README.md +++ b/examples/linux/rpmsg-proxy-app/README.md @@ -58,7 +58,7 @@ Assume all the binaries are zcu102 board specific. - ``` + ```shell # Specify remote processor firmware to be loaded. echo image_rpc_demo > /sys/class/remoteproc/remoteproc0/firmware From 50df88de62c855b8faf29d32273badf681c1072d Mon Sep 17 00:00:00 2001 From: Sipke Vriend Date: Mon, 31 Aug 2026 09:54:59 +1000 Subject: [PATCH 4/5] examples: linux: rpmsg-utils: rename to make README a Markdown file To allow for formatting of readme rename to README.md Signed-off-by: Sipke Vriend --- examples/linux/rpmsg-utils/{README => README.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename examples/linux/rpmsg-utils/{README => README.md} (100%) diff --git a/examples/linux/rpmsg-utils/README b/examples/linux/rpmsg-utils/README.md similarity index 100% rename from examples/linux/rpmsg-utils/README rename to examples/linux/rpmsg-utils/README.md From 89f7936ada10423c4c21a5b434a5ea247babb5f8 Mon Sep 17 00:00:00 2001 From: Sipke Vriend Date: Mon, 31 Aug 2026 09:49:17 +1000 Subject: [PATCH 5/5] examples: linux: rpmsg-utils: Format with markdown code block and heading Use a code block for the udev rules and extend the heading underline for eptdestroy. Signed-off-by: Sipke Vriend --- examples/linux/rpmsg-utils/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/linux/rpmsg-utils/README.md b/examples/linux/rpmsg-utils/README.md index a394d841..3a5f0f6f 100644 --- a/examples/linux/rpmsg-utils/README.md +++ b/examples/linux/rpmsg-utils/README.md @@ -7,6 +7,7 @@ automatically create endpoint devices as remoteproc devices are booted. An example of udev-rule that automatically exposes the APPS_RIVA_CTRL channel to user space as the pronto core comes up: +``` ACTION=="add", SUBSYSTEM=="rpmsg", \ KERNEL=="rpmsg_ctrl[0-9]*", \ ATTRS{rpmsg_name}=="pronto", \ @@ -22,9 +23,10 @@ SUBSYSTEM=="rpmsg", KERNEL=="rpmsg[0-9]*", \ ATTR{name}=="?*", \ ATTRS{rpmsg_name}=="?*", \ SYMLINK+="rpmsg/$attr{rpmsg_name}/$attr{name}" +``` eptdestroy -==== +========== "rpmsg_destroy_ept" implements RPMSG_DESTROY_EPT_IOCTL to destroy an endpoint created by the RPMSG_CREATE_EPT_IOCTL. ping