I am in the process of migrating from TorizonCore 5.7 to TorizonCore 6.2.
Maybe you can help me with figuring out why the can0 interface is behaving differently between these OS releases?
We implemented a can0_startup.service in systemd that does a ip link set can0 type can bitrate 125000 and then ip link set can0 up to bring the interface up. This works fine with TorizonCore 5.7.0 (build 17) but the service fails on TorizonCore 6.2.0-devel-202303 (build 6):
root@apalis-imx8-14760463:~# systemctl status can0_startup.service
x can0_startup.service - Setup SocketCAN interface can0 with a bitrate of 125000
Loaded: loaded (/etc/systemd/system/can0_startup.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2023-03-23 11:07:03 UTC; 8s ago
Process: 1690 ExecStartPre=/sbin/ip link set can0 type can bitrate 125000 (code=exited, status=2)
Mar 23 11:07:03 apalis-imx8-14760463 systemd[1]: Starting Setup SocketCAN interface can0 with a bitrate of 125000...
Mar 23 11:07:03 apalis-imx8-14760463 ip[1690]: ip: either "dev" is duplicate, or "type" is garbage
Mar 23 11:07:03 apalis-imx8-14760463 systemd[1]: can0_startup.service: Control process exited, code=exited, status=2/INVALIDARGUMENT
Mar 23 11:07:03 apalis-imx8-14760463 systemd[1]: can0_startup.service: Failed with result 'exit-code'.
Mar 23 11:07:03 apalis-imx8-14760463 systemd[1]: Failed to start Setup SocketCAN interface can0 with a bitrate of 125000.
Our setup is:
Apalis iMX8QM 4GB
Custom Carrierboard (LVDS, USB, CAN, RS232, and I2C)
torizon@apalis-imx8-14760463:~$ systemctl status can0_startup
* can0_startup.service - Setup SocketCAN interface can0 with a bitrate of 125000
Loaded: loaded (/etc/systemd/system/can0_startup.service; enabled; vendor preset: disabled)
Active: active (exited) since Thu 2023-03-23 12:27:05 UTC; 4min 38s ago
Process: 1627 ExecStartPre=/sbin/ip link set can0 type can bitrate 125000 (code=exited, status=0/SUCCESS)
Process: 1629 ExecStart=/sbin/ip link set can0 up (code=exited, status=0/SUCCESS)
Main PID: 1629 (code=exited, status=0/SUCCESS)
Mar 23 12:27:05 apalis-imx8-14760463 systemd[1]: Starting Setup SocketCAN interface can0 with a bitrate of 125000...
Mar 23 12:27:05 apalis-imx8-14760463 systemd[1]: Started Setup SocketCAN interface can0 with a bitrate of 125000.
Any idea what I might have missed during the update? There were no changes made to the service file. The custom-display-overlay.dts only contains panel-timings.
sure.
For TorizonCore 5 the output is ip utility, iproute2-ss200127:
U-Boot 2020.04-5.7.0+git.33bb8e968332 (Jan 01 1970 - 00:00:00 +0000)
CPU: NXP i.MX8QM RevB A53 at 1200 MHz
DRAM: 4 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... OK
In: serial
Out: serial
Err: serial
Model: Toradex Apalis iMX8 QuadMax 4GB IT V1.1D, Serial# 14760487
BuildInfo:
- SCFW 216a2c2e, SECO-FW c9de51c0, IMX-MKIMAGE 6a315dbc, ATF 2fa8c63
- U-Boot 2020.04-5.7.0+git.33bb8e968332
switch to partitions #0, OK
mmc0(part 0) is current device
flash target is MMC:0
Net: eth0: ethernet@5b040000
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
973 bytes read in 11 ms (85.9 KiB/s)
## Executing script at 83100000
5127 bytes read in 22 ms (227.5 KiB/s)
167875 bytes read in 33 ms (4.9 MiB/s)
81 bytes read in 27 ms (2.9 KiB/s)
Applying Overlay: apalis-imx8_lvds_overlay.dtbo
510 bytes read in 31 ms (15.6 KiB/s)
Applying Overlay: display-MI0700BNT-4CP2-B_overlay.dtbo
2942 bytes read in 37 ms (77.1 KiB/s)
12192077 bytes read in 287 ms (40.5 MiB/s)
Uncompressed size: 30659072 = 0x1D3D200
9183263 bytes read in 224 ms (39.1 MiB/s)
## Flattened Device Tree blob at 83000000
Booting using the fdt blob at 0x83000000
Loading Ramdisk to fcd8b000, end fd64d01f ... OK
Loading Device Tree to 00000000fcd3e000, end 00000000fcd8afff ... OK
Starting kernel ...
[ 0.145872] No BMan portals available!
[ 0.147074] No QMan portals available!
[ 1.783649] imx-audmix imx-audmix.0: failed to find SAI platform device
[ 1.870278] imx6q-pcie 5f010000.pcie: pcie_ext clock source missing or invalid
[ 1.870313] imx6q-pcie 5f000000.pcie: pcie_ext clock source missing or invalid
[ 2.043278] debugfs: Directory '59050000.sai' with parent 'apalis-imx8qm-sgtl5000' already present!
[ 3.299821] imx6q-pcie 5f010000.pcie: failed to initialize host
[ 3.305772] imx6q-pcie 5f010000.pcie: unable to add pcie port.
[ 3.419787] imx6q-pcie 5f000000.pcie: failed to initialize host
[ 3.425735] imx6q-pcie 5f000000.pcie: unable to add pcie port.
Starting version 244.5+
TorizonCore 5.7.0+build.17 apalis-imx8-14760487 ttyLP1
apalis-imx8-14760487 login:
torizon
Password:
torizon@apalis-imx8-14760487:~$ ip -V
ip utility, iproute2-ss200127
torizon@apalis-imx8-14760487:~$
And for the TorizonCore 6 … well I get a Usage from BusyBox v1.35.0:
U-Boot 2020.04-5.7.0+git.33bb8e968332 (Jan 01 1970 - 00:00:00 +0000)
CPU: NXP i.MX8QM RevB A53 at 1200 MHz
DRAM: 4 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... OK
In: serial
Out: serial
Err: serial
Model: Toradex Apalis iMX8 QuadMax 4GB IT V1.1D, Serial# 14760463
BuildInfo:
- SCFW 216a2c2e, SECO-FW c9de51c0, IMX-MKIMAGE 6a315dbc, ATF 2fa8c63
- U-Boot 2020.04-5.7.0+git.33bb8e968332
switch to partitions #0, OK
mmc0(part 0) is current device
flash target is MMC:0
Net: eth0: ethernet@5b040000
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
973 bytes read in 12 ms (79.1 KiB/s)
## Executing script at 83100000
5375 bytes read in 23 ms (227.5 KiB/s)
170359 bytes read in 33 ms (4.9 MiB/s)
81 bytes read in 27 ms (2.9 KiB/s)
Applying Overlay: apalis-imx8_lvds_overlay.dtbo
510 bytes read in 31 ms (15.6 KiB/s)
Applying Overlay: display-MI0700BNT-4CP2-B_overlay.dtbo
2942 bytes read in 34 ms (84 KiB/s)
13341641 bytes read in 314 ms (40.5 MiB/s)
Uncompressed size: 35275264 = 0x21A4200
11530527 bytes read in 275 ms (40 MiB/s)
## Flattened Device Tree blob at 83000000
Booting using the fdt blob at 0x83000000
Loading Ramdisk to fcb4e000, end fd64d11f ... OK
Loading Device Tree to 00000000fcb01000, end 00000000fcb4dfff ... OK
Starting kernel ...
[ 1.288168] debugfs: Directory 'lvds1' with parent 'pm_genpd' already present!
[ 1.296449] debugfs: Directory 'mipi1-i2c1' with parent 'pm_genpd' already present!
[ 1.304149] debugfs: Directory 'mipi1-i2c0' with parent 'pm_genpd' already present!
[ 1.311843] debugfs: Directory 'mipi1-pwm0' with parent 'pm_genpd' already present!
[ 1.319938] debugfs: Directory 'mipi1' with parent 'pm_genpd' already present!
Starting version 250.5+
[ 7.099706] imx-audmix imx-audmix.0: failed to find SAI platform device
[FAILED] Failed to start Setup Sock…can0 with a bitrate of 125000.
TorizonCore 6.2.0-devel-202303+build.6 apalis-imx8-14760463 ttyLP1
apalis-imx8-14760463 login: torizon
Password:
torizon@apalis-imx8-14760463:~$ ip -V
BusyBox v1.35.0 () multi-call binary.
Usage: ip [OPTIONS] address|route|link|tunnel [ARGS]
torizon@apalis-imx8-14760463:~$ ip --version
BusyBox v1.35.0 () multi-call binary.
Usage: ip [OPTIONS] address|route|link|tunnel [ARGS]
torizon@apalis-imx8-14760463:~$
I used a second device for this comparison and added the bootup part - maybe it will help.