thin-edge / thin-edge.io

The open edge framework for lightweight IoT devices
https://thin-edge.io
Apache License 2.0
219 stars 54 forks source link

Illegal instruction error when connecting on Raspberry Pi 1B #3183

Open reubenmiller opened 1 day ago

reubenmiller commented 1 day ago

Describe the bug

Running tedge connect c8y on a Raspberry Pi 1B causes an Illegal instruction error, and the process exits.

The following is the output from the error:

# tedge connect c8y
The system config file '/etc/tedge/system.toml' doesn't exist. Using '/bin/systemctl' as the default service manager

Detected mosquitto version >= 2.0.0
Checking if systemd is available.

Checking if configuration for requested bridge already exists.

Validating the bridge certificates.

Creating the device in Cumulocity cloud.

Illegal instruction

To Reproduce

  1. Install the official thin-edge.io version on a Raspberry Pi 1B

    wget -O - thin-edge.io/install.sh | sh -s
  2. Configure a Cumulocity tenant

  3. Connect to Cumulocity

    tedge connect c8y

Expected behavior

thin-edge.io should work on a Raspberry Pi 1B (armv6 ARM processor)

Screenshots

Environment (please complete the following information):

Property Value
OS [incl. version] Raspbian GNU/Linux 12 (bookworm)
Hardware [incl. revision] Raspberry Pi Model B Rev 2
System-Architecture Linux rpi1-xxxxxxx 6.6.31+rpt-rpi-v6 #1 Raspbian 1:6.6.31-1+rpt1 (2024-05-29) armv6l GNU/Linux
thin-edge.io version tedge 1.3.1

Additional context

reubenmiller commented 1 day ago

It seems that from early on that the incorrect Rust target was chosen for the armv6 packages. Though in a previous Rust version (< 1.78), tedge was functional, however it seems to have broken at sometime.

However after doing some research and testing, the target should be arm-unknown-linux-gnueabi and not arm-unknown-linux-gnueabihf.

References

reubenmiller commented 1 day ago

The new armv6 package is available on the main channel, and can be installed on a Raspberry Pi 1B or Zero (version1):

wget -O - thin-edge.io/install.sh | sh -s -- --channel main
gligorisaev commented 21 hours ago

@reubenmiller I am not able to check, my RPI gave his life up and I cannot find any to replace it right now.

gligorisaev commented 17 hours ago

Bug cannot be reproduced anymore