Installing Maemo's Diablo SDK under Ubuntu Hardy

Tagged:  

So Diablo has been released. Wasting no time I set about installing the new SDK under my distribution of choice, Ubuntu Hardy. The process is pretty painless thanks to the installer scripts but there are a few little gotcha's that you need to look out for.

The two extra steps that you will need to do if you are running Ubuntu Hardy are:

as root add

vm.vdso_enabled = 0

to /etc/sysctl.conf and while you are at it change the vm_mmap_min_addr to read

vm.mmap_min_addr = 4096

To make the changes active you have to run

$ sudo sysctl -p

To continue the install first run the scratchbox script which you can get from here by first changing the file permissions and then executing it like so

$ chmod a+x ./maemo-scratchbox-install_4.1.sh
$ ./maemo-scratchbox-install_4.1.sh

From there add a user to the scratchbox environment with

$ sudo /scratchbox/sbin/sbox_adduser USERNAME yes

(replace USERNAME with your username).

and run the SDK script downloaded from here.

$ sh ./maemo-sdk-install_4.1.sh

Answer a couple of questions and wait. You will be presented with a screen asking what environment you want to set up. If you will be developing, and I hope you will be, then choose either option 3 or 4.

At this point go grab yourself a coffee, it takes some time.

Install and run Xephr outside of the scratchbox environment with

$ sudo apt-get install xserver-xephyr
$ Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -extension Composite

Finally start Maemo from within the scratchbox environment with

$ scratchbox
$ export DISPLAY=:2
$ af-sb-init.sh start

If everything went as planned you should be confronted with this

Don't be dismayed that all that work only got you an pretty much empty window. Take heart that will a little reading and a bit of effort, you too can get cool and crazy apps compiled for the Internet Tablet platform.

Happy hacking!

Thanks for taking the time to document this!

To simplify the instructions, you might consider this command:
$ bash maemo-scratchbox-install_4.1.sh

Instead of:
$ chmod a+x ./maemo-scratchbox-install_4.1.sh
$ ./maemo-scratchbox-install_4.1.sh

It also seems helpful to mention the file to edit before listing the actual change. For example:
Edit /etc/sysctl.conf, adding this line:
vm.vdso_enabled = 0
and changing the value of vm_mmap_min_addr:
vm.mmap_min_addr = 4096

wasted a bit of time trying to figure out why the installation wasn't working. I'm still not sure what I was doing wrong before but following your instructions got everything working.

Cheers!

thank you for great howto.
now i need to find money to buy nokia n8x0 :)

It's /etc/sysctl.conf, not sysctrl.conf.

Also, the official installation instructions warn you against changing /etc/sysctl.conf without first testing the settings don't hang your computer. Apparently one of the settings may crash Ubuntu Gutsy, and if you edit /etc/sysctl.conf, you'll end up with an unbootable system.

To test the settings manually, run

sudo sysctl -w vm.vdso_enabled=0 vm.mmap_min_addr=4096

--
Marius Gedminas

Thanks for the typo correction.

The hanging on Gutsy is a good point, the steps above work for Hardy and I haven't a Gutsy install around now to check if they will break it.