DART Ubuntu GS: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{PageHeader|OMAP4DART - Ubuntu Precise}} | {{PageHeader|OMAP4DART - Ubuntu Precise}} {{docImage|category1=DART|category2=Ubuntu}} __toc__ | ||
{{docImage|category1=DART|category2=Ubuntu}} | |||
__toc__ | |||
= Introduction = | |||
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. | |||
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<br/> = | |||
OMAP4 DART board includes an on-SOM 4G eMMC which is the default boot device. | |||
To | 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). | |||
Install the pre-build Ubuntu image on the SD card. | 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. | |||
<pre>$ gunzip Ubuntu_12.04_core-DART-EVM.VAR10.img.gz | <pre>$ gunzip Ubuntu_12.04_core-DART-EVM.VAR10.img.gz | ||
$ dd if=Ubuntu_12.04_core-DART-EVM.VAR10.img of=/dev/sdX bs=128k | $ dd if=Ubuntu_12.04_core-DART-EVM.VAR10.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, press and hold the boot select button and power on the DART board. | ||
This will boot Ubuntu from extrnal SD card. | This will boot Ubuntu from extrnal SD card. | ||
'''login: '''username: variscite, password: password | '''login: '''username: variscite, password: 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> | ||
= Build Ubuntu Kernel from sources | = Build Ubuntu Kernel from sources = | ||
To retrieving the kernel sources use git: | 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 patch: | To apply Variscite kernel patch: | ||
<pre>$ git apply omap4dart-ubuntu-12.04.TI_GLP168- | <pre>$ git apply omap4dart-ubuntu-12.04.TI_GLP168-VAR10-armhf-omap4.patch | ||
</pre> | </pre> | ||
Install tools: | 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: | |||
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 | |||
Note: After compiling and installing new debian packages, rename uImage and uInitrd in /dev/sdX1 to uImage.var and uInitrd.var | Note: After compiling and installing new debian packages, rename uImage and uInitrd in /dev/sdX1 to uImage.var and uInitrd.var | ||
= Build U-Boot from sources | = 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/> = | ||
On the target. | On the target. | ||
make sure your are connected to the network with lan or wireless lan. Use ifconfig for that.<br>Copy files from your build system: | make sure your are connected to the network with lan or wireless lan. Use ifconfig for that.<br/>Copy 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> | ||
Rename the images name | Rename the images name | ||
<pre>$ sudo mv /media/emmcboot/uInitrd /media/emmcbootbbb/uInitrd.var | <pre>$ sudo mv /media/emmcboot/uInitrd /media/emmcbootbbb/uInitrd.var | ||
$ sudo mv /media/emmcboot/uImage /media/emmcboot/uImage.var | $ sudo mv /media/emmcboot/uImage /media/emmcboot/uImage.var | ||
$ sync | $ sync | ||
</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> |
Revision as of 17:15, 23 January 2014
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-EVM.VAR10.img.gz $ dd if=Ubuntu_12.04_core-DART-EVM.VAR10.img of=/dev/sdX bs=128k
Plug the microSD to DART MMC port, press and hold the boot select button and power on the DART board.
This will boot Ubuntu from extrnal SD card.
login: username: variscite, password: password
To burn eMMC
$ umount /dev/mmcblk0p2 /dev/mmcblk0p1 $ sudo /root/eMMC/emmc-flasher.sh
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 patch:
$ git apply omap4dart-ubuntu-12.04.TI_GLP168-VAR10-armhf-omap4.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
Note: After compiling and installing new debian packages, rename uImage and uInitrd in /dev/sdX1 to uImage.var and uInitrd.var
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
On the target.
make sure your are connected to the network with lan or wireless lan. Use ifconfig for that.
Copy 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
Rename the images name
$ sudo mv /media/emmcboot/uInitrd /media/emmcbootbbb/uInitrd.var $ sudo mv /media/emmcboot/uImage /media/emmcboot/uImage.var $ sync
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