Versions Compared

Key

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

...

Info
iconfalse
$ wget -c http://releases.linaro.org/archive/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-

...

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

Info
iconfalse

$ ${CC}gcc --version
arm-linux-gnueabihf-gcc (crosstool-NG linaro-1.13.1-4.7-2013.04-20130415 - Linaro GCC 2013.04) 4.7.3 20130328 (prerelease)
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Generating SSH Keys

...

We recommend you use SSH keys to establish a secure connection between your computer and Embedian Gitlab server. The steps below will walk you through generating an SSH key and then adding the public key to our Gitlab account.

...

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 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 u-boot.imx image are the same, the difference is how you flash u-boot.imx. This will be explained in the "Setup SD card" section.

...

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 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 u-boot.imx image are the same, the difference is how you flash u-boot.imx. This will be explained in the "Setup SD card" section.

...

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

 

Yocto Build Root File System:

...

For these instruction, we are assuming: DISK=/dev/mmcblk0, "lsblk" is very useful for determining the device id.

Info
iconfalse

$ export DISK=/dev/mmcblk0

Erase SD card:

Info
iconfalse

$ sudo dd if=/dev/zero of=${DISK} bs=1M count=16

...

Info
iconfalse
titlesfdisk
$ sudo sfdisk --version
sfdisk from util-linux 2.27.1

Create Partitions:

Info
titlesfdisk >=2.26.x
$ sudo sfdisk ${DISK} <<-__EOF__
1M,48M,0x83,*
,,,-
__EOF__

...

Copy uEnv.txt to the boot partition:

Info
iconfalse
title~/

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

Install Kernel zImage

Copy zImage to the boot partition:

Info
iconfalse
title~/smarc-fsl-linux-kernel

$ sudo cp -v arch/arm/boot/zImage /media/boot

Install Kernel Device Tree Binary

Info
iconfalse

$ sudo mkdir -p /media/boot/dtbs

$ sudo cp -v arch/arm/boot/dts/imx6q-smarcfimx6.dtb arch/arm/boot/dts/imx6dl-smarcfimx6.dtb /media/boot/dtbs

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 

Install Root File System and Kernel Modules

...

Info
iconfalse
titledirectory where your root file system is

$ sudo tar xvfz <filename.tar.gz> -C /media/rootfs

Ubuntu 14.04:

Info
iconfalse
titledirectory where your root file system is

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

Copy Kernel Modules:

Info
iconfalse
title~/smarc-fsl-linux-kernel

$ sudo make ARCH=arm INSTALL_MOD_PATH=/media/rootfs modules_install

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.

...

Edit: /etc/network/interfaces

Info
iconfalse

$ sudo vim /media/rootfs/etc/network/interfaces

Add:

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

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

...

For these instruction, we are assuming: DISK=/dev/mmcblk0, "lsblk" is very useful for determining the device id.

Info
iconfalse

$ export DISK=/dev/mmcblk0

Mount Partitions:

On some systems, these partitions may be auto-mounted...

...

Copy zImage to rootfs partition:

Info
iconfalse

$ sudo cp -v /media/boot/zImage /media/rootfs/home/root

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

...

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 

 

Copy real rootfs to rootfs partition:

Yocto Built Root File Systems

Info
iconfalse

$ pushd /media/rootfs

$ sudo tar cvfz ~/smarcfimx6-emmc-rootfs.tar.gz .

$ sudo mv ~/smarcfimx6-emmc-rootfs.tar.gz /media/rootfs/home/root

$ popd

Ubuntu 14.04 Root File Systems

Info
iconfalse

$ sudo vim /media/rootfs/etc/udev/rules.d/70-persistent-net.rules

Delete all contents starting with "SUBSYSTEM=="

$ pushd /media/rootfs

$ sudo tar cvfz ~/smarcfimx6-emmc-rootfs.tar.gz .

$ sudo mv ~/smarcfimx6-emmc-rootfs.tar.gz /media/rootfs/home/root

$ popd

Remove SD card:

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

...

Install Kernel Device Tree Binary

Info
iconfalse

$ sudo mkdir -p /media/boot/dtbs

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

Install Root File System

...

Info
iconfalse

$ sudo tar -zxvf smarcfimx6-emmc-rootfs.tar.gz -C /media/rootfs

 

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 2018-02-08