Versions Compared

Key

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

...

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.

...

To build Embedian’s SMARC-FiMX7 u-boot and linux kernel, you will need to install the Linaro arm compiler that is the same as that we build for SMARC-T335X, SMARC-T4378 and SMARC-FiMX6

For u-boot 2017.03 and Linux 4.9.11, use the following Linaro arm compilier. 

Info
iconfalse

$ wget -c https://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
iconfalse

$ wget -c https://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-

...

Clone the U-Boot source code from Embedian Git Server.

Download:
For u-boot v2017.03: 

Info
iconfalse

$ git clone git@git.embedian.com:developer/smarc-t335x-uboot.git smarcfimx6-uboot

$ cd smarcfimx6-uboot

$ git checkout smarc-imx7_v2017.03_4.9.11_1.0.0_ga

For u-boot v2016.03: 

Info
iconfalse

$ 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

...

Note
titleNote

Note1:

If the board is SMARC-FiMX7-S (Solo Core), use
$ make ARCH=arm CROSS_COMPILE=${CC} smarcfimx7s_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-FiMX7 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-FiMX7 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 4.9.11 (Based on Freescale imx_4.9.11_1.0.0_ga official release):

Info
iconfalse

$ 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
iconfalse

$ 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
iconfalse

$ 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

...

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
iconfalse
title~/smarcfimx7-uboot

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

...

Info
iconfalse
titleu-boot command prompt

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 8000086000

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
iconfalse
title~/smarcfimx7-uboot

$ sudo dd if=u-boot.imx of=${DISK} bs=512 seek=2 

...

Info
iconfalse

console=ttymxc2,115200
mmcdev=01
mmcpart=1
image=zImage
loadaddr=0x80800000
fdt_addr=0x83000000
mmcroot=/dev/mmcblk2p2 ro
mmcrootfstype=ext4 rootwait fixrtc
netdev=eth0
ethact=FEC0
ipaddr=192.168.1.150
serverip=192.168.1.53
gatewayip=192.168.1.254
mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs}
uenvcmd=run loadzimage; run loadfdt; run mmcboot

...

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, 32/0809/20172018

Last updated 20172018-0302-0809