DART Ubuntu GS: Difference between revisions
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/> | ||
= Introduction = | |||
= Introduction | |||
Below instructions corresponds to <span style="color: rgb(255, 0, 0);">Ubuntu_12.04-DART.VAR10</span> release. | Below instructions corresponds to <span style="color: rgb(255, 0, 0);">Ubuntu_12.04-DART.VAR10</span> release. | ||
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] and Ubuntu Precise (12.04) distribution. | 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] 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 ready-to-run pre-built image which contain:Kernel, U-boot, Xloader and Ubuntu File system. | 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. | You must use Ubuntu 12.04LTS workstation as your build system. | ||
= Install Ubuntu on eMMC | = 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: /dev/sd<span style="color: rgb(255, 0, 0);">'''X'''</span>, /dev/mmcblk0). | 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/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. | 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>$ gunzip Ubuntu_12.04_core-DART- | <pre>$ gunzip Ubuntu_12.04_core-DART-BOARD.VAR10_2.img.gz | ||
$ dd if=Ubuntu_12.04_core-DART- | $ 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, | 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 | This will boot Ubuntu from microSD card. | ||
'''login: '''username: | '''login: '''username: root, no password | ||
To burn eMMC | To burn eMMC | ||
<pre>$ umount /dev/mmcblk0p2 /dev/mmcblk0p1 | <pre>$ umount /dev/mmcblk0p2 /dev/mmcblk0p1 | ||
$ sudo /root/eMMC/emmc-flasher.sh | $ sudo /root/eMMC/emmc-flasher.sh | ||
</pre> | </pre> | ||
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>$ git clone git://dev.omapzoom.org/pub/scm/integration/kernel-ubuntu.git | <pre>$ 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 | To apply Variscite kernel patches: | ||
<pre>$ git apply omap4dart-ubuntu-12.04.TI_GLP168- | <pre>$ git apply omap4dart-ubuntu-12.04.TI_GLP168-VAR10-armhf-omap4.patch | ||
</pre> | $ git apply 0001-Fix-GPIO-LEDs.patch | ||
Install tools: | </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: | 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): | 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. | 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 | 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 | ||
= Build U-Boot from sources = | |||
To retrieve the U-Boot sources use git: | |||
To retrieve the U-Boot sources use git: | |||
<pre>$ git clone git://git.linaro.org/boot/u-boot-linaro-stable.git | <pre>$ 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/> = | ||
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 | $ scp <yourname>@<your build system ip>:<your build folder>/*.deb ./ | ||
</pre> | </pre> | ||
Unmount your boot partition | Unmount your boot partition | ||
<pre>sudo umount /dev/mmcblk0p1 | <pre>sudo umount /dev/mmcblk0p1 | ||
</pre> | </pre> | ||
Install Debian pacakges: | 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> | ||
Reboot your target to get new kernel changes. | |||
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
<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/>