Difference between revisions of "1012 TORADEX"
(→Obtain and compile the source) |
(→Obtain and compile the source) |
||
Line 75: | Line 75: | ||
#* cp config_v24_toradex .config | #* cp config_v24_toradex .config | ||
; Option B (manual method) | ; Option B (manual method) | ||
− | #* | + | #Run menuconfig |
+ | #*make menuconfig | ||
#Use arrows to scroll down to: | #Use arrows to scroll down to: | ||
#"Device Drivers --->" | #"Device Drivers --->" |
Revision as of 10:34, 1 June 2017
Contents |
Toradex use with Sensoray Model 1012 (and 2255)
This is a work in progress. It will be completed soon.
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
- user should have some familiarity with kernel development and compilation
- C development tools installed
- git source countrol package installed. On Ubuntu, use "sudo apt-get install git". On Fedora, use "sudo dnf install git"
- microSD card
- Host RS-232 serial port support (or USB dongle), and cable.
- RS-232 adapter for the Ixora board
- 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
- In step 1, download the Apalis iMX6 Linux Image. In our case, we use version 2.4
- Extract the image as superuser
- sudo tar xjvf Apalis_iMX6_LinuxImageV2.4Beta1_20150518.tar.bz2
- Change to the image directory that was extracted
- cd Apalis_iMX6_LinuxImageV2.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
- Install the base image to the SD card. This step may take some time
- ./update.sh -o /media/microSD
- 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.
- 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).
- 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
- Make a symbolic link to the toolchain
- ln -s gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf gcc-linaro-4.9
Obtain and compile the source
The instructions below refer to the instructions here. Sensoray's wiki instructions are specific to the iMX6 with a version of the kernel known to work well with the board.
- Download the 3.10.17 kernel from Toradex
- git clone -b toradex_imx_3.10.17_1.0.0_ga git://git.toradex.com/linux-toradex.git linux-toradex_v24.git
- Set the cross compilation environment variables
- export ARCH=arm
- export PATH=~/gcc-linaro-4.9/bin:$PATH
- export CROSS_COMPILE=arm-linux-gnueabihf-
- Change to the Linux source directory
- cd linux-toradex_v24.git
- Install the default build parameters
- make apalis_imx6_defconfig
- Select the 1012 default kernel module using either A) or B) below
- Option A
- Download config file from Sensoray
- Copy the config file to the current .config build
- cp config_v24_toradex .config
- Option B (manual method)
- Run menuconfig
- make menuconfig
- Use arrows to scroll down to:
- "Device Drivers --->"
- Press Enter (<Select>)
- Use arrows to scroll down to:
- "Multimedia support"
- Press Enter (<Select>)
- Use arrows to scroll down to:
- "Analog TV support"
- Press Space Bar. Item will be selected with an asterisk *.
- Use arrows to scroll down to:
- "Media USB Adapters"
- Press Enter
- Use arrows to scroll down to:
- "USB Sensoray 2255 Video capture device"
- Press Space bar to select. This will enable 2255 if desired later and also install required videobuf libraries if 1012 driver needs updated in the future (replacing the built in version).
- Press right arrow once until <Exit> is selected. Press Enter.
- Use arrows to scroll down to:
- Media PCI Adapters.
- Press Space Bar to select and press Enter
- Use down arrow to scroll down to:
- "TW686x cards (NEW)".
- Press Space Bar to select and press Enter
- Use down arrow to scroll down to:
- "Philips SAA7134 support (NEW)
- Press Space Bar to select and press Enter. This installed other libraries that may be useful in the future without having to recompile the entire kernel.
- Press right arrow once until <Exit> is selected. Press Enter. Multimedia support menu will appear.
- Press right arrow once until <Exit> is selected. Press Enter. This brings you back to the device drivers root menu.
- Press right arrow once until <Exit> is selected. Press Enter. This brings you back to the main kernel root menu.
- Press right arrow once until <Exit> is selected. Press Enter. A pop-up asking if you want to save your new configuration appears. <Yes> should be selected. Press enter to save the configuration.