Meego Wiki
Views

Hardware-accelerated graphics on Pandaboard using MeeGo

From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
(On MeeGo chroot)
(On MeeGo chroot: Xorg details.)
Line 92: Line 92:
  [  2085.826] (II) pvr(0): Creating default Display subsection in Screen section
  [  2085.826] (II) pvr(0): Creating default Display subsection in Screen section
<more stuff omitted>
<more stuff omitted>
-
[  2085.829] (II) Loading sub module "dri2"
 
-
[  2085.829] (II) LoadModule: "dri2"
 
-
[  2085.830] (II) Reloading /usr/lib/xorg/modules/extensions/libdri2.so
 
-
[  2085.830] (II) pvr(0): [pvr] Software copy threshold : 0B
 
-
[  2085.830] (II) pvr(0): [pvr] Software solid threshold : 0B
 
-
[  2085.831] (II) pvr(0): [pvr] Software composite threshold : 1024B
 
-
[  2085.831] (II) pvr(0): [pvr] Pixmap pool size: 1B
 
-
[  2085.831] (II) Loading sub module "exa"
 
-
[  2085.831] (II) LoadModule: "exa"
 
-
[  2085.832] (II) Loading /usr/lib/xorg/modules/libexa.so
 
-
[  2085.832] (II) Module exa: vendor="X.Org Foundation"
 
-
[  2085.832] compiled for 1.9.0, module version = 2.5.0
 
-
[  2085.832] ABI class: X.Org Video Driver, version 8.0
 
  [  2085.832] PVRPreInit: done
  [  2085.832] PVRPreInit: done
  [  2085.832] (--) Depth 24 pixmap format is 32 bpp
  [  2085.832] (--) Depth 24 pixmap format is 32 bpp
Line 121: Line 108:
  [  2085.873] (==) pvr(0): Direct rendering enabled
  [  2085.873] (==) pvr(0): Direct rendering enabled
  [  2085.874] PVRScreenInit: done
  [  2085.874] PVRScreenInit: done
-
  [  2085.874] (==) RandR enabled
+
   
-
[  2085.874] (II) Initializing built-in extension Generic Event Extension
+
and so forth.  The first numbers in square brackets are timestamps that will vary from run to run.  Note that the [http://groups.google.com/group/pandaboard/browse_thread/thread/f26965c05ee65df4/51e2114e105049e5?lnk=gst&q=AIGLX#51e2114e105049e5 log file contains errors]:
-
 
+
-
and so forth.  The first numbers in square brackets are timestamps that will vary from run to run.  Note that the log file contains errors:
+
  [  2085.897] (EE) AIGLX error: dlopen of /usr/lib/dri/pvr_dri.so failed (/usr/lib/dri/pvr_dri.so: cannot open shared object file: No such file or directory)
  [  2085.897] (EE) AIGLX error: dlopen of /usr/lib/dri/pvr_dri.so failed (/usr/lib/dri/pvr_dri.so: cannot open shared object file: No such file or directory)

Revision as of 02:42, 9 May 2011

Contents

Demo of MeeGo Handset UX running alongside OGLES2 "Coverflow" demo on OMAP4 Pandaboard

1-minute video at Flickr showing 3D hardware acceleration

Summary

The video shows the OGLES "Coverflow" demo from Imagination Technologies running on the SGX540 GPU which is part of the OMAP 4430 processor that powers the Pandaboard. Coverflow requires 3D hardware acceleration, so the video shows that the PVR closed-source drivers from Imagination and TI's open source Xorg shared-object libraries work with the MeeGo userland. Just to show that the platform really is MeeGo, I'm running the Handset UX's duihome alongside the graphics demo. OpenVG, the 2D hardware-accelerated graphics suite, also works fine on Panda-MeeGo.

Major references

Details

The demo uses the kernel and drivers from the OMAP 4 image of Ubuntu 10.10. The Ubuntu image is installed on a microSD card using TI's instructions.

MeeGo was built using this kickstart file and the 1.1.80 snapshot (just because I had that image lying around the disk) and installed on a generic Kingston 16 GB USB stick using standard methods:

[alison@bonnet]$ dmesg| grep sd
[789217.011903]$ sd 33:0:0:0: [sdc] Attached SCSI removable disk
[alison@bonnet]$ mkdir -p /media/meego_usb
[alison@bonnet]$ sudo umount /media/meego_usb
[alison@bonnet]$ sudo mkfs.ext3 -L meego_usb /dev/sdc1
[alison@bonnet]$ sudo cp -rfp meego-panda-rootfs-morepkgs/* /media/meego_usb
[alison@bonnet]$ sudo mount -t ext3 /dev/sdc1 /media/meego_usb
[alison@bonnet]$ ls /media/meego_usb
\/    boot/  etc/   lib/	 media/  opt/	root/  srv/  tmp/  var/
bin/  dev/   home/  lost+found/  mnt/	 proc/	sbin/  sys/  usr/
[alison@bonnet]$ 

Note that the image is not bootable. It doesn't need to be for the chroot hack to work.

How-to

On Ubuntu boot system

  • First, boot the Panda using Ubuntu on the microSD. Set up your account, create a root password, etc., following standard Ubuntu instructions.
  • Either reboot into runlevel 3 or change to a text window (for example using Ctrl-Alt-F2) and login as root.
  • MeeGo will want to run its own X server, and each booted Linux system can have only one running X instance. (? I think.) Find Ubuntu'srunning gdm programs:
ps axl | grep gdm

Locate the PIDs of gdm-binary and gdm-simple-slave and kill them:

kill -TERM <gdm-binary-pid>
kill -TERM <gdm-simple-slave-pid>

If you type Ctrl-Alt-F7 to return to the workspace where Ubuntu was running X and gdm-greeter, you should now see a blank screen. Type

ps axl | grep gdm

and

ps axl | grep X

just to make sure.

  • As root, run Panda_chroot_setup. The script copies all the needed shared object libraries from Ubuntu and bind-mounts the dynamic filesystems (/var, /proc, etc.) in MeeGo. The script is inspired by N900 chroot instructions although I found that MeeGo reported that dbus wasn't running unless I mounted all of /var/run.
  • Run
chroot /media/meego_usb /bin/bash

The shell prompt will change. Welcome to MeeGo!

  • Note that you can change to any other virtual desktop (say via Ctrl-Alt-F4) and login into Ubuntu again. Since MeeGo's filesystem is mounted on top of Ubuntu's and they are running the same kernel, it's possible to copy binaries missing from MeeGo from Ubuntu. For example, I transferred working copies of "lsof" and "locate" that way.

On MeeGo chroot

  • Verify that you are running in MeeGo userland by trying, for example, "which uxlaunch" or something similar for a binary that Ubuntu doesn't include.
  • Launch GUI with
startx&

On my system, the command took me to virtual desktop 8. To get back to the text console, type Ctrl-Alt-F2 again. You may freely change among Ubuntu text console, MeeGo text console and MeeGo GUI.

  • On the MeeGo GUI, you should get an xterm popping up under the ancient twm window manager. These are X failsafe defaults. It should be possible to start gdm instead, but I haven't tried it.
  • Note that the graphical display where the X server runs is :0.0 and is unrelated to the number of the desktop where the GUI is running:
alison@ubuntu-installer:~$ echo $DISPLAY
:0.0
  • Have a look at /var/log/Xorg.0.log (or most recent similarly named file) to see if X has successfully loaded the PVR drivers for the GPU. You should see lines like
[  2085.776] (II) LoadModule: "dri2"
[  2085.776] (II) Loading /usr/lib/xorg/modules/extensions/libdri2.so

<more stuff omitted>

[  2085.777] (II) LoadModule: "pvr"
[  2085.778] (II) Loading /usr/lib/xorg/modules/drivers/pvr_drv.so
[  2085.779] (II) Module PVR: vendor="X.Org Foundation"
[  2085.779] 	compiled for 1.9.0, module version = 1.6.3758
[  2085.779] 	Module class: X.Org Video Driver
[  2085.779] 	ABI class: X.Org Video Driver, version 8.0
[  2085.779] (II) pvr: Driver for PowerVR chipsets: PowerVR SGX
[  2085.779] (--) using VT number 8
[  2085.798] (WW) Falling back to old probe method for pvr
[  2085.800] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[  2085.826] (II) pvr(0): Creating default Display subsection in Screen section

<more stuff omitted>

[  2085.832] PVRPreInit: done
[  2085.832] (--) Depth 24 pixmap format is 32 bpp
[  2085.833] PVRScreenInit
[  2085.833] (II) v4l2: enabling local-alpha for /dev/video1
[  2085.849] (II) pvr(0): [DRI2] Setup complete
[  2085.849] (II) pvr(0): [DRI2]   DRI driver: pvr
[  2085.849] (II) EXA(0): Driver allocated offscreen pixmaps
[  2085.849] (II) EXA(0): Driver registered support for the following operations:
[  2085.849] (II)         Solid
[  2085.849] (II)         Copy
[  2085.849] (II)         Composite (RENDER acceleration)
[  2085.873] (==) pvr(0): Backing store disabled
[  2085.873] (==) pvr(0): Silken mouse enabled
[  2085.873] (==) pvr(0): DPMS enabled
[  2085.873] (==) pvr(0): Direct rendering enabled
[  2085.874] PVRScreenInit: done

and so forth. The first numbers in square brackets are timestamps that will vary from run to run. Note that the log file contains errors:

[  2085.897] (EE) AIGLX error: dlopen of /usr/lib/dri/pvr_dri.so failed (/usr/lib/dri/pvr_dri.so: cannot open shared object file: No such file or directory)
[  2085.897] (EE) AIGLX: reverting to software rendering
[  2085.897] (II) AIGLX: Screen 0 is not DRI capable

Ignore them; they are expected.

Future plans

Personal tools