Still don’t have a Meld Account?
Join now to be a part of the worlds largest embedded linux community!
Join Now!Tutorial 1: Introduction to Embedded Linux Development with MVIP on the BeagleBoard-XM
This is the first in a tutorial series introducing embedded Linux development with the MontaVista Integration Platform (MVIP). The tutorials utilize the BeagleBoard-XM single board computer (SBC) and the Texas Instruments BeagleBoard-XM Software Development Kit (SDK). It is assumed that the reader has some knowledge of Linux, use of the command line, as well as a general knowledge of embedded development. The goal of the series is to take a developer new to MVIP from initial setup of their development environment through to understanding how to perform complex activities using MVIP such as development of device drivers, debugging applications and the Linux kernel.
This tutorial series uses the Meld SDK for BeagleBoard-XM. This software package from MontaVista Software, LLC contains a Software Development Kit (SDK) for the BeagleBoard-XM architected around the MontaVista Integration Platform (MVIP). It provides MVIP 6.1, MontaVista-branded toolchain, and a ready-to-build Integration Platform project. For convenience, the prebuilt directory contains images (U-Boot bootloader, kernel uImage, and a root file system for the target device). This SDK comes with absolutely no warranty and no support at all.
This tutorial series will attempt to provide as much context and explanation for each step. Links will be provided to further sources of information to allow the reader to delve deeper into particular subjects as they see fit.
Step 1: Download the Texas Instruments BeagleBoard-XM SDK.
If you are reading this tutorial it is likely that you are a registered member of the Meld.org community. To download the Meld SDK for BeagleBoard-XM, you must be registered as a Meld.org community member. If you are not, please register now at meld.org.
Once registered and logged into Meld.org, the Texas Instruments BeagleBoard-XM SDK can be found at: BeagleBoard-XM SDK. Clicking the Download link will present the Download Agreement. Please read the agreement, select the 'I agree to the terms and conditions' checkbox and click the green Download button.
On the Texas Instruments BeagleBoard-XM SDK page please click the link to begin download of the SDK.
Step 2: Exploring the SDK
To explore the BeagleBoard-XM SDK it must first be extracted to a location of your choice. When choosing a location for your SDK consider that the location be writable and allow for you as a regular user to execute applications from it. On Linux, a good location to use is your Home directory. For this example, I've created a meldsdk directory in my home directory. To do the same, enter the following commands:
NOTE: My username on my Linux desktop is "wmat", therefore please substitute your own username wherever you see mine.
$cd $pwd /home/wmat $mkdir meldsdk
Now move the downloaded SDK to your new development directory.
$cd meldsdk $mv ~/Downloads/ti-beagle-xm-meldkit.tar.gz . $ls ti-beagle-xm-meldkit.tar.gz
Finally, extract the contents of the SDK to the meldsdk directory.
$tar zxpvf ti-beagle-xm-meldkit.tar.gz
$ls ti-beagle ti-beagle-xm-meldkit.tar.gz $cd ti-beagle $ls -lF total 24 drwxr-x--- 7 wmat wmat 4096 2011-06-27 09:30 beagle/ drwxr-x--- 11 wmat wmat 4096 2010-10-12 17:08 mvip/ drwxr-x--- 2 wmat wmat 4096 2011-06-27 09:27 prebuilt/ -rw-r----- 1 wmat wmat 5242 2011-06-27 09:37 README drwxr-x--- 3 wmat wmat 4096 2010-12-14 21:58 toolchain/
An item to note in the latter is the ls -lF command. The two options (-lF) tell the ls command to use long-listing (l) format and to append a classification (/ in this case) indicator to the end of each line. You do not have to use these options with ls, however, I find it makes directory listings more informative.
Step 3: Hardware Setup
At this point your SDK is extracted and available, however, before continuing let's hook up the BeagleBoard and ensure we can access it using a serial console from your desktop.
Initial hookup and validation of the BeagleBoard-XM is documented in many places online. Please refer to one of the following to connect the appropriate cables and power up your BeagleBoard-XM for the first time:
BeagleBoard-XM System Reference Manual
MontaVista Linux 6 on the BeagleBoard (uses original BeagleBoard)
Booting Linux on the BeagleBoard-XM
Assuming that you have connected a serial cable using a Serial-to-USB cable and plugged in the BeagleBoard-XM access a serial console using the following command. This step assumes GNU Screen is installed on your host machine. If GNU Screen is not installed, please install with your appropriate package management system:
$screen /dev/ttyUSB0 115200
You should see a blank console screen with the number 60 in the top left corner of the screen. This indicates that the BeagleBoard is powered and serial access has been established. Now insert the microSD card provided with the BeagleBoard-XM into the microSD card slot on the board. Once inserted, the BeagleBoard-XM will begin booting from the validation image provided on the card. Be prepared to hit a key on your keyboard to pause the autoboot process. After halting the autoboot process the serial console should display output similar or identical to the following (depending on your BeagleBoard-XM version):
Texas Instruments X-Loader 1.4.4ss (Aug 19 2010 - 02:49:27) Beagle xM Rev A Reading boot sector Loading u-boot.bin from mmc U-Boot 2010.03-dirty (Aug 20 2010 - 20:50:46) OMAP3630/3730-GP ES1.0, CPU-OPP2, L3-165MHz, OMAP3 Beagle board + LPDDR/NAND I2C: ready DRAM: 512 MB NAND: 256 MiB In: serial Out: serial Err: serial Probing for expansion boards, if none are connected you'll see a harmless I2C error. No EEPROM on expansion board Beagle xM Rev A Die ID #0b7e00001bf00000015739ea0701000f Hit any key to stop autoboot: 0 OMAP3 beagleboard.org # To exit the GNU Screen window use the following: ^-a k This means, Control key, then the a key, then the k key. Select y when prompted as follows: Really kill this window y/n
Congratulations, you've verified that your BeagleBoard-XM works and you can access it via a serial console.
Step 4: Booting the BeagleBoard-XM
As we learned in the previous step, the BeagleBoard-XM boots from a microSD card. It is possible to boot the BeagleBoard-XM other ways, such as across the network via NFS, which will be explored in a subsequent tutorial. At this point, booting the BeagleBoard-XM with the microSD card is the easiest method.
Returning to the SDK we extracted in Step 2 change directories to the /prebuilt directory:
$cd <location of your SDK>
$ls beagle mvip prebuilt README toolchain $cd prebuilt $ls MLO rootfs.tar.gz u-boot.bin uImage x-loader.bin.ift
To use the prebuilt images you require a blank microSD card. I recommend an 4GB card. To prepare your card for use with the BeagleBoard, please follow the instructions found here: SD Card Set Up.
I recommend using the mkcard.txt script described on the SD Card Set Up page. Once the script completes you should have two partitions on the card, one named /boot and one named /root. Assuming your card is mounted at /media/root and /media/boot, copy the prebuilt files provided in the SDK to the card as follows:
$cp MLO /media/boot $cp u-boot.bin /media/boot $cp uImage /media/boot $cp rootfs.tar.gz /media/root $cd /media/root $tar zxpvf rootfs.tar.gz $sync $umount /media/boot $umount /media/root
Now insert the card into the BeagleBoard-XM and power it on. Do not stop the boot process this time. Your BeagleBoard should boot to a login prompt as follows:
MontaVista(R) Linux(R) 6.0
MontaVista Linux 6 .dev-snapshot-20110318 ti-omap3-beagle console ti-omap3-beagle login:
The login username to enter is "root". There is no password. Once logged in, you can see the kernel version as follows:
$root@ti-omap3-beagle:~# uname -a
Linux ti-omap3-beagle 2.6.39-rc7.ti-omap3-beagle-2.6.29-09638-gac4a0b3 #3 SMP Tue May 17 16:19:36 EDT 2011 armv7l unknown
Congratulations, your BeagleBoard-XM is now running MontaVista Linux.
In Tutorial 2, we will begin to explore the MontaVista Integration Platform.
