1012 TORADEX

From Sensoray Technical Wiki
Revision as of 17:42, 31 May 2017 by DA (Talk | contribs)

Jump to: navigation, search

Contents

Toradex use with Sensoray Model 1012 (and 2255)

The 1012 has been tested with the Toradex Apalis iMX6 board. Toradex provides their own support pages here. This wiki entry provides additional information for updating the kernel to support the Sensoray 1012 device. The instructions also enable the Model 2255 driver for completeness.

The Apalis iMX6 CPU provides PCIe support, needed for the 1012. Toradex also provides a convenient and recommended carrier board called the Ixora to connect the 1012 and provide other peripherals. Sensoray has tested with the iMX6Q and the Ixora V1.0A carrier board running software version V2.4 (3.10 kernel). The instructions here should be valid for future kernel versions.

In order to use the 1012 with the Toradex CPU board, you will need cross-compile a new kernel and driver modules.

Pre-requisites

  1. user should have some familiarity with kernel development and compilation
  2. C development tools installed
  3. git source countrol package installed. On Ubuntu, use "sudo apt-get install git". On Fedora, use "sudo dnf install git"
  4. microSD card
  5. Host RS-232 serial port support (or USB dongle), and cable.
  6. RS-232 adapter for the Ixora board
  7. microSD card reader for host computer

Updating the 3.10 kernel, V2.4 Toradex version for the Apalis iMX6

Prepare the microSD card

Attach a microSD card to your host system. The microSD card should be formatted with the FAT32 system and with standard DOS partition. On Linux, this is done with fdisk and mkfs.vfat. Their use is describe elsewhere. The easiest method would be to format the card on a Windows machine first.

Follow Step 1 only of the preparation procedure described here and with the additional details below. The commands are listed as bullet points to be entered in a terminal window.

Flashing Linux on IMX6 Modules

  1. In step 1, download the Apalis iMX6 Linux Image. In our case, we use version 2.4
  2. Extract the image as superuser
    • sudo tar xjvf Apalis_iMX6_LinuxImageV2.4Beta1_20150518.tar.bz2
  3. Change to the image directory that was extracted
    • cd Apalis_iMX6_LinuxImageV2.4
  4. Find the mount point of the SD card and/or mount the SD card. If unsure, type "dmesg" after plugging in the microSD into card adapter (connected to the PC). The device should be printed in the log. In Fedora and Ubuntu, a popup window usually appears showing the mounted path of the device if clicked. In our case, the microSD is /dev/sdb1. We will mount it at /media/microSD. These instructions below are optional. The important point is to know the mount point. In Fedora, it may be /run/media/user/XYZ where XYZ are random for example.
    • sudo mkdir /media/microSD
    • sudo umount /dev/sdb1
    • sudo mount /dev/sdb1 /media/microSD
  5. Install the base image to the SD card. This step may take some time
    • ./update.sh -o /media/microSD
  6. Change back to our home directory
    • cd ~

Obtain a cross-compiler

Before building the kernel, you will need a cross compiler. Native compilation on the embedded system is not recommend. It would take considerable time and their may not be enough resources. It is highly recommended to use a pre-compiled toolchain.

Building a toolchain is complex and very time consuming. Linaro has greatly simplified the process. The version number of Linaro cross-compiler may depend on what kernel version you are compiling for. Newer compilers may not be able to compile older kernels and vice-versa.

  1. For the Apalis iMX6 3.10 kernel, version 4.9 is required. We also need the arm-linux-gnueabihf variant. (Embedded-Application Binary Interface Hard Float).
  2. Extract the toolchain to your home directory (or other directory of choice)
    • tar xJvf gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf.tar.xz
Personal tools
Namespaces

Variants
Actions
Toolbox