Error while loading shared libraries

I am on Step 18 of the Getting Started guide for reflashing a T30 going from the built-in WinCE to Linux. I get the following error:

Colibri T30 rootfs detected
./tegrarcm: error while loading shared libraries: libusb-1.0.so.0: cannot open shared object file: No such file or directory

Back in step 1 I got various “Ignore” and “Error” messages on the sudo apt-get for the libraries which probably led to this problem.

However, I have no control over the apt-get process and can only type what I am told to type. I tried the exact commands in Step 1 over and over very carefully but got a number of messages about not being able to find this or that file as it whirled by on the screen.

Even backing up to the “sudo apt-get update” command there are errors such as
“Err:50 Index of /ubuntu xenial-security/main arm64 Packages 404 Not Found …”

Suggestions appreciated.

What exact hardware (module and carrier board) and software aka BSP versions of things are you talking about?

I assume you do have a working Internet connection and can e.g. browse this web page from that development workstation?

To get libusb to work you would need at least the following done:

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libusb-1.0-0:i386 libusb-1.0-0

Its a Colibri T30 on the Colibri Evaluation Board.
The internet works and apt-get goes out and gets many things but fails on some things. If I rerun it the same apt-get failures occur over and over as if the files I was told to request don’t exist.
Then if I proceed anyway, it fails in Step 18 while running the update.sh with the message that the libusb is missing.

The sequence that I am following for my module is:

@Roger_Florida: Which Linux Distribution are you using on your host exactly (uname -a)?

Could you provide the error logs when you are running the apt-get commands?

It says:
4.15.0-32-generic #35~16.04.1-Ubuntu SMP Fri Aug 10 21:54:34 2018 x86_64 GNU/Linux

Thanks for this Information.

The internet works and apt-get goes out and gets many things but fails on some things. If I rerun it the same apt-get failures occur over and over as if the files I was told to request don’t exist

Could you send a log of this?

link text

So far you failed to answer my question:

What exact hardware (module and carrier board) and software aka BSP versions of things are you talking about?

apt-get on your host was not able to install all the needed packages. Could you launch the following command :
sudo apt-get update --fix-missing.

Afterwards, you should launch

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libusb-1.0-0:i386 libusb-1.0-0

You clearly seem to have some kind of an Internet connection issue. Can you e.g. ping Canonical’s servers?

[user@host ~]$ dig +noall +answer -x 91.189.88.149
149.88.189.91.in-addr.arpa. 2099 IN	PTR	danava.canonical.com.
[user@host ~]$ ping -c 4 danava.canonical.com
PING danava.canonical.com (91.189.88.149) 56(84) bytes of data.
64 bytes from danava.canonical.com (91.189.88.149): icmp_seq=1 ttl=49 time=28.9 ms
64 bytes from danava.canonical.com (91.189.88.149): icmp_seq=2 ttl=49 time=28.8 ms
64 bytes from danava.canonical.com (91.189.88.149): icmp_seq=3 ttl=49 time=28.8 ms
64 bytes from danava.canonical.com (91.189.88.149): icmp_seq=4 ttl=49 time=29.0 ms

--- danava.canonical.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 7ms
rtt min/avg/max/mdev = 28.775/28.874/29.033/0.157 ms
[user@host ~]$ dig +noall +answer -x 91.189.91.26
26.91.189.91.in-addr.arpa. 3410	IN	PTR	hanger.canonical.com.
[user@host ~]$ ping -c 4 hanger.canonical.com
PING hanger.canonical.com (91.189.91.26) 56(84) bytes of data.
64 bytes from hanger.canonical.com (91.189.91.26): icmp_seq=1 ttl=52 time=116 ms
64 bytes from hanger.canonical.com (91.189.91.26): icmp_seq=2 ttl=52 time=116 ms
64 bytes from hanger.canonical.com (91.189.91.26): icmp_seq=3 ttl=52 time=116 ms
64 bytes from hanger.canonical.com (91.189.91.26): icmp_seq=4 ttl=52 time=116 ms

--- hanger.canonical.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 7ms
rtt min/avg/max/mdev = 115.898/115.963/115.992/0.038 ms

One thing which you may try as a workaround is using the statically linked tegrarcm from the Toradex Easy Installer for Apalis T30:

[user@host ~]$ wget -c https://docs.toradex.com/105323-apalis-t30-toradexeasyinstaller.zip
--2019-01-25 15:11:39--  https://docs.toradex.com/105323-apalis-t30-toradexeasyinstaller.zip
Resolving docs.toradex.com (docs.toradex.com)... 178.32.63.175
Connecting to docs.toradex.com (docs.toradex.com)|178.32.63.175|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 23075494 (22M) [application/zip]
Saving to: ‘105323-apalis-t30-toradexeasyinstaller.zip’

105323-apalis-t30-t 100%[===================>]  22.01M  2.38MB/s    in 9.1s    

2019-01-25 15:11:48 (2.42 MB/s) - ‘105323-apalis-t30-toradexeasyinstaller.zip’ saved [23075494/23075494]

[user@host ~]$ unzip 105323-apalis-t30-toradexeasyinstaller.zip 
Archive:  105323-apalis-t30-toradexeasyinstaller.zip
   creating: Apalis-T30_ToradexEasyInstaller_1.8-20181019/
 extracting: Apalis-T30_ToradexEasyInstaller_1.8-20181019/recovery-windows.bat  
 extracting: Apalis-T30_ToradexEasyInstaller_1.8-20181019/tezi.png  
   creating: Apalis-T30_ToradexEasyInstaller_1.8-20181019/recovery/
  inflating: Apalis-T30_ToradexEasyInstaller_1.8-20181019/recovery/README  
  inflating: Apalis-T30_ToradexEasyInstaller_1.8-20181019/recovery/tegrarcm  
  inflating: Apalis-T30_ToradexEasyInstaller_1.8-20181019/recovery/Apalis_T30_2GB_800Mhz.bct  
  inflating: Apalis-T30_ToradexEasyInstaller_1.8-20181019/boot.scr  
  inflating: Apalis-T30_ToradexEasyInstaller_1.8-20181019/image.json  
 extracting: Apalis-T30_ToradexEasyInstaller_1.8-20181019/wrapup.sh  
  inflating: Apalis-T30_ToradexEasyInstaller_1.8-20181019/apalis_t30.img  
  inflating: Apalis-T30_ToradexEasyInstaller_1.8-20181019/recovery-linux.sh  
  inflating: Apalis-T30_ToradexEasyInstaller_1.8-20181019/u-boot-dtb-tegra.bin  
  inflating: Apalis-T30_ToradexEasyInstaller_1.8-20181019/tezi.itb  
[user@host ~]$ wget -c https://developer1.toradex.com/files/toradex-dev/uploads/media/Colibri/Linux/Images/Colibri-T30_LXDE-Image_2.8b5.156-20181228.tar.bz2
--2019-01-25 15:19:24--  https://developer1.toradex.com/files/toradex-dev/uploads/media/Colibri/Linux/Images/Colibri-T30_LXDE-Image_2.8b5.156-20181228.tar.bz2
Resolving developer1.toradex.com (developer1.toradex.com)... 91.121.62.218
Connecting to developer1.toradex.com (developer1.toradex.com)|91.121.62.218|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 143020404 (136M) [application/x-bzip2]
Saving to: ‘Colibri-T30_LXDE-Image_2.8b5.156-20181228.tar.bz2’

Colibri-T30_LXDE-Im 100%[===================>] 136.39M  2.46MB/s    in 56s     

2019-01-25 15:20:20 (2.45 MB/s) - ‘Colibri-T30_LXDE-Image_2.8b5.156-20181228.tar.bz2’ saved [143020404/143020404]

[zim@host ~]$ sudo tar xjf Colibri-T30_LXDE-Image_2.8b5.156-20181228.tar.bz2
[sudo] password for zim: 
[zim@host ~]$ cd Colibri-T30_LXDE-Image_2.8.5/
[zim@host Colibri-T30_LXDE-Image_2.8.5]$ sudo mv tegra-uboot-flasher/tegrarcm tegra-uboot-flasher/tegrarcm.orig
[zim@host Colibri-T30_LXDE-Image_2.8.5]$ sudo cp ../Apalis-T30_ToradexEasyInstaller_1.8-20181019/recovery/tegrarcm tegra-uboot-flasher/
[zim@host Colibri-T30_LXDE-Image_2.8.5]$ ./update.sh -d
Colibri T30 rootfs detected
bct file: ../colibri-t30_bin/colibri_t30_12MHz_NT5CC256M16CP-DI_400MHz.bct
bootloader file: ../colibri-t30_bin/u-boot-dtb-tegra.bin
load addr 0x80108000
entry addr 0x80108000
device id: 0x7130
uid:  0x015d18846a28160c
RCM version: 3.1
downloading miniloader to target at address 0x4000a000 (128916 bytes)...
miniloader downloaded successfully
Chip UID:                0x0000000000000000015d18846a28160c
Chip ID:                 0x30
Chip ID Major Version:   0x1
Chip ID Minor Version:   0x3
Chip SKU:                0xb1 (t30)
Boot ROM Version:        0x1
Boot Device:             0x2 (EMMC)
Operating Mode:          0x3 (developer mode)
Device Config Strap:     0x0
Device Config Fuse:      0x0
SDRAM Config Strap:      0x0
sending file: ../colibri-t30_bin/colibri_t30_12MHz_NT5CC256M16CP-DI_400MHz.bct
- 6128/6128 bytes sent
../colibri-t30_bin/colibri_t30_12MHz_NT5CC256M16CP-DI_400MHz.bct sent successfully
sending file: ../colibri-t30_bin/u-boot-dtb-tegra.bin
/ 517206/517206 bytes sent
../colibri-t30_bin/u-boot-dtb-tegra.bin sent successfully

Got the same thing as before

Thanks for your Input. Could you try the suggestion of marcel.tx?

Was able to ping as described above without problems.
Started executing you second set of commands and got as far as step 46 before it failed on not finding the USB. See attached log.link text

Was able to ping as described above without problems.

This is strange. There is something wrong with your host installation. Try to do a clean install and reinstall these packages.

Started executing you second set of commands and got as far as step 46 before it failed on not finding the USB

For this, you must put the module in the recovery mode using the hardware mechanism described in the chapter 6 of the datatsheet
or enter in U-Boot and write enterrcm.
Additionally you also need to connect the USB_CL Port (X29) to the Host.

Best regards, Jaski

So I think we may be getting at the heart of the matter.
I have notionally 3 USB connections to the target board: x27, x29, x30. Possibly x29 and x30 are the same?
Anyway, if I only connect to either x29 or x30, I never see any /dev/ttyUSBx in the list.

If, however, I connect x27 to a USB, I see that one come up immediately as ttyUSB0 while the bootloader is counting down.

If I also connect to x30 as the instructions indicate, I see ttyUSB1 show up but only AFTER the bootloader countdown times out and the OS comes up.

I can get the bootloader menu to show up in minicom on x27 and via that port I can interrupt the bootloader and get to the menu shown. I can never get that on x30 (obviously because that ttyUSB never shows up until the OS is booted, and only if I also have x27 connected.

So, it would be nice to have clear instructions on which USB ports I should have connected and what I am supposed to see on each one as the bootloader is waiting to be interrupted. I am currently of the opinion that the instructions are not correct but will be happy to be shown otherwise.

R

As you seem to be resilient to answering any of my questions I won’t be doing this today.

Yes, those two USB device receptacles are the same and no, those regular USB device connections don’t give you any ttyUSBx’ as they connect directly to the T30 SoC which needs to be in recovery mode. You may want to study the following article on our developer website in great detail.