Skip to content

Instantly share code, notes, and snippets.

@seank-com
Forked from marktayl1/iotedgeinstalltx2_gist.md
Last active September 11, 2023 09:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save seank-com/9d9bf1ffcbd0acb5129246c8e32de687 to your computer and use it in GitHub Desktop.
Save seank-com/9d9bf1ffcbd0acb5129246c8e32de687 to your computer and use it in GitHub Desktop.
Install Steps for IoT Edge on NVIDIA Jetson Tx2

Install Steps for IoT Edge on NVIDIA Jetson Tx2

Multi-architecture method

Prerequisites: This assumes you already have docker up and running. You can also use Moby by following the instructions at https://docs.microsoft.com/en-us/azure/iot-edge/how-to-install-iot-edge-linux-arm just before the installation of IoT Edge in step: 10

  1. $ sudo dpkg --add-architecture armhf
  2. $ sudo apt-get update
  3. $ sudo apt-get install libc-bin libc-bin libc-dev-bin libc6 libc6:armhf libc6-dev libgcc1 libgcc1:armhf locales
  4. $ wget http://ports.ubuntu.com/ubuntu-ports/pool/main/h/hostname/hostname_3.16ubuntu2_armhf.deb
  5. $ sudo dpkg -i ./hostname_3.16ubuntu2_armhf.deb
  6. $ wget http://ftp.us.debian.org/debian/pool/main/o/openssl1.0/libssl1.0.2_1.0.2l-2+deb9u3_armhf.deb
  7. $ sudo dpkg -i libssl1.0.2_1.0.2l-2+deb9u3_armhf.deb
  8. $ sudo apt-get install -f
  9. If you get any error message, it may be related to the fact you have a non-compatible version of libssl like the libsll-dev version. In this case, just purge it with
    1. $ sudo apt-get purge libssl-dev
  10. $ wget https://aka.ms/libiothsm-std-linux-armhf-latest -O libiothsm-std.deb
  11. $ sudo dpkg -i ./libiothsm-std.deb
  12. $ wget https://aka.ms/iotedged-linux-armhf-latest -O iotedge.deb
  13. $ sudo dpkg -i ./iotedge.deb
  14. If you get an error about hostname being required just go to the next step
  15. $ sudo apt-get install -f
  16. Type Yes, do as I say!
  17. $ sudo nano /etc/iotedge/config.yaml
    1. or sudo vim /etc/iotedge/config.yaml
    2. or if you are a GUI person, you can also use gedit in place of nano
  18. Add the connection string to your Edge device as usual (or configure dps)
  19. Change the edgeAgent config/image to reflect the architecture. For example "mcr.microsoft.com/azureiotedge-agent:1.0.0-linux-arm32v7"
    1. Note: this may not be necessary if using Moby instead of docker to determine do docker pull mcr.microsoft.com/azureiotedge-agent:1.0 and see if it just works.
  20. Save and close the file
  21. OPTIONAL Only do this step if iotedge still isn't working
    1. Edit the /etc/systemd/system/multi-user.target.wants/iotedge.service file
      a. Add the line below in the In the [Service] section
      b. Environment=LISTEN_FDNAMES=iotedge.mgmt.socket:iotedge.socket
  22. $ sudo systemctl restart iotedge

Troubleshooting:

  • If you run edge as a daemon, you may end up getting 127 errors. This just says something went wrong in the process started by the system. If you want better error info, you can try running iotedged from the command line using:
    • $ sudo /usr/bin/iotedged -c /etc/iotedge/config.yaml
  • Note, if you run iotedged from the command line, and it configures hsm, you will need to clear that configuration before starting iotedged as a service. If not, the service will fail repeatedly at the configuring hsm stage. You can clear it by removing the libiothsm, and deleting the /var/lib/iotedge/hsm directory. Then reinstall libiothsm as before.

More info about the libssl install and adding LISTEN_FDNAMES environment variable is here: https://blogs.msdn.microsoft.com/laurelle/2018/08/17/azure-iot-edge-support-for-raspbian-8-0-debian-8-0/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment