DART Ubuntu GS: Difference between revisions

From Variscite Wiki
No edit summary
No edit summary
 
(27 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{PageHeader|OMAP4DART - Ubuntu Precise}}
{{PageHeader|OMAP4DART - Ubuntu Precise}} {{docImage|category1=DART|category2=Ubuntu}} __toc__
{{docImage|category1=DART|category2=Ubuntu}}
<startFeed/>
__toc__
= Introduction =
= Introduction =


Below instructions corresponds to&nbsp;<span style="color: rgb(255, 0, 0);">Ubuntu_12.04-DART.VAR10</span> release.&nbsp;  
Below instructions corresponds to&nbsp;<span style="color: rgb(255, 0, 0);">Ubuntu_12.04-DART.VAR10</span> release.&nbsp;


Variscite supports its [http://www.variscite.com/products/system-on-module-som/cortex-a9/dart-4460-cpu-ti-omap-4-omap4460 OMAP4 DART4460] with [http://dev.omapzoom.org/?p=integration/kernel-ubuntu.git TI Ubuntu Linux kernel]&nbsp;and Ubuntu Precise (12.04) distribution.<br>
Variscite supports its [http://www.variscite.com/products/system-on-module-som/cortex-a9/dart-4460-cpu-ti-omap-4-omap4460 OMAP4 DART4460] with [http://dev.omapzoom.org/?p=integration/kernel-ubuntu.git TI Ubuntu Linux kernel]&nbsp;and Ubuntu Precise (12.04) distribution.


The Linux kernel provides support for all on-board peripherals.  
The Linux kernel provides support for all on-board peripherals.


Your Ubuntu folder in the FTP contains&nbsp;ready-to-run pre-built image which contain:Kernel, U-boot, Xloader and Ubuntu File system.<br>
Your Ubuntu folder in the FTP contains&nbsp;ready-to-run pre-built image which contain:Kernel, U-boot, Xloader and Ubuntu File system.


You must use Ubuntu 12.04LTS workstation as your build system.  
You must use Ubuntu 12.04LTS workstation as your build system.


= Install Ubuntu on eMMC<br>  =
= Install Ubuntu on eMMC =


OMAP4 DART board includes an on-SOM 4G eMMC which is the default boot device.  
OMAP4 DART board includes an on-SOM 4G eMMC which is the default boot device.


To burn the eMMC for the first time you need to boot from the external SD card and burn the eMMC from Linux shell.  
To burn the eMMC for the first time you need to boot from the external SD card and burn the eMMC from Linux shell.


To install Ubuntu on external SD card plug microSD card to your Linux host machine, run dmesg and see what device is added (for example:&nbsp; /dev/sd<span style="color: rgb(255, 0, 0);">'''X'''</span>, /dev/mmcblk0).<br>
To install Ubuntu on external SD card plug microSD card to your Linux host machine, run dmesg and see what device is added (for example:&nbsp; /dev/sd<span style="color: rgb(255, 0, 0);">'''X'''</span>, /dev/mmcblk0).


You can identify your device name by using dmesg and looking at the end of the system log.<br>
You can identify your device name by using dmesg and looking at the end of the system log.


Install the pre-build Ubuntu image on the SD card.  
Install the pre-build Ubuntu image on the SD card.
<pre>$&nbsp;gunzip Ubuntu_12.04_core-DART-EVM.VAR10.img.gz
<pre>$&nbsp;gunzip Ubuntu_12.04_core-DART-BOARD.VAR10_2.img.gz
$&nbsp;dd if=Ubuntu_12.04_core-DART-EVM.VAR10.img of=/dev/sdX bs=128k
$&nbsp;dd if=Ubuntu_12.04_core-DART-BOARD.VAR10_2.img of=/dev/sdX bs=128k
</pre>  
</pre>
Plug the microSD to DART MMC port, press and hold the boot select button and power on the DART board.  
Plug the microSD to DART MMC port, setup SW4 (on DART carrier board) to boot from SD and power on the DART board.


This will boot Ubuntu from extrnal SD card.  
This will boot Ubuntu from microSD card.


'''login:&nbsp;'''username: variscite,&nbsp;password: password  
'''login:&nbsp;'''username: root,&nbsp;no password


To burn eMMC  
To burn eMMC
<pre>$ umount /dev/mmcblk0p2 /dev/mmcblk0p1
<pre>$ umount /dev/mmcblk0p2 /dev/mmcblk0p1
$&nbsp;sudo /root/eMMC/emmc-flasher.sh
$&nbsp;sudo /root/eMMC/emmc-flasher.sh
</pre>  
</pre>
= Build Ubuntu Kernel from sources  =


To retrieving the kernel sources use git:  
Setup SW4 to boot from eMMC and power on the DART board.
Now it will boot Ubuntu from internal eMMC.
 
= Build Ubuntu Kernel from sources =
 
To retrieving the kernel sources use git:
<pre>$&nbsp;git clone git://dev.omapzoom.org/pub/scm/integration/kernel-ubuntu.git
<pre>$&nbsp;git clone git://dev.omapzoom.org/pub/scm/integration/kernel-ubuntu.git
$ cd kernel-ubuntu  
$ cd kernel-ubuntu  
$ git checkout -b working d8a13c28e3ddc1f7cb098823b883dbc6a02bcb43
$ git checkout -b working d8a13c28e3ddc1f7cb098823b883dbc6a02bcb43
</pre>  
</pre>
To apply Variscite kernel patch:  
To apply Variscite kernel patches:
<pre>$&nbsp;git apply omap4dart-ubuntu-12.04.TI_GLP168-VAR9-armhf-omap4.patch
<pre>$&nbsp;git apply omap4dart-ubuntu-12.04.TI_GLP168-VAR10-armhf-omap4.patch
</pre>  
$&nbsp;git apply 0001-Fix-GPIO-LEDs.patch
Install tools:<br>
</pre>
Install tools:
<pre>$ sudo apt-get install gcc-arm-linux-gnueabihf cpp-arm-linux-gnueabihf
<pre>$ sudo apt-get install gcc-arm-linux-gnueabihf cpp-arm-linux-gnueabihf
$ sudo apt-get build-dep linux-image-$(uname -r)
$ sudo apt-get build-dep linux-image-$(uname -r)
$ sudo apt-get install dpkg-dev kernel-wedge
$ sudo apt-get install dpkg-dev kernel-wedge
</pre>  
</pre>
Set tools enviroment variables:<br>
Set tools enviroment variables:
<pre>$ export ARCH=arm
<pre>$ export ARCH=arm
$ export CROSS_COMPILE=arm-linux-gnueabihf-
$ export CROSS_COMPILE=arm-linux-gnueabihf-
</pre>  
</pre>
Make changes to the kernel (optional):<br>
Make changes to the kernel (optional):
<pre>$ fakeroot debian/rules clean
<pre>$ fakeroot debian/rules clean
$ fakeroot debian/rules editconfigs
$ fakeroot debian/rules editconfigs
</pre>  
</pre>
Build the kernel and generate a kernel package:  
Build the kernel and generate a kernel package:
<pre>$ fakeroot debian/rules clean
<pre>$ fakeroot debian/rules clean
$ do_tools=false skipabi=true skipmodule=true dpkg-buildpackage -B -aarmhf -uc -us
$ do_tools=false skipabi=true skipmodule=true dpkg-buildpackage -B -aarmhf -uc -us
</pre>  
</pre>
You should have in the directory above the kernel-ubuntu 3 .deb pacakges.<br>
You should have in the directory above the kernel-ubuntu 3 .deb pacakges.


For example:  
For example:


linux-headers-3.4.0-1489_3.4.0-1489.28_armhf.deb<br>linux-headers-3.4.0-1489-omap4_3.4.0-1489.28_armhf.deb<br>linux-image-3.4.0-1489-omap4_3.4.0-1489.28_armhf.deb <br>
linux-headers-3.4.0-1489_3.4.0-1489.28_armhf.deb<br/>linux-headers-3.4.0-1489-omap4_3.4.0-1489.28_armhf.deb<br/>linux-image-3.4.0-1489-omap4_3.4.0-1489.28_armhf.deb


<br>
= Build U-Boot from sources =


Note: After compiling and installing new debian packages, rename uImage and uInitrd in /dev/sdX1 to uImage.var and uInitrd.var
To retrieve the U-Boot sources use git:
 
= Build U-Boot from sources  =
 
To retrieve the U-Boot sources use git:  
<pre>$&nbsp;git clone git://git.linaro.org/boot/u-boot-linaro-stable.git
<pre>$&nbsp;git clone git://git.linaro.org/boot/u-boot-linaro-stable.git
$ cd u-boot-linaro-stable
$ cd u-boot-linaro-stable
$ git checkout -b working 5b752a1e0528aa29f5bd4cde0905c8b604c56255
$ git checkout -b working 5b752a1e0528aa29f5bd4cde0905c8b604c56255
</pre>  
</pre>
To apply Variscite U-Boot patch:  
To apply Variscite U-Boot patch:
<pre>git apply omap4dart-u-boot-linaro-VAR10.patch
<pre>git apply omap4dart-u-boot-linaro-VAR10.patch
</pre>  
</pre>
To build U-Boot sources(OMAP4 DART EVM):  
To build U-Boot sources(OMAP4 DART EVM):
<pre>$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omap4_dart_evm    # boot from eMMC
<pre>$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omap4_dart_evm    # boot from eMMC
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omap4_dart_evm_sd # boot from external SD card
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omap4_dart_evm_sd # boot from external SD card
</pre>  
</pre>
To build U-Boot sources(OMAP4 DART Board):  
To build U-Boot sources(OMAP4 DART Board):
<pre>$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omap4_dart_board    # boot from eMMC
<pre>$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omap4_dart_board    # boot from eMMC
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omap4_dart_board_sd # boot from external SD card
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omap4_dart_board_sd # boot from external SD card
</pre>  
</pre>
= Apply your kernel<br> =
= Apply your kernel<br/> =
 
On the target.<br>


make sure your are connected to the network with lan or wireless lan. Use ifconfig for that.<br>Copy files from your build system:<br>
From device Linux shell.
Make sure your are connected to the network and copy .deb files from your build system:
<pre>$ cd ~/var-som-om44.deb/
<pre>$ cd ~/var-som-om44.deb/
$ scp &lt;yourname&gt;@&lt;your build system ip&gt;:&lt;your build folder&gt;/*.deb ./
$ scp <yourname>@<your build system ip>:<your build folder>/*.deb ./
</pre>  
</pre>
Unmount your boot partition<br>
Unmount your boot partition
<pre>sudo umount /dev/mmcblk0p1
<pre>sudo umount /dev/mmcblk0p1
</pre>  
</pre>
Install Debian pacakges:<br>
Install Debian pacakges:
<pre>sudo dpkg -i *3.4.0-1489.28_armhf.deb
<pre>sudo dpkg -i *3.4.0-1489.28_armhf.deb
</pre>  
</pre>
Rename the images name<br>
 
<pre>$ sudo mv /media/emmcboot/uInitrd /media/emmcbootbbb/uInitrd.var
Reboot your target to get new kernel changes.
$ sudo mv /media/emmcboot/uImage /media/emmcboot/uImage.var
$ sync
</pre>
Reboot your target to get new kernel changes.  


= Install U-Boot on eMMC =
= Install U-Boot on eMMC =


<span style="line-height: 1.5em;">Flash images to the eMMC device:</span>  
<span style="line-height: 1.5em;">Flash images to the eMMC device:</span>
<pre>$ dd if=MLO of=/dev/mmcblk0 seek=131072 bs=1
<pre>$ dd if=MLO of=/dev/mmcblk0 seek=131072 bs=1
$ dd if=u-boot.img of=/dev/mmcblk0 seek=393216 bs=1</pre>
$ dd if=u-boot.img of=/dev/mmcblk0 seek=393216 bs=1</pre>
= Capture video from CSI cameras =
From device Linux shell, to capture video from CSI1 camera type:
<pre>$ X &
$ ./cap_cam1.sh</pre>
To capture video from CSI2 camera type:
<pre>$ X &
$ ./cap_cam2.sh</pre>
<endFeed/>

Latest revision as of 13:39, 22 April 2014

OMAP4DART - Ubuntu Precise

<startFeed/>

Introduction

Below instructions corresponds to Ubuntu_12.04-DART.VAR10 release. 

Variscite supports its OMAP4 DART4460 with TI Ubuntu Linux kernel and Ubuntu Precise (12.04) distribution.

The Linux kernel provides support for all on-board peripherals.

Your Ubuntu folder in the FTP contains ready-to-run pre-built image which contain:Kernel, U-boot, Xloader and Ubuntu File system.

You must use Ubuntu 12.04LTS workstation as your build system.

Install Ubuntu on eMMC

OMAP4 DART board includes an on-SOM 4G eMMC which is the default boot device.

To burn the eMMC for the first time you need to boot from the external SD card and burn the eMMC from Linux shell.

To install Ubuntu on external SD card plug microSD card to your Linux host machine, run dmesg and see what device is added (for example:  /dev/sdX, /dev/mmcblk0).

You can identify your device name by using dmesg and looking at the end of the system log.

Install the pre-build Ubuntu image on the SD card.

$ gunzip Ubuntu_12.04_core-DART-BOARD.VAR10_2.img.gz
$ dd if=Ubuntu_12.04_core-DART-BOARD.VAR10_2.img of=/dev/sdX bs=128k

Plug the microSD to DART MMC port, setup SW4 (on DART carrier board) to boot from SD and power on the DART board.

This will boot Ubuntu from microSD card.

login: username: root, no password

To burn eMMC

$ umount /dev/mmcblk0p2 /dev/mmcblk0p1
$ sudo /root/eMMC/emmc-flasher.sh

Setup SW4 to boot from eMMC and power on the DART board. Now it will boot Ubuntu from internal eMMC.

Build Ubuntu Kernel from sources

To retrieving the kernel sources use git:

$ git clone git://dev.omapzoom.org/pub/scm/integration/kernel-ubuntu.git
$ cd kernel-ubuntu 
$ git checkout -b working d8a13c28e3ddc1f7cb098823b883dbc6a02bcb43

To apply Variscite kernel patches:

$ git apply omap4dart-ubuntu-12.04.TI_GLP168-VAR10-armhf-omap4.patch
$ git apply 0001-Fix-GPIO-LEDs.patch

Install tools:

$ sudo apt-get install gcc-arm-linux-gnueabihf cpp-arm-linux-gnueabihf
$ sudo apt-get build-dep linux-image-$(uname -r)
$ sudo apt-get install dpkg-dev kernel-wedge

Set tools enviroment variables:

$ export ARCH=arm
$ export CROSS_COMPILE=arm-linux-gnueabihf-

Make changes to the kernel (optional):

$ fakeroot debian/rules clean
$ fakeroot debian/rules editconfigs

Build the kernel and generate a kernel package:

$ fakeroot debian/rules clean
$ do_tools=false skipabi=true skipmodule=true dpkg-buildpackage -B -aarmhf -uc -us

You should have in the directory above the kernel-ubuntu 3 .deb pacakges.

For example:

linux-headers-3.4.0-1489_3.4.0-1489.28_armhf.deb
linux-headers-3.4.0-1489-omap4_3.4.0-1489.28_armhf.deb
linux-image-3.4.0-1489-omap4_3.4.0-1489.28_armhf.deb

Build U-Boot from sources

To retrieve the U-Boot sources use git:

$ git clone git://git.linaro.org/boot/u-boot-linaro-stable.git
$ cd u-boot-linaro-stable
$ git checkout -b working 5b752a1e0528aa29f5bd4cde0905c8b604c56255

To apply Variscite U-Boot patch:

git apply omap4dart-u-boot-linaro-VAR10.patch

To build U-Boot sources(OMAP4 DART EVM):

$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omap4_dart_evm    # boot from eMMC
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omap4_dart_evm_sd # boot from external SD card

To build U-Boot sources(OMAP4 DART Board):

$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omap4_dart_board    # boot from eMMC
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omap4_dart_board_sd # boot from external SD card

Apply your kernel

From device Linux shell. Make sure your are connected to the network and copy .deb files from your build system:

$ cd ~/var-som-om44.deb/
$ scp <yourname>@<your build system ip>:<your build folder>/*.deb ./

Unmount your boot partition

sudo umount /dev/mmcblk0p1

Install Debian pacakges:

sudo dpkg -i *3.4.0-1489.28_armhf.deb

Reboot your target to get new kernel changes.

Install U-Boot on eMMC

Flash images to the eMMC device:

$ dd if=MLO of=/dev/mmcblk0 seek=131072 bs=1
$ dd if=u-boot.img of=/dev/mmcblk0 seek=393216 bs=1

Capture video from CSI cameras

From device Linux shell, to capture video from CSI1 camera type:

$ X & 
$ ./cap_cam1.sh

To capture video from CSI2 camera type:

$ X & 
$ ./cap_cam2.sh

<endFeed/>