Meego Wiki
Views

MeeGo IVI on ExoPC

From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
(nobdy on IVI UX on ExoPC: nobdy in IVI "top applications" image.)
(nobdy on IVI UX on ExoPC: Link to better video.)
Line 249: Line 249:
Nobdy is more useful with the [http://www.linux-magazine.com/Issues/2011/126/Charly-s-Column-Terminator Terminator multi-xterm-on-screen] application.    Follow the posted instructions to [http://www.tenshu.net/p/terminator.html install Terminator],  but first zypper install vte and vte-python from the default 1.2.0 repo.
Nobdy is more useful with the [http://www.linux-magazine.com/Issues/2011/126/Charly-s-Column-Terminator Terminator multi-xterm-on-screen] application.    Follow the posted instructions to [http://www.tenshu.net/p/terminator.html install Terminator],  but first zypper install vte and vte-python from the default 1.2.0 repo.
      
      
-
[https://secure.flickr.com/photos/99725460@N00/6122192920/ Flickr video] of nobdy running in xterm.
+
[https://secure.flickr.com/photos/99725460@N00/6135604624/in/set-72157627642835378 Flickr video] of nobdy running in xterm and displaying data in qmlviewer via D-bus.
= Miscellany =
= Miscellany =
[[File:ExoPCstandScreenshot.png|400px|thumb|left|[[Media:ExoPCstand.mp4|Cheap hack]] for making ExoPC stand.]]
[[File:ExoPCstandScreenshot.png|400px|thumb|left|[[Media:ExoPCstand.mp4|Cheap hack]] for making ExoPC stand.]]

Revision as of 07:19, 11 September 2011

Contents

Introduction

IVI 1.2 menu on ExoPC
IVI 1.2 homescreen on ExoPC courtesy of 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

Chroot 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.

Chroot 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.
  • 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 text console

  • 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.

chroot for full graphical IVI UX

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.

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.


Use File:ExoPC chroot scripts.tar.bz2.txt with a new IVI install to copy all the needed drivers and libraries from Tablet Preview partition to IVI partition. Try the chroot once just to debug the IVI GUI installation before trying to boot into it directly. To use the scripts:

   mv ExoPC_chroot_scripts.tar.bz2.txt ExoPC_chroot_scripts.tar.bz2
   tar xjf ExoPC_chroot_scripts.tar.bz2
   cd ExoPC_chroot_scripts
   ./ExoPC_chroot_setup
   

Edit the file ExoPC_IVI.conf to reflect your system settings. Most obviously, change "IVI_ROOT" to a different partition name if your IVI image is not in /dev/sda3. Once the script has run, follow the instructions to chroot to /IVI and start the full uxlaunch GUI there. Once the uxlaunch is working in the chroot, the correct files for Intel i915 graphics are installed on the IVI partition, so users can now boot directly into the graphical runlevel 5 of IVI. Take note of the ampersand to run uxlaunch in background. Running uxlaunch in foreground will prevent further switching between the 3 virtual terminal windows. If there are problems, viewing /IVI/home/meego/.xsession-errors or /IVI/var/log/Xorg.0.log from the tablet virtual console 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

(Anyone who finds other problems, please add them!)

  • 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. Brendan Arfoll has a fix involving CONFIG_I2C_I801 in kernel configuration and a chrontel driver copied from WeTab repos.
  • Camera, which works with Windows but not Tablet UX either under 1.2.0.90 image, but which did work work 1.2.0 release.
  • Make_GL_links script shouldn't be needed . . .

Dual-booting Tablet and IVI UXes

Begin by partitioning the SSD in the ExoPC, as outlined above. Install the first OS in partition /dev/sda2 and make a copy of the /boot/extlinux/extlinux.conf file. Make a second copy of the file and use a text editor it to add an entry for the second OS, which the user will boot from the same kernel but from /dev/sda3. An example File:Extlinux.conf.txt shows tablet UX booting from /dev/sda2 and IVI from /dev/sda3. In the example, IVI is booting into text-console mode because of the "3" appended to the boot parameters.

MeeGo installers want the whole disk on which they are installed, and the second installer a user runs will typically not display the same convenient behavior as GRUB, which, if appropriately coaxed, will automagically modify a single /boot/grub/grub.conf file to accomodate multiple OSes or userlands. Instead, the user has two choices:

  • Tell the second installer to mount the first partition /dev/sda1 as /boot. The second installer will hang while trying to modify the /boot/extlinux/extlinux.conf file created by the first installer. A forced reboot will produce an inoperable system, as the second installer has created an empty extlinux.conf file. Boot from a USB drive, mount the /dev/sda1 filesystem and copy back the extlinux.conf file backup onto /boot on /dev/sda1 to restore the system to operability. (Note that the USB stick that is used for rescue will have its own /boot. Do not copy the file there but to the ExoPC's SSD!)
  • Don't explicitly tell the second installer to create a /boot partition. The installer will create /boot in the partition where the installation of the second UX is taking place (here /dev/sda3) and will make that partition as the bootable one. Fix this problem using parted, as outlined above.

For these methods to work, the kernel to which the extlinux.conf files makes reference must, of course, be in /boot as well! It's a good idea to back-up the Master Boot Record once you have a tricky installation complete.

MIC Kickstart version

A ready-made bootable image with kernel-adaptation-pinetrail is available. Note that any image with the kernel-adaptation-intel-automotive will not run on devices like Lenovo S-10t netbook or ExoPC.

To build your own image which can be booted from a flash key using the mic tool (Image_Creation), start with the following kickstart file: mg-ivi-ia32-pinetrail-latest.ks.

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.

vgrade

In order to stop the accelerometer being picked up as an input device and associated mouse pointer motion, download File:80-suppress-accel.conf.txt and move it to /etc/X11/xorg.conf.d/80-suppress-accel.conf.

Post-installation notes

System updates and software installation

Since the 1.2 release, the MeeGo-IVI project has released updates. Do not install these with "zypper update" without careful consideration! Zypping up from these repos auto-installs kernel-adaptation-intel-automotive and its modules, plus the EMGD graphics drivers and uninstalls the kernel-adaptation-pinetrail and i915 graphics drivers that ExoPC needs. It's possible to prevent this overwrite by using "zypper al kernel-adaptation-pinetrail", etc., but then nearly nothing will update.


nobdy on IVI UX on ExoPC

The Trunk repo has a nobdy package that works fine on ExoPC. However, do not update from the Trunk repo unless you know what you are doing! A safe method is

  zypper ar http://download.meego.com/live/Trunk/standard Trunk
  zypper install nobdy qt-qmlviewer
  zypper mr -d Trunk

which installs nobdy and then immediately disables the Trunk repo.

The IVI launcher/chooser will only offer to switch among programs have .desktop files in /usr/share/applications/ and icon images in /usr/share/themes/1024-600-10/icons/ and /usr/share/themes/1024-600-10/icons/launchers. For qmlviewer, I copied a random small PNG image from one of the Qt4 directories into the icon directories, renaming it "qmlviewer.png" and added a reference to it in a qmlviewer.desktop file I created by editing one of the existing files in /usr/share/applications/. For nobdy, I did the same, but first I created an icon by using a program to write "nobdy" in a box. The resulting icons in the chooser show up in the video linked below.

Nobdy IVI scroll list.jpg

To test nobdy with a USB-connected OBD scanner, use a config file invoking File:Plugins.xml examplesubscriber.txt, but to view live OBD data with a GUI, use a config file that supports a File:Plugins.xml dbus.txt. So far, OBD scanning with OBDLink works with Tablet Preview with examplesubscriber and dbussimple subscribers receiving data from genericobd2 provider, but the invocations don't work on the IVI UX. It's not yet clear whether the problem on the IVI UX is due to incomplete configuration or a differing versions of Qt Mobility between Tablet Preview and IVI UX.


Nobdy IVI top applications.jpg

In order to view OBD data with qmlviewer, first plug the OBDLink scanner into USB. Make sure that the corresponding /dev/ttyUSB* file is world-readable and writable. After copying File:Plugins.xml dbus.txt to /etc/nobdy/plugins.xml, start nobdy in an xterm as "nobdy." Crank the ignition. You should see messages appear like 'Connected to ELM version "ELM327 v1.3a"' if all is working. Invoke qmlviewer with

  qmlviewer -opengl -qmlbrowser

When the browser opens, choose tripzero's GuagesExample.qml. Some of the fields should live-update and respond to the car's accelerator, etc.


Nobdy is more useful with the Terminator multi-xterm-on-screen application. Follow the posted instructions to install Terminator, but first zypper install vte and vte-python from the default 1.2.0 repo.

Flickr video of nobdy running in xterm and displaying data in qmlviewer via D-bus.

Miscellany

Cheap hack for making ExoPC stand.
Personal tools