set up scratchbox
wget http://repository.maemo.org/stable/chinook/maemo-scratchbox-install_4.0.sh
sudo chmod a+x ./maemo-scratchbox-install_4.0.sh
sudo ./maemo-scratchbox-install_4.0.sh
sudo /scratchbox/sbin/sbox_adduser <your_user_name> yes
set up maemo chinook sdk
you need to create a new shell so your user has the right groups. you can just log out and log back in
wget http://tablets-dev.nokia.com/4.0/maemo-sdk-install_4.0.sh
sh maemo-sdk-install_4.0.sh
echo "sb-conf select CHINOOK_X86 && yes | fakeroot apt-get install maemo-explicit" | scratchbox -s -p
echo "sb-conf select CHINOOK_ARMEL && yes | fakeroot apt-get install maemo-explicit" | scratchbox -s -p