Versions Compared

Key

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

...

...

To build Embedian’s smarct335x u-boot and linux kernel, you will need to install the Linaro arm compiler that TI used for their release: 
For

For u-boot 2014.04, u-boot 2014.07, Linux 3.2, Linux 3.12 and Linux 3.14, use the following newer v2017.01 and Linux kernel v4.9.41, use Linaro arm compilier that TI used in theirAMSDK 6 and AMSDK7..their Processor SDK 04.01.00.06

Info
iconfalse
$ wget -c http://releases.linaro.org/archive/13.04/components/toolchain/binaries/gcc-linaro-6.2-2016.11/arm-linux-gnueabihf/gcc-4.7-2013.04-20130415_linuxlinaro-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-4.7-2013.04-20130415_linux.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 https://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
$ export CC=/opt/sudo tar -C /opt -xJf gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf-4.7-2013.04-20130415_linux.tar.xz
$ export CC=/opt/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-

For  
For u-boot 2015.07 and Linux  and Linux 4.1.10, you need to use the following newer 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-


For 
u-boot v20162014.05 and Linux kernel v4.4.12, use 04u-boot 2014.07Linux 3.2, Linux 3.12 and Linux 3.14, use the following newer Linaro arm compilier that TI used in their Processor SDK 03.00.00.04theirAMSDK 6 and AMSDK7..

Info
iconfalse
$ wget httpswget http://releases.linaro.org/archive/13.04/components/toolchain/binaries/5.3-2016.02/gcc-linaro-arm-linux-gnueabihf/gcc-linaro-54.37-20162013.0204-x8620130415_64_arm-linux-gnueabihf.tar.xz
$ sudo tar -C /opt -xJf gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihfarm-linux-gnueabihf-4.7-2013.04-20130415_linux.tar.xz
$ export CC=/opt/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihfarm-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.

...

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

Download:

For u-boot v2014.04 (AMSDK6 and AMSDK7v2017.01 (Processor-SDK-04.01.00.06): 

Info
iconfalse
$ git clone git@git.embedian.com:developer/smarc-t335x-uboot.git
$ cd smarc-t335x-uboot
$ git checkout v2014v2017.0401-smarct33smarct3x
Note
iconfalse

For SBC-SMART-MEN

$ git checkout v2014.04-smartmen

If Boot up from eMMC, change #define CONFIG_SYS_MMC_ENV_DEV from 0 to 1 in include/configs/smarct335x_evm.h file and compile again.


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

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


For u-boot
v2014v2015.07 (Processor-SDK-0102.00.00.0300):  

Info
iconfalse
$ git clone git@git.embedian.com:developer/smarc-t335x-uboot.git
$ cd smarc-t335x-uboot
$ git checkout v2014v2015.07-smarct33

 

Note
iconfalse
If Boot up from eMMC, change mmcdev=0 to mmcdev=1 in include/configs/smarct335x_evm.h file and compile again.

Configure and Build:

Info
iconfalse
$ make ARCH=arm CROSS_COMPILE=${CC} distclean
$ make ARCH=arm CROSS_COMPILE=${CC} smarct335x_evm_uart3_configdefconfig
$ make ARCH=arm CROSS_COMPILE=${CC}


For u-boot
v2015v2014.07 (Processor-SDK-0201.00.00.0003): 

Download

Info
iconfalse
$ git clone git@git.embedian.com:developer/smarc-t335x-uboot.git
$ cd smarc-t335x-uboot
$ git checkout v2015v2014.07-smarct33

 


For u-boot
v2016v2014.05 (Processor-SDK-03.00.00.0404 (AMSDK6 and AMSDK7): 

Download

Info
iconfalse
$ git clone git@git.embedian.com:developer/smarc-t335x-uboot.git
$ cd smarc-t335x-uboot
$ git checkout v2016v2014.0504-smarct3xsmarct33
Note
iconfalse
For SBC-SMART-MEN
$ git checkout v2014.04-smartmen

Configure and Build:

Info
iconfalse
$ make ARCH=arm CROSS_COMPILE=${CC} distclean
$ make ARCH=arm CROSS_COMPILE=${CC} smarct335x_evm_uart3_defconfigconfig
$ make ARCH=arm CROSS_COMPILE=${CC}
Note
iconfalse

The uartx in u-boot config (defconfig) file is to specify the debug console outputs.

Linux Kernel

...

Download:

For 34.2 (AMSDK69.41 (Processor-SDK-04.01.00.06, Stable, LTS release): 

Info
iconfalse
$ git clone git@git.embedian.com:developer/linux-smarc-t335xti-v3linux-kernel.2.git
$ cd linux-smarc-t335x-v3.2ti-linux-kernel
$ git checkout v3.2_SMARCT335xPSP_smarct3x-processor-sdk-04.0601.00.11
Note
iconfalse

For board SBC-SMART-MEN:

$ git checkout v3.2_SBC_SMARTMEN

 

...

06


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

Info
iconfalse
$ makegit ARCH=arm CROSS_COMPILE=${CC} distcleanclone git@git.embedian.com:developer/smarc-ti-linux-kernel.git
$ make ARCH=arm CROSS_COMPILE=${CC} smarc_t335x_defconfigcd smarc-ti-linux-kernel
$ makegit ARCH=arm CROSS_COMPILE=${CC} uImage modules

 

...

checkout smarct3x-processor-sdk-linux-03.00.00.04


For 4.1.y (Processor-SDK-02.00.01.07, Stable, LTS):

Info
iconfalse
$ git clone git@git.embedian.com:developer/smarc-ti-linux-kernel.git
$ cd smarc-ti-linux-kernel
$ git checkout smarcsmarct3x-tiprocessor-sdk-linux-302.1200.y01

 


For 3.14.y (Processor-SDK-01.00.00.03, Stable, LTS):

Info
iconfalse
$ git clone git@git.embedian.com:developer/smarc-ti-linux-kernel.git
$ cd smarc-ti-linux-kernel
$ git checkout smarc-ti-linux-3.14.y

 


For 43.112.y (Processor-SDK-02.00.01.07AMSDK7, Stable, LTS):

Info
iconfalse
$ git clone git@git.embedian.com:developer/smarc-ti-linux-kernel.git
$ cd smarc-ti-linux-kernel
$ git checkout smarct3xsmarc-processorti-sdk-linux-023.0012.01

...

y


Configure and Build (v3.12 and later):

Info
iconfalse
$ make ARCH=arm CROSS_COMPILE=${CC} distclean
$ make ARCH=arm CROSS_COMPILE=${CC} smarc_t335x_defconfig
$ make ARCH=arm CROSS_COMPILE=${CC} zImage modules am335x-smarct335x.dtb


For 3.2 (AMSDK6, Stable, LTS release):

Info
iconfalse
$ git clone git@git.embedian.com:developer/linux-smarc-tit335x-linux-kernelv3.2.git
$ cd linux-smarc-ti-linux-kernelt335x-v3.2
$ git checkout smarct3x-processor-sdk-linux-03.00.00.04

...

v3.2_SMARCT335xPSP_04.06.00.11
Note
iconfalse

For board SBC-SMART-MEN:

$ git checkout v3.2_SBC_SMARTMEN


Configure and Build:

Info
iconfalse
$ make ARCH=arm CROSS_COMPILE=${CC} distclean
$ make ARCH=arm CROSS_COMPILE=${CC} smarc_t335x_defconfig
$ make ARCH=arm CROSS_COMPILE=${CC} zImageuImage modules am335x-smarct335x.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 for kernel 3.14, kernel 4.1, kernel 4.4 and kernel 4.49, after you clone the kernel sources, copy the firmware elf binary into the firmware/ folder of kernel sources

...

and make the kernel again.

 

Root File System

...

Arago:

UserPassword
rootN/A

...

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

Verify:

Info
iconfalse

$ md5sum smarcsmarct3x-ubuntu14ubuntu-14.04.tar.gz

e883c8fca4ab5c6e396ee54202f20e3505db5b85224e84e9898a1c5925703b8b  smarc-ubuntu14.04.tar.gz

...

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/

...

Info
iconfalse
title~/uEnv.txt

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

loadaddr=0x82000000
initrd_addr=0x88080000
fdtaddr=0x88000000
fdtfile=am335x-smarct335x.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=ttyO3ttyS3,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

Note

For kernel 3.1412.y and after, the serial port device descriptor changes from ttyS to ttyO to ttyS

The above uEnv.txt file needs to change accordingly. (ttyO3 ttyS3 --> ttyS3ttyO3)

SD card will always be emulated as /dev/mmcblk1 at kernel 3.12 and newer version 

...

Info
iconfalse
titledirectory where your root file system is

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

 


Ubuntu 14.04:

Info
iconfalse
titledirectory where your root file system is

$ sudo tar xvfz smarc-ubuntu14.04.tar.gz -C /media/rootfs

...

Info
iconfalse

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

loadaddr=0x82000000
initrd_addr=0x88080000
fdtaddr=0x88000000
fdtfile=am335x-smarct335x.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=ttyO3ttyS3,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

Note

For kernel 3.1412.y and after, the serial port device descriptor changes from ttyS to ttyO to ttyS

The above uEnv.txt file needs to change accordingly. (ttyO3 ttyS3 --> ttyS3ttyO3)

The uEnv.txt file only changes mmcroot from /dev/mmcblk1 (SD) to /dev/mmcblk0 (eMMC)

 


Copy real rootfs to rootfs partition:

Info
iconfalse

$ pushd /media/rootfs

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

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

$ popd

 


Remove SD card:

Info
iconfalse
$ sync
$ sudo umount /media/boot
$ sudo umount /media/rootfs

...

Info
iconfalse

$ export DISK=/dev/mmcblk0

Erase SD cardeMMC Flash:

Info
iconfalse

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

...

Info
iconfalse
$ sudo sfdisk --in-order --Linux --unit M ${DISK} <<-__EOF__
1,48,0xE,*
,,,-
__EOF__

 


In SDK6, Arago rootfs will mount partition2 as /media/mmcblk0p2 automatically after executing the above command. Umount the partition first.

...

Info
iconfalse

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

 

Note
iconfalse

The U-Boot for SD Boot up and eMMC Boot up has one line difference in include/configs/smarct335x_evm.h. The mmcdev is 0 for SD boot up and is 1 for eMMC boot up.


Only for v3.12.y or after:

Install Kernel Device Tree Binary

 

Info
iconfalse

$ sudo mkdir -p /media/boot/dtbs

$ sudo cp -v am335x-smarct335x.dtb /media/boot/dtbs

 

Install Root File System

...

Info
iconfalse

$ sudo tar -zxvf smarct335x-emmc-rootfs.tar.gz -C /media/rootfs

 

Unmount eMMC:

 
Info
iconfalse
$ sync
$ sudo umount /media/boot
$ sudo umount /media/rootfs
Note

If your rootfs id Ubuntu, you need to modify /media/rootfs/etc/fstab and change the mount point from /dev/mmcblk1p2 to /dev/mmcblk0p2 before un-mounting it.

Switch your Boot Select to eMMC and you will be able to boot up from eMMC now.


Last updated 20162018-0802-2409