Maemo SDK on Gentoo/AMD64
Anyone who has tried installing Maemo SDK on a 64-bit system has run into
problems. Maemo SDK 2.2 and up (not that you would have more luck with
earlier versions) requires Scratchbox Apophis R4, which is 32-bit.
There are several pages on the web describing Maemo SDK installation on
Gentoo, 64-bit platform, or both:
This is my story of how I set up Maemo 3.1 SDK on Gentoo/AMD64…
First of all, you’ll need to download
http://repository.maemo.org/stable/3.1/maemo-scratchbox-install_3.1.sh and
http://repository.maemo.org/stable/3.1/maemo-sdk-install_3.1.sh
Step 1: Scratchbox
# uname -a Linux harmony 2.6.20-suspend2-r5-ae070426 #1 PREEMPT Thu Apr 26 12:03:31 EEST 2007 x86_64 AMD Turion(tm) 64 Mobile Technology MT-37 AuthenticAMD GNU/Linux # linux32 # uname -a Linux harmony 2.6.20-suspend2-r5-ae070426 #1 PREEMPT Thu Apr 26 12:03:31 EEST 2007 i686 AMD Turion(tm) 64 Mobile Technology MT-37 AuthenticAMD GNU/Linux # bash ~/maemo-scratchbox-install_3.1.sh -s /maemo-3.1/scratchbox ... # /maemo-3.1/scratchbox/sbin/sbox_adduser arteme yes Scratchbox user account for user arteme added
Step 2: Maemo SDK
After you have added yourself as a user to sbox group, you will need to
start a new terminal, re-login, or whatever else you do to get the group
membership updated. I simply do:
# ssh 127.0.0.1
Then:
# bash maemo-sdk-install_3.1.sh -s /maemo-3.1/scratchbox
Step 3: Xephyr
Xephyr is available in Gentoo as a kdrive USE-flag for xorg-server.
Although if you want to run it natively in 64-bit mode, you’re out of luck!
At the time of writing, there are a number of bugs that make X crash at
startup or otherwise. In particular,
https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/66996
(or https://bugs.freedesktop.org/show_bug.cgi?id=8417 in freedesktop.org
bugzilla) and others. Certain distributions have patched the bugs themselves
(http://cvs.fedora.redhat.com/viewcvs/rpms/xorg-x11-server/devel/) and there
are some fixes upstream
(http://gitweb.freedesktop.org/?p=xorg%%2Fxserver.git&a=search&s=ephyr).
However, for a painless installation I have used a 32-bit chroot environment.
32-bit chroot environment
You can follow the 32-bit Chroot Guide for Gentoo/AMD64 or use the
x86-chroot package:
# emerge x86-chroot # rc-update add x86-chroot default # /etc/init.d/x6-chroot start
Xephyr in 32-bit chroot environment
Enter the 32-chroot environment:
# x86-chroot
Install Xephyr:
# USE="kdrive -ipv6 -dri" VIDEO_CARDS="vga" emerge xorg-server
You’re all set!
Everything is installed, you’re all set! Don’t forget to start scratchbox on
system start-up:
# /maemo-3.1/scratchbox/sbin/sbox_ctl start
Start Xephyr. You can do that through the x86-chroot as root, or
better as a user:
$ LD_LIBRARY_PATH=/opt/x86-chroot/lib:/opt/x86-chroot/usr/lib \
/opt/x86-chroot/usr/bin/Xephyr :2 -host-cursor \
-screen 800x480x16 -dpi 96 -ac
Log into scratchbox:
$ /maemo-3.1/scratchbox/login Welcome to Scratchbox, the cross-compilation toolkit! Use 'sb-menu' to change your compilation target. See /scratchbox/doc/ for documentation. [sbox-SDK_X86: ~] > export DISPLAY=:2 [sbox-SDK_X86: ~] > af-sb-init.sh start ...
| Posted in blog | No Comments »