- Build and Install Linux System for SMARC-FiMX6 (Solo, Dual Lite, Dual and Quad Core)
- Availability
- Carrier Board
- Basic Resources
- ARM Cross Compiler: GCC
- Generating SSH Keys
- Bootloader: U-Boot
- Linux Kernel
- Root File System
- Setup SD Card
- Install Root File System and Kernel Modules
- Setup eMMC
- Install Root File System
Build and Install Linux System for SMARC-FiMX6 (Solo, Dual Lite, Dual and Quad Core)
This document provides instructions for advanced users how Embedian offers patches and builds a customized version of u-boot and linux kernel for Embedian's SMARC-FiMX6 product platform and how to install the images to bring the evaluation board up and running.
Our aim is to fully support our hardware through device drivers. We also provide unit tests so that testing a board is easy and custom development can start precisely.
Availability
SMARC-FiMX6 at Embedian
Carrier Board
SBC-SMART-BEE (module and carrier board) at Embedian
SBC-SMART-MEN (module and carrier board) at Embedian
EVK-STD-CARRIER (universal carrier board for all SMARC modules) at Embedian
Basic Resources
- 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.freescale.com/imx/linux-imx.git
- Freescale BSP meta layer: git://git.freescale.com/imx/meta-fsl-bsp-release
- OpenEmbedded/Yocto BSP layer for Freescale's ARM platform git://git.yoctoproject.org/meta-fsl-arm
- Embedian SMARC-FiMX6 kernel source tree for linux 3.14.28_1.0.0, 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/
ARM Cross Compiler: GCC
This is a pre-built (32bit) version of Linaro GCC that runs on generic linux, so 64bit users need to make sure they have installed the 32bit libraries for their distribution.
debian based | extra | pkgs: (sudo apt-get update ; sudo apt-get install xyz) |
---|---|---|
Ubuntu 12.04 |
| ia32-libs |
Debian 7 (Wheezy) | sudo dpkg --add-architecture i386 | libc6:i386 libstdc++6:i386 libncurses5:i386 zlib1g:i386 |
Ubuntu 12.10 -> 14.04 |
| libc6:i386 libstdc++6:i386 libncurses5:i386 zlib1g:i386 |
Red Hat/Centos/Fedora |
| libstdc++.i686 ncurses-devel.i686 zlib.i686 |
Red Hat based (rpm) | extra | pkgs: (yum install xyz) |
Red Hat/Centos/Fedora |
| libstdc++.i686 ncurses-devel.i686 zlib.i686 |
Ubuntu 12.04 |
| ia32-libs |
Ubuntu 12.10 -> 14.04 |
| libc6:i386 libstdc++6:i386 libncurses5:i386 zlib1g:i386 |
To build Embedian’s SMARC-FiMX6 u-boot and linux kernel, you will need to install the following Linaro arm compiler:
For u-boot 2018.03 and Linux 4.14.98, you need to use the following newer Linaro arm compilier.
For u-boot 2017.03, Linux 4.9.11 and Linux 4.9.88, use the following Linaro arm compilier.
For u-boot 2015.04 and Linux 4.1.15, use the following Linaro arm compilier.
For u-boot 2014.04, and Linux 3.14, use the following Linaro arm compilier.
Test:
If this test fails, verify that you have the 32bit libraries installed on your development system.
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.
Step 1. Check for SSH keys
First, we need to check for existing ssh keys on your computer. Open up Git Bash and run:
Check the directory listing to see if you have a file named either id_rsa.pub
or id_dsa.pub
. If you don't have either of those files go to step 2. Otherwise, you already have an existing keypair, and you can skip to step 3.
Step 2. Generate a new SSH key
To generate a new SSH key, enter the code below. We want the default settings so when asked to enter a file in which to save the key, just press enter.
Now you need to enter a passphrase.
Which should give you something like this:
Step 3. Add your SSH key to Embedian Gitlab Server
Copy the key to your clipboard.
Go to Embedian Git Server. At Profile Setting --> SSH Keys --> Add SSH Key
Paste your public key and press "Add Key" and your are done.
Bootloader: U-Boot
Clone the U-Boot source code from Embedian Git Server.
Download:
For u-boot v2018.03:
For u-boot v2017.03:
For u-boot v2015.04:
Configure and Build:
For u-boot v2014.04:
Configure and Build:
Linux Kernel
Download:
For 4.14.98 (Based on Freescale imx_4.14.98_2.0.0_ga official release):
For 4.9.88 (Based on Freescale imx_4.9.88_2.0.0_ga official release):
For 4.9.11 (Based on Freescale imx_4.9.11_1.0.0_ga official release):
For 4.1.15 (Based on Freescale imx_4.1.15_1.0.0_ga official release):
Configure and Build:
For 3.14.28 (Based on Freescale imx_3.14.28_1.0.0_ga official release):
Configure and Build:
Root File System
Ubuntu 16.04:
User | Password |
---|---|
root | root |
ubuntu | temppwd |
Ubuntu 16.04 Download:
Verify:
Debian 8.7:
User | Password |
---|---|
root | root |
debian | temppwd |
Debian 8 Download:
Verify:
Ubuntu 14.04:
User | Password |
---|---|
root | root |
ubuntu | temppwd |
Ubuntu 14.04 Download:
Verify:
Yocto Build Root File System:
User | Password |
---|---|
root | N/A |
Find the yocto pre-built root file systems here at Embedian's ftp site based on your module CPU variants.
Setup SD Card
For these instruction, we are assuming: DISK=/dev/mmcblk0, "lsblk" is very useful for determining the device id.
Erase SD card:
Create Partition Layout:
With util-linux v2.26, sfdisk was rewritten and is now based on libfdisk.
Create Partitions:
Format Partitions:
Mount Partitions:
On some systems, these partitions may be auto-mounted...
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. (Note: Rename u-boot-dtb.img to u-boot.img if your u-boot is v2017.03)
Fuse u-boot.imx to the SPI NOR flash.
Stop at U-Boot command prompt (Press any key when booting up). Copy and Paste the following script under u-boot command prompt.
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. (Note: Rename u-boot-dtb.img to u-boot.img if your u-boot is v2017.03)
uEnv.txt based bootscript
Create "uEnv.txt" boot script: ($ vim uEnv.txt)
Copy uEnv.txt to the boot partition:
Install Kernel zImage
Copy zImage to the boot partition:
Install Kernel Device Tree Binary
Install Root File System and Kernel Modules
Copy Root File System:
Yocto Pre-Built Rootfs:
Ubuntu 14.04:
Copy Kernel Modules:
Networking:
Edit: /etc/network/interfaces
Add:
Remove SD card:
Setup eMMC
Setting up eMMC usually is the last step at development stage after the development work is done at your SD card or NFS environments. From software point of view, eMMC is nothing but a non-removable SD card on board. For SMARC-FiMX6, the SD card is always emulated as /dev/mmcblk1 and on-module eMMC is always emulated as /dev/mmcblk3. Setting up eMMC now is nothing but changing the device descriptor.
This section gives a step-by-step procedure to setup eMMC flash. Users can write a shell script your own at production to simplify the steps.
First, we need to backup the final firmware from your SD card or NFS.
Prepare for eMMC binaries from SD card (or NFS):
Insert SD card into your Linux PC. For these instructions, we are assuming: DISK=/dev/mmcblk0, "lsblk" is very useful for determining the device id.
For these instruction, we are assuming: DISK=/dev/mmcblk0, "lsblk" is very useful for determining the device id.
Mount Partitions:
On some systems, these partitions may be auto-mounted...
Copy zImage to rootfs partition:
Copy uEnv.txt to rootfs partition:
Copy and paste the following contents to /media/rootfs/home/root ($ sudo vim /media/rootfs/home/root/uEnv.txt)
Copy device tree blob to rootfs partition:
Copy real rootfs to rootfs partition:
Yocto Built Root File Systems
Ubuntu 14.04 Root File Systems
Remove SD card:
Copy Binaries to eMMC from SD card:
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.
Erase SD card:
Create Partition Layout:
Format Partitions:
Mount Partitions:
Install binaries for partition 1
Copy uEnv.txt/zImage/*.dtb to the boot partition
Install Kernel Device Tree Binary
Install Root File System
Unmount eMMC:
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 2019-11-16