Colibri IMX7 RPMsg kernel modules not loading

Hi @eric.tx ,

I wanted to follow up with my attempts to get the RPMsg functional on the Verdin iMX8M Plus Quad 8GB on the Verdin Development Board v1.1F:

Problem: I am able to compile, and start the RPMsg demos on the A and M cores. But the M core does not seem to be responsive after the initial debug message is sent out.

Above you can see that the Ping-Pong demo and String Echo demo starts after the run m4boot command is sent out from the bootloader, but there is no response afterwards. In the section below I’ve outlined by setup:

Setup:

  1. Working directory:

device-tree-overlays and linux-toradex have been checked out to the following branch: toradex_5.15-2.2.x-imx as outlined here: Embedded Linux Support Strategy | Toradex Developer Center

My tcbuild.yaml file contains the following:

# >> NOTES:
# >> Lines containing ">>" are simply comments explaining the properties that
# >> follow; if you don't like these comments run:
# >>   $ grep -v '>>' tcbuild.yaml > tcbuild-clean.yaml
# >> A line not containing ">>" can be uncommented (by removing the hash mark
# >> plus a space from its beginning); also set the corresponding property to
# >> appropriate values.
# >> When uncommenting a line having a property, remember to uncomment all its
# >> parent properties as well; for example: if you uncomment the
# >> 'splash-screen' property, also uncomment its parent property called
# >> 'customization'.

# >> The input section specifies the image to be taken as the base for the
# >> customization.
input:
  easy-installer:
    # >> Choose one of the options (REQUIRED):
    # >> (1) Image as local folder or tarball.
    local: torizon-core-docker-verdin-imx8mp-Tezi_6.6.1+build.14.tar 
    # >> (2) Remote file (optionally with a filename and or a sha256 checksum):
    # remote: "https://artifacts.toradex.com/.../torizon-core-docker-apalis-imx8-Tezi_5.1.0%2Bbuild.1.tar"
    # remote: "https://artifacts.toradex.com/.../torizon-core-docker-colibri-imx6-Tezi_5.0.0-devel-202009%2Bbuild.2.tar;filename=torizon-core-docker-colibri-imx6-Tezi_5.0.0-devel-202009+build.2.tar;sha256sum=368595fa3fb00af9604e70311de3b04df6b30b280deec2f8918c46f479026ddb"
    # >> (3) Image specification (URL will be generated by the tool)
    # toradex-feed:
    #   version: "5.1.0"
    #   release: quarterly
    #   machine: colibri-imx7-emmc
    #   distro: torizon-upstream
    #   variant: torizon-core-docker
    #   build-number: "1"
    #   # build-date: "20210408"

# >> The customization section defines the modifications to be applied to get
# >> the desired output image.
customization:
  # >> Splash screen:
  # splash-screen: custom-splash-screen.png
  # >> Directories overlayed to the base OSTree
  # filesystem:
     # - changes/
   kernel:
    modules:
      - source-dir: rpmsg/
        autoload: no
   device-tree:
    # >> Directories where to look for include files.
     include-dirs:
      - device-tree-overlays/include
      - linux-toradex/include
    # >> Custom device tree source:
     #custom: linux-toradex/arch/arm/boot/dts/imx7d-colibri-emmc-eval-v3.dts
    # >> Device-tree overlays configuration:
     overlays:
      add:
        - device-tree-overlays/overlays/verdin-imx8mp_hmp_overlay.dts

      # >> Whether to ignore all overlays from the base image (or ostree
      # >> archive in the future).
      # clear: false
      # >> Specific overlays not to use from base image (useful only when
      # >> clear is false and not DT has been selected).
      # remove:
        # - apalis-imx8_hdmi_overlay.dtbo
      # >> Overlays to add to output image.
      # add:
      # kernel:
    # >> Custom kernel arguments.
    # arguments:
      # - key1=val1
      # - key2=val2
    # >> Modules to build and possibly load automatically.
    # modules:
      # - source-dir: virtual_touchscreen/
      #   autoload: false

# >> The output section defines properties of the output image.
output:
  # >> OSTree deployment configuration (relevant also for Easy Installer output).
  # ostree:
    # branch: my-dev-branch
    # commit-subject: "OSTree commit subject"
    # commit-body: "OSTree commit body"
  # >> Parameters for deploying to an Easy Installer image.
  easy-installer:
    # >> Output directory of the customized image (REQUIRED):
    local: output_directory
    # >> Information used by Toradex Easy Installer:
    # name: "My customized image"
    # description: "My customized image (description)"
    # licence: files/custom-licence.html
    # release-notes: files/custom-release-notes.html
    # accept-licence: true
    # autoinstall: true
    # autoreboot: true
    # bundle:
      # >> Choose one of the options:
      # >> (1) Specify a docker-compose file whose referenced images will be downloaded.
      # >>     Properties platform, username, password and registry are optional.
      # compose-file: files/docker-compose.yml
      # platform: linux/arm/v7
      # username: "${USERNAME}"
      # password: "${PASSWORD}"
      # registry: hub.docker.com
      # >> (2) Specify a local directory containing the bundled images (previously
      # >>     obtained by 'torizoncore-builder bundle' command).
      # dir: bundle/
    # >> Provisioning configuration:
    # provisioning:
      # >> For "online" mode, properties "shared-data" and "online-data" must be specified.
      # >> For "offline" mode, property "shared-data" must be specified alone.
      # mode: "online"
      # shared-data: "shared-data.tar.gz"
      # online-data: "${ONLINE_PROVISIONING_DATA:?online provisioning data not supplied}"

The Torizon Core version was chosen without containers from here: Download Links | Toradex Developer Center

The rpmsg kernel module was copied over from the following directory: linux-toradex/drivers/rpmsg/ with the following Makefile modifications:

# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_RPMSG)		+= rpmsg_core.o
obj-$(CONFIG_RPMSG_CHAR)	+= rpmsg_char.o
obj-$(CONFIG_RPMSG_CTRL)	+= rpmsg_ctrl.o
obj-$(CONFIG_RPMSG_NS)		+= rpmsg_ns.o
obj-$(CONFIG_RPMSG_MTK_SCP)	+= mtk_rpmsg.o
qcom_glink-objs			:= qcom_glink_native.o qcom_glink_ssr.o
obj-$(CONFIG_RPMSG_QCOM_GLINK) += qcom_glink.o
obj-$(CONFIG_RPMSG_QCOM_GLINK_RPM) += qcom_glink_rpm.o
obj-$(CONFIG_RPMSG_QCOM_GLINK_SMEM) += qcom_glink_smem.o
obj-$(CONFIG_RPMSG_QCOM_SMD)	+= qcom_smd.o
obj-$(CONFIG_RPMSG_VIRTIO)	+= virtio_rpmsg_bus.o
obj-$(CONFIG_HAVE_IMX_RPMSG)	+= imx_rpmsg.o
obj-$(CONFIG_IMX_RPMSG_PINGPONG)	+= imx_rpmsg_pingpong.o
obj-$(CONFIG_IMX_RPMSG_TTY)	+= imx_rpmsg_tty.o

SRC := $(shell pwd)

all:
	$(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules

clean:
	$(MAKE) -C $(KERNEL_SRC) M=$(SRC) clean

Note: I am able to compile the demos using the MCUXpresso SDK without any issues.

  1. On-board setup:

Once the demo binary has been SCP’d to the /ostree/deploy/torizon/var directory I enter the bootloader and run the following commands, to load in the demo binary to the M core:

Before starting the M core, I run the steps outlined here: Support of rpmsg in TorizonCore on Verdin iMX8MP - #5 by hfranco.tx

On the M debug console, I see the start of the string demo debug message, but I don’t see the entire message as outlined here: Running FreeRTOS on the Cortex-M7 of a Verdin iMX8M Plus | Toradex Developer Center

RPMSG String Echo FreeRTOS RTOS API Demo...

Nameservice sent, ready for incoming messages...
Get Message From Master Side : "hello world!" [len : 12]

A core:

M core:

I can confirm the the RPMsg driver has been loaded, but there is not ttyRPMSG device created:

Is there anything that I’m missing in my setup ?