Reader “Mark” recently left a comment saying the NDA on Freescale i.MX6 resources was lifted and documentation and source code were now available for the platform. So it’s time for me to look into it, and provide an overview of Freescale i.MX6 features, list available development platforms, and have a closer look at the documentation, source code and tools for the platform.
Freescale i.MX6 Processors
- Freescale i.MX6SoloLite – Single Cortex A9 processor up to 1 GHz with 256KB L2 Cache, 32-bit DDR3 and LPDDR2 memory support, and 2D graphics accelerator (Vivante GC355 + GC320)
- Freescale i.MX6Solo – Single Cortex A9 core up to 1 GHz with 512KB L2 Cache, 32-bit DDR3 and LPDDR2 memory support, and 2D & 3D graphics accelerator (Vivante GC880 + GC320)
- Freescale i.MX6DualLite – Dual Cortex A9 up to 1 GHz with 512KB L2 Cache, 32-bit DDR3 and LPDDR2 memory support, and 2D & 3D graphics accelerator (Vivante GC880 + GC320)
- Freescale i.MX6Dual – Dual Cortex A9 up to 1.2 GHz with 1MB L2 Cache, 64-bit DDR3 and LPDDR2 memory support, SATA-II, and 2D & 3D graphics accelerator (Vivante GC2000 + GC355 + GC320)
- Freescale i.MX6Quad – Quad Cortex A9 up to 1.2 GHz with 1MB L2 Cache, 64-bit DDR3 and LPDDR2 memory support, SATA-II, and 2D & 3D graphics accelerator (Vivante GC2000 + GC355 + GC320)
Everything I’ve written above is actually nothing new as this was mentioned in the press releases and Freescale i.MX6 page for a while. What might be new is the internal structure of the processors.
If you want to get more overview about Freescale i.MX6 SoC features, I invite you to visit the 2 links at the beginning of this section. If you want to look into details continue reading and we’ll get to the documentation soon.
Freescale i.MX6 Development Boards
In this blog, I mainly cover low cost development boards and gadgets, and we have already several boards which are available now or soon will be:
Another low cost alternative would be to use the upcoming Hiapad Hi-802 mini PC ($89) based on Freescale i.MX6Quad and providing easy access to debug ports. Obviously this option offers less flexibility and features than the first 2 boards.
Freescale also provides some full-featured (and somewhat expensive) development platforms for different applications:
- i.MX 6SoloLite Evaluation Kit ($399 to $499) – Evaluation kit based on i.MX6SoloLite to develop e-Reader products. $399 is for the board only, and $499 includes an E-Ink Panel with the board.
- SABRE Board and Platform for Smart Devices ($399 and $999) – The SABRE board (MCIMX6Q-SDB) is powered by i.MX6Quad with 1GB RAM, 8GB eMMC, 2xLVDS, HDMI and LCD video outputs,, 2x SD card sockets, Gb Ethernet, SATA connector and more. The SABRE Platform is based on the SABRE board and comes with a 10.1″ LVDS display with integrated P-cap sensing.
- SABRE for Automotive Infotainment ($799) – There are actually 2 platforms: one using i.MX6Quad(1GHz) and the other i.MX6DualLite (800 MHz). Both plaforms come with 2GB DDR3 RAM, 32 MB NOR flash, a NAND flash socket, LVDS & HDMI interfaces, Ethernet, SD card socket, and more. The Quad version also comes with a SATA port.
All development platforms should be be able to support Android, Linux and Windows Embedded operating systems.
Freescale i.MX6 Documentation
BIG FAT WARNING! If you’ve been working on Chinese (and/or Taiwanese) SoCs for too long, you may be in for a shock (and may end up missing reverse-engineering the datasheet from the source code) as Freescale has released lots of document publicly (I won’t be able to list them all here) and the documentation appears to very thorough. For example, Freescale i.MX6 Reference Manual is 5739 pages long!
You can find all documents on Freescale i.MX6 Documentation page, and the most interesting (to me) are:
I’ve flicked through the technical documentation and it seems really good. I’ve discovered that i.MX6Quad can boot from SPI, I2C and EIM (External Interface Module) interfaces, NAND flash, SD/MMC, SATA or USB depending on the board configuration, which looks pretty darn interesting, especially for USB and SATA boot.
I’ve also looked at Linux and Android documentation (obviously), but I’m a bit puzzled as it asks you to use Ubuntu 9.04 (Jaunty) for the build environment (LTIB), and provide links to a git repo where the kernel has not been updated for 8 months and u-boot for 4 months… But as you’ll see below we won’t need to use those as you’ll discover below. Most of the software documentation on Freescale refers to the SABRE for Smart Devices and Automotive Infotainment, so if you are using one of the low cost board may be better off checking out the vendor software documentation.
Elements14 has documentation for the SABRE Lite Board (which it sells for $179) including a user manual describing the hardware and showing how to get started with the software (TimeLink Linux BSP), and schematics. Boundary Devices has excellent instructions on their blog, and if you have a Freescale i.MX6 device to develop on, I recommend you subscribe to their blog.
Freescale released schematics and PCB layout files for the SABRE SD and AI platforms (Cf. Printed Circuit Boards and Schematics-Schematics section on i.MX6 page). If you are more interested in SABRE Lite hardware, Boundary Devices released the following files:
Freescale i.MX6 Linux and Android BSP & Source Code
Freescale i.MX6 Source Code
Beside linking to an outdated git repository, Freescale also provides download link to Linux Kernel 3.0.35, Android 4.0.4 and Multimedia Codecs source code:
Building the Linux Kernel and U-Boot for Freescale i.MX6 SABRE Lite board
Let’s try to build u-boot and the kernel for Freescale .iMX6 uing ltib in Ubuntu 12.04 64-bit.
After downloading L3.0.35_12.09.01_ER_SOURCE, extract it, and install the LTIB package as a normal user (not as root), in a location such as /home/user/:
tar zxvf L3.0.35_12.09.01_GA_source.tar.gz ./L3.0.35_12.09.01_GA_source/install cd ltib
Install some dependencies (this may vary depending upon your current installation and OS):
sudo apt-get install zlib1g zlib1g-dev m4 bison tcl ncurses-dev liblzo2-dev uuid-dev librpm-dev rpm curl
Since I’m using a 64-bit build machine, I also had to install the following:
sudo apt-get install ia32-libs libc6-dev-i386 lib32z1
After spending some time trying to figure out problems, I realized Ubuntu 12.04 is not currently supported in LTIB and you need a patch, which you can apply as follows in ltib directory:
curl -L https://community.freescale.com/servlet/JiveServlet/downloadBody/93455-102-3-2835/patch-ltib-ubuntu12.04.sh | bash
Finally, you may need to edit the sudoers file (sudo visudo) to allow the current user to run rpm as root without password, and add the following line:
user ALL = NOPASSWD: /usr/bin/rpm, /opt/freescale/ltib/usr/bin/rpm
Start to build LTIB and cross your fingers:
./ltib -m config
Set the platform to “Freescale iMX reference boards” (as if you had a choice), exit and save the changes. At the next menu, select platform type as “imx6q” and package profile. Exit and save the new configuration. Please note that only the profiles of Min profile, FSL gnome release packages, and mfg firmware profile pass build tests. I chose the default “Min” profile.
You can use the ./ltib -m selectype command to change the profile after the first selection.
To build U-Boot for i.MX6 SABRE Lite board, select “Choose your board for U-Boot” as “mx6q_sabrelibre”. This option is only for U-Boot, as the current default kernel configuration builds a single image that works for all i.MX6 boards except i.MX 6SoloLite boards. Close the configuration screen and save the changes. You can now build the kernel and U-Boot by running the following command:
The build failed to build busybox. To fix it, I had to edit rootfs/usr/lib/libpthread.so and change one line to:
GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux.so.3 ) )
Same thing for rootfs/usr/lib/libpthread.so:
GROUP ( libpthread.so.0 libpthread_nonshared.a )
Then type ./ltib again. When this procedure is completed, the kernel image and the U-Boot images are located at: rootfs/boot/:
ls -l rootfs/boot/ total 23668 lrwxrwxrwx 1 root root 6 Nov 18 12:36 bootable_kernel -> uImage -rw-r--r-- 1 root root 68241 Nov 18 12:35 linux.config -rw-r--r-- 1 root root 1615837 Nov 18 12:35 System.map -rwxr-xr-x 1 root root 739072 Nov 18 11:42 u-boot -rwxr-xr-x 1 root root 178936 Nov 18 11:42 u-boot.bin -rw-r--r-- 1 root root 3760504 Nov 18 12:35 uImage -rwxr-xr-x 1 root root 14034174 Nov 18 12:35 vmlinux -rwxr-xr-x 1 root root 3760440 Nov 18 12:35 zImage
Freescale i.MX6 Android, Linux, Ubuntu… Binary Images/Files
There are also some binary demo files for Android and Linux and closed source files (e.g. codecs):
Beside the Ubuntu root file system, Arch Linux for ARM is also said to be working on Nitrogen6X board.
There are also demo images specific to SABRE Smart Devices and Automotive Infotainment platforms. For a complete list of available files, visit Freescale i.MX6 Software & Tools page.
Boundary devices posted a binary LTIB image for i.MX6 Sabre Lite and Nitrogen6X boards as well as a short getting started guide. It might be worth having a look, although this has been done in August. Linaro has instructions to run Ubuntu 11.10 (Oneric) on the board, but it dates a bit and images have disappeared.
Finally, you could also use Timesys LinuxLink Linux BSP for SABRE Lite and Nitrogen6X boards. LinuxLink is a web based system that allows you to build custom Linux distributions for your board. I gave an overview of this web-based build system in a previous post “Timesys Unveils LinuxLink BSP/SDK for MityARM-3359 SoM (TI AM335x)“.
Freescale i.MX6 Development Tools
Again, you can check Freescale i.MX6 Software & Tools page for a list of software and hardware tools, but there appears to be 3 main software tools:
- LTIB – This is the default build system for Freescale i.MX series processors, and it widely referred to in the documentation.
- MfgTool – Tool for downloading OS images to the i.MX6. It can be downloaded separately, but is also part of IMX6_R13.4_ANDROID_SOURCE_CODE.
- IMX_CST_TOOL – Freescale Code Signing Tool for the High Assurance Boot library. Provides software code signing support designed for use with i.MX processors that integrate the HAB library in the internal boot ROM.
If you develop on hardware based on Freescale i.MX6, you’ll have to use the first 2 tools. To be honest, I’m not exactly sure what the third tool does, but it seems required for security purpose at boot time. You need to be approved manually by Freescale before being able to download IMX_CST_TOOL. This is probably not really needed if you just want to tinker with your board, but if you’re going to make a commercial product, you may need it.
Elements14 also point to Timesys LinuxLink (mentioned above) and ARM DS 5, and even if those are interesting, they may not be necessary. It all depends on your preferences and needs.
For low level debugging and board bring-up, you may want to use hardware probes such as ARIUM HS-1000S JTAG Emulator/Debugger or iSystem iC3000 ActiveEmulator debug and test tool.
If you need support for the platform for one of the low cost boards, you could check the imx community, comment in Boundary Devices blog (if you use their images) or participate in Elements14 community.