Setting up OpenCV2.4.2
For the last few days I had been trying to upgrade my Angstrom version to 2012.05 from Angstrom v2010.07 on Beagleboard. An older version of u-boot.bin and TI X-loader 1.9.2 were used to boot the old Angstrom. There were a lot of changes in the boot sector too which even removes the use of X-loader completely. My aim was to have the latest Angstrom version 2012.05 which have the graphical interface too along with the console and to get OpenCV2.4.2 running and make it possible to compile an OpenCV project on the embedded processor. There were some difficulties in getting it all done and so I thought to bring it all together to a single location. The host system is Ubuntu.
http://downloads.angstrom-distribution.org/demo/beagleboard/ consists of all the the images of the rootfiles. 6 various versions of the rootfiles are available in the list at present. But sadly 3 of them are the only one that supports GUI of them 2 are outdated and the latest is having some trouble in booting.
Angstrom-systemd-GNOME-image-eglibc-ipk-v2012.05-beagleboard.rootfs.tar.bz2 seems to be the apt file for us. But its reported to have lot of troubles to many users. The most notable is that GUI is either working with errors or not working at all!
The same file is present in ‘untested’ folder too, which satisfies all our criteria.
In short, the following steps will help in setting up the beagleboard:
Insert the card in the host machine.
Type ‘sudo sh mkcard.txt /dev/sdX’ in a terminal where ‘X’ stands for the drive letter of SD card.
On completion, mount both the partitions, by entering into those folders.
Copy MLO to 1st partition followed by copying u-boot.img
Copy the uImage file from 2ndpartition/boot to the first partition
Unmount both the partitions.
Insert the card in the beagleboard and reboot while pressing the ‘User button’ on the board.
On booting press ‘Enter’
Incase, we want to have the bootfiles in the NAND memory do the following, else skip this step:
mmc rescan 0
fatload mmc 0 82000000 MLO
nand erase 0 80000
nand write 82000000 0 2000
nand write 82000000 20000 20000
nand write 82000000 40000 20000
nand write 82000000 60000 20000
fatload mmc 0 0x82000000 u-boot.img
nand erase 80000 170000
nand write 0x82000000 80000 170000
nand erase 260000 20000
The following steps setup the environment variables:
You should now have the Angstrom successfully loaded and display the login prompt in the GUI.
On connecting to net, many files are to be downloaded to have opencv running. Do the following for this.
Open a terminal and type:
The above steps will successfully help in setting up the required files for compiling an OpenCV code in beagleboard.
At this point, it is always advisable to create a backup of the SD card in ‘.gz’ format. In future if the card were to get corrupt, we can get a working version running quickly using the backed-up .gz file. ‘.gz’ file will even handle the partitioning of the SD card too.