Freescale iMX6 Boundary Devices Sabre Lite software

From RidgeRun Developer Connection
Jump to: navigation, search

Introduction

i.MX6 is a highly integrated development system based on the next generation ARM-Cortex A9 processor from Freescale.

For Video capture applications it has Multi-stream-capable HD video engine delivering 1080p60 decode, 1080p30 encode and 3-D video playback in HD.

BD-SL-i.MX6 board (formerly the SABRE Lite board), is a low-cost development platform from BoundaryDevices, featuring the powerful i.MX 6Quad applications processor.

General References

i.MX6Quad Family of Applications Processors (Data Sheet, Application Notes): 

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6Q

Handson Workshop:iMX6 Series Basics:

http://2012ftf.ccidnet.com/pdf/0066.pdf

Freescale iMX6 Processor Technical Reference Manual :

http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf?fpsp=1&WT_TYPE=Reference%20Manuals&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=pdf&WT_ASSET=Documentation

i.MX6 Frequently asked questions:
http://boundarydevices.com/i-mx6-frequently-asked-questions-and-answers/

iWave's i.MX6 Development Platform:
http://www.youtube.com/watch?v=V-4dnuAN3HA

Low Cost Freescale iMX6 Quad Sabre Lite Development Board:
http://www.cnx-software.com/2012/02/24/low-cost-freescale-imx6-quad-sabre-lite-development-board/#ixzz2IpfeabsR

Zealz tv-stick based on Freescale i.MX6:
http://liliputing.com/2012/12/zealz-gk802-tv-stick-packs-quad-core-freescale-cpu-onto-a-99-pc-on-a-stick.html

i.MX6 Processor Family diagram :
http://www.freescale.com/files/graphic/block_diagram/IMX6X_FAMILY_BD2.html?keepThis=true&TB_iframe=true&height=480&width=979

Freescale i.MX6 Board hardware and software References:

Freescale i.MX6 boards. Details available on :
http://www.freescale.com/webapp/sps/site/taxonomy.jsp?code=IMX6X_SERIES
Freescale channel partner Element14 boards:
http://www.element14.com/community/community/knode/dev_platforms_kits/element14_dev_kits/sabrelite?ICID=hp_sabrebanner?CMP=SOM-FREES
Freescale Ecosystem partner - IWAVE SYSTEMS SOM boards:
http://www.iwavesystems.com/imx6-qseven-mass-production
FreeScale Sabre board avnet buying info :
http://www.em.avnet.com/en-us/design/drc/Pages/Freescale-i.MX-6-Development-Tools.aspx
FreeScale Sabre board:
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=RDIMX6SABREBRD
FreeScale i.MX 6 Series Software and Development Tool Resources:
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX6_SW
Low cost experimenter's board:
http://boundarydevices.com/products/nitrogen6x-board-imx6-arm-cortex-a9-sbc
Freescale channel partner Element14 SABRE Lite board:
https://www.element14.com/community/community/knode/dev_platforms_kits/element14_dev_kits/sabrelite?CMP=KNC-APAC-Knode-SabreLite
System on Module for use in products:
http://www.iwavesystems.com/product/cpu-modules/i-mx6-q7-som/i-mx6-qseven-som.html
System on Module for use in products:
http://www.phytec.com/products/som/phyflex/i.mx6.html
Timesys-LinuxLink iMX6 Software suppport buying link:
https://avnetexpress.avnet.com/store/em/EMController/Software/Operating-Systems/RTOS/_/N-100821/Ne-100000?action=products&cat=1&catalogId=500201&cutTape=&inStock=&langId=-1&myCatalog=&npi=&proto=&regionalStock=&rohs=&storeId=500201&term=i.mx6x&topSellers=&categoryLink=true

i.MX6Q: i.MX6Quad Family of Application Processors -Block Diagram

IMX6Q BD TN.jpg

Block diagram reference : http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6Q

i.MX6 Series Processor Family

iMX6 Series Processor Family has below 5 Types of Processors ( They can be differentiated mainly based on the Processor speed, Memory and a few differences in the I/O supported).

i.MX6D: i.MX 6Dual Family of Applications Processors
i.MX6DL: i.MX 6DualLite Family of Applications Processors
i.MX6Q: i.MX 6Quad Family of Applications Processors
i.MX6S: i.MX 6Solo Family of Applications Processors
i.MX6SL: i.MX 6SoloLite Family of Applications Processors


Sl No iMX6 Processor Familly Processor Speed Number of Cores Memory
Type of Memory I/O Bus Interface Display Support Product Application Area
1

i.MX6D:

i.MX6 Dual Family

1.2 GHz
Dual 1MB of L2 Cache
64-bit DDR3 or 2-ch.,
32-bit LPDDR2 support.
Integrated FlexCAN, MLB busses, PCI Express® and SATA-2
Integrated of LVDS, MIPI display port, MIPI camera port and HDMI v1.4.
i.MX 6Dual provides a scalable solution for consumer, automotive and industrial applications.
2

i.MX6DL:

i.MX6 DualLite Family

1 GHz
Dual 512 KB of L2 cache
64-bit DDR3 or 2-ch.,
32-bit LPDDR2 support.
Integrated MLB busses and PCI-e.
Integrated LVDS, MIPI display port, MIPI camera port and HDMI v1.4
i.MX 6DualLite processor ideal for consumer and industrial applications such as media or market-specific smart devices.
3

i.MX6Q:

i.MX 6Quad Family

1.2 GHz
Quad 1 MB of L2 cache
64-bit DDR3 or 2-ch.,
32-bit LPDDR2 support.
Integrated FlexCAN, MLB busses, PCI Express® and SATA-2
Integrated LVDS, MIPI display port, MIPI camera port and HDMI v1.4
Ideal platform for leading-edge consumer, automotive and industrial multimedia applications.
4

i.MX6S:

i.MX 6Solo Family

1 GHz
Single 512 KB of L2 cache
32-bit DDR3/LPDDR2 support
FlexCAN and MLB
Integrated LVDS, MIPI display, MIPI camera port, HDMI v1.4
Flexible platform for consumer, automotive and industrial applications.
5

i.MX6SL:

i.MX 6SoloLite

1 GHz
Single 256 KB of L2 cache
32-bit DDR3/LPDDR2 support.
            ----
EPD controller and an LCD controller
Ideal for next-generation ereaders and smart devices.

Reference : 

http://www.freescale.com/webapp/sps/site/taxonomy.jsp?code=IMX6X_SERIES

RidgeRun iMX6 SDK Beta release features


Component
Revision
Link
Branch
Hash ID
kernel
3.0.35
BoundaryDev-Git_kernel
boundary-L3.0.35_12.09.01_GA
NA
bootloader
2013.01-rc1
BoundaryDev-Git_uboot
production
1e8892278066984c73a82423d674bc50df1c7fde
USB Loader - git://github.com/RobertCNelson/imx_usb_loader.git Git Repo -
SPI SD Loader - SPI_SD_Loader - -


Note: For USB Loader, libusb-1.0-0 and libusb-1.0-0-dev are required.

Repo References:

Boundary Devices GitHub Repository: https://github.com/boundarydevices
Timesys Repository: http://repository.timesys.com/buildsources/

GStreamer Support to i.MX6 Platform

GStreamer i.MX6 Pipelines :

https://community.freescale.com/docs/DOC-93387

GStreamer i.MX6 Decoding :

https://community.freescale.com/docs/DOC-93446

GStreamer i.MX6 Encoding:

https://community.freescale.com/docs/DOC-93447

Freescale-Useful GStreamer Commands:

https://community.freescale.com/docs/DOC-93487

Freescale GStreamer plugins:

http://boundarydevices.com/freescale-gstreamer-plugins/

BoundarydevicesTag Archives:

http://boundarydevices.com/tag/gstreamer/

Freescale Community on i.MX6 and Download links

i.MX6 Multimedia Applications Processors documents:

https://community.freescale.com/docs/DOC-93743

Freescale iMX Community:

https://community.freescale.com/community/imx

iMX6Q Manufacturing tool from Freescale :

http://people.linaro.org/~guodongxu/myupload/freescale_tools/

Linaro on Freescale i.MX6Q Sabre Lite Board

iMX6Q Sabre Lite Board Getting Started, Linaro image tools, Downloading Linaro Evaluation Builds:

https://wiki.linaro.org/Boards/MX6QSabreLite

Freescale Manufacturing Tool:

MfgTool (i.MX53) :

https://support.bluetechnix.at/wiki/MfgTool_%28i.MX53%29

Quick reference link for Sabrelite board. (Hardware Manual etc):

http://boundarydevices.com/products/sabre-lite-imx6-sbc/ (Please Click the 'Support' tab in this link).

BoundaryDevices FAQ Links:

Unbricking a Nitrogen6X or Sabre Lite i.MX6 board: http://boundarydevices.com/unbricking-nitrogen6x-sabre-lite-i-mx6-board/

How to program u-boot.bin from the boot prompt : http://boundarydevices.com/i-mx-6dq-u-boot-updates/

Auto-configuration of displays for i.MX6 using a U-Boot script : http://boundarydevices.com/auto-configuration-of-displays-for-i-mx6-using-a-u-boot-script/]

Boot scripts for main-line U-Boot on i.MX6 : http://boundarydevices.com/boot-scripts-for-main-line-u-boot-on-i-mx6/

GStreamer Camera Streaming on i.MX6 : http://boundarydevices.com/gstreamer-camera-streaming-on-i-mx6/

SabreLite Wiki:

In this link you can find a nice wiki that summarizes all the necessary info to start working with the board.

Linaro Git:

git clone git://git.linaro.org/bsp/freescale/linux-linaro.git 

BoundaryDevices Git Repositories:

Git Repo for Boundary devices kernel tree, uboot : https://github.com/boundarydevices
Boundary Devices Kernel tree for i.MX6 (You can clone the linux kernel image from Boundary devices for i.MX6 using git-clone below):

git clone git://github.com/boundarydevices/linux-imx6.git linux-imx6

After you clone it, please run :

$ cd linux-im6

$ gitk

Boundary Devices u-boot tree for i.MX6 (You can clone the u-boot image from Boundary devices for i.MX6 using git-clone below):

git clone git://github.com/boundarydevices/u-boot-imx6.git u-boot-imx6

After you clone it, please run :

$ cd u-boot-imx6

$ gitk

Compiling Freescale BSP

The BSP can be downloaded from this link. (You should have the Freescale login account)

Freescale BSP is only supported by ubuntu 9.04.

To be able to compile it install the following packages.

sudo apt-get -y install gettext libgtk2.0-dev rpm bison m4 libfreetype6-dev
sudo apt-get -y install libdbus-glib-1-dev liborbit2-dev intltool
sudo apt-get -y install ccache zlib1g zlib1g-dev gcc g++ libtool
sudo apt-get -y install uuid-dev liblzo2-dev tcl wget libncurses5-dev
sudo apt-get -y install libncursesw5-dev lib32z1 libglib2.0-dev xsltproc
sudo apt-get -y install ia32-libs libc6-dev-i386

if uname -a|grep -sq 'x86_64'; then
sudo apt-get -y install ia32-libs libc6-dev-i386 lib32z1
fi

#The following recommended for Linux development.
#They are not required by LTIB.

sudo apt-get -y install gparted emacs22-nox openssh-server
sudo apt-get -y install nfs-common nfs-kernel-server lintian
sudo apt-get -y install git-core git-doc git-email git-gui gitk
sudo apt-get -y install diffstat indent tofrodos fakeroot doxygen uboot-mkimage
sudo apt-get -y install sendmail mailutils meld atftpd sharutils
sudo apt-get -y install manpages-dev manpages-posix manpages-posix-dev linux-doc
sudo apt-get -y install vnc4server xvnc4viewer

Once you have downloaded the code proceed to uncompress the code and and install it.

cd <BSP directoy>

./install

The BSP is built by using LTIB and it requires root privileges during execution. To accommodate this, the sudoers file needs to be modified. To do that run the following command:

sudo visudo

And add the following line:

<user> ALL = NOPASSWD: /usr/bin/rpm, /opt/freescale/ltib/usr/bin/rpm

Limit the cache:

ccache -M 50M

ccache -c

Go to the ltib folder in the BSP installation directory.

cd <BSP installation directory>/ltib

In order to configure the BSP for sabre lite run:

./ltib -m config

And follow the instructions.

When the configuration is done run:

./ltib

to build the BSP.

   Note: if during the build process you have an error similar to the following:

error: cannot open Name index using db3 - No such file or directory 

Run the following to solve it:

sudo rpm --rebuilddb

cd /var/lib/rpm/

sudo cp Packages Name

Once the build process is done you can find the file system in:

<BSp installation directory>/ltib/rootfs

Steps to update/upgrade the SPI-NOR with boundary devices production branch of latest bootloader

1.

git clone https://github.com/boundarydevices/u-boot-imx6.git u-boot-imx6latest


2. goto 'u-boot-imx6latest' dir


3.

git checkout production


4. Steps to Build the production branch of the latest bootloader source files:

export PATH=/opt/codesourcery/arm-2009q1/bin/:$PATH
export ARCH=arm
export CROSS_COMPILE=arm-none-linux-gnueabi-
make nitrogen6x_config
make


5. Copy the newly built 'u-boot.imx' from 'u-boot-imx6latest' dir in to the microSD (you can make a backup of the original 'u-boot.imx6' in the timesys image just in case it is needed)- Note:microSD contains factory defalut timesys image dir structure


6. Start the board and stop at uboot


7. Use the below command at u-boot prompt

run upgradeu
Log of the upgrade process:
U-Boot > run upgradeu
AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part
No port device detected!
** Bad device size - sata 0 **
** Bad device size - sata 0 **

SATA device 1: unknown device
** Bad device sata 1 **
** Bad device sata 1 **
MMC: no card present
mmc0(part 0) is current device
MMC: no card present
** Bad device mmc 0 **
MMC: no card present
** Bad device mmc 0 **
mmc1 is current device
** Unrecognized filesystem type **
1752 bytes read
## Executing script at 10008000
check U-Boot
325360 bytes read
read 0x4f6f0 bytes from SD card
SF: Detected SST25VF016B with page size 4 KiB, total 2 MiB
probed SPI ROM
byte at 0x12000024 (0xf0) != byte at 0x12400024 (0xfc)
Total of 36 byte(s) were the same
Need U-Boot upgrade
Program in 5 seconds
5
4
3
2
1
erasing
programming
verifying
Total of 325360 byte(s) were the same
---- U-Boot upgraded. reset

8. restart the board and you should be booting with the new bootloader


iMX6 SabreLite board SD Boot Steps ( Using SD Card loader to support boot from the SD card)

1.

export DISK=/dev/sdx
 

Note: * Change the "x" for the correct letter. "sudo fdisk -l" is useful for determining the device id.


2. Erase/Format the microSD card:

sudo parted --script ${DISK} mklabel msdos 

3. Install U-Boot Bootloader:

sudo dd if=/path/to/u-boot.imx of=${DISK} seek=2 bs=512  


Note: Use the u-boot.imx from timesys factory microsd card image or create the one using boundary devices production branch version of u-boot source code.

4. Create ext2 partition:

sudo parted --script ${DISK} mkpart primary ext2 2 700 

Note: Please enter the sufficient end memory size; (In our case I choose 700MB to copy entire timesys factory dir structure).


5. Format primary parttion as ext2

sudo mkfs.ext2 ${DISK}1 -L iMX6Test  


Note: I choose 'iMX6Test' as <Partition Label> for primary partition and device id created in my case is /dev/sdb1


6. Remove and reconnect the SD card


7. Copy the SD Card loader:

Mount the partition. ie /media/iMX6Test


sudo cp -v /path/to/iMX6DQ_SPI_to_uSDHCx.bin /media/iMX6Test/spi_sd.bin


*x = 3 for booting fron slot 3 (SD card) and 4 fro slot 4 (micor SD card).


ie for SD card: sudo cp -v /path/to/iMX6DQ_SPI_to_uSDHC3.bin /media/iMX6Test/spi_sd.bin

and for microSD card: sudo cp -v /path/to/iMX6DQ_SPI_to_uSDHC4.bin /media/iMX6Test/spi_sd.bin


Note: Links for downloading the SD card loader:

https://wiki.linaro.org/Boards/MX6QSabreLite?action=AttachFile&do=view&target=iMX6DQ_SPI_to_SD_loader_binaries_rev1.0.zipwiki.linaro.org/Boards/MX6QSabreLite

https://wiki.linaro.org/Boards/MX6QSabreLite https://wiki.linaro.org/Boards/MX6QSabreLite https://wiki.linaro.org/Boards/MX6QSabreLite


8. Remove SD card:

sync
sudo umount /media/iMX6Test 


9. Flashing the SD Card loader


Insert the SD Card with the primary partition created (ie /media/iMX6Test ), with SD Card loader copied using the above steps till 8. 


Power up Board with SD card and interrupt at U-Boot's autoboot:


Flashing instructions:

ext2load mmc 0:1 12000000 spi_sd.bin
sf probe
sf erase 0 0x40000
sf write 0x12000000 0 ${filesize}
reset


Note: in the case of micro sd card please use ' ext2load mmc 1:1 12000000 spi_sd.bin '


10. After the completion of above steps, remove the SD Card and copy the entire content (dir,sub dir, files) of the timesys microSD card to the 'iMX6Test' partition in the SD Card.


11. Insert the SD Card back to the board and power on the board. You will see the board booting up from SD card and timesys kernel is successfully installed and running on the board.


How to revert back to booting from the board (iMX6 SabreLite board)

Note : Instead we can use 'upgrade script' which is the easier method : please refer the section "Steps to update/upgrade the SPI-NOR with boundary devices production branch of latest bootloader" in this Wiki link.


1. Copy the 'u-boot.imx' to the bootable sd card created using the above steps ( iMX6 SabreLite board SD Boot Steps: )

Note : If 'u-boot.imx' is already exists on the bootable sd card, then need not copy it.


2. Insert the SD card and interrupt at U-Boot's autoboot.


3. Follow the below steps at 'u-boot' prompt.


U-Boot > mmc dev 0
U-Boot > ext2load mmc 0 10800000 u-boot.imx
U-Boot > sf probe
U-Boot > sf erase 0 0xc0000
U-Boot > sf write 10800000 0x400 $filesize
U-Boot > reset


4. Remove the SD card and power on the board (without the sdcard or microsdcard inserted into the board), you will see the board boots up and stops at u-boot prompt.


How to create a new bootscript file for ex 6q_bootscript:

1. Create a new file '6q_bootscript.txt' file and edit the boot commands.

For ex original 6q_bootscript file contents ($strings 6q_bootscript) from timesys are as below:

set bootargs $bootargs console=ttymxc1,115200 vmalloc=400M root=/dev/mmcblk0p1 rootwait consoleblank=0 ;
if hdmidet ; then
setenv bootargs $bootargs video=mxcfb0:dev=hdmi,1280x720M@60,if=RGB24 video=mxcfb1:dev=lcd,CLAA-WVGA,if=RGB666 fbmem=28M,10M
else
setenv bootargs $bootargs video=mxcfb0:dev=lcd,CLAA-WVGA,if=RGB666 video=mxcfb1:dev=hdmi,1280x720M@60,if=RGB24 calibration tsdev=tsc2004 fbmem=10M,28M
${fs}load mmc ${disk}:1 10800000 /boot/uImage && bootm 10800000 ; echo "Error loading kernel image"


2. Use 'mkimage' boot command to convert 6q_bootscript.txt to 6q_bootscript script file.

mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "boot script" -d 6q_bootscript.txt 6q_bootscript


3. Copy the new 6q_bootscript file generated to bootable SD card ( with timesys bsp).

Ref : http://boundarydevices.com/boot-scripts-for-main-line-u-boot-on-i-mx6/

See Also:

https://github.com/RidgeRun/eval-sdk-imx6-sabre/blob/master/README.md
https://github.com/RidgeRun/eval-sdk-imx6/blob/master/README.md