Apalis module update script fails

I’m trying to update my Apalis v1.1A module to the latest version of Linux and BSP using the method recommended in this application note: http://developer.toradex.com/knowledge-base/flashing-linux-on-imx6-modules

I downloaded then unpacked Apalis-iMX6_LXDE-Image_2.7b3-20170630.tar.bz2 to my a directory on my host computer, which is running Ubuntu 12 LTS, then I executed: ~$ sudo sh -c "command -v mkfs.vfat" /sbin/mkfs.vfat /sbin/mkfs.vfat
then: ~$ sudo ln -s /sbin/mkfs.vfat /sbin/mkfs.fat
then, finally: $ sudo ./update.sh -o /media/3264-6261/

Here is the terminal output from the execution of ‘update.sh’:

[upload|fNWMO9889983gtTcIDPgnbX6gXU=]

Here is a look at the resulting directory of my FAT formatted SD Card:

[upload|TL4UcLxHWV3SRpwCBinQ4FCD3Wo=]

Can I trust that my SD Card will properly update my Apalis iMX6 module? If not, how can I resolve this issue?

-Chuck

Evergreen, Colorado

Change SD card or use EasyInstaller. I also have the same problems.

After changing SD Card device sizes/manufacturers, I tried to use the Toradex Easy Installer following the steps found here: http://developer.toradex.com/software/toradex-easy-installer but, again failure!

After executing ‘bmode usb’ from the U-Boot command line, I see the output below:

U-Boot 2014.04 (Jan 12 2015 - 18:52:26)
CPU:   Freescale i.MX6Q rev1.5 at 792 MHz
Reset cause: POR
Board: Toradex Apalis iMX6
I2C:   ready
DRAM:  1 GiB
PMIC: device id: 0x10, revision id: 0x11
PMIC: programmed
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
auto-detected panel HDMI
Display: HDMI (1024x768)
In:    serial
Out:   serial
Err:   serial
Net:   using phy at 7
FEC [PRIME]
Hit any key to stop autoboot:  0 
Apalis iMX6 # bmode usb
resetting ...

Also, it looks like my Ubuntu VM sees the Apalis module’s OTG USB port as executing ‘lsusb’ on the terminal returns:

Bus 001 Device 021: ID 15a2:0054 Freescale Semiconductor, Inc. i.MX6Q SystemOnChip in RecoveryMode

So far so good, it seems. But I when I try to execute ‘recovery-linux.sh’ I get the following:

cimarron@ubuntu:~/Desktop/Apalis-iMX6_ToradexEasyInstaller_1.1-20170906$ sudo ./recovery-linux.sh

Downloading Toradex Easy Installer...

./recovery/imx_usb: ./recovery/imx_usb: cannot execute binary file

Downloading Toradex Easy Installer failed...

Any suggests will be much appreciated…

Thanks,

-Chuck

With the method you use it never worked for me. These boards do not allow you to use the command “dd” as with others regularly. I use EasyInstaller. I can email you a linux image for apalis imx6q 2GB v1.1 for you to test.

I guess our usage of split in the update script is not compatible with whatever version Ubuntu 12.04 shipped with. Please upgrade to a later Ubuntu version or use the Toradex Easy Installer.

I guess you may not be running a 64-bit Linux distribution on your development workstation. The imx_usb tool is really only compiled for use on such.

Who mentioned anything about using dd? BTW: One can very well use dd to update e.g. the root file system using U-Boot’s ums feature.

Marcel,

Yes, my Ubuntu 12.04 VM is a 32-bit version; however, due to several legacy SDKs still in active use on this development host, legacy a 64-bit version of Ubuntu is not possible. Is it possible for Toradex to rewrite / recompile recovery-linux.sh so that it is backward compatible with Ubuntu 12.04 32-bit? I’m not the only Toradex customer with this problem so rewriting the script would be a big benefit to your customer base.

-Chuck

Marcel,

It is not possible / practical for me to upgrade to a different version of Ubuntu on this development machine. Is it possible for Toradex to rewrite / recompile the update.sh so that it is backward compatible with Ubuntu 12.04 32-bit? I’m not the only Toradex customer with this problem so rewriting the script would be a big benefit to your customer base.

-Chuck

Hi Chuck

As Marcel mentions split in Ubuntu 12.04 is from a coreutils version which is older than coreutils 8.16. Thus it is missing the ability to set a starting number with the numeric-suffixes option.

If you cannot get away from Ubuntu 12.04 and you cannot update coreutils to 8.16 or later you could work around the issue by removing the ‘=100’ from the split command line in update.sh and rename the resulting artefacts by hand afterwards.

sudo split -a 3 -b `expr 64 \* 1024 \* 1024` --numeric-suffixes ${BINARIES}/${IMAGEFILE} "$OUT_DIR/root.ext3-"

.

mv root.ext3-000 root.ext3-100
mv root.ext3-001 root.ext3-101
mv root.ext3-002 root.ext3-102
...

Max

I am with Max, you should really consider moving to a newer, 64-bit distribution, especially when starting a new project. There are increasingly more use cases, where you will run into issues due to the memory limitations of a 32-bit architecture when working on a embedded project, and those are not only Toradex related (e.g. compile time errors when using link-time optimizations, since LTO typically requires a big address space or when compiling large frameworks such as web browser engines). After all, it is 2017…

I compiled a static linked 32-bit version of imx_usb, you can download it here. Replace the imx_usb file in the recovery/ subfolder of Toradex Easy Installer and recovery should work with a 32-bit distribution.