...
- 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-FiMX7 kernel source tree for linux rel_imx_4.1.15_1.2.0_ga : git@gitand imx_4.9.11_1.0.0_ga: 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/
...
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-FiMX7 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, SMARC-T4378 and SMARC-FiMX6: first:
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, you need to use the following newer 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 2016.03 and Linux 4.1.15, you need to use the following newer Linaro arm compilier.
Info | ||
---|---|---|
| ||
$ wget -chttps 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- |
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 v2018.03:
Info | ||
---|---|---|
| ||
$ git clone git@git.embedian.com:developer/smarc-t335x-uboot.git smarcfimx7-uboot $ cd smarcfimx7-uboot $ git checkout smarc-imx7_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 smarcfimx7-uboot $ cd smarcfimx7-uboot $ git checkout smarc-imx7_v2017.03_4.9.11_1.0.0_ga |
For u-boot v2016.03:
Info | ||
---|---|---|
| ||
$ git clone git@git.embedian.com:developer/smarc-t335x-uboot.git smarcfimx7-uboot $ cd smarcfimx7-uboot $ git checkout smarc-rel_imx_4.1.15_2.0.0_ga |
Configure and Build:
Info | ||
---|---|---|
| ||
$ make ARCH=arm CROSS_COMPILE=${CC} distclean $ make ARCH=arm CROSS_COMPILE=${CC} smarcfimx7d_ser3_defconfig $ make ARCH=arm CROSS_COMPILE=${CC} |
Note | ||||
---|---|---|---|---|
| ||||
Note1:
Note 2:
Note 3:
|
...
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-imx7_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-imx7_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-imx7_4.9.11_1.0.0_ga |
For 4.1.15 (Based on Freescale imx_4.1.15_1.2.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-rel_imx_4.1.15_1.2.0_ga |
Configure and Build:
Configure and Build:
Info | ||
---|---|---|
| ||
$ make ARCH=arm CROSS_COMPILE=${CC} distclean $ make ARCH=arm CROSS_COMPILE=${CC} smarcfimx7_defconfig $ make ARCH=arm CROSS_COMPILE=${CC} zImage modules imx7s-smarcfimx7.dtb imx7d-smarcfimx7.dtb |
Note | ||
---|---|---|
| ||
Note1: If the board is Solo Core, the device tree blob is imx7s-smarcfimx7.dtb. If the board is Dual Core, the device tree blob is imx7d-smarcfimx7.dtb |
...
Info | ||
---|---|---|
| ||
$ wget -c ftp://ftp.embedian.com/public/dev/minfs/ubuntu/xenial/imx7-ubuntu-16.04.2-armhf-2017-03-02.tar.gz |
...
Info | ||
---|---|---|
| ||
$ wget -c ftp://ftp.embedian.com/public/dev/minfs/debian/jessie/imx7-debian-8.7-armhf-2017-03-02.tar.gz |
...
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 | ||
---|---|---|
| ||
$ |
...
Copy u-boot.imx to the boot partition. (Note: Rename u-boot-dtb.img to u-boot.img if your u-boot is v2018.03 or v2017.03)
Info | ||||
---|---|---|---|---|
| ||||
$ sudo cp -v u-boot.imx /media/boot/u-boot.imx |
...
Info | ||||
---|---|---|---|---|
| ||||
U-Boot# mmc rescan; mmc dev; load mmc 0:1 0x90800000 u-boot.imx; sf probe; sleep 2; sf erase 0 0xc0000; sf write 0x90800000 0x400 80000c0000 |
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 v2018.03 or v2017.03)
Info | ||||
---|---|---|---|---|
| ||||
$ sudo dd if=u-boot.imx of=${DISK} bs=512 seek=2 |
...
Info | ||||
---|---|---|---|---|
| ||||
$ |
Install Kernel Device Tree Binary
...
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 |
...
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...
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 zImage to rootfs partition:
Info | ||
---|---|---|
| ||
|
Note | ||
---|---|---|
| ||
|
...
Info | ||
---|---|---|
| ||
console=ttymxc2,115200 |
Copy device tree blob to rootfs partition:
Info | ||
---|---|---|
| ||
|
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 |
...
Now it will be almost the same as you did when setup your SD card, but the eMMC device descriptor is /dev/mmcblk2 now.
Info | ||
---|---|---|
| ||
$ |
Erase SD card:
Info | ||
---|---|---|
| ||
$ |
...
Install Kernel Device Tree Binary
Info | ||
---|---|---|
| ||
|
Install Root File System
...
Info | ||
---|---|---|
| ||
$ sudo tar -zxvf smarcfimx7-emmc-rootfs.tar.gz -C /media/rootfs |
...
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/08/2017
Last updated 20172019-0311-08