...
- ARM Cross Compiler
- Bootloader
- Das U-Boot – the Universal Boot Loader http://www.denx.de/wiki/U-Boot
- Source – http://git.denx.de/?p=u-boot.git;a=summary
- Linux Kernel
- Linus's Mainline tree: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=summary
- Freescale Linux source tree: git git://git.freescale.com/imx/linux-2.6-imx.git
- Freescale BSP meta layer: git git://git.freescale.com/imx/meta-fsl-bsp-release
- OpenEmbedded/Yocto BSP layer for Freescale's ARM platform gitplatform git://git.yoctoproject.org/meta-fsl-arm
- Embedian SMARC-FiMX6 kernel source tree for linux 3.14.28_1.0.0: git@git, 4.1.15_1.0.0 and 4.9.11_1.0.0: git@git.embedian.com:developer/smarc-fsl-linux-kernel.git
- ARM based rootfs
- Debian Squeeze: http://www.debian.org/
- Debian Squeeze: http://www.debian.org/
...
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 u-boot 2018.03 and Linux 4.14.98, you need to use the following newer Linaro arm compilier.
Info | ||
---|---|---|
| ||
$ wget -c http://releases.linaro.org/components/toolchain/binaries/6.4-2017.11/arm-linux-gnueabihf/gcc-linaro-6.4.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz $ sudo tar -C /opt -xJf gcc-linaro-6.4.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz $ export CC=/opt/gcc-linaro-6.4.1-2017.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- |
For u-boot 2017.03, Linux 4.9.11 and Linux 4.9.88, use the following Linaro arm compilier.
Info | ||
---|---|---|
| ||
$ wget -c http://releases.linaro.org/components/toolchain/binaries/6.2-2016.11/arm-linux-gnueabihf/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf.tar.xz $ sudo tar -C /opt -xJf gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf.tar.xz $ export CC=/opt/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- |
For u-boot 2015.04 and Linux 4.1.15, use the following Linaro arm compilier.
Info | ||
---|---|---|
| ||
$ 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- |
For u-boot 2014.04, and Linux 3.14, use the following Linaro arm compilier.
Info | ||
---|---|---|
| ||
$ 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.
Info | ||
---|---|---|
| ||
|
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.
...
Clone the U-Boot source code from Embedian Git Server.
Download:
For u-boot v2018.03:
Info | ||
---|---|---|
| ||
$ git clone git@git.embedian.com:developer/smarc-t335x-uboot.git smarcfimx6-uboot $ cd smarcfimx6-uboot $ git checkout smarc-imx6_v2018.03_4.14.98_2.0.0_ga |
For u-boot v2017.03:
Info | ||
---|---|---|
| ||
$ 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 | ||
---|---|---|
| ||
$ 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 |
Configure and Build:
Info | ||
---|---|---|
| ||
$ make ARCH=arm CROSS_COMPILE=${CC} distclean $ make ARCH=arm CROSS_COMPILE=${CC} smarcfimx6_quad_1g_ser3_defconfig $ make ARCH=arm CROSS_COMPILE=${CC} |
Note | ||||
---|---|---|---|---|
| ||||
Note1: If the board is SMARC-FiMX6-Q-2G or SMARC-FiMX6-D-2G, use If the board is SMARC-FiMX6-Q-1G or SMARC-FiMX6-D-1G, use If the board is SMARC-FiMX6-U-1G, use If the board is SMARC-FiMX6-S, use If the board is SMARC-FiMX6-S-1G, use If the board is SMARC-FiMX6-QP-1G, use If the board is SMARC-FiMX6-QP-2G, use 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. |
For u-boot v2014.04:
Info | ||
---|---|---|
| ||
$ 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 | ||
---|---|---|
| ||
$ make ARCH=arm CROSS_COMPILE=${CC} distclean $ make ARCH=arm CROSS_COMPILE=${CC} smarcfimx6_quad_1g_ser3_config $ make ARCH=arm CROSS_COMPILE=${CC} |
Note | ||||
---|---|---|---|---|
| ||||
Note1: If the board is SMARC-FiMX6-Q-2G or SMARC-FiMX6-D-2G, use If the board is SMARC-FiMX6-Q-1G or SMARC-FiMX6-D-1G, use If the board is SMARC-FiMX6-U-1G, use If the board is SMARC-FiMX6-S, use 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 4.14.98 (Based on Freescale imx_4.14.98_2.0.0_ga official release):
Info | ||
---|---|---|
| ||
$ git clone git@git.embedian.com:developer/smarc-fsl-linux-kernel.git $ cd smarc-fsl-linux-kernel $ git checkout smarc-imx6_4.14.98_2.0.0_ga |
For 4.9.88 (Based on Freescale imx_4.9.88_2.0.0_ga official release):
Info | ||
---|---|---|
| ||
$ git clone git@git.embedian.com:developer/smarc-fsl-linux-kernel.git $ cd smarc-fsl-linux-kernel $ git checkout smarc-imx6_4.9.88_2.0.0_ga |
For 4.9.11 (Based on Freescale imx_4.9.11_1.0.0_ga official release):
Info | ||
---|---|---|
| ||
$ git clone git@git.embedian.com:developer/smarc-fsl-linux-kernel.git $ cd smarc-fsl-linux-kernel $ git checkout smarc-imx_4.9.11_1.0.0_ga |
For 4.1.15 (Based on Freescale imx_4.1.15_1.0.0_ga official release):
Info | ||
---|---|---|
| ||
$ 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 | ||
---|---|---|
| ||
$ 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 | ||
---|---|---|
| ||
$ 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 | ||
---|---|---|
| ||
$ 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 | ||
---|---|---|
| ||
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: For XGA (1024x768) LVDS panel: For WXGA (1366x768) LVDS panel: For 1080p (1920x1080) LVDS panel: |
Root File System
...
Ubuntu 16.04:
User | Password |
---|---|
root | root |
ubuntu | temppwd |
Ubuntu 16.04 Download:
Info | ||
---|---|---|
| ||
$ wget -c ftp://ftp.embedian.com/public/dev/minfs/ubuntu/xenial/imx6-ubuntu-16.04.2-armhf-2017-03-02.tar.gz |
Verify:
Info | ||
---|---|---|
| ||
$ 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:
User | Password |
---|---|
root | root |
debian | temppwd |
Debian 8 Download:
Info | ||
---|---|---|
| ||
$ wget -c ftp://ftp.embedian.com/public/dev/minfs/debian/jessie/imx6-debian-8.7-armhf-2017-03-02.tar.gz |
Verify:
Info | ||
---|---|---|
| ||
$ 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:
User | Password |
---|---|
root | root |
ubuntu | temppwd |
Ubuntu 14.04 Download:
Info | ||
---|---|---|
| ||
|
Verify:
Info | ||
---|---|---|
| ||
|
Yocto Build Root File System:
...
Find the yocto pre-built root file systems here at Embedian's ftp site based on your module CPU variants.
...
For these instruction, we are assuming: DISK=/dev/mmcblk0, "lsblk" is very useful for determining the device id.
Info | ||
---|---|---|
| ||
|
Erase SD card:
Info | ||
---|---|---|
| ||
$ |
Create Partition Layout:
With util-linux v2.26, sfdisk was rewritten and is now based on libfdisk.
Info | ||||
---|---|---|---|---|
| ||||
$ sudo sfdisk --version sfdisk from util-linux 2.27.1 |
Create Partitions:
Info | ||
---|---|---|
| ||
$ sudo sfdisk ${DISK} <<-__EOF__ 1M , 48M , 0x83 ,* ,,,- __EOF__ |
Info | ||
---|---|---|
| ||
$ sudo sfdisk --in-order --Linux --unit M ${DISK} <<-__EOF__ 1 , 48 , 0x83 ,* ,,,- __EOF__ |
Format Partitions:
Info | ||
---|---|---|
| ||
for : DISK=/dev/mmcblk0 $ sudo mkfs.vfat -F 16 ${DISK}p1 -n boot $ sudo mkfs.ext4 ${DISK}p2 -L rootfs for : DISK=/dev/sdX $ sudo mkfs.vfat -F 16 ${DISK} 1 -n boot $ sudo mkfs.ext4 ${DISK} 2 -L rootfs |
...
On some systems, these partitions may be auto-mounted...
Info | ||
---|---|---|
| ||
$ 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/ |
...
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 | ||||
---|---|---|---|---|
| ||||
$ sudo cp -v u-boot.imx /media/boot/u-boot.imx |
...
Stop at U-Boot command prompt (Press any key when booting up). Copy and Paste the following script under u-boot command prompt.
Info | ||||
---|---|---|---|---|
| ||||
U-Boot# mmc rescan U-Boot# sf write 0x10800000 0x0 60000 |
0xc0000; sf write 0x10800000 0x400 a0000 |
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 | ||||
---|---|---|---|---|
| ||||
$ sudo dd if=u-boot.imx of=${DISK} bs=512 seek=2 |
...
Info | ||||
---|---|---|---|---|
| ||||
#####HDMI###### console=ttymxc4,115200 |
Copy uEnv.txt to the boot partition:
Info | ||||
---|---|---|---|---|
| ||||
|
Install Kernel zImage
Copy zImage to the boot partition:
Info | ||||
---|---|---|---|---|
| ||||
|
Install Kernel Device Tree Binary
Info | ||
---|---|---|
| ||
|
Note | ||
---|---|---|
| ||
For XGA (1024x768) LVDS panel: For WXGA (1366x768) LVDS panel: For 1080p (1920x1080) LVDS panel: |
Install Root File System and Kernel Modules
...
Info | ||||
---|---|---|---|---|
| ||||
|
Ubuntu 14.04:
Info | ||||
---|---|---|---|---|
| ||||
|
Copy Kernel Modules:
Info | ||||
---|---|---|---|---|
| ||||
|
Note | ||
---|---|---|
| ||
|
...
Edit: /etc/network/interfaces
Info | ||
---|---|---|
| ||
|
Add:
Info | ||||
---|---|---|---|---|
| ||||
auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp |
Remove SD card:
Info | ||
---|---|---|
| ||
$ sync $ sudo umount /media/boot $ sudo umount /media/rootfs |
...
For these instruction, we are assuming: DISK=/dev/mmcblk0, "lsblk" is very useful for determining the device id.
Info | ||
---|---|---|
| ||
|
Mount Partitions:
On some systems, these partitions may be auto-mounted...
...
Copy zImage to rootfs partition:
Info | ||
---|---|---|
| ||
|
Note | ||
---|---|---|
| ||
|
Copy uEnv.txt to rootfs partition:
...
Info | ||
---|---|---|
| ||
#####HDMI###### console=ttymxc4,115200 |
Copy device tree blob to rootfs partition:
Info | ||
---|---|---|
| ||
$ sudo cp -v /media/boot/dtbs/imx6qp-smarcfimx6.dtb /media/rootfs/home/root/imx6qp-smarcfimx6.dtbdtb dtb |
Note | ||
---|---|---|
| ||
For WVGA (800x480) LVDS panel: For XGA (1024x768) LVDS panel: For WXGA (1366x768) LVDS panel: For 1080p (1920x1080) LVDS panel: |
Copy real rootfs to rootfs partition:
Yocto Built Root File Systems
Info | ||
---|---|---|
| ||
|
Ubuntu 14.04 Root File Systems
Info | ||
---|---|---|
| ||
Delete all contents starting with "SUBSYSTEM=="
|
Remove SD card:
Info | ||
---|---|---|
| ||
$ sync $ sudo umount /media/boot $ sudo umount /media/rootfs |
...
Create Partition Layout:
Info | ||
---|---|---|
| ||
1 1M , 48 48M , 0x83 ,* ,,,- __EOF__ |
Format Partitions:
...
Install binaries for partition 1
Copy uEnv.txt/zImage/*.dtb to dtb to the boot partition
Info | ||
---|---|---|
| ||
$ sudo cp -v zImage uEnv.txt /media/boot/ |
Install Kernel Device Tree Binary
Info | ||
---|---|---|
| ||
|
Install Root File System
...
Info | ||
---|---|---|
| ||
|
Unmount eMMC:
Info | ||
---|---|---|
| ||
$ 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 20152019-0611-1116