Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

To build Embedian’s SMARC-FiMX6 u-boot and linux kernel, you will need to install the following Linaro arm compiler that is the same as that we build for SMARC-T335X

 For For u-boot 20142017.04, 03 and Linux 3.144.9.11, use the following Linaro arm compilier. 

Info
iconfalse
$ wget 
http
-c https://releases.linaro.org/
archive/13.04/
components/toolchain/binaries/
gcc-linaro-
6.2-2016.11/arm-linux-gnueabihf/gcc-
4.7-2013.04-20130415_linux
linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf.tar.xz
$ sudo tar -C /opt -xJf gcc-linaro-
arm-linux-gnueabihf-4.7-2013.04-20130415_linux
6.2.1-2016.11-x86_64_arm-linux-gnueabihf.tar.xz
$ export CC=/opt/gcc-linaro-
arm-linux-gnueabihf-4.7-2013.04-20130415_linux
6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-


For u-boot 2015.04 and Linux 4.1.15, you need to use the following newer Linaro arm compilier. 

Info
iconfalse
$ wget -c https://releases.linaro.org/15.05/components/toolchain/binaries/arm-linux-gnueabihf/gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabihf.tar.xz
$ sudo tar -C /opt -xJf gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabihf.tar.xz
$ export CC=/opt/gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-

 
For u-boot 2014.04, and Linux 3.14, use the following Linaro arm compilier.

Info
iconfalse
$ wget http://releases.linaro.org/archive/13.04/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux.tar.xz
$ sudo tar -C /opt -xJf gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux.tar.xz
$ export CC=/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf-

Test:

If this test fails, verify that you have the 32bit libraries installed on your development system.

...

Clone the U-Boot source code from Embedian Git Server.

Download:
For u-boot v2017.03: 

Info
iconfalse
$ git clone git@git.embedian.com:developer/smarc-t335x-uboot.git smarcfimx6-uboot
$ cd smarcfimx6-uboot
$ git checkout smarc-imx_v2017.03_4.9.11_1.0.0_ga


For u-boot v2015.04:
 

Info
iconfalse
$ git clone git@git.embedian.com:developer/smarc-t335x-uboot.git smarcfimx6-uboot
$ cd smarcfimx6-uboot
$ git checkout smarc-imx_v2015.04_4.1.15_1.0.0_ga


For u-boot v2014.04:
 

Info
iconfalse
$ git clone git@git.embedian.com:developer/smarc-t335x-uboot.git smarcfimx6-uboot
$ cd smarcfimx6-uboot
$ git checkout smarc-imx_v2014.04_3.14.28_1.0.0_ga

Configure and Build:

Info
iconfalse
$ make ARCH=arm CROSS_COMPILE=${CC} distclean
$ make ARCH=arm CROSS_COMPILE=${CC} smarcfimx6_quad_1g_ser3_
config
defconfig
$ make ARCH=arm CROSS_COMPILE=${CC}
Note
iconfalse
titleNote

Note1:

If the board is SMARC-FiMX6-Q-2G or SMARC-FiMX6-D-2G, use
$ make ARCH=arm CROSS_COMPILE=${CC} smarcfimx6_quad_2g_ser3_config

 If the board is SMARC-FiMX6-Q-1G or SMARC-FiMX6-D-1G, use
$ make ARCH=arm CROSS_COMPILE=${CC} smarcfimx6_quad_1g_ser3_config

 If the board is SMARC-FiMX6-U-1G, use
$ make ARCH=arm CROSS_COMPILE=${CC} smarcfimx6_dl_1g_ser3_config

 If the board is SMARC-FiMX6-S, use
$ make ARCH=arm CROSS_COMPILE=${CC} smarcfimx6_solo_ser3_config

 If the board is SMARC-FiMX6-QP-1G, use
$ make ARCH=arm CROSS_COMPILE=${CC} smarcfimx6_quadplus_1g_ser3_defconfig

 If the board is SMARC-FiMX6-QP-2G, use
$ make ARCH=arm CROSS_COMPILE=${CC} smarcfimx6_quadplus_2g_ser3_defconfig

Note 2:

"ser3" stands for console debug port. In this example, we uses SER3 as debug port. If user uses SER0 as your debug port, make change to "ser0" instead. Same as SER1 and SER2.

Note 3:

The SMARC-FiMX6 module always boot up from the onboard on-module SPI NOR flash. The factory default will be u-boot.imx pre-installed with SER3 as console output. In some cases when the SPI NOR flash is empty or needs to be upgraded. Users can shunt crossed the TEST# to ground. In this way, the SMARC-FiMX6 module will boot up to carrier SD card, if TEST# pin is shunt crossed. The The u-boot.imx image  image are the same, the difference is how you flash flash u-boot.imx. This will be explained in the "Setup SD card" section.


For u-boot
v2015v2014.04: 

Info
iconfalse
$ git clone git@git.embedian.com:developer/smarc-t335x-uboot.git smarcfimx6-uboot
$ cd smarcfimx6-uboot
$ git checkout smarc-imx_
v2015
v2014.04_
4
3.
1
14.
15
28_1.0.0_ga

Configure and Build:

Info
iconfalse
$ make ARCH=arm CROSS_COMPILE=${CC} distclean
$ make ARCH=arm CROSS_COMPILE=${CC} smarcfimx6_quad_1g_ser3_
defconfig
config
$ make ARCH=arm CROSS_COMPILE=${CC}
Note
iconfalse
titleNote

Note1:

If the board is SMARC-FiMX6-Q-2G or SMARC-FiMX6-D-2G, use
$ make ARCH=arm CROSS_COMPILE=${CC} smarcfimx6_quad_2g_ser3_defconfig

 If the board is SMARC-FiMX6-Q-1G or SMARC-FiMX6-D-1G, use
$ make ARCH=arm CROSS_COMPILE=${CC} smarcfimx6_quad_1g_ser3_defconfig

 If the board is SMARC-FiMX6-U-1G, use
$ make ARCH=arm CROSS_COMPILE=${CC} smarcfimx6_dl_1g_ser3_defconfig

 If the board is SMARC-FiMX6-S, use
$ make ARCH=arm CROSS_COMPILE=${CC} smarcfimx6_solo_ser3_defconfig

Note 2:

"ser3" stands for console debug port. In this example, we uses SER3 as debug port. If user uses SER0 as your debug port, make change to "ser0" instead. Same as SER1 and SER2.

Note 3:

The SMARC-FiMX6 module always boot up from the onboard on-module SPI NOR flash. The factory default will be u-boot.imx pre-installed with SER3 as console output. In some cases when the SPI NOR flash is empty or needs to be upgraded. Users can shunt crossed the TEST# to ground. In this way, the SMARC-FiMX6 module will boot up to carrier SD card, if TEST# pin is shunt crossed. The The u-boot.imx image  image are the same, the difference is how you flash flash u-boot.imx. This will be explained in the "Setup SD card" section.

...

Linux Kernel

...

Download:

For 34.149.28 111 (Based on Freescale imx_34.149.2811_1.0.0_ga official ga official release):

Info
iconfalse
$ git clone git@git.embedian.com:developer/smarc-fsl-linux-kernel.git
$ cd smarc-fsl-linux-kernel
$ git checkout smarc-imx_
3
4.
14
9.
28
11_1.0.0_ga


For 4.1.15 (Based on Freescale imx_4.1.15_1.0.0_ga official release):

Info
iconfalse
$ git clone git@git.embedian.com:developer/smarc-fsl-linux-kernel.git
$ cd smarc-fsl-linux-kernel
$ git checkout smarc-imx_4.1.15_1.0.0_ga

Configure and Build:

 

Info
iconfalse
$ make ARCH=arm CROSS_COMPILE=${CC} distclean
$ make ARCH=arm CROSS_COMPILE=${CC} smarcfimx6_defconfig
$ make ARCH=arm CROSS_COMPILE=${CC} zImage modules imx6q-smarcfimx6.dtb imx6dl-smarcfimx6.dtb imx6qp-smarcfimx6.dtb


For 3.14.28 (Based on Freescale imx_3.14.28_1.0.0_ga official release):

Info
iconfalse
$ git clone git@git.embedian.com:developer/smarc-fsl-linux-kernel.git
$ cd smarc-fsl-linux-kernel
$ git checkout smarc-imx_3.14.28_1.0.0_ga

Configure and Build:

Info
iconfalse
$ make ARCH=arm CROSS_COMPILE=${CC} distclean
$ make ARCH=arm CROSS_COMPILE=${CC} smarcfimx6_defconfig
$ make ARCH=arm CROSS_COMPILE=${CC} zImage modules imx6q-smarcfimx6.dtb imx6dl-smarcfimx6.dtb
Note
iconfalse

Note1:

If the board is QuadPlus core, the device tree blob is imx6qp-smarcfimx6.dtb.

If the board is Dual or Quad core, the device tree blob is imx6q-smarcfimx6.dtb.

If the board is Dual Lite or Solo core, the device tree blob is imx6dl-smarcfimx6.dtb

If you are using LVDS panel, replace the corresponding device tree file by the following.

For WVGA (800x480) LVDS panel:
imx6qp-smarcfimx6.dtb --> imx6qp-smarcfimx6-wvga.dtb
imx6q-smarcfimx6.dtb --> imx6q-smarcfimx6-wvga.dtb
imx6dl-smarcfimx6.dtb --> imx6dl-smarcfimx6-wvga.dtb

For XGA (1024x768) LVDS panel:
imx6qp-smarcfimx6.dtb --> imx6qp-smarcfimx6-xga.dtb
imx6q-smarcfimx6.dtb --> imx6q-smarcfimx6-xga.dtb
imx6dl-smarcfimx6.dtb --> imx6dl-smarcfimx6-xga.dtb 

For WXGA (1366x768) LVDS panel:
imx6qp-smarcfimx6.dtb --> imx6qp-smarcfimx6-wxga.dtb
imx6q-smarcfimx6.dtb --> imx6q-smarcfimx6-wxga.dtb

imx6dl-smarcfimx6.dtb --> imx6dl-smarcfimx6-wxga.dtb

For 1080p (1920x1080) LVDS panel:
imx6qp-smarcfimx6.dtb --> imx6qp-smarcfimx6-1080p.dtb
imx6q-smarcfimx6.dtb --> imx6q-smarcfimx6-1080p.dtb

imx6dl-smarcfimx6.dtb --> imx6dl-smarcfimx6-1080p.dtb

Root File System

...

Ubuntu 16.04:

UserPassword
rootroot
ubuntutemppwd

Ubuntu 16.04 Download:

Info
iconfalse
$ wget -c ftp://ftp.embedian.com/public/dev/minfs/xenial/imx6-ubuntu-16.04.2-armhf-2017-03-02.tar.gz

Verify:

Info
iconfalse
$ md5sum imx6-ubuntu-16.04.2-armhf-2017-03-02.tar.gz
0a3b5cf7b2f6c65856e07f21c17f3129  imx6-ubuntu-16.04.2-armhf-2017-03-02.tar.gz


Debian 8.7:

UserPassword
rootroot
debiantemppwd

Debian 8 Download:

Info
iconfalse
$ wget -c ftp://ftp.embedian.com/public/dev/minfs/jessie/imx6-debian-8.7-armhf-2017-03-02.tar.gz

Verify:

Info
iconfalse
$ md5sum imx6-debian-8.7-armhf-2017-03-02.tar.gz
beb77ef08400cb9f1780e8a80f47add6  imx6-debian-8.7-armhf-2017-03-02.tar.gz


Ubuntu 14.04:

UserPassword
rootroot
ubuntutemppwd

Ubuntu 14.04 Download:

Info
iconfalse

$ wget -c ftp://ftp.embedian.com/public/dev/minfs/trusty/imx6-ubuntu1404.tar.gz

Verify:

Info
iconfalse

$ md5sum imx6-ubuntu1404.tar.gz
f1420197b9581468f586ae3a4181b125  imx6-ubuntu1404.tar.gz

...

Copy u-boot.imx to the boot partition. (Note: Rename u-boot-dtb.img to u-boot.img if your u-boot is v2017.03)

Info
iconfalse
title~/smarcfimx6-uboot

$ sudo cp -v u-boot.imx /media/boot/u-boot.imx

...

Info
iconfalse
titleu-boot command prompt

U-Boot# mmc rescan; mmc dev; load mmc 0:1 0x10800000 u-boot.imx; sf probe; sleep 2; sf erase 0 0xc0000; sf write 0x10800000 0x400 8000086000

If SPI NOR Flash is empty

...

Copy u-boot.imx to the boot partition. (Note: Rename u-boot-dtb.img to u-boot.img if your u-boot is v2017.03)

Info
iconfalse
title~/smarcfimx6-uboot

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

...

Info
iconfalse
title~/uEnv.txt

#####HDMI######
#optargs="video=mxcfb0:dev=hdmi,1280x720M@60,if=RGB24,bpp=32 consoleblank=0"
#####LVDS#####
#optargs="video=mxcfb0:dev=ldb,if=RGB24,bpp=32 consoleblank=0 fbmem=24M vmalloc=400M"
#####Parallel LCD Setting#####
#optargs="video=mxcfb0:dev=lcd,CLAA-WVGA,if=RGB24,bpp=32 consoleblank=0 fbmem=24M vmalloc=400M"
#####Parallel LCD to CH7055A (VESA Timing Format) Setting #####
#optargs="video=mxcfb0:dev=lcd,768x576M@75,if=RGB24,bpp=32 consoleblank=0"
#optargs="video=mxcfb0:dev=lcd,1280x1024M@60,if=RGB24,bpp=32 consoleblank=0"
#optargs="video=mxcfb0:dev=lcd,640x480M@60,if=RGB24,bpp=32 consoleblank=0"

console=ttymxc4,115200
mmcdev=0
mmcpart=1
image=zImage
loadaddr=0x12000000
fdt_addr=0x18000000
mmcroot=/dev/mmcblk1p2 ro
mmcrootfstype=ext4 rootwait fixrtc
netdev=eth0
ethact=FEC0
ipaddr=192.168.1.150
serverip=192.168.1.53
gatewayip=192.168.1.254
mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs}
uenvcmd=run loadzimage; run loadfdt; run mmcboot

...

Note
titleNote
  1. If you are using LVDS panel, copy the corresponding device tree blob into SD card as follows.

For WVGA (800x480) LVDS panel:
$ sudo cp -v arch/arm/boot/dts/imx6qp-smarcfimx6-wvga.dtb /media/boot/dtbs/imx6qp-smarcfimx6.dtb
$ sudo cp -v arch/arm/boot/dts/imx6q-smarcfimx6-wvga.dtb /media/boot/dtbs/imx6q-smarcfimx6.dtb
$ sudo cp -v arch/arm/boot/dts/imx6dl-smarcfimx6-wvga.dtb /media/boot/dtbs/imx6dl-smarcfimx6.dtb 

For XGA (1024x768) LVDS panel:
 $ sudo cp -v arch/arm/boot/dts/imx6qp-smarcfimx6-xga.dtb /media/boot/dtbs/imx6qp-smarcfimx6.dtb
$ sudo cp -v arch/arm/boot/dts/imx6q-smarcfimx6-xga.dtb /media/boot/dtbs/imx6q-smarcfimx6.dtb
 $ sudo cp -v arch/arm/boot/dts/imx6dl-smarcfimx6-xga.dtb /media/boot/dtbs/imx6dl-smarcfimx6.dtb 

For WXGA (1366x768) LVDS panel:
 $ sudo cp -v arch/arm/boot/dts/imx6qp-smarcfimx6-wxga.dtb /media/boot/dtbs/imx6qp-smarcfimx6.dtb
$ sudo cp -v arch/arm/boot/dts/imx6q-smarcfimx6-wxga.dtb /media/boot/dtbs/imx6q-smarcfimx6.dtb
 $ sudo cp -v arch/arm/boot/dts/imx6dl-smarcfimx6-wxga.dtb /media/boot/dtbs/imx6dl-smarcfimx6.dtb 

For 1080p (1920x1080) LVDS panel:
 $ sudo cp -v arch/arm/boot/dts/imx6qp-smarcfimx6-1080p.dtb /media/boot/dtbs/imx6qp-smarcfimx6.dtb
$ sudo cp -v arch/arm/boot/dts/imx6q-smarcfimx6-1080p.dtb /media/boot/dtbs/imx6q-smarcfimx6.dtb
 $ sudo cp -v arch/arm/boot/dts/imx6dl-smarcfimx6-1080p.dtb /media/boot/dtbs/imx6dl-smarcfimx6.dtb 

...

Info
iconfalse
titledirectory where your root file system is

$ sudo tar xvfz imx6-ubuntu1404.tar.gz -C /media/rootfs

Copy Kernel Modules:

...

Note
titleNote
  1. After compiled u-boot, it will generated u-boot.imx (u-boot-dtb.imx if using u-boot v2017.03) and u-boot.bin. The only difference is IVT header that will tell i.MX6 internal ROM where to load u-boot. If the firmware in SPI flash need to be update or empty. Users could pull the TEST# pin on carrier board to low. In this way, SMARC-FiMX6 will boot up to SD card first. The u-boot we need to use now will be u-boot.imx. The command to copy u-boot.imx to SD card now is:
    $ sudo dd if=u-boot.imx of=${DISK} bs=512 seek=2 
    In this case, user will only need to copy uEnv.txt, zImage and device tree blob to partition one of your boot device.  
  2. MAC address is factory pre-installed at on board I2C EEPROM at offset 60 bytes. It starts with Embedian's vendor code 10:0D:32. u-boot will read it and pass this parameter to kernel.
  3. If your rootfs is yocto built, the kernel modules will be included in the rootfs.

...

Info
iconfalse
title/media/rootfs/etc/network/interfaces

auto lo
iface lo inet loopback
 
auto eth0
iface eth0 inet dhcp

 


Remove SD card:

Info
iconfalse
$ sync
$ sudo umount /media/boot
$ sudo umount /media/rootfs

...

Note
titleNote
  1. If your rootfs is Ubuntu 14.04, copy to /media/rootfs/home/ubuntu instead of /media/rootfs/home/root

 


Copy uEnv.txt to rootfs partition:

...

Info
iconfalse

#####HDMI######
#optargs="video=mxcfb0:dev=hdmi,1280x720M@60,if=RGB24,bpp=32 consoleblank=0"
#####LVDS#####
#optargs="video=mxcfb0:dev=ldb,if=RGB24,bpp=32 consoleblank=0 fbmem=24M vmalloc=400M"
#####Parallel LCD Setting#####
#optargs="video=mxcfb0:dev=lcd,CLAA-WVGA,if=RGB24,bpp=32 consoleblank=0 fbmem=24M vmalloc=400M"
#####Parallel LCD to CH7055A (VESA Timing Format) Setting #####
#optargs="video=mxcfb0:dev=lcd,768x576M@75,if=RGB24,bpp=32 consoleblank=0"
#optargs="video=mxcfb0:dev=lcd,1280x1024M@60,if=RGB24,bpp=32 consoleblank=0"
#optargs="video=mxcfb0:dev=lcd,640x480M@60,if=RGB24,bpp=32 consoleblank=0"

console=ttymxc4,115200
mmcdev=2
mmcpart=1
image=zImage
loadaddr=0x12000000
fdt_addr=0x18000000
mmcroot=/dev/mmcblk3p2 ro
mmcrootfstype=ext4 rootwait fixrtc
netdev=eth0
ethact=FEC0
ipaddr=192.168.1.150
serverip=192.168.1.53
gatewayip=192.168.1.254
mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs}
uenvcmd=run loadzimage; run loadfdt; run mmcboot

Copy device tree blob to rootfs partition:

Info
iconfalse
$ sudo cp -v /media/boot/dtbs/imx6qp-smarcfimx6.dtb /media/rootfs/home/root/imx6qp-smarcfimx6.dtb
$ sudo cp -v /media/boot/dtbs/imx6q-smarcfimx6.dtb /media/rootfs/home/root/imx6q-smarcfimx6.dtb
$ sudo cp -v /media/boot/dtbs/imx6dl-smarcfimx6.dtb /media/rootfs/home/root/imx6dl-smarcfimx6.
dtb 
dtb 


Note
titleNote
  1. If you are using LVDS panel, copy the corresponding device tree blob into eMMC as follows.

For WVGA (800x480) LVDS panel:
$ sudo cp -v arch/arm/boot/dts/imx6qp-smarcfimx6-wvga.dtb /media/boot/dtbs/imx6qp-smarcfimx6.dtb
$ sudo cp -v arch/arm/boot/dts/imx6q-smarcfimx6-wvga.dtb /media/boot/dtbs/imx6q-smarcfimx6.dtb
$ sudo cp -v arch/arm/boot/dts/imx6dl-smarcfimx6-wvga.dtb /media/boot/dtbs/imx6dl-smarcfimx6.dtb 

For XGA (1024x768) LVDS panel:
 $ sudo cp -v arch/arm/boot/dts/imx6qp-smarcfimx6-xga.dtb /media/boot/dtbs/imx6qp-smarcfimx6.dtb
$ sudo cp -v arch/arm/boot/dts/imx6q-smarcfimx6-xga.dtb /media/boot/dtbs/imx6q-smarcfimx6.dtb
 $ sudo cp -v arch/arm/boot/dts/imx6dl-smarcfimx6-xga.dtb /media/boot/dtbs/imx6dl-smarcfimx6.dtb 

For WXGA (1366x768) LVDS panel:
 $ sudo cp -v arch/arm/boot/dts/imx6qp-smarcfimx6-wxga.dtb /media/boot/dtbs/imx6qp-smarcfimx6.dtb
$ sudo cp -v arch/arm/boot/dts/imx6q-smarcfimx6-wxga.dtb /media/boot/dtbs/imx6q-smarcfimx6.dtb
 $ sudo cp -v arch/arm/boot/dts/imx6dl-smarcfimx6-wxga.dtb /media/boot/dtbs/imx6dl-smarcfimx6.dtb 

For 1080p (1920x1080) LVDS panel:
 $ sudo cp -v arch/arm/boot/dts/imx6qp-smarcfimx6-1080p.dtb /media/boot/dtbs/imx6qp-smarcfimx6.dtb
$ sudo cp -v arch/arm/boot/dts/imx6q-smarcfimx6-1080p.dtb /media/boot/dtbs/imx6q-smarcfimx6.dtb
 $ sudo cp -v arch/arm/boot/dts/imx6dl-smarcfimx6-1080p.dtb /media/boot/dtbs/imx6dl-smarcfimx6.dtb 

...

Install binaries for partition 1

Copy uEnv.txt/zImage/*.dtb to dtb to the boot partition

Info
iconfalse

$ sudo cp -v zImage uEnv.txt /media/boot/

...

Info
iconfalse

$ sudo mkdir -p /media/boot/dtbs

$ sudo cp imx6qp-v smarcfimx6.dtb imx6q-smarcfimx6.dtb imx6dl-smarcfimx6.dtb /media/boot/dtbs

...

Unmount eMMC:

Info
iconfalse
$ sync
$ sudo umount /media/boot
$ sudo umount /media/rootfs

 

Switch your Boot Select to eMMC and you will be able to boot up from eMMC now.


version 1.0a, 3/23/2015

Last updated 20162018-0402-08