(→Prerequisites) |
|||
| (9 intermediate revisions not shown) | |||
| Line 103: | Line 103: | ||
* Installation of bootloader, kernel and root file system on sd card | * Installation of bootloader, kernel and root file system on sd card | ||
| - | Shell scripts have been created to automate all of these steps as much as possible. You can get all necessary files [http://bug10738.openaos.org/images/beagleboard/ here]. These steps will require about | + | Shell scripts have been created to automate all of these steps as much as possible. You can get all necessary files [http://bug10738.openaos.org/images/beagleboard/ here]. These steps will require about 4 GB of additional free disk space. |
* build_kernel.sh build the kernel and the modules, | * build_kernel.sh build the kernel and the modules, | ||
| Line 117: | Line 117: | ||
</pre> | </pre> | ||
| - | The kernel used in this project is not the MeeGo kernel (which doesn't include any beagleboard specific patches) but a port of the ubuntu kernel which is being maintained | + | The kernel used in this project is not the MeeGo kernel (which doesn't include any beagleboard specific patches) but a port of the ubuntu kernel which is being maintained especially for the beagleboard and related boards. |
You can get the build scripts from [https://launchpad.net/~beagleboard-kernel https://launchpad.net/~beagleboard-kernel]. Follow the instructions there to build a Ubuntu kernel. There are only two MeeGo specific things: | You can get the build scripts from [https://launchpad.net/~beagleboard-kernel https://launchpad.net/~beagleboard-kernel]. Follow the instructions there to build a Ubuntu kernel. There are only two MeeGo specific things: | ||
| Line 164: | Line 164: | ||
This will download all packages required to build the root file system from the internet into the ./mycachedir directory and assemble the root file system image. | This will download all packages required to build the root file system from the internet into the ./mycachedir directory and assemble the root file system image. | ||
| - | If you need to save hard disk space you can remove the ../mycachedir directory once the image has successfully been built. | + | If you need to save hard disk space, you can remove the ../mycachedir directory once the image has successfully been built. |
| - | If you want to build an ivi or tablet images instead use | + | If you want to build an ivi or tablet images, instead use |
<pre> | <pre> | ||
| Line 180: | Line 180: | ||
== Installation on sd card == | == Installation on sd card == | ||
| - | The last step is to put the kernel and the rootfs onto an sd card together with an xloader and uboot boot loader as required to boot the beagleboard. This is accomplished by invoking the [http://bug10738.openaos.org/images/beagleboard/setup_sdcard.sh setup_sdcard.sh shell script]. This script has to be given the device name of the sd card you are intending to use. On my system the sd card is /dev/sdd, so i have to invoke the script as follows: | + | The last step is to put the kernel and the rootfs onto an sd card together with an xloader and uboot boot loader, as required to boot the beagleboard. This is accomplished by invoking the [http://bug10738.openaos.org/images/beagleboard/setup_sdcard.sh setup_sdcard.sh shell script]. This script has to be given the device name of the sd card you are intending to use. On my system, the sd card is /dev/sdd, so i have to invoke the script as follows: |
<pre> | <pre> | ||
| Line 186: | Line 186: | ||
</pre> | </pre> | ||
| - | The script will | + | The script will ask you to acknowledge this. Please watch the output carefully. Specifying, for example, your system's hard drive will wipe your entire hard disk, instead of the sd card. |
This will take some time as the sd card is reformatted, all bootloaders are installed, file systems are created and the kernel and the contents of the root file system are copied onto the sd card. | This will take some time as the sd card is reformatted, all bootloaders are installed, file systems are created and the kernel and the contents of the root file system are copied onto the sd card. | ||
| - | Again, if you intend to use the IVI or tablet image use a slightly modified command: | + | Again, if you intend to use the IVI or tablet image, use a slightly modified command: |
<pre> | <pre> | ||
TYPE=ivi ./setup_sdcard.sh --mmc /dev/sdd | TYPE=ivi ./setup_sdcard.sh --mmc /dev/sdd | ||
| Line 203: | Line 203: | ||
== Boot == | == Boot == | ||
| - | Plug the resulting SD card into your beagleboard and power on. After a few seconds the video will switch to 800x480 pixels and the MeeGo handset UX should appear on the screen. The first boot will always take several minutes as some media files are copied forth and back on the card. | + | Plug the resulting SD card into your beagleboard and power on. After a few seconds, the video will switch to 800x480 pixels and the MeeGo handset UX should appear on the screen. The first boot will always take several minutes, as some media files are copied forth and back on the card. |
[[File:Meego_beagle.jpg]] | [[File:Meego_beagle.jpg]] | ||
| Line 218: | Line 218: | ||
== Bluetooth keyboard == | == Bluetooth keyboard == | ||
| - | A CSR bluetooth dongle works out of the box. Hcitool is present to scan for devices as well | + | A CSR bluetooth dongle works out of the box. Hcitool is present to scan for devices, as well |
as hidd to connect to bluetooth HID devices. This has been tested with a bluetooth | as hidd to connect to bluetooth HID devices. This has been tested with a bluetooth | ||
keyboard. | keyboard. | ||
| Line 232: | Line 232: | ||
== Ethernet == | == Ethernet == | ||
| - | A D-Link DUB-E100 ethernet dongle works out of the box and gets an IP address via DHCP. With this network connection | + | A D-Link DUB-E100 ethernet dongle works out of the box and gets an IP address via DHCP. With this network connection, I was able to verify that zypper and the package management work, also. A "zypper up" successfully updated a few packages. |
| - | The beagleboard XM's onboard Ethernet (a SMSC95xx based USB device) | + | The beagleboard XM's onboard Ethernet (a SMSC95xx based USB device) works, also. |
== WLAN == | == WLAN == | ||
| Line 248: | Line 248: | ||
== Starting X programs from the serial console == | == Starting X programs from the serial console == | ||
| - | If you have a keyboard and mouse you can skip this section. If you don't have a keyboard connected and want to run X programs from the console, you need to set the DISPLAY environment variable. Also it's required to change to the meego user before doing so: | + | If you have a keyboard and mouse you can skip this section. If you don't have a keyboard connected and want to run X programs from the console, you need to set the DISPLAY environment variable. Also, it's required to change to the meego user before doing so: |
<pre> | <pre> | ||
May 31st 2011: The instructions on this page don't work anymore!
These instructions require the integration of closed third party code into MeeGo to enable the video acceleration required for a decent MeeGo user experience. Recently, MeeGo for the arm CPU (MeeGo/ARM) has switched to hardware floating point support (hardfp/armv7hl). This needs to be explicitly supported by all code supposed to be used on MeeGo/ARM. The previous software floating point based setup (armv7l) is not officially supported by MeeGo anymore.
Unfortunately, all closed source drivers incl. the SGX video acceleration drivers provided by TI for the beagle board are not available with hardfp/armv7hl support. This fact breaks the beagle board setup presented here and probably also all other arm based meego ports. Currently, the only exception is the n900, which is supported by nokia with matching closed source drivers.
This document describes how to create a MeeGo image for the beagleboard.
More information regarding MeeGo on the Beagleboard can be found at ARM/Meego_on_the_Beagle.
Contents |
(For details read #Prepared_images).
[Youtube video of BeagleBoard running MeeGo handset UX]
Creating this image has been tested on Ubuntu 10.10. Other distros may require some things to be done differently. Several people have tried and failed to make this work on Ubuntu 9.04 and Ubuntu 9.10. Ubuntu 10.04 requires some tweaks when installing the cross compilers. It is recommended to use Ubuntu 10.10, if you want the best chance of success. Conversely, if you have made this work for other versions of Ubuntu or other distros, please add to this page any information that will help others achieve the same success.
This is a work in progress. However, if you think these instructions are incomplete or lack some important aspect, feel free to edit this page or ask for help on IRC in #meego-arm on irc.freenode.net.
Please keep in mind that MeeGo is a work in progress. Things which already worked may be broken again and you might not end up with a working setup even though you followed the instructions precisely. Everything up to the running TI demos will likely be stable, but the MeeGo UI itself is still broken every now and then.
Working:
Todo:
Known issues:
The RevA and RevB boards have only 128 MB RAM. This is not enough for the handset distribution of MeeGo. With swap enabled the UX boots, but is barely usable. Tested board revisions: B7
The RevC boards are the best choice at this moment, as their hardware is fully supported by the Linux kernel and since their 256 MB RAM allow for a more fluid UX experience. Tested board revisions: C3, C4
The XM RevA boots into handset UX and is very fast and responsive. The stock kernel doesn't yet fully support this board (CPU only runs at 800 Mhz) and, most important, the USB hub doesn't work under the MeeGo kernel. Tested board revisions: XM-A2
The only board currently fully supported is the BeagleBoard RevC!
Ready-to-run SD card images can be found on bug10738. These images can be copied directly onto a 2 GB SD card:
dd if=<image name> of=/dev/<sd card device> bs=64k
It is possible that your SD card is slighty smaller than these images. In this case you can, for example, use fdisk to adjust the size of the 512 MB swap partition on the card and, afterwards, use mkswap to reformat that partition.
The root password for this image is "meego" as usual.
This document assumes that you have worked with the beagleboard before and it may be helpful if you, for example, know how to format a memory card to boot from.
If you are new to BeagleBoard, you might want to learn the basics using the following resources:
The following instructions assume that your beagleboard boots from sd card. Xloader and uboot versions stored in beagleboard internal nand memory might prevent the following setup from working properly. If a bootloader is installed, you'll usually get its command prompt on the serial console when booting, without an sd card inserted. Entering
nand erase
there will erase the entire nand memory and reset the beagleboard into the state expected in the following instructions. Warning: Other beagleboard sd cards you might be using may rely on certain parts being stored in nand and might not work afterwards.
Please use a memory card of at least 2 GB size for the following experiments. Otherwise, the generated image may not fit onto the card.
The beagleboard sd card image generation consists of three major steps:
Shell scripts have been created to automate all of these steps as much as possible. You can get all necessary files here. These steps will require about 4 GB of additional free disk space.
To build the kernel and its modules, you'll need to cross compile for the ARM platform. The most convenient option under Ubuntu is to install the arm cross compiler that comes with ubuntu:
sudo apt-get install gcc-4.5-arm-linux-gnueabi
The kernel used in this project is not the MeeGo kernel (which doesn't include any beagleboard specific patches) but a port of the ubuntu kernel which is being maintained especially for the beagleboard and related boards.
You can get the build scripts from https://launchpad.net/~beagleboard-kernel. Follow the instructions there to build a Ubuntu kernel. There are only two MeeGo specific things:
The CPUFreq governor can be adjusted in the kernel config dialog that will automatically open when you run the build_kernel.sh script from the 2.6.38-devel package. You need to set
CPU Power Management --> Default CPUFreq governor (ondemand) ---> userspace
The 2.6.38-devel package allows for local patch directory which can be specified in the system.sh file. Just place the 800x480.patch there and it will automatically be included into the resulting kernel.
You should end up with a uImage and modules tarball in 2.6.28-devel/deploy.
The gnueabi cross compiler is not available by default on the Lucid Lynx distribution. But you can get access to it using either the natty or maverick universe repositories (just be careful to disable them when you are done getting what you need).
Add the following line to your /etc/apt/sources.list. Or use the Synaptic package manager (sudo synaptic, Settings->Repositories, Other Software->Add). You may choose your own mirror if xmission is slow or doesn't work for you.
deb http://mirrors.xmission.com/ubuntu/ maverick main universe >> /etc/apt/sources.list
Do an update (hit Reload in synaptic or sudo apt-get update) and then install the gnueabi cross compiler + a few other programs that might be missing:
sudo apt-get install gcc-4.5-arm-linux-gnueabi rpm2cpio uboot-mkimage
The root file system (rootfs) is assembled from binary packages available in the MeeGo ARM repositories. The tool used to assemble the rootfs is called mic (MeeGo image creator). You need at least mic version 0.24.6 and you might have to grab the latest version from git following the instructions at Image_Creation#From_Development_Git_Tree.
When using ubuntu 10.04/10.10 you'll need to install qemu using the qemu-kvm-extras-static package. If you have an existing scratchbox setup, this will collide with qemu-kvm-extras-static. After installing that package scratchbox arm will not work anymore. Removing that package and restarting the scratchbox services makes scratchbox work again.
The rootfs image creation itself is started using the build_image.sh script the following way:
sudo ./build_image.sh
This will download all packages required to build the root file system from the internet into the ./mycachedir directory and assemble the root file system image.
If you need to save hard disk space, you can remove the ../mycachedir directory once the image has successfully been built.
If you want to build an ivi or tablet images, instead use
sudo TYPE=ivi ./build_image.sh
or
sudo TYPE=tablet ./build_image.sh
The last step is to put the kernel and the rootfs onto an sd card together with an xloader and uboot boot loader, as required to boot the beagleboard. This is accomplished by invoking the setup_sdcard.sh shell script. This script has to be given the device name of the sd card you are intending to use. On my system, the sd card is /dev/sdd, so i have to invoke the script as follows:
./setup_sdcard.sh --mmc /dev/sdd
The script will ask you to acknowledge this. Please watch the output carefully. Specifying, for example, your system's hard drive will wipe your entire hard disk, instead of the sd card.
This will take some time as the sd card is reformatted, all bootloaders are installed, file systems are created and the kernel and the contents of the root file system are copied onto the sd card.
Again, if you intend to use the IVI or tablet image, use a slightly modified command:
TYPE=ivi ./setup_sdcard.sh --mmc /dev/sdd
or
TYPE=tablet ./setup_sdcard.sh --mmc /dev/sdd
Plug the resulting SD card into your beagleboard and power on. After a few seconds, the video will switch to 800x480 pixels and the MeeGo handset UX should appear on the screen. The first boot will always take several minutes, as some media files are copied forth and back on the card.
I have tested various peripheral devices on this setup and most of them are working out of the box.
These just work, nothing to configure.
A CSR bluetooth dongle works out of the box. Hcitool is present to scan for devices, as well as hidd to connect to bluetooth HID devices. This has been tested with a bluetooth keyboard.
A 7 inch egalax based touchscreen worked nearly perfectly out of the box. It was just a little bit mis-calibrated.
The latest hal driven xorg can be given a input configuration file to deal with this.An example setup is already included at /etc/X11/xorg.conf.d/50-input-touch.conf. If you don't have a touchscreen this file is ignored.
This configuration is automatically applied to all touchscreen devices that map to /dev/input/event*. You may have to adjust the calibration values in that file to match your device.
A D-Link DUB-E100 ethernet dongle works out of the box and gets an IP address via DHCP. With this network connection, I was able to verify that zypper and the package management work, also. A "zypper up" successfully updated a few packages.
The beagleboard XM's onboard Ethernet (a SMSC95xx based USB device) works, also.
A Ralink RT2501 based USB dongle works, is detected and can scan for networks. But it isn't provided an address via dhcp.
Audio works out of the box. Appropriate configuration files for the beagleboard have been included.
If you have a keyboard and mouse you can skip this section. If you don't have a keyboard connected and want to run X programs from the console, you need to set the DISPLAY environment variable. Also, it's required to change to the meego user before doing so:
[root@localhost ~]# su meego [meego@localhost root]$ export DISPLAY=:0 [meego@localhost root]$ xeyes
Do you like what you see? Want to share it? Make a screenshot! This doesn't need any special software. Just copy the framebuffer contents into some file:
cp /dev/fb0 screenshot.raw
The resulting file should have a size of exactly 770048 bytes (800x480x2) if you are using a 800x480 display size at 16 bits per pixel.
On your host use ffmpeg to convert this into some standard format like png:
ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt rgb565 -s 800x480 -i screenshot.raw -f image2 -vcodec png screenshot.png
Screenshot of an early handset UX on beagle (jul 2010)
Screenshot of IVI UX on beagle (nov 2010)
Screenshot of tablet UX on beagle (apr 2011)