FX30 with (WP77xx) with Talon mangOH CAN interface

Hi Chris,

How to get the fx30 yocto source code by leaf?
Here is what i got from swi-fx30-catm_1.0.0 identifier:

owner@ubuntu:~/leaf/leaf-data/wp77$ ls
fx30-catm-image fx30-catm-linux-image swi-vscode-support
fx30-catm-legato swi-fx30-catm wp77-modem-image
fx30-catm-legato-image swi-legato wp77-toolchain

Hi @jyijyi,
Just execute this command:

leaf getsrc swi-linux

Leaf will pull the entire yocto workspace using repo. You’ll need to setup SSH keys on gerrit.legato.io

The R11 source will be available with identifier: swi-fx30-catm_2.0.0

BR,
Chris

Hi Chris,
Thx for the information, I will try later.

Hi Chris,
it seems I will need to rebuild the image of my fx30 to implement the CAN drivers and also to update the GLIBC of my target device.
I am trying to download the source from gerrit but it seems it fails due to public-key ack:

XXXXX@XXXXX.com.au@gerrit.legato.io: Permission denied (publickey).
fatal: Could not read from remote repository.

How do I implement the ssh publickey? Do I need to generate one on gerrit and to store it locally to my machine (~/.ssh) or the other way around? Because on gerrit I can`t do either things…

Hi Claudio,
You’ll need to register at gerrit.legato.io and then add your public key under your profile settings.

You can generate a private/public key pair using ssh-keygen.

BR,
Chris

Hi @cchenry ,

I have the same issue and get stuck.
Can you help to give us a step by step on how to pass through those pubic key problem?

I have tried
ssh-keygen -t rsa -b 2048 -C “xxx@xxxxxx.com

and then " cat /home/owner/.ssh/id_rsa.pub "
copy the value to “https://gerrit.legato.io/settings/#SSHKeys

Still I saw the following:


Proceed? (Y/n)
Y
Checking credentials…
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
ERROR:
Something went wrong when trying to connect to ssh://xxx@xxxxxx.com@gerrit.legato.io:29418/manifest


Hi @jyijyi,
Have you added your git info?
git config --global user.name “FIRST LAST”
git config --global user.email “your_email@xxx.com
BR,
Chris

Hi @cchenry,
Thanks for your help.
Finally I can download the source code by the steps below:

  1. ssh-keygen -t rsa -b 2048 -C “xxx@xxx.com

  2. cat /home/owner/.ssh/id_rsa.pub

  3. copy the value to “https://gerrit.legato.io/settings/#SSHKeys
    set the username to “xxx” in https://gerrit.legato.io/settings/#Profile ( this can only set once)

  4. sudo chmod 400 /home/owner/.ssh/id_rsa

  5. ssh-add /home/owner/.ssh/id_rsa
    Enter passphrase for /home/owner/.ssh/id_rsa:

sudo chmod 700 ~/.ssh/
sudo chmod 600 ~/.ssh/*
sudo chown -R owner ~/.ssh/
sudo chgrp -R owner ~/.ssh/

(where owner is the user name of my PC)

  1. in VScode, choose the profile you needed:
    leaf shell
    leaf env user --set GERRIT_USER=“xxx”
    leaf getsrc swi-linux
2 Likes

I have setup the leaf with the latest release for the FX30S, is there any different way to build an open the CAN interface on the target from what I have done earlier?
I have, once again, compile my project and deployed to the target and then run the start.can.sh script, still get an error from the kernel when trying to load the can driver:

root@fx30s:~# ./start_can.sh
“./start_can.sh board [slot]” where board is “green” or “red” or “yellow” and slot is “0” or “1”
root@fx30s:~# ./start_can.sh red 0
Unload of module can_iot.ko has been successful.
sh: write error: Device or resource busy
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c app_Create() 3259 | Creating app ‘tools’
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c app_Start() 3472 | Starting app ‘tools’
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_uartMode.so’ to '/legato/systems/current/appsWriteable/tools/lib/libCo
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_secstore.so’ to '/legato/systems/current/appsWriteable/tools/lib/libCo
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_cm.so’ to '/legato/systems/current/appsWriteable/tools/lib/libComponen
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_moduleLoad.so’ to '/legato/systems/current/appsWriteable/tools/lib/lib
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_fwupdate.so’ to '/legato/systems/current/appsWriteable/tools/lib/libCo
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_pmtool.so’ to '/legato/systems/current/appsWriteable/tools/lib/libComp
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_le_pa_uartMode_default.so’ to '/legato/systems/current/appsWriteable/t
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_swiQmi.so’ to '/legato/systems/current/appsWriteable/tools/lib/libComp
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_le_pa_uartMode.so’ to '/legato/systems/current/appsWriteable/tools/lib
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_gnss.so’ to '/legato/systems/current/appsWriteable/tools/lib/libCompon
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/cm’ to ‘/legato/systems/current/appsWriteable/tools/bin/cm’: Already exists
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/gnss’ to ‘/legato/systems/current/appsWriteable/tools/bin/gnss’: Already exists
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/kmod’ to ‘/legato/systems/current/appsWriteable/tools/bin/kmod’: Already exists
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/fwupdate’ to ‘/legato/systems/current/appsWriteable/tools/bin/fwupdate’: Already ex
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/secstore’ to ‘/legato/systems/current/appsWriteable/tools/bin/secstore’: Already ex
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/uartMode’ to ‘/legato/systems/current/appsWriteable/tools/bin/uartMode’: Already ex
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/pmtool’ to ‘/legato/systems/current/appsWriteable/tools/bin/pmtool’: Already exists
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_swiQmi.so’ to '/legato/systems/current/appsWriteable/tools/lib/libComp
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_le_pa_uartMode.so’ to '/legato/systems/current/appsWriteable/tools/lib
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/scripts/cm’ to ‘/legato/systems/current/appsWriteable/tools/scripts/cm’: Already exists
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | proc.c proc_Start() 1403 | Starting process ‘kmod@0’ with pid 3850
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | supervisor.c SigChildHandler() 874 | Reaping unconfigured child process 3849.
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[3850]/supervisor T=main | proc.c proc_Start() 1363 | Execing ‘bin/kmod’
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[3850]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxCoreDumpFileBytes to value 8192.
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[3850]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileBytes to value 90112.
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[3850]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxLockedMemoryBytes to value 8192.
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[3850]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileDescriptors to value 256.
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[3850]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxMQueueBytes to value 512.
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[3850]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxThreads to value 20.
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[3850]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxQueuedSignals to value 100.
Oct 2 09:05:44 fx30s user.warn Legato: -WRN- | UNKNOWN[3850]/framework T=main | safeRef.c InitMap() 217 | Map name ‘refle_kernelModule_ClientHandlers’ truncated to ‘refle_kernelModule_ClientHandle’.
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | kernelModules.c le_kernelModule_Unload() 1784 | Requested to unload module ‘can_iot.ko’.
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | kernelModules.c le_kernelModule_Unload() 1826 | Unloading module, ‘can_iot.ko’, was successful.
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | proc.c proc_SigChildHandler() 2079 | Process ‘kmod@0’ (PID: 3850) has exited with exit code 0.
Oct 2 09:05:44 fx30s user.info kernel: [ 1153.224824] gpio_set_map_table: Detected FX30S
Oct 2 09:05:44 fx30s user.debug kernel: [ 1153.224851] gpio_sync_ri: RI owner is Modem
Oct 2 09:05:44 fx30s user.debug kernel: [ 1153.224865] gpio_map_name_to_num: find GPIO 76
Oct 2 09:05:44 fx30s user.debug kernel: [ 1153.224874] export_store: Export GPIO: 76
Oct 2 09:05:44 fx30s user.info kernel: [ 1153.224899] gpio_set_map_table: Detected FX30S
Oct 2 09:05:44 fx30s user.debug kernel: [ 1153.224909] gpio_sync_ri: RI owner is Modem
Oct 2 09:05:44 fx30s user.debug kernel: [ 1153.224923] gpiod_export: sierra–find GPIO,chipdev = -828222960,chipngpio = 80,chipbase = 0
Oct 2 09:05:44 fx30s user.info kernel: [ 1153.225663] gpio_set_map_table: Detected FX30S
Oct 2 09:05:44 fx30s user.debug kernel: [ 1153.225682] gpio_sync_ri: RI owner is Modem
Oct 2 09:05:44 fx30s user.debug kernel: [ 1153.225693] gpio_map_name_to_num: find GPIO 38
Oct 2 09:05:44 fx30s user.debug kernel: [ 1153.225702] export_store: Export GPIO: 38
Oct 2 09:05:44 fx30s user.debug kernel: [ 1153.225714] gpio-38 (sysfs): gpiod_request: status -16
Oct 2 09:05:44 fx30s user.debug kernel: [ 1153.225723] export_store: Status -16
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c app_StopComplete() 4764 | app ‘tools’ has stopped.
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | apps.c DeactivateAppContainer() 374 | Application ‘tools’ has stopped.
Could not load the required module, can_iot.ko. (LE_FAULT)
See the device log for details.
Cannot find device “can0”
ifconfig: SIOCGIFFLAGS: No such device
root@fx30s:~# Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c app_Start() 3472 | Starting app ‘tools’
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_uartMode.so’ to '/legato/systems/current/appsWriteable/tools/lib/libCo
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_secstore.so’ to '/legato/systems/current/appsWriteable/tools/lib/libCo
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_cm.so’ to '/legato/systems/current/appsWriteable/tools/lib/libComponen
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_moduleLoad.so’ to '/legato/systems/current/appsWriteable/tools/lib/lib
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_fwupdate.so’ to '/legato/systems/current/appsWriteable/tools/lib/libCo
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_pmtool.so’ to '/legato/systems/current/appsWriteable/tools/lib/libComp
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_le_pa_uartMode_default.so’ to '/legato/systems/current/appsWriteable/t
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_swiQmi.so’ to '/legato/systems/current/appsWriteable/tools/lib/libComp
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_le_pa_uartMode.so’ to '/legato/systems/current/appsWriteable/tools/lib
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_gnss.so’ to '/legato/systems/current/appsWriteable/tools/lib/libCompon
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/cm’ to ‘/legato/systems/current/appsWriteable/tools/bin/cm’: Already exists
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/gnss’ to ‘/legato/systems/current/appsWriteable/tools/bin/gnss’: Already exists
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/kmod’ to ‘/legato/systems/current/appsWriteable/tools/bin/kmod’: Already exists
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/fwupdate’ to ‘/legato/systems/current/appsWriteable/tools/bin/fwupdate’: Already ex
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/secstore’ to ‘/legato/systems/current/appsWriteable/tools/bin/secstore’: Already ex
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/uartMode’ to ‘/legato/systems/current/appsWriteable/tools/bin/uartMode’: Already ex
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/pmtool’ to ‘/legato/systems/current/appsWriteable/tools/bin/pmtool’: Already exists
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_swiQmi.so’ to '/legato/systems/current/appsWriteable/tools/lib/libComp
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_le_pa_uartMode.so’ to '/legato/systems/current/appsWriteable/tools/lib
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/scripts/cm’ to ‘/legato/systems/current/appsWriteable/tools/scripts/cm’: Already exists
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | proc.c proc_Start() 1403 | Starting process ‘kmod@0’ with pid 3861
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | supervisor.c SigChildHandler() 874 | Reaping unconfigured child process 3860.
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[3861]/supervisor T=main | proc.c proc_Start() 1363 | Execing ‘bin/kmod’
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[3861]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxCoreDumpFileBytes to value 8192.
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[3861]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileBytes to value 90112.
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[3861]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxLockedMemoryBytes to value 8192.
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[3861]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileDescriptors to value 256.
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[3861]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxMQueueBytes to value 512.
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[3861]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxThreads to value 20.
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[3861]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxQueuedSignals to value 100.
Oct 2 09:05:45 fx30s user.warn Legato: -WRN- | UNKNOWN[3861]/framework T=main | safeRef.c InitMap() 217 | Map name ‘refle_kernelModule_ClientHandlers’ truncated to ‘refle_kernelModule_ClientHandle’.
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | kernelModules.c le_kernelModule_Load() 1720 | Requested to load module ‘can_iot.ko’.
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | kernelModules.c ExecuteCommand() 244 | Execute '/sbin/insmod /legato/systems/current/modules/can_iot.ko ’
Oct 2 09:05:45 fx30s user.crit Legato: CRT | supervisor[1421]/supervisor T=main | kernelModules.c ExecuteCommand() 295 | /sbin/insmod /legato/systems/current/modules/can_iot.ko exited with error code 8.
Oct 2 09:05:45 fx30s user.err Legato: =ERR= | supervisor[1421]/supervisor T=main | kernelModules.c le_kernelModule_Load() 1758 | Load module, ‘can_iot.ko’, failed. (LE_FAULT)
Oct 2 09:05:45 fx30s user.err kernel: [ 1154.367995] can_iot: version magic '3.18.140 preempt mod_unload ARMv7 p2v8 ’ should be '3.18.44 preempt mod_unload ARMv7 p2v8 ’
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | proc.c proc_SigChildHandler() 2079 | Process ‘kmod@0’ (PID: 3861) has exited with exit code 1.
Oct 2 09:05:45 fx30s user.warn Legato: -WRN- | supervisor[1421]/supervisor T=main | app.c app_SigChildHandler() 4067 | Process ‘kmod@0’ in app ‘tools’ faulted: Ignored.
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c app_StopComplete() 4764 | app ‘tools’ has stopped.
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | apps.c DeactivateAppContainer() 374 | Application ‘tools’ has stopped.

ExecuteCommand() 295 | /sbin/insmod /legato/systems/current/modules/can_iot.ko exited with error code 8.
Oct 2 09:05:45 fx30s user.err Legato: =ERR= | supervisor[1421]/supervisor T=main | kernelModules.c le_kernelModule_Load() 1758 | Load module, ‘can_iot.ko’, failed. (LE_FAULT)
Oct 2 09:05:45 fx30s user.err kernel: [ 1154.367995] can_iot: version magic '3.18.140 preempt mod_unload ARMv7 p2v8 ’ should be '3.18.44 preempt mod_unload ARMv7 p2v8 ’

Same problem with kernel version.
Have you tried the swi-fx30-catm_1.0.0 package?

I did start with that version, I was told to wait for the new release and that was going to fix all problems. @cchenry could u please explain it a bit because this is holding back all our projects and now we have lost a whole month.

It worth to make a try on swi-fx30-catm_1.0.0

Hi Claudio,
Could you please explain how you built your can_iot kernel object? Your log doesn’t show a magic number issue, but I wonder if you’ve built it separately from the kernel.

Are you using the prebuilt R11.0.0.007 kernel image?

Could you please try pulling the yocto source code:
leaf getsrc swi-linux

Add your kernel driver to the yocto kernel. You may also need to enable the CAN options as well. Then you can build the full image including the kernel:
cd swi-linux
make

The resulting image will be in:
build_bin/images/public

Alternately, the Legato framework supports installing a kernel object via a Legato application. I’m not familiar with the exact process, but there should be documentation on legato.io

BR,
Chris

@cchenry, I am actually using the legato framework for that, the only reference I have found was this:

…the system definition link is broken.

The system definition I am using is this one:

#include “$LEGATO_ROOT/default.sdef”
apps:
{
}
appSearch:
{
}
interfaceSearch:
{
}
moduleSearch:
{
/home/claudio/legatoWorkspace/legatoAF/drivers/mangoh/can_common
/home/claudio/legatoWorkspace/legatoAF/drivers/mangoh/can_9x07
}
kernelModules:
{
mcp251x.mdef
can_iot.mdef
}

This compiles fine and I can download to the target, then I locally run the start.sh script (assuming the target is for RED as the wp77 - FX30 should be)…
root@fx30s:~# ./start_can.sh red 0
Unload of module can_iot.ko has been successful.
sh: write error: Device or resource busy
Could not load the required module, can_iot.ko. (LE_FAULT)
See the device log for details.
Cannot find device “can0”
ifconfig: SIOCGIFFLAGS: No such device

This happens either with interfaces 0 or 1.

ExecuteCommand() 295 | /sbin/insmod /legato/systems/current/modules/can_iot.ko exited with error code 8.
Oct 2 09:05:45 fx30s user.err Legato: =ERR= | supervisor[1421]/supervisor T=main | kernelModules.c le_kernelModule_Load() 1758 | Load module, ‘can_iot.ko’, failed. (LE_FAULT)
Oct 2 09:05:45 fx30s user.err kernel: [ 1154.367995] can_iot: version magic '3.18.140 preempt mod_unload ARMv7 p2v8 ’ should be '3.18.44 preempt mod_unload ARMv7 p2v8 ’

Same problem with kernel version.
Have you tried the swi-fx30-catm_1.0.0 package?

We have started with the package and were told to wait for the new release as the

The stock WP77 code will run on an FX30 but peripheral functions won’t work.

Now I see that I am working on leaf shell, you are working on VScode and cchenry is talking about toolchain and system rebuild.
I did actually try with exact the same system definition and using the swi-fx30-catm_1.0.0, which didn`t work.

Is the CAN drive enabled on the R11 and how do I get it operational…?
If you’re able to wait another week or 2, the R11 release is just about ready.

I used the toolchain of swi-fx30-catm_1.0.0, and compile the mangoh source with CAN enabled in shared.sdef.
I can run it on FX30M1 FW 9.1.

root@fx30:~# kmod load can_iot.ko
Load of module can_iot.ko has been successful.
root@fx30:~# Oct 6 07:39:04 fx30 user.warn Legato: -WRN- | UNKNOWN[4493]/framework T=main | LE_FILENAME le_ref_CreateMap() 149 | Map name ‘refle_kernelModule_ClientHandlers’ truncated to ‘refle_kernelModule_ClientHandle’.
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | kernelModules.c le_kernelModule_Load() 1087 | Requested to load module ‘can_iot.ko’.
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | kernelModules.c ExecuteCommand() 190 | Execute ‘/sbin/insmod /legato/systems/current/modules/can_iot.ko’
Oct 6 07:39:04 fx30 user.debug kernel: [ 1219.556676] gpio_sync_ri: RI owner is APP
Oct 6 07:39:04 fx30 user.debug kernel: [ 1219.556701] gpiod_export: sierra–find GPIO,chipdev = -828222960,chipngpio = 80,chipbase = 0
Oct 6 07:39:04 fx30 user.err kernel: [ 1219.557462] sps: BAM device 0x07884000 is not registered yet.
Oct 6 07:39:04 fx30 user.info kernel: [ 1219.563137] sps:BAM 0x07884000 is registered.
Oct 6 07:39:04 fx30 user.info kernel: [ 1219.564685] sps:BAM 0x07884000 (va:0xd0bc0000) enabled: ver:0x18, number of pipes:24
Oct 6 07:39:04 fx30 user.warn kernel: [ 1219.565223] spi1.0 supply vdd not found, using dummy regulator
Oct 6 07:39:04 fx30 user.warn kernel: [ 1219.565305] spi1.0 supply xceiver not found, using dummy regulator
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | kernelModules.c InstallEachKernelModule() 701 | New kernel module can_iot.ko
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | kernelModules.c le_kernelModule_Load() 1101 | Load module, ‘can_iot.ko’, was successful.
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | supervisor.c SigChildHandler() 783 | Reaping unconfigured child process 2667.
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | supervisor.c SigChildHandler() 783 | Reaping unconfigured child process 2673.
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | supervisor.c SigChildHandler() 783 | Reaping unconfigured child process 2679.
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | supervisor.c SigChildHandler() 783 | Reaping unconfigured child process 2686.
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | supervisor.c SigChildHandler() 783 | Reaping unconfigured child process 2692.
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | proc.c proc_SigChildHandler() 2035 | Process ‘avcLoadConfig’ (PID: 2693) has exited with exit code 0.
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | supervisor.c SigChildHandler() 783 | Reaping unconfigured child process 2699.
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | supervisor.c SigChildHandler() 783 | Reaping unconfigured child process 2705.
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | supervisor.c SigChildHandler() 783 | Reaping unconfigured child process 2711.
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | supervisor.c SigChildHandler() 783 | Reaping unconfigured child process 2723.
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | supervisor.c SigChildHandler() 783 | Reaping unconfigured child process 2730.
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | supervisor.c SigChildHandler() 783 | Reaping unconfigured child process 2736.
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | supervisor.c SigChildHandler() 783 | Reaping unconfigured child process 2742.
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | supervisor.c SigChildHandler() 783 | Reaping unconfigured child process 2747.
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | supervisor.c SigChildHandler() 783 | Reaping unconfigured child process 2762.
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | supervisor.c SigChildHandler() 783 | Reaping unconfigured child process 2768.
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | supervisor.c SigChildHandler() 783 | Reaping unconfigured child process 2774.
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | supervisor.c SigChildHandler() 783 | Reaping unconfigured child process 2780.
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | supervisor.c SigChildHandler() 783 | Reaping unconfigured child process 2786.
Oct 6 07:39:04 fx30 user.info Legato: INFO | supervisor[2643]/supervisor T=main | supervisor.c SigChildHandler() 783 | Reaping unconfigured child process 2792.
Oct 6 07:39:04 fx30 user.info kernel: [ 1219.576902] can_iot_init: mcp2515 (gpio:79 irq:131).

Can you post the sys definition you are using?

Here are my sdef files:
shared.sdef (1.1 KB) red.sdef (739 Bytes)

Which one is the part for the CAN?
Because there are some apps which are not connected with CAN interface.