This howto decribes how to install ubuntu on a SD-card so we can use it on a beagle board. We also install the needed packages so we could compile opencv-programs and use a external usb-camera (tested with logitech quickcam).
The SD-card partitions
We create 2 partitions on the SD-card (we use an SD-card of 2GB). The first partition is the boot-partition which is 109MB (blocks 1-14). The second partition is the root-partition and is 1.8GB (block 15-240). To create the paritions, we can use fdisk. If you use a external card-reader, the name of the device is the same as a external hard-drive (in my case /dev/sdd). Before you use fdisk, be sure that the partitions are not mounted.
<br>After you created the partitions, you have to format them. The boot-partition in vfat (mkfs.vfat /dev/sdd1) and the root-partition as ext3fs (mkfs.ext3 /dev/sdd2).
creating the system tree
Each linux installation uses a tree of files (al the files under the /-directory)m so we have to create this file-tree. Before we can do this, we have to install qemu and debootstrap:<br>
''sudo apt-get install qemu''<br>
''wget http://ports.ubuntu.com/pool/main/d/debootstrap/debootstrap_1.0.13~jaunty1_all.deb''<br>
''sudo dpkg -i debootstrap_1.0.13~jaunty1_all.deb''<br>
<br>We generate the system-tree with the following command:
''sudo ~/ubuntu/rootstock-0.1.3/rootstock --fqdn beagleboard --login ubuntu --password temppwd --imagesize 2G --seed usbutils,xfce4,gdm,udev,opencv-doc,libcv1,libcvaux1,libhighgui1,gcc-4.1,g++-4.3,make,binutils,build-
essential,qc-usb-source,libcv-dev,libcvaux-dev,libhighgui-dev,qc-usb-utils --dist jaunty --serial ttyS2 --kernel-image http://rcn-ee.net/deb/kernel/beagle/jaunty/v2.6.29-58cf2f1-oer44.1/linux-image-2.6.29-oer44.1_1.
0jaunty_armel.deb''
<br>We created a ubuntu system-tree with a user ''ubuntu'' (password ''temppwd'') and with the option "seed" we declared the packages we want to install so we could use opencv and the usb-camera. The last option is important, we declare which kernel to use. By using this option, we also create a vmlinuz-file, which gives us the possibility to create a uImage we could boot from. We also could compile a kernel ourself, but it is easier to generate one.
<br>Generating the system tree will cost some time. When it is finished there are 3 new files in the local directory (the directory we where in when we executed the command):
<ul>
<li>armel-rootfs-DATUM.tgz: This is the generated system-tree (in archive)</li>
<li>vmlinuz-KERNELVERSIE: Needed to create the uImage file </li>
<li>rootstock-DATUM.log: The log file</li>
</ul>
<br>To generate the uImage, we first install uboot-mkimage:<br>
''sudo apt-get install uboot-mkimage''
<br>
''mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n "Linux" -d ./vmlinuz-* ./uImage''
Copy data to the SD-card
Now we have to move the created files to the partitions on the SD-card. On the boot-partition we need 3 files:
<ul>
<li>''MLO<br></li>
<li>''u-boot.bin''<br></li>
<li>''uImage''<br></li>
</ul>
<br>The uImage file, is the kernel image we created with the mkimage-command. The other files we could download from Internet, or use the files in the SD-card images from the robocup-project (I used the last possibility). On the root-partition we have to put the system-tree. We just unpack the archive into the directory the root-partition (of the SD-card) is mounted on:<br>
''tar -xvf armel-rootfs-DATUM.tgz -C /path/naar/partitie/''<br>
(DATUM is variabel, it depends on the moment you created the system-tree)<br>
<br>Now the SD-card is ready for use on the beagle board. Unmount it (sudo umount /dev/sdd1; sudo umount /dev/sdd2), put it into the beagle board and boot.
After booting
(We now work on the beagle board)<br>
<br>After a while you can login with the username ''ubuntu'' and password ''temppwd''. The rootstock process also installed a lot of unneeded packages we could remove again. This will reduce the used space and will improve the performance of the running ubuntu. We could list the installed packages with the command:<br>
''dpkg --get-selections |less''<br>
<br>
We could remove packages with apt-get. Double check the dependent packages that will also be removed. When the beagle board is not connected with the Internet, we couldn't reinstall the packages, so we would start all over again from the tree in the archive. I deleted packages with the command: <br>
''apt-get remove ca-certificates dhcp3-client dhcp3-common dictionaries-common ghostscript gnupg html2text iproute iputils-ping laptop-detect lpr mysql-common net-tools netbase netcat netcat-traditional psutils psfontmgr tcpd''<br>
Introduction
This howto decribes how to install ubuntu on a SD-card so we can use it on a beagle board. We also install the needed packages so we could compile opencv-programs and use a external usb-camera (tested with logitech quickcam).The SD-card partitions
We create 2 partitions on the SD-card (we use an SD-card of 2GB). The first partition is the boot-partition which is 109MB (blocks 1-14). The second partition is the root-partition and is 1.8GB (block 15-240). To create the paritions, we can use fdisk. If you use a external card-reader, the name of the device is the same as a external hard-drive (in my case /dev/sdd). Before you use fdisk, be sure that the partitions are not mounted.<br>After you created the partitions, you have to format them. The boot-partition in vfat (mkfs.vfat /dev/sdd1) and the root-partition as ext3fs (mkfs.ext3 /dev/sdd2).
creating the system tree
Each linux installation uses a tree of files (al the files under the /-directory)m so we have to create this file-tree. Before we can do this, we have to install qemu and debootstrap:<br>''sudo apt-get install qemu''<br>
''wget http://ports.ubuntu.com/pool/main/d/debootstrap/debootstrap_1.0.13~jaunty1_all.deb''<br>
''sudo dpkg -i debootstrap_1.0.13~jaunty1_all.deb''<br>
<br>The system-tree can be generated with rootstock:<br>
''wget http://launchpad.net/project-rootstock/trunk/0.1/+download/rootstock-0.1.3.tar.gz''<br>
''tar xf rootstock-0.1.3.tar.gz''<br>
''cd rootstock-0.1.3''<br>
<br>We generate the system-tree with the following command:
''sudo ~/ubuntu/rootstock-0.1.3/rootstock --fqdn beagleboard --login ubuntu --password temppwd --imagesize 2G --seed usbutils,xfce4,gdm,udev,opencv-doc,libcv1,libcvaux1,libhighgui1,gcc-4.1,g++-4.3,make,binutils,build-
essential,qc-usb-source,libcv-dev,libcvaux-dev,libhighgui-dev,qc-usb-utils --dist jaunty --serial ttyS2 --kernel-image http://rcn-ee.net/deb/kernel/beagle/jaunty/v2.6.29-58cf2f1-oer44.1/linux-image-2.6.29-oer44.1_1.
0jaunty_armel.deb''
<br>We created a ubuntu system-tree with a user ''ubuntu'' (password ''temppwd'') and with the option "seed" we declared the packages we want to install so we could use opencv and the usb-camera. The last option is important, we declare which kernel to use. By using this option, we also create a vmlinuz-file, which gives us the possibility to create a uImage we could boot from. We also could compile a kernel ourself, but it is easier to generate one.
<br>Generating the system tree will cost some time. When it is finished there are 3 new files in the local directory (the directory we where in when we executed the command):
<ul>
<li>armel-rootfs-DATUM.tgz: This is the generated system-tree (in archive)</li>
<li>vmlinuz-KERNELVERSIE: Needed to create the uImage file </li>
<li>rootstock-DATUM.log: The log file</li>
</ul>
<br>To generate the uImage, we first install uboot-mkimage:<br>
''sudo apt-get install uboot-mkimage''
<br>
''mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n "Linux" -d ./vmlinuz-* ./uImage''
Copy data to the SD-card
Now we have to move the created files to the partitions on the SD-card. On the boot-partition we need 3 files:<ul>
<li>''MLO<br></li>
<li>''u-boot.bin''<br></li>
<li>''uImage''<br></li>
</ul>
<br>The uImage file, is the kernel image we created with the mkimage-command. The other files we could download from Internet, or use the files in the SD-card images from the robocup-project (I used the last possibility). On the root-partition we have to put the system-tree. We just unpack the archive into the directory the root-partition (of the SD-card) is mounted on:<br>
''tar -xvf armel-rootfs-DATUM.tgz -C /path/naar/partitie/''<br>
(DATUM is variabel, it depends on the moment you created the system-tree)<br>
<br>Now the SD-card is ready for use on the beagle board. Unmount it (sudo umount /dev/sdd1; sudo umount /dev/sdd2), put it into the beagle board and boot.
After booting
(We now work on the beagle board)<br><br>After a while you can login with the username ''ubuntu'' and password ''temppwd''. The rootstock process also installed a lot of unneeded packages we could remove again. This will reduce the used space and will improve the performance of the running ubuntu. We could list the installed packages with the command:<br>
''dpkg --get-selections |less''<br>
<br>
We could remove packages with apt-get. Double check the dependent packages that will also be removed. When the beagle board is not connected with the Internet, we couldn't reinstall the packages, so we would start all over again from the tree in the archive. I deleted packages with the command: <br>
''apt-get remove ca-certificates dhcp3-client dhcp3-common dictionaries-common ghostscript gnupg html2text iproute iputils-ping laptop-detect lpr mysql-common net-tools netbase netcat netcat-traditional psutils psfontmgr tcpd''<br>