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 ...
Subversion-only SSH users
Sometimes you’re stuck with svn+ssh://… access for your repository. You need to give someone SSH access to access the repository, but you don’t want to give them full shell access. What you can do is create a group, whose users will only have access to svnserve.
Create a group called “svnonly”. /etc/groups will look something like:
... svnonly:x:414 ...
Then you can add users into that group. /etc/passwd will look something like:
... john:x:1001:414::/home/svnonly/john:/bin/bash mike:x:1002:414::/home/svnonly/mike:/bin/bash bob:x:1003:414::/home/svnonly/bob:/bin/bash ...
The home directory is entirely up to you – I choose /home/svnonly as a top directory for svnonly-users to keep them separate from full-access users and to keep /home neat. Yet, each can have their own home directory to have .ssh/authorized_keys, for example.
Next, add the following to your /etc/ssh/sshd_config:
Match Group svnonly
X11Forwarding no
AllowTcpForwarding no
ForceCommand svnserve -t
Now svnonly-users will have svnserve started for them automatically when they connect instead of a normal shell.
| Posted in blog | No Comments »