meta data for this page
Build and install Ubuntu System for RSC-IMX61
Here you can find instruction to setup development environment for U-boot & Kernel source code for RSC-IMX61 and the way to install Ubuntu system. With this guideline, user will be able to setup the system easily and test all the functions with the system.
Setup Build Environment
To build U-Boot & kernel source code for RSC-IMX61, you will need to install following packages on Ubuntu. 64bit users have to make sure 32bit libraries has been installed for their system.
Distribution | packages (sudo apt-get update ; sudo apt-get install xxx) |
---|---|
Ubuntu 12.04 | ia32-libs u-boot-mkimage |
Ubuntu 14.04 | libc6:i386 libstdc++6:i386 libncurses5:i386 zlib1g:i386 u-boot-tools |
Generating RSA Keys
Use command below to generate RSA Key :
#ssh-keygen -t rsa
You can find “id_rsa.pub” in path below. Please send it to us by email to get access right of Avalue GIT server.
#/home/username/.ssh/
Download Source code and cross compiler tool from Avalue git server
#git clone giter@aes.avalue.com.tw:core.git -b AIB-IMX6
Compile U-Boot & Kernel Source code
After you download source code from Avalue GIT server, you will find a folder named “core”. Here is description for each folder & files inside.
Item | Description |
---|---|
fsl | folder with cross compile tools inside |
kernel | folder with kernel source code inside |
Makefile | Makefile for compile u-boot & kernel image |
u-boot | folder with u-boot souce code inside |
Use command below to compile u-boot & kernel
#make -j4
Use command below to compile u-boot only
#make aib-imx6-uboot -j4
Use command below to compile kernel only
#make aib-imx6-kernel -j4
Use command below to clean all the binary files in source code
#make clean
After you finish to compile source code, you will find files below. Here are description for each files
Item | Description |
---|---|
u-boot-quad.bin | u-boot for AIB-IMX6(Quad core) with 1GB DDR3L memory |
u-boot-solo.bin | u-boot for AIB-IMX6(Dual-lite) with 1GB DDR3L memory |
uImage | kernel image file for AIB-IMX6 with WM8326 PMIC |
Bootloader : U-Boot
To modify default setting for u-boot command, you can modify following files in path core/u-boot/include/configs/
Item | Description |
---|---|
mx6_AIB-IMX6.h | Default settings for AIB-IMX6 |
mx6q_AIB-IMX6.h | Default settings for AIB-IMX6 |
mx6solo_AIB-IMX6.h | Default settings for AIB-IMX6 |
Linux Kernel
Please get into folder core/kernel and use command below to load default configuration of kernel and config it
Command | Description |
---|---|
#make -j4 | Command to build kernel for AIB-IMX6 |
#make menuconfig | Command to setup kernel configuration |
#make modules | Command to build kernel modules |
#make clean | Command to clean binary files in kernel source code |
You can find update uImage in path core/kernel/arch/arm/boot
Ubuntu Root File System
The Ubuntu file system we provided in mfgtool is Ubuntu 12.04. Here is user name & password information.
user name | password |
---|---|
linaro | linaro |
Install System into SD Card
Please insert a SD card in the card reader on your Ubuntu development system.
1. Check device node of the SD card by command below
#cat /proc/partitions
For example, mine is /dev/sdd as below
2. Create partition for SD card
#sudo fdisk /dev/sdd Type the following parameters (each followed by <ENTER>): d [delete the previous partition] n [create a new partition] p [create a primary partition] 1 [the first partition] 20480 [20480x512bytes=10MB, which leaves enough space for the kernel, the boot loader and its configuration data] <enter> [using the default value will create a partition that spans to the last sector of the medium] w [ this writes the partition table to the medium and fdisk exits]
3. Format new partition in EXT3 format
#sudo umount /dev/sdd1 #sudo mkfs.ext3 /dev/sdd1
4. install u-boot on SD card by command below
//This is command to install u-boot for SMA-IMX6SI on SD card #sudo dd if=u-boot-solo.bin of=/dev/sdd bs=1k seek=1 skip=1 conv=fsync //This is command to install u-boot for SMA-IMX6QI on SD card #sudo dd if=u-boot-quad.bin of=/dev/sdd bs=1k seek=1 skip=1 conv=fsync //This is command to install u-boot for SMA-IMX6QI with 2GB DDR3L on SD card #sudo dd if=u-boot-quad-2g.bin of=/dev/sdd bs=1k seek=1 skip=1 conv=fsync
5. Install kernel image file on SD card by command below
//This is command to install kernel for SMA-IMX6 with PMIC WM8326 on SD card #sudo dd if=uImage of=/dev/sdd bs=1M seek=1 conv=fsync //This is command to install kernel for SMA-IMX6 with PMIC PF0100 on SD card #sudo dd if=uImage-p of=/dev/sdd bs=1M seek=1 conv=fsync
6. Get ubuntu.tar.bz2 from mfgtool and use command below to copy it on SD card
#sudo umount /dev/sdd1 #sudo mount /dev/sdd1 /mnt #cd /mnt #sudo tar jxpf ~/ubuntu.tar.bz2 #cd .. #cd umount /dev/sdd1
Modify u-boot setting to load kernel image & Ubuntu file system from SD card
1. Connect a cross-over RS232 cable between COM1 of RSC-IMX61 and Windows 7 system.
2. If you do not have RS232 cross over cable, please make one by yourself as below.
3. Use hyper terminal program, like PUTTY to link with i.MX6 system.
4. Power on RSC-IMX61 and press SPACE on keyboard to get into -boot menu.
5. Set boot device as command below in u-boot menu
SMARC U-Boot >setenv linux_cmd ‘setenv bootargs ${linux_bootargs};mmc dev 1;mmc read ${loadaddr} 0x800 0x3000;bootm’ SMARC U-Boot > setenv linux_bootargs 'console=tty0 console=ttymxc0,115200 root=/dev/mmcblk1p1 rootwait rw' SMARC U-Boot> saveenv SMARC U-Boot> boot
Now you can boot from SD card w/o problem.