Versions Compared

Key

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

...

Note
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

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 SPI NOR flash. The factory default will be u-boot.imx pre-installed. 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.

 

...

Linux Kernel

...

Download:

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

...

Info
iconfalse
$ sudo mkdir -p /media/boot/
$ sudo mkdir -p /media/rootfs/
 
for: DISK=/dev/mmcblk0
$ sudo mount ${DISK}p1 /media/boot/
$ sudo mount ${DISK}p2 /media/rootfs/
 
for: DISK=/dev/sdX
$ sudo mount ${DISK}1 /media/boot/
$ sudo mount ${DISK}2 /media/rootfs/

Install Bootloader

If SPI NOR Flash is not empty

The u-boot.imx is pre-installed in SPI NOR flash at factory default. SMARC-FiMX6 is designed to always boot up from SPI NOR flash and to load zImage, device tree blob and root file systems based on the setting of BOOT_SEL. If users need to fuse their own u-boot or perform u-boot upgrade. This section will instruct you how to do that.

Copy u-boot.

...

imx to the boot partition.

Info
iconfalse
title~/smarcfimx6-uboot

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

Fuse u-boot.imx to the SPI NOR flash.

Stop at U-Boot command prompt (Press any key when booting up).

Info
iconfalse
titleu-boot command prompt

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

 

If SPI NOR Flash is empty

In some cases, when SPI NOR flash is erased or the u-boot is under development, we need a way to boot from SD card first. Users need to shunt cross the TEST# pin to ground. In this way, SMARC-FiMX6 will always boot up from SD card. 

Copy u-boot.imx to the boot partition

Info
iconfalse
title~/smarcfimx6-uboot

$ sudo dd if=u-boot.imx of=${DISK} bs=512 seek=2 
Note
  1. If your u-boot hasn't been finalized and still under development, it is recommended to shunt cross the test pin and boot directly from SD card first. Once your u-boot is fully tested and finalized, you can fuse your u-boot to SPI NOR flash.
  2. When TEST# pin of SMARC-FiMX6 is not shunt crossed, it will always boot up from SPI NOR flash. U-boot will read the BOOT_SEL configuration and determine where it should load zImage and device tree blob. When TEST# is shunt crossed (pull low), it will always boot up from SD card.

uEnv.txt based bootscript

...

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/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/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/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/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
title~/smarc-fsl-linux-kernel

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


Note
titleNote
  1. SMARC-FiMX6 always boots up to SPI flash first. The firmware in SPI flash is factory pre-installed from Embedian. It will read the BOOT_SEL configuration that defined by SMARC specification on your carrier board and load u-boot.bin from the partition one of the device (could be SD card, eMMC, SATA,..etc) that you selected to memory.
  2. After compiled u-boot, it will generated u-boot.imx 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.  
  3. 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.
  4. If your rootfs is yocto built, the kernel modules will be included in the rootfs.

...

Info
iconfalse
$ sudo mkdir -p /media/boot/
$ sudo mkdir -p /media/rootfs/
 
for: DISK=/dev/mmcblk0
$ sudo mount ${DISK}p1 /media/boot/
$ sudo mount ${DISK}p2 /media/rootfs/
 
for: DISK=/dev/sdX
$ sudo mount ${DISK}1 /media/boot/
$ sudo mount ${DISK}2 /media/rootfs/

Changing Device descriptor from U-Boot:

There is only one line needed to be changed from original u-boot.

At include/configs/smarcfimx6.h, find

#define CONFIG_SYS_MMC_ENV_DEV

Change from "0" to "2" and make again.

(Users can also checkout the smarc-emmc-imx_3.14.28_1.0.0_ga branch from Embedian u-boot git server by the following way.

git checkout smarc-imx_3.14.28_1.0.0_ga
make ARCH=arm CROSS_COMPILE=${CC} distclean
make ARCH=arm CROSS_COMPILE=${CC} smarcfimx6_quad_1g_ser3_config
make ARCH=arm CROSS_COMPILE=${CC}

)

The new u-boot.bin will be the one for eMMC use.

Copy u-boot.bin Copy zImage to rootfs partition:

Info
iconfalse
title~/smarcfimx6-uboot

$ sudo cp -v u-boot.bin //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

Copy zImage to rootfs partition:

Info
iconfalse

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

 


Copy uEnv.txt to rootfs partition:

...

Insert this SD card into your SMARC-FiMX6 device and boot into SD card.

Now it will be almost the same as you did when setup your SD card, but the eMMC device descriptor is /dev/mmcblk3 now.

...

Install binaries for partition 1

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

Info
iconfalse

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

...