...
- 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
- Linux omap tree: http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap.git
- TI Linux source tree: http://git.ti.com/git/ti-linux-kernel/ti-linux-kernel.git
- TI’s overall Processor SDK build and test process: http://arago-project.org/git/projects/tisdk-build-scripts.git
- Arago Project TI Staging tree: http://arago-project.org/git/projects/?p=linux-am33x.git;a=shortlog;h=refs/heads/v3.2-staging
- Embedian smarc-t335x kernel source tree for linux 3.2: http://git.embedian.com/developer/linux-smarc-t335x-v3.2.git
- Embedian smarc-t335x kernel source tree for linux 3.12 and after: http://git.embedian.com/developer/smarc-ti-linux-kernel
- ARM based rootfs
- Debian Squeeze: http://www.debian.org/
- Debian Squeeze: http://www.debian.org/
...
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]v2017.01 and Linux kernel v4.9.41, use Linaro arm compilier that TI used in their Processor SDK 04.01.00.06
Info | ||
---|---|---|
| ||
$ 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 | ||
---|---|---|
| ||
$ wget 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 $ 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 or newer, you need to use the following newer Linaro arm compilier that TI used in their Processor SDK 02.00.01.07.
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- |
For u-boot 2014.04, u-boot 2014.07, Linux 3.2, Linux 3.12 and Linux 3.14, use the following newer Linaro arm compilier that TI used in theirAMSDK 6 and AMSDK7..
Info | ||
---|---|---|
| ||
$ wget http://releases.linaro.org/archive/13.04/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux.tar.xz $ sudo tar -C /opt -xJf gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux.tar.xz $ export CC=/opt/gcc-linaro-arm-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.
Info | ||
---|---|---|
| ||
|
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 v2014.04 (AMSDK6 and AMSDK7v2017.01 (Processor-SDK-04.01.00.06):
Info | ||
---|---|---|
| ||
$ git clone git@git.embedian.com:developer/smarc-t335x-uboot.git $ cd smarc-t335x-uboot $ git checkoutv2014 v2017.04 01-smarct33 smarct3x |
Note | ||
---|---|---|
| ||
For SBC-SMART-MEN $ git checkout v2014.04-smartmenIf 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 | ||
---|---|---|
| ||
$ 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 | ||
---|---|---|
| ||
$ git clone git@git.embedian.com:developer/smarc-t335x-uboot.gitv2014 v2015.07-smarct33 |
Note | ||
---|---|---|
| ||
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 | ||
---|---|---|
| ||
$ make ARCH=arm CROSS_COMPILE=${CC} distclean $ make ARCH=arm CROSS_COMPILE=${CC} smarct335x_evm_uart3_config defconfig $ make ARCH=arm CROSS_COMPILE=${CC} |
For u-boot v2015v2014.07 (Processor-SDK-0201.00.00.0003):
Download
Info | ||
---|---|---|
| ||
$ git clone git@git.embedian.com:developer/smarc-t335x-uboot.gitv2015 v2014.07-smarct33 |
For u-boot v2014.04 (AMSDK6 and AMSDK7):
Info | ||
---|---|---|
| ||
$ git clone git@git.embedian.com:developer/smarc-t335x-uboot.git |
Note | ||
---|---|---|
| ||
For SBC-SMART-MEN $ git checkout v2014.04-smartmen |
Configure and Build:
Info | ||
---|---|---|
| ||
$ make ARCH=arm CROSS_COMPILE=${CC} distcleandefconfig config |
Note | ||
---|---|---|
| ||
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 | ||
---|---|---|
| ||
$ git clone git@git.embedian.com:developer/linux- smarc- t335xti-v3 linux-kernel.2. git $ cdlinux- smarc-t335x-v3.2 ti-linux-kernel $ gitcheckout v3.2_SMARCT335xPSP_04.06 checkout smarct3x-processor-sdk-04.01.00.11 |
Note | ||
---|---|---|
| ||
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 | ||
---|---|---|
| ||
$ make ARCH=arm CROSS_COMPILE=${CC} distclean $ make ARCH=arm CROSS_COMPILE=${CC} smarc_t335x_defconfig $ make ARCH=arm CROSS_COMPILE=${CC} uImage modules |
...
git clone git@git.embedian.com:developer/smarc-ti-linux-kernel.git |
For 4.1.y (Processor-SDK-02.00.01.07, Stable, LTS):
Info | ||
---|---|---|
| ||
$ git clone git@git.embedian.com:developer/smarc-ti-linux-kernel.git $ cd smarc-ti-linux-kernel $ git checkoutsmarc smarct3x-ti processor-sdk-linux-3 02.12 00.y 01 |
For 3.14.y (Processor-SDK-01.00.00.03, Stable, LTS):
Info | ||
---|---|---|
| ||
$ 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 | ||
---|---|---|
| ||
$ git clone git@git.embedian.com:developer/smarc-ti-linux-kernel.git $ cd smarc-ti-linux-kernel $ git checkoutsmarct3x smarc-processor ti-sdk- linux- 023.00 12.01 y |
Configure and Build (v3.12 and later):
Info | ||
---|---|---|
| ||
$ 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 | ||
---|---|---|
| ||
$ git clone git@git.embedian.com:developer/linux-smarc-t335x-v3.2.git $ cd linux-smarc-t335x-v3.2 $ git checkout v3.2_SMARCT335xPSP_04.06.00.11 |
Note | ||
---|---|---|
| ||
For board SBC-SMART-MEN: $ git checkout v3.2_SBC_SMARTMEN |
Configure and Build:
Info | ||
---|---|---|
| ||
$ make ARCH=arm CROSS_COMPILE=${CC} distclean $ make ARCH=arm CROSS_COMPILE=${CC} smarc_t335x_defconfig $ make ARCH=arm CROSS_COMPILE=${CC} uImage modules |
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.2, after you clone the kernel sources, copy the firmware binary into the firmware/ folder of kernel sources
Info | ||
---|---|---|
| ||
$ cd linux-smarc-t335x-v3.2/firmware $ wget http://developer.embedian.com/download/attachments/2883656/am335x-pm-firmware.bin |
To resolve this for kernel 3.14 and , kernel 4.1, kernel 4.4 and kernel 4.9, after you clone the kernel sources, copy the firmware elf binary into the firmware/ folder of kernel sources
Info | ||
---|---|---|
| ||
$ cd smarc-ti-linux-kernel/firmware $ wget http://developer.embedian.com/download/attachments/2883656/am335x-pm-firmware.elf $ wget http://developer.embedian.com/download/attachments/2883656/am335x-evm-scale-data.bin |
- If you see the error message like this:
...
You can simply install the mkimage by:
Info | ||
---|---|---|
| ||
|
and make the kernel again.
Root File System
...
Arago:
User | Password |
---|---|
root | N/A |
SDK7 Processor-SDK-04.01.00.06 Download:
Info | ||
---|---|---|
| ||
$ wget -c ftp://ftp.embedian.com/public/dev/minfs/arago/processor_sdk_04.01.00.06/smarct335x-rootfs-image-smarct335x -sdk7.tar..tar.xz |
Verify:
Info | ||
---|---|---|
| ||
|
Processor-SDK-03.00.00.04 Download:
Info | ||
---|---|---|
| ||
$ wget -c ftp://ftp.embedian.com/public/dev/minfs/arago/processor_sdk_03.00.00.04/smarct335x-rootfs-image-smarct335x.tar.gz |
Verify:
Info | ||
---|---|---|
| ||
|
SDK6 Processor-SDK-02.00.01.07 Download:
Info | ||
---|---|---|
| ||
$ wget -c ftp://ftp.embedian.com/public/dev/minfs/arago/processor_sdk_02.00.01.07/smarct335x-rootfs-image-smarct335x -sdk6.tar.gz |
Verify:
Info | ||
---|---|---|
| ||
|
SDK7 Download:
Info | ||
---|---|---|
| ||
$ wget -c ftp://ftp.embedian.com/public/dev/minfs/arago/sdk7/smarct335x-rootfs-image-smarct335x -sdk6.tar.gz |
Verify:
Info | ||
---|---|---|
| ||
|
...
ee272266a6bbeb718c129f51f71c52f5 smarct335x-rootfs-image-smarct335x.tar.gz |
Ubuntu 1216.04:
User | Password |
---|---|
root | root |
ubuntu | temppwd |
Download:
Info | ||
---|---|---|
| ||
$ wget -c ftp://ftp.embedian.com/public/dev/minfs/ preciseubuntu/xenial/smarct3x-ubuntu- 1216.04 -minimal-armhf-2012-11-29.tar.gz |
Verify:
Info | ||
---|---|---|
| ||
a05cd21dc2df12daa2e9962fa92be23e957625f56f786a22d44b60480155cfd9 smarct3x-ubuntu-1216.04-minimal-armhf-2012-11-29.tar.gz |
Ubuntu 14.04:
User | Password |
---|---|
root | root |
ubuntu | temppwd |
Download:
Info | ||
---|---|---|
| ||
$ wget -c ftp://ftp.embedian.com/public/dev/minfs/ubuntu/trusty/ smarcsmarct3x- ubuntu14ubuntu-14.04.tar.gz |
Verify:
Info | ||
---|---|---|
| ||
e883c8fca4ab5c6e396ee54202f20e3505db5b85224e84e9898a1c5925703b8b smarcsmarct3x-ubuntu14ubuntu-14.04.tar.gz |
Debian 9.8:
User | Password |
---|---|
root | root |
debian | temppwd |
Download:
Info | ||
---|---|---|
| ||
$ wget -c ftp://ftp.embedian.com/public/dev/minfs/debian/stretch/smarct3x-debian-9.8-armhf-2019-02-16.tar.gz |
Verify:
Info | ||
---|---|---|
| ||
8969f249307d9b2c2ef5c76f7ca1c6b8 smarct3x-debian-9.8-armhf-2019-02-16.tar.gz |
Setup SD Card
...
For these instruction, we are assuming: DISK=/dev/mmcblk0, "lsblk" is very useful for determining the device id.
Info | ||
---|---|---|
| ||
|
Erase SD card:
Info | ||
---|---|---|
| ||
$ |
Create Partition Layout:
With util-linux v2.26, sfdisk was rewritten and is now based on libfdisk.
Info | ||||
---|---|---|---|---|
| ||||
$ sudo sfdisk --version sfdisk from util-linux 2.27.1 |
Create Partitions:
Info | ||
---|---|---|
| ||
$ sudo sfdisk ${DISK} <<-__EOF__ 1M , 48M , 0xE ,* ,,,- __EOF__ |
Info | ||
---|---|---|
| ||
$ sudo sfdisk --in-order --Linux --unit M ${DISK} <<-__EOF__ 1 , 48 , 0xE ,* ,,,- __EOF__ |
Format Partitions:
Info | ||
---|---|---|
| ||
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 | ||
---|---|---|
| ||
$ 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 | ||||
---|---|---|---|---|
| ||||
optargs="consoleblank=0 mem=512M" loadaddr=0x82000000 initrd_high=0xffffffff loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${kernel_file} ##Un-comment to enable systemd in Debian Wheezy console=ttyO3ttyS3,115200n8 mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs} #zImage: #zImage + uInitrd: where uInitrd has to be generated on the running system. ###Begin Rootfs from NFS ###Begin 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 |
...
Copy uEnv.txt to the boot partition:
Info | ||||
---|---|---|---|---|
| ||||
|
Install Kernel zImage
Copy zImage to the boot partition:
Info | ||||
---|---|---|---|---|
| ||||
|
Only for v3.12.y or after:
Install Kernel Device Tree Binary
Info | ||
---|---|---|
| ||
|
Install Root File System and Kernel Modules
...
Info | ||||
---|---|---|---|---|
| ||||
|
Arago SDK6:
Info | ||||
---|---|---|---|---|
| ||||
|
Ubuntu 14.04:
Info | ||||
---|---|---|---|---|
| ||||
|
Copy Kernel Modules:
Info | ||||
---|---|---|---|---|
| ||||
|
Networking:
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...
...
Copy zImage to rootfs partition:
Info | ||
---|---|---|
| ||
|
Note | ||
---|---|---|
| ||
|
Copy zImage to rootfs partition:
Info | ||
---|---|---|
| ||
|
For kernel v3.12.y or later:
Info | ||
---|---|---|
| ||
|
Copy uEnv.txt to rootfs partition:
...
Info | ||
---|---|---|
| ||
optargs="consoleblank=0 mem=512M" loadaddr=0x82000000 initrd_high=0xffffffff loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${kernel_file} ##Un-comment to enable systemd in Debian Wheezy console=ttyO3ttyS3,115200n8 mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs} #zImage: #zImage + uInitrd: where uInitrd has to be generated on the running system. ###Begin Rootfs from NFS ###Begin 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 | ||
---|---|---|
| ||
|
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/mmcblk0 now.
Info | ||
---|---|---|
| ||
|
Erase SD cardeMMC Flash:
Info | ||
---|---|---|
| ||
$ |
...
Info | ||
---|---|---|
| ||
$ 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 | ||
---|---|---|
| ||
$ sudo cp -v MLO u-boot.img zImage uEnv.txt /media/boot/ |
Note | ||
---|---|---|
| ||
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 | ||
---|---|---|
| ||
|
Install Root File System
...
Info | ||
---|---|---|
| ||
|
Unmount eMMC:
Info | ||
---|---|---|
| ||
$ 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 20152018-10-2204