Meego Wiki
Views

MeeGo IVI on ExoPC

From MeeGo wiki
Revision as of 18:50, 23 July 2011 by Alison (Talk | contribs)
Jump to: navigation, search

This area is under construction - This page is for shared development purposes: I guarantee that nothing here works yet.

Contents

Introduction

IVI 1.2 menu on ExoPC
IVI 1.2 homescreen on ExoPC courtesy of User:vgrade

The in-vehicle segment of MeeGo needs development platforms which are more convenient and less expensive than an actual car console. While there are a number of attractive development board options available, as of this writing (July 21, 2011), hardfp GPU drivers needed to run MeeGo 1.2 are lacking for ARMv7 hardware. While there are some development boards available with x86 Atom processors, the ExoPC tablet that has been widely distributed in the MeeGo community offers an attractive alternative. Intel's Tablet UX release targeted the ExoPC, so software support for the device is superior to that for the raw-board options. While the ExoPC does not offer the automotive-relevant hardware extensions (e.g. CAN bus, internal GPS) that some of the development boards do, the functionality can be added via USB or bluetooth.

Installation

Approach

The installation can conveniently be bootstrapped by using a chroot method like that previously employed by N900 and Pandaboard MeeGo-porting efforts. The basic idea is to install two images, one a stable, software-complete image like Tablet UX 1.2 for Atom, and the image to be adapted to the hardware, like IVI UX 1.2. The developer boots the stable image into a text console, then uses chroot to switch to the second image's userland. Subsequently the applications of the second image can be invoked using its own libraries and settings, but on top of the first image's kernel and virtual filesystems.

Details

Install images on ExoPC SSD and Configure Bootloader

  • Burn latest Tablet and IVI ISO images onto two USB sticks following the existing instructions.
  • Attach a USB mouse and keyboard to the ExoPC. Get an externally powered USB hub as you will need 3 ports (mouse, keyboard and USB drive) and ExoPC has only two.
  • Install the Tablet UX from the USB. On the ExoPC screen, wipe the "BBS" soft button back and forth during boot, and choose to boot from the USB device using the arrow keys on the attached keyboard. Also check out these detailed instructions from Intel.

Invocation of partition tool from Tablet Installer

  • In the installer's partition tool, choose "custom layout" and set the following partition table to preserve Windows but leave room for IVI:

Final partition table for Tablet, IVI and (preinstalled) Windows

  Disk /dev/sda: 64.0 GB, 64023257088 bytes
  255 heads, 63 sectors/track, 7783 cylinders
  Units = cylinders of 16065 * 512 = 8225280 bytes
  Disk identifier: 0x3da06da4
  Device    Boot      Start         End      Blocks   Id  System
  /dev/sda1               1          13      102400    7  HPFS/NTFS
  Partition 1 does not end on cylinder boundary.
  /dev/sda2              13        2563    20480000    7  HPFS/NTFS
  /dev/sda3   *        2563        2595      256001   83  Linux
  /dev/sda4            2595        7783    41677522+   5  Extended
  /dev/sda5            2595        5077    19937281   83  Linux
  /dev/sda6            5077        7559    19938003   83  Linux
  /dev/sda7            7559        7783     1802237   82  Linux swap / Solaris

Here /dev/sda1 and /dev/sda2 belong to Windows pre-install, /dev/sda3 is /boot created by Tablet installer, /dev/sda5 isTablet UX and /dev/sda6 will be IVI UX. Note that the filesystems must be ext3. (Default btrfs does not work with partition resizing tool yet.)

  • Try booting the Tablet UX and (if you wish Windows) and verify that they work as you expect.
  • Now install the IVI ISO from another USB stick. Boot from it in a similar fashion, choose "custom layout" in the partition tool and put IVI in partition /dev/sda6. Do not modify the other partitions.

Despite repeated attempts, this method failed to produce a bootable IVI partition but the chroot method is more convenient for development anyway. See "Known Problems" below.

    • IVI installer may make /dev/sda6 the boot partition even if you tell it that /dev/sda5 is the boot partition. If this happens, boot Tablet from a USB stick, and do the following from vt1 (Ctrl-Alt-F1):
 parted /dev/sda
 p (prints partition table; see /dev/sda6 has boot flag)
 set 5 boot
 p (check that /dev/sda5 now has boot flag)
 q

Now booting from SSD (/dev/sda) should work again.

  • From the tablet UX, get a terminal window, perhaps by typing "Ctrl-Alt-F1." Use zypper to update the software if you wish. Install any tools you will need to inspect and edit files, for example mlocate, binutils, man, man-db and emacs.
  • Using your favorite text editor, modify the bootloader configuration in /boot/extlinux/extlinux.conf in /dev/sda3 in order to make what follows easier. Set prompt 1, a longer timeout and comment out "menu hidden" and "menu background splash.jpg" as shown below. Remove the "quiet" flag to get more diagnostics during boot. Don't change the other lines. Note that your kernel versions will be different.


 # extlinux.conf
 prompt 1
 timeout 20
 default vesamenu.c32
 menu autoboot Starting Tablet
 #menu hidden
 menu resolution 1366 768
 #menu background splash.jpg
 menu title Welcome to Tablet 1.2.0.90.0.20110517.1
 menu color border 0 #ffffffff #00000000
 menu color sel 7 #ffffffff #ff000000
 menu color title 0 #ffffffff #00000000
 menu color tabmsg 0 #ffffffff #00000000
 menu color unsel 0 #ffffffff #00000000
 menu color hotsel 0 #ff000000 #ffffffff
 menu color hotkey 7 #ffffffff #ff000000
 menu color timeout_msg 0 #ffffffff #00000000
 menu color timeout 0 #ffffffff #00000000
 menu color cmdline 0 #ffffffff #00000000
 label tablet
	menu label Tablet_1.2.0.90.0 (2.6.38.2-8.12-adaptation-pinetrail)
	kernel vmlinuz-2.6.38.2-8.12-adaptation-pinetrail
 #	append ro root=/dev/sda5 quiet vga=current
	append ro root=/dev/sda5 vga=current
	menu default
 label ivi
	menu label IVI_1.2.0 (2.6.37.6-10.5-adaptation-intel-automotive)
	kernel chain.c32
	append boot 6
 label Other
	menu label Other
	kernel chain.c32
	append boot 1

chroot for IVI

  • Boot tablet UX. Then:
  mkdir /IVI
  mount /dev/sda6 /IVI
  ls /IVI 

IVI filesystem should appear. Verify that what you expect is there. For example, /etc/init.d for IVI has bluetooth-ivi and speech-dispatcherd, while /etc/init.d for Tablet does not.

  • Get a 3rd virtual terminal (default on Tablet UX is two) by typing
  openvt /bin/bash
  chvt 3

Now you should have a shell prompt in a new VT. Login at vt3 and chroot to IVI there:

  chroot /IVI /bin/bash

Now "ls /et/init.d" will show what's in /IVI, not what's in Tablet's root partition. Change back to Tablet UX user filesystem just by switching virtual terminals.

Running IVI's GUI in chroot Environment

Summary

Having the IVI text console is a first step, but the whole purpose of the exercise is to get its GUI up and running. To do so, there is some more housekeeping needed, as detailed in this File:ExoPC chroot setup.txt, which is modified from one at ARM/N900/Install/chroot. Nasa's instructions regarding graphics drivers at mp3car.com may also be helpful.

Note "3" appended on bootloader prompt line.   Hit "tab" when bootloader first appears to get the editable line.

Note that the script must be run from a Tablet text console and that the Tablet UX's GUI must not be running. In order to boot the Tablet image into text-only mode, append the character "3" to the bootargs command line as shown in the image above. If you allow the Tablet GUI to come up, the method described below to start IVI UX will fail even if you try to do so from a text console. The reason is that a given login can run only one instance of X11. Before starting uxlaunch to run the IVI GUI apps, we must perform several more housekeeping tasks:

  • Since IVI user apps will talk to Tablet kernel, they need access to the kernel's existing virtual filesystems in /dev/, /proc, /tmp, /sys and /var.
  • Since the IVI user libraries were built for different hardware, we can copy the different shared-object libraries that ExoPC needs from the Tablet userspace to the IVI one. Most notably, the ExoPC requires different X11 configuration since it has a different touchscreen.

Step-by-step instructions:

  1. Download File:ExoPC chroot setup.txt and File:Unmount IVI.txt, put them in Tablet root account's PATH and make them executable, removing ".txt" from end of filenames. Also download File:Make GL links.txt.
  1. Boot ExoPC to Tablet UX text console by hitting tab when bootloader appears and appending "3" to the command line.
  1. The system comes up in virtual terminal 2. Change to vt1 by typing "Ctrl-Alt-F1" and login as root.
  1. Run ExoPC_chroot_setup from the command line. The /IVI filesystem should be mounted. Try "ls /IVI" or "mount | grep IVI."
  1. Copy Make_GL_links.txt to the PATH of the root account of the IVI filesystem, e.g.
 mkdir /IVI/root/bin
 mv Make_GL_links.txt /IVI/root/bin/Make_GL_links
 chmod a+x /IVI/root/bin/Make_GL_links
  1. Change to vt3 with "Ctrl-Alt-F3." Login as root there.
  1. Run Make_GL_links.
  1. Execute
 uxlaunch&

Take note of the ampersand to run uxlaunch in background. Running uxlaunch in foreground will prevent further switching between the 3 virtual terminal windows.

  1. You will be switched to vt2 and see the IVI lock-screen. Use "Ctrl-Alt-F1" to get back to terminal with Tablet user filesystem and "Ctrl-Alt-F3" to get back to IVI text console. If there are problems, viewing /IVI/home/meego/.xsession-errors or /IVI/var/log/Xorg.0.log is likely to yield the most useful diagnostics. (From IVI text console or GUI, omit the leading "/IVI" from pathnames.)

What is working

  • WiFi, touchscreen and sometimes audio output from IVI menus
  • Web browser, music player and some of the other apps

What is not working

  • Real-time navigation and mapping (no internal GPS).
  • Audio is intermittent; can be partially addressed by restarting pulseaudio.
  • Dialer: no modem.
  • HDMI out; doesn't work with Tablet or Windows either.
  • Camera, which works with Windows but not Tablet UX either.
  • Make_GL_links script shouldn't be needed . . .

MIC Kickstart version

To build an image which can be booted from a flash key using the mic tool (Image_Creation) download the following kick start file :-

http://images.formeego.org/exopc/ - This site also includes a ready made image.

Create an image using the following command :-

sudo mic-image-creator -f livecd -t ../tmp/ -k ../cache/ -c ivi-ia32-pinetrail.ks -a i586 --release=latest --pkgmgr=yum

Burn to usb stick :-

sudo dd if=meego-ivi-ia32-pinetrail-latest.img of=/dev/sdX bs=4M - replace X with your device letter (b,c..)

Boot from stick in device

Boot takes sometime. I've not tried installing to internal flash and you may need a keyboard to configure wireless as onscreen kb is not working. I need to add something to Xorg.conf.d to stop the accelerometer being picked up as an input device, you may notice the mouse pointer dancing.

vgrade

Miscellany

Cheap hack for making ExoPC stand.
Personal tools