Versions Compared

Key

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

...

debian basedextrapkgs: (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


For u-boot v2017.01 and Linux kernel v4.9.41, use Linaro arm compilier that TI used in their Processor SDK 04.01.00.06

Info
iconfalse
$ wget -c http://releases.linaro.org/components/toolchain/binaries/6.2-2016.11/arm-linux-gnueabihf/gcc-linaro-6.2.1-2016.11-i686_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 v2016.05 and Linux kernel v4.4.12, use Linaro arm compilier that TI used in their Processor SDK 03.00.00.04

Info
iconfalse
$ wget -c http://releases.linaro.org/components/toolchain/binaries/5.3-2016.02/arm-linux-gnueabihf/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz
$ sudo tar -C /opt -xJf gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz
$ export CC=/opt/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-


For u-boot v2015.07 and Linux kernel v4.1.10, use Linaro arm compilier that TI used in their Processor SDK 02.00.01.07

Info
iconfalse
$ wget -c
https
 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.

Info
iconfalse

$ ${CC}gcc --version
arm-linux-gnueabihf-gcc (crosstool-NG linaro-1.13.1-4.7-2013.04-20130415 - Linaro GCC 2013.04) 4.7.3 20130328 (prerelease)
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

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 v2017.01 (Processor-SDK-04.01.00.06): 

Info
iconfalse
$ git clone git@git.embedian.com:developer/smarc-t335x-uboot.git smarc-t437x-uboot
$ cd smarc-t437x-uboot
$ git checkout v2017.01-smarct4x


For u-boot v2016.05 (Processor-SDK-03.00.00.04):
 

Info
iconfalse
$ git clone git@git.embedian.com:developer/smarc-t335x-uboot.git smarc-t437x-uboot
$ cd smarc-t437x-uboot
$ git checkout v2016.05-smarct4x


For u-boot v2015.07 (Processor-SDK-02.00.
0001.0007): 

Download

Info
iconfalse
$ git clone git@git.embedian.com:developer/smarc-t335x-uboot.git smarc-t437x-uboot
$ cd smarc-t437x-uboot
$ git checkout v2015.07-smarct4x


Configure and Build:

Info
iconfalse
$ make ARCH=arm CROSS_COMPILE=${CC} distclean
$ make ARCH=arm CROSS_COMPILE=${CC} smarct437x_evm_spi_uart3_defconfig
$ make ARCH=arm CROSS_COMPILE=${CC}
Note
  1. If users use other uart ports as their debug port, simply change uart3 to other index.
  2. The SMARC-T4378 module always boot up from the onboard SPI NOR flash. The factory default will be MLO.byteswap and u-boot.img 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-T4378 module will boot up to carrier SD card. If TEST# pin is shunt crossed to ground, the config will be:

$ make ARCH=arm CROSS_COMPILE=${CC} smarct437x_evm_uart3_defconfig

Linux Kernel

...

Download:

For 4.9.41 (Processor-SDK-04.01.00.06, Stable, LTS):

Info
iconfalse
$ git clone git@git.embedian.com:developer/smarc-ti-linux-kernel.git
$ cd smarc-ti-linux-kernel
$ git checkout smarct4x-processor-sdk-04.01.00.06


For 4.4.12 (Processor-SDK-03.00.00.04, Stable, LTS):

Info
iconfalse
$ git clone git@git.embedian.com:developer/smarc-ti-linux-kernel.git
$ cd smarc-ti-linux-kernel
$ git checkout smarct4x-processor-sdk-linux-03.00.00.04
Note

SMARC-T4378-800 variant and SMARC-T4378-01G both share the same kernel branch "smarct4x-processor-sdk-linux-03.00.00.04" at Linux kernel v4.4.12 and "smarct4x-processor-sdk-04.01.00.06" at Linux kernel v4.9.41.


For 4.1.13 (Processor-SDK-02.00.0001.0107, Stable, LTS):

Info
iconfalse
$ git clone git@git.embedian.com:developer/smarc-ti-linux-kernel.git
$ cd smarc-ti-linux-kernel
$ git checkout smarct4x-800-processor-sdk-linux-02.00.01
Note

Branch "smarct4x-800-processor-sdk-linux-02.00.01" is for SMARC-T4378-800 variant. If users use SMARC-T4378-01G, use "smarct4x-processor-sdk-linux-02.00.01" branch instead.

$ git checkout smarct4x-processor-sdk-linux-02.00.01 

Configure and Build

Info
iconfalse
$ make ARCH=arm CROSS_COMPILE=${CC} distclean
$ make ARCH=arm CROSS_COMPILE=${CC} smarct437x_defconfig
$ make ARCH=arm CROSS_COMPILE=${CC} zImage modules am437x-smarct437x.dtb

Note:

  • The kernel sources packaged in this release do not have the required PM firmware binary already copied in the firmware/ folder of the kernel sources. Due to this building the kernel using the default kernel configuration will fail with this error:

...


To resolve this issue
, after you clone the kernel sources, copy the am335x-pm-firmware.elf and am43x-evm-scale-data.bin into the firmware/ folder of kernel sources

Info
iconfalse
$ cd smarc-ti-linux-kernel/firmware
$ wget http://developer.embedian.com/download/attachments/24608772/am335x-pm-firmware.elf
$ wget http://developer.embedian.com/download/attachments/24608772/am43x-evm-scale-data.bin
  • If you see the error message like this:

...

Arago:

UserPassword
rootN/A

Processor-SDK-0204.01.00.06 Download:

Info
iconfalse
$ wget -c ftp://ftp.embedian.com/public/dev/minfs/arago/processor_sdk_04.01.00.06/smarct437x-rootfs-image-smarct437x.tar.xz

Verify:

Info
iconfalse
$ md5sum smarct437x-rootfs-image-smarct437x.tar.xz
31bf748e3a07b17c7c3a2f2e6ede63ba  smarct437x-rootfs-image-smarct437x.tar.xz


Processor-SDK-03.00.00.04 Download:

Info
iconfalse
$ wget -c ftp://ftp.embedian.com/public/dev/minfs/arago/processor_sdk_03.00.00.04/smarct437x-rootfs-image-smarct437x.tar.gz

Verify:

Info
iconfalse
$ md5sum smarct437x-rootfs-image-smarct437x.tar.gz
6f109f7d2d36866e54c4b15fcdc6603c  smarct437x
530c96d0430107c90c837a9c5f70ec8f  smarct437x-rootfs-image-smarct437x.tar.gz


Ubuntu 14Processor-SDK-02.00.01.07 Download:

Info
iconfalse
$ wget -c ftp://ftp.embedian.com/public/dev/minfs/arago/processor_sdk_02.00.01.07/smarct437x-rootfs-image-smarct437x.tar.gz
Verify:
Info
iconfalse
$ md5sum smarct437x-rootfs-image-smarct437x.tar.gz
06a996ef1c349d5784bdbe9e381b51ed  smarct437x-rootfs-image-smarct437x.tar.gz

Ubuntu 16.04:

UserPassword
rootroot
ubuntutemppwd

Download:

Info
iconfalse
$ wget -c ftp://ftp.embedian.com/public/dev/minfs/ubuntu/xenial/smarct4x-ubuntu-16.04.tar.gz

Verify:

Info
iconfalse

$ md5sum smarct4x-ubuntu-16.04.tar.gz

ab3e068528a4a3f74b1bbd49e27250f1  smarct4x-ubuntu-16.04.tar.gz

 

Ubuntu 14.04:

UserPassword
rootroot
ubuntutemppwd

Download:

Info
iconfalse
$ wget -c ftp://ftp.embedian.com/public/dev/minfs/ubuntu/trusty/smarct4x-ubuntu-14.04.tar.gz

Verify:

Info
iconfalse

$ md5sum smarc4x-ubuntu-14.04.tar.gz

2ef6477f7e506e651c2c8a7b4290fefc2ef6477f7e506e651c2c8a7b4290fefc   smarct4xsmarct4x-ubuntu-14.04.tar.gz

Setup SD Card

...

Info
iconfalse

$ sudo dd if=/dev/zero of=${DISK} bs=1M count=16

Create Partition Layout:

With util-linux v2.26, sfdisk was rewritten and is now based on libfdisk.

Info
iconfalse
titlesfdisk
$ sudo sfdisk --version
sfdisk from util-linux 2.27.1

Create Partitions:

Info
titlesfdisk >=2.26.x
$ sudo sfdisk ${DISK} <<-__EOF__
1M,48M,0xE,*
,,,-
__EOF__
Info
titlesfdisk <=2.25
$ sudo sfdisk --in-order --Linux --unit M ${DISK} <<-__EOF__
1,48,0xE,*
,,,-
__EOF__

Format Partitions:

Info
iconfalse
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
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/

...

The MLO.byteswap and u-boot.img is pre-installed in SPI NOR flash at factory default. SMARC-T4378 is designed to always boot upi up from SPI NOR flash and to load zImage, device tree blob and root file systems based on the device 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 MLO.byteswap/u-boot.img to the first boot partition of your SD card.

Info
iconfalse
title~/smarc-t437x-uboot

$ sudo cp -v MLO.byteswap /media/boot/
$ sudo cp -v u-boot.img /media/boot/spi-u-boot.img 

...

Copy MLO/u-boot.img to the first boot partition of your SD card.

Info
iconfalse
title~/smarc-t437x-uboot

$ sudo cp -v MLO /media/boot/
$ sudo cp -v u-boot.img /media/boot/ 

...

Info
iconfalse
title~/uEnv.txt

optargs="consoleblank=0 mem=512M"
#u-boot eMMC specific overrides; Angstrom Distribution (SMARC-T437X) 2014-05-20
kernel_file=zImage
initrd_file=initrd.img

loadaddr=0x82000000
initrd_addr=0x88080000
fdtaddr=0x88000000
fdtfile=am437x-smarct437x.dtb 

initrd_high=0xffffffff
fdt_high=0xffffffff

loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${kernel_file}
loadinitrd=load mmc ${mmcdev}:${mmcpart} ${initrd_addr} ${initrd_file}; setenv initrd_size ${filesize}
loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdtaddr} /dtbs/${fdtfile}
#

##Un-comment to enable systemd in Debian Wheezy
#optargs=quiet init=/lib/systemd/systemd

console=ttyS3ttyS4,115200n8
mmcroot=/dev/mmcblk1p2 ro
mmcrootfstype=ext4 rootwait fixrtc

mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs}

#zImage:
uenvcmd=run loadimage; run loadfdt; run mmcargs; bootz ${loadaddr} - ${fdtaddr}

#zImage + uInitrd: where uInitrd has to be generated on the running system.
#boot_fdt=run loadimage; run loadinitrd; run loadfdt
#uenvcmd=run boot_fdt; run mmcargs; bootz ${loadaddr} ${initrd_addr}:${initrd_size} ${fdtaddr}

###Begin Rootfs from NFS
#serverip=192.168.1.51
#rootpath=/srv/nfs/smarct335x/ubuntu1204/
#nfsopts=nolock,acdirmin=60
#netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
##netboot=echo Loading kernel from SDCARD and booting from NFS ...; run loadimage; run netargs; bootz ${loadaddr} - ${fdtaddr}
##uenvcmd=run netboot
###End Rootfs from NFS

###Begin Load kernel from TFTP
#netmask=255.255.255.0
#ipaddr=192.168.1.65
#serverip=192.168.1.51
#netboot=echo Loading kernel and device tree from TFTP and booting from NFS ...; setenv autoload no; tftp ${loadaddr} ${kernel_file}; tftp ${fdtaddr} ${fdtfile}; run netargs; bootz ${loadaddr} - ${fdtaddr}
#uenvcmd=run netboot
###End Load kernel from TFTP

...

Info
iconfalse
title~/smarc-ti-linux-kernel

$ sudo cp -v arch/arm/boot/zImage /media/boot

Install Kernel Device Tree Binary

Info
iconfalse
$ sudo mkdir -p /media/boot/dtbs
$ sudo cp -v arch/arm/boot/dts/am437x-smarct437x.dtb /media/boot/dtbs

Install Root File System and Kernel Modules

...

Copy Root File System:

Processor-SDK-02.00.0001.0007:

Info
iconfalse
titledirectory where your root file system is

$ sudo tar xvfz smarct437x-rootfs-image-smarct437x.tar.gz -C /media/rootfs

Ubuntu 14.04:

Info
iconfalse
titledirectory where your root file system is

$ sudo tar xvfz smarct4x-ubuntu-14.04.tar.gz -C /media/rootfs

Copy Kernel Modules:

Info
iconfalse
title~/smarc-ti-linux-kernel

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

Networking:

Edit: /etc/network/interfaces

Info
iconfalse
$ sudo vim /media/rootfs/etc/network/interfaces

Add:

Info
iconfalse
title/media/rootfs/etc/network/interfaces

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
iconfalse

$ export DISK=/dev/mmcblk0

Mount Partitions:

On some systems, these partitions may be auto-mounted...

...

Copy zImage to rootfs partition:

Info
iconfalse

$ sudo cp -v /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

...

Info
iconfalse
title~/uEnv.txt

optargs="consoleblank=0 mem=512M"
#u-boot eMMC specific overrides; Angstrom Distribution (SMARC-T437X) 2014-05-20
kernel_file=zImage
initrd_file=initrd.img

loadaddr=0x82000000
initrd_addr=0x88080000
fdtaddr=0x88000000
fdtfile=am437x-smarct437x.dtb 

initrd_high=0xffffffff
fdt_high=0xffffffff

loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${kernel_file}
loadinitrd=load mmc ${mmcdev}:${mmcpart} ${initrd_addr} ${initrd_file}; setenv initrd_size ${filesize}
loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdtaddr} /dtbs/${fdtfile}
#

##Un-comment to enable systemd in Debian Wheezy
#optargs=quiet init=/lib/systemd/systemd

console=ttyS3ttyS4,115200n8
mmcroot=/dev/mmcblk0p2 ro
mmcrootfstype=ext4 rootwait fixrtc

mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs}

#zImage:
uenvcmd=run loadimage; run loadfdt; run mmcargs; bootz ${loadaddr} - ${fdtaddr}

#zImage + uInitrd: where uInitrd has to be generated on the running system.
#boot_fdt=run loadimage; run loadinitrd; run loadfdt
#uenvcmd=run boot_fdt; run mmcargs; bootz ${loadaddr} ${initrd_addr}:${initrd_size} ${fdtaddr}

###Begin Rootfs from NFS
#serverip=192.168.1.51
#rootpath=/srv/nfs/smarct335x/ubuntu1204/
#nfsopts=nolock,acdirmin=60
#netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
##netboot=echo Loading kernel from SDCARD and booting from NFS ...; run loadimage; run netargs; bootz ${loadaddr} - ${fdtaddr}
##uenvcmd=run netboot
###End Rootfs from NFS

###Begin Load kernel from TFTP
#netmask=255.255.255.0
#ipaddr=192.168.1.65
#serverip=192.168.1.51
#netboot=echo Loading kernel and device tree from TFTP and booting from NFS ...; setenv autoload no; tftp ${loadaddr} ${kernel_file}; tftp ${fdtaddr} ${fdtfile}; run netargs; bootz ${loadaddr} - ${fdtaddr}
#uenvcmd=run netboot
###End Load kernel from TFTP

...

Copy device tree blob to rootfs partition:

Info
iconfalse
$ sudo cp -v /media/boot/dtbs/am437x-smarct437x.dtb /media/rootfs/home/root/am437x-smarct437x.dtb 

Copy real rootfs to rootfs partition:

Yocto Built Root File Systems

Info
iconfalse

$ pushd /media/rootfs

$ sudo tar cvfz ~/smarct437x-emmc-rootfs.tar.gz .

$ sudo mv ~/smarct437x-emmc-rootfs.tar.gz /media/rootfs/home/root

$ popd

Ubuntu 14.04 Root File Systems

Info
iconfalse

$ sudo vim /media/rootfs/etc/udev/rules.d/70-persistent-net.rules

Delete all contents starting with "SUBSYSTEM=="

$ pushd /media/rootfs

$ sudo tar cvfz ~/smarct437x-emmc-rootfs.tar.gz .

$ sudo mv ~/smarct437x-emmc-rootfs.tar.gz /media/rootfs/home/root

$ popd

Remove SD card:

Info
iconfalse
$ 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/mmcblk0 now. (SD card will be /dev/mmcblk1)

Info
iconfalse

$ export DISK=/dev/mmcblk0

Erase SD card:

Info
iconfalse

$ sudo dd if=/dev/zero of=${DISK} bs=1M count=16

...

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

Info
iconfalse

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

Install Kernel Device Tree Binary

Info
iconfalse
$ sudo mkdir -p /media/boot/dtbs
$ sudo cp -v am437x-smarct437x.dtb /media/boot/dtbs

Install Root File System

...

Info
iconfalse
$ sudo tar -zxvf smarct437x-emmc-rootfs.tar.gz -C /media/rootfs

 

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 SPI NOR flash and import u-boot environmental parameters and load kernel zImage and device tree blob from eMMC now.

==End of Document==


Last updated 20162018-110-2604