VAR-SOM-MX6 Ubuntu GS: Difference between revisions

From Variscite Wiki
Line 19: Line 19:


#use our standard nand-recovery image. Boot into it and flash Yocto by running "nand-recovery.sh" after boot.  
#use our standard nand-recovery image. Boot into it and flash Yocto by running "nand-recovery.sh" after boot.  
#reboot the system (nand). hit space bar to go into u-boot prompt.<br>  
#reboot the system (nand). Hit space bar to go into u-boot prompt.<br>  
#change the environment variables:<br>
#change the environment variables:<br>
<pre>U-Boot &gt; setenv bootcmd run bootcmd_mmc
<pre>U-Boot &gt; setenv bootcmd run bootcmd_mmc

Revision as of 09:49, 22 January 2014

VAR-SOM-MX6 - Ubuntu Linaro

Introduction

Variscite supports its VAR-SOM-MX6 with Linaro Ubuntu (11.10) distribution.
Your Ubuntu folder on your CD /  FTP contains ready-to-run pre-built image which contain:Kernel, U-boot, and Ubuntu File system.

Variscite recommends the use of Ultra (class 10 and above) microSD for optimial performance.

Installation

Plug your SD card to your Linux machine, run dmesg and see which device is added (i.e. /dev/sdX). Copy the Ubuntu image to your SD card:

$ gunzip mx6-som-ubuntu-oneric-sd.vx.img.gz
$ dd if=mx6-som-ubuntu-oneric-sd.vx.img of=/dev/sdX bs=4M

Boot

The default u-boot environment settings will load the on-som Nand flash based image.

In order to boot from SD-Card:

  1. use our standard nand-recovery image. Boot into it and flash Yocto by running "nand-recovery.sh" after boot.
  2. reboot the system (nand). Hit space bar to go into u-boot prompt.
  3. change the environment variables:
U-Boot > setenv bootcmd run bootcmd_mmc
U-Boot > saveenv

This method will use the u-boot from nand while booting kernel and using fileystem from the sd-card.

The default username and password are:

Username : linaro

password: linaro

Build Kernel and U-Boot from Sources

Linux

Get sources:

$ mkdir ~/VAR-MX6-ub/
$ cd ~/VAR-MX6-ub/
$ git clone git://github.com/varigit/linux-2.6-imx.git
$ cd linux-2.6-imx/
$ git checkout -b rel_imx_3.0.35_4.1.0-var17-release remotes/origin/rel_imx_3.0.35_4.1.0-var17-release

Build the kernel:

$ make ARCH=arm CROSS_COMPILE=arm-fsl-linux-gnueabi- mrproper
$ make ARCH=arm CROSS_COMPILE=arm-fsl-linux-gnueabi- var_som_mx6_ubuntu_defconfig
$ make -j7 ARCH=arm CROSS_COMPILE=arm-fsl-linux-gnueabi- uImage
$ make -j7 ARCH=arm CROSS_COMPILE=arm-fsl-linux-gnueabi- modules
Comment:
I used /dev/mmcblk0 in all sd-card commands. You need to use dmesg and change it to your device name.

Flash the kernel to the sd-card and transfer the modules:

$ sudo dd if=arch/arm/boot/uImage of=/dev/mmcblk0 bs=512 seek=2048 conv=fsync;sync
$ sudo make ARCH=arm CROSS_COMPILE=arm-fsl-linux-gnueabi- modules_install INSTALL_MOD_PATH=/media/VAR_MX6_UB4.1/

u-boot

Get sources:

$ cd ~/VAR-MX6-ub/
$ git clone git://github.com/varigit/uboot-imx
$ cd uboot-imx/
$ git checkout -b imx_v2009.08_3.0.35_4.1.0-var15 remotes/origin/imx_v2009.08_3.0.35_4.1.0-var15

Build u-boot:

$ make -j6 ARCH=arm CROSS_COMPILE=arm-fsl-linux-gnueabi- mrproper
$ make ARCH=arm CROSS_COMPILE=arm-fsl-linux-gnueabi- mx6q_var_som_config
$ make -j6 ARCH=arm CROSS_COMPILE=arm-fsl-linux-gnueabi-

Flash u-boot to the sd-card:

$ sudo dd if=u-boot.bin of=/dev/mmcblk0 bs=512 seek=2 skip=2 conv=fsync; sync

Un mount the sdcard. Press eject first.