Build and Install Linux System for SMARC T335X
This document provides instructions for advanced users how Embedian offers patches and builds a customized version of u-boot and linux kernel for Embedian's SMARC T335X product platform and how to install the images to bring the evaluation board up and running.
Our aim is to fully support our hardware through device drivers. We also provide unit tests so that testing a board is easy and custom development can start precisely.
Availability
SMARC T335X at Embedian
Carrier Board
SBC-SMART-BEE (module and carrier board) at Embedian
SBC-SMART-MEN (module and carrier board) at Embedian
Basic Resources
- 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/
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.
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 smarct335x u-boot and linux kernel, you will need to install the Linaro arm compiler that TI used for their release:
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
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
For u-boot 2015.07 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.
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..
Test:
If this test fails, verify that you have the 32bit libraries installed on your development system.
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.
Step 1. Check for SSH keys
First, we need to check for existing ssh keys on your computer. Open up Git Bash and run:
Check the directory listing to see if you have a file named either id_rsa.pub
or id_dsa.pub
. If you don't have either of those files go to step 2. Otherwise, you already have an existing keypair, and you can skip to step 3.
Step 2. Generate a new SSH key
To generate a new SSH key, enter the code below. We want the default settings so when asked to enter a file in which to save the key, just press enter.
Now you need to enter a passphrase.
Which should give you something like this:
Step 3. Add your SSH key to Embedian Gitlab Server
Copy the key to your clipboard.
Go to Embedian Git Server. At Profile Setting --> SSH Keys --> Add SSH Key
Paste your public key and press "Add Key" and your are done.
Bootloader: U-Boot
Clone the U-Boot source code from Embedian Git Server.
Download:
For u-boot v2017.01 (Processor-SDK-04.01.00.06):
For u-boot v2016.05 (Processor-SDK-03.00.00.04):
For u-boot v2015.07 (Processor-SDK-02.00.00.00):
Configure and Build:
For u-boot v2014.07 (Processor-SDK-01.00.00.03):
For u-boot v2014.04 (AMSDK6 and AMSDK7):
Configure and Build:
Linux Kernel
Download:
For 4.9.41 (Processor-SDK-04.01.00.06, Stable, LTS):
For 4.4.12 (Processor-SDK-03.00.00.04, Stable, LTS):
For 4.1.y (Processor-SDK-02.00.01.07, Stable, LTS):
For 3.14.y (Processor-SDK-01.00.00.03, Stable, LTS):
For 3.12.y (AMSDK7, Stable, LTS):
Configure and Build (v3.12 and later):
For 3.2 (AMSDK6, Stable, LTS release):
Configure and Build:
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
To resolve this for kernel 3.14, 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
- If you see the error message like this:
You can simply install the mkimage by:
and make the kernel again.
Root File System
Arago:
User | Password |
---|---|
root | N/A |
Processor-SDK-04.01.00.06 Download:
Verify:
Processor-SDK-03.00.00.04 Download:
Verify:
Processor-SDK-02.00.01.07 Download:
Verify:
SDK7 Download:
Verify:
Ubuntu 16.04:
User | Password |
---|---|
root | root |
ubuntu | temppwd |
Download:
Verify:
Ubuntu 14.04:
User | Password |
---|---|
root | root |
ubuntu | temppwd |
Download:
Verify:
Debian 9.8:
User | Password |
---|---|
root | root |
debian | temppwd |
Download:
Verify:
Setup SD Card
For these instruction, we are assuming: DISK=/dev/mmcblk0, "lsblk" is very useful for determining the device id.
Erase SD card:
Create Partition Layout:
With util-linux v2.26, sfdisk was rewritten and is now based on libfdisk.
Create Partitions:
Format Partitions:
Mount Partitions:
On some systems, these partitions may be auto-mounted...
Install Bootloader
Copy MLO/u-boot.img to the boot partition
uEnv.txt based bootscript
Create "uEnv.txt" boot script: (vim uEnv.txt)
For v3.2:
For 3.12.y or after :
Copy uEnv.txt to the boot partition:
Install Kernel zImage
Copy zImage to the boot partition:
Only for v3.12.y or after:
Install Kernel Device Tree Binary
Install Root File System and Kernel Modules
Copy Root File System:
Arago SDK7:
Arago SDK6:
Ubuntu 14.04:
Copy Kernel Modules:
Networking:
Edit: /etc/network/interfaces
Add:
Remove SD card:
Setup eMMC
Setting up eMMC usually is the last step at development stage after the development work is done at your SD card or NFS environments. eMMC on module will be always emulated as /dev/mmcblk0. Setting up eMMC now is nothing but changing the device descriptor.
This section gives a step-by-step procedure to setup eMMC flash. Users can write a shell script your own at production to simplify the steps.
First, we need to backup the final firmware from your SD card or NFS.
Prepare for eMMC binaries from SD card (or NFS):
Insert SD card into your Linux PC. For these instructions, we are assuming: DISK=/dev/mmcblk0, "lsblk" is very useful for determining the device id.
For these instruction, we are assuming: DISK=/dev/mmcblk0, "lsblk" is very useful for determining the device id.
Mount Partitions:
On some systems, these partitions may be auto-mounted...
Copy zImage to rootfs partition:
Copy zImage to rootfs partition:
For kernel v3.12.y or later:
Copy uEnv.txt to rootfs partition:
Copy and paste the following contents to /media/rootfs/home/root ($ sudo vim /media/rootfs/home/root/uEnv.txt)
For kernel v3.2:
For kernel v3.12.y+:
Copy real rootfs to rootfs partition:
Remove SD card:
Insert this SD card into your SMARC T335X device and boot up the devices from SD card.
Now it will be almost the same as you did when setup your SD card, but the eMMC device descriptor is /dev/mmcblk0 now.
Erase eMMC Flash:
Create Partition Layout:
In SDK6, Arago rootfs will mount partition2 as /media/mmcblk0p2 automatically after executing the above command. Umount the partition first.
Format Partitions:
Mount Partitions:
Install binaries for partition 1
Copy MLO/u-boot.img/uEnv.txt/zImage to the boot partition
Only for v3.12.y or after:
Install Kernel Device Tree Binary
Install Root File System
Unmount eMMC:
Switch your Boot Select to eMMC and you will be able to boot up from eMMC now.
Last updated 2018-10-04