turtlebot3: Installing turtlebot3 on Ubuntu IoT 18.04 architecture not detected properly

ISSUE TEMPLATE ver. 0.2.0

  1. Which TurtleBot3 you have?

    • Burger
    • Waffle
    • Waffle Pi
  2. Which SBC(Single Board Computer) is working on TurtleBot3?

    • Raspberry Pi 3
    • Intel Joule 570x
    • etc (PLEASE, WRITE DOWN YOUR SBC HERE)
  3. Which OS you installed in SBC?

    • Ubuntu MATE 16.04 or later
    • Raspbian
    • Ubuntu 18.04 IoT
  4. Which OS you installed in Remote PC?

    • Ubuntu 16.04 LTS (Xenial Xerus)
    • Ubuntu 18.04 LTS (Bionic Beaver)
    • Linux Mint 18.x
    • etc (PLEASE, WRITE DOWN YOUR OS)
  5. Write down software version and firmware version

    • Software version: [x.x.x]
    • Firmware version: [x.x.x]
  6. Write down the commands you used in order

    • Going through the code provided here. I hit a snag running the following command:
~$ ./update.sh $OPENCR_PORT $OPENCR_MODEL.opencr
  1. Copy and Paste your error message on terminal

    • The above code results in this output:
aarch64
OpenCR Update Start..
./update.sh: line 27: ./opencr_ld_shell_x86: cannot execute binary file: Exec format error
  1. Please, describe detailedly what difficulty you are in

Installing on Ubuntu 18.04 IoT, the script attempts to install the x86 binaries even though we are on an arm system. Using the uname -m or uname -p returns:

aarch64

I believe a fix for this is to add this case to the update.sh:

case $(uname -m) in
    i386)   architecture="386" ;;
    i686)   architecture="386" ;;
    x86_64) architecture="amd64" ;;
    armv7l) architecture="arm" ;;
    aarch64) architecture="arm";;  # <-- my fix
    arm)    dpkg --print-architecture | grep -q "arm64" && architecture="arm64" || architecture="arm" ;;
esac

however, this runs into the following error:

-bash: ./opencr_ld_shell_arm: No such file or directory

I believe this is due to the binary file only compiled for a 32-bit arm architecture. Is it possible to get it for a 64-bit architecture?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 15 (1 by maintainers)

Most upvoted comments

Great. That is the fix! I tried that last night, but I was not paying close enough attention. I re-ran the whole line with the wget and all after a making that edit.

Thanks for your help!

@zmk5

The issue seems to be solved. If you have any question about this issue, please feel free to reopen or get a new ticket 😃

@zmk5, @robotpilot

I have updated the update.sh file. Please use it with the following command:

sudo dpkg --add-architecture armhf
sudo apt-get update
sudo apt-get install libc6:armhf

@zmk5

I believe the processor on the Raspberry Pi 3 is already 64-bit

Yes. The hardware supports 64-bit. I currently have no hardware to test. I will get the hardware out next week and I will test it. In addition, please refer to the link below.