Scratchbox is a cross-compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross-compile an entire Linux distribution.
chmod a+x maemo-sdk-install-wizard_5.0.py
sudo ./maemo-sdk-install-wizard_5.0.py
su -c ./maemo-sdk-install-wizard_5.0.py
su
./maemo-sdk-install-wizard_5.0.py
/etc/sysctl.conf
vm.mmap_min_addr = 0
sudo sysctl -p
/scratchbox/login
user@linuxmint ~/Desktop $ /scratchbox/login Welcome to Scratchbox, the cross-compilation toolkit! Use 'sb-menu' to change your compilation target. See /scratchbox/doc/ for documentation. [sbox-FREMANTLE_X86: ~] >
vim /etc/apt/sources.list
#Extras deb http://repository.maemo.org/extras/ fremantle free non-free deb-src http://repository.maemo.org/extras/ fremantle free
fakeroot apt-get update
fakeroot apt-get dist-upgrade
fakeroot apt-get install libqt4-gui libqt4-dev
(Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -keybd ephyr,,,xkbmodel=evdev) &
#!/bin/sh # Automatically created by Maemo 5.0 SDK Installer (Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -keybd ephyr,,,xkbmodel=evdev) & (Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -kb; newgrp sbox <<'END' /scratchbox/login af-sb-init.sh stop END ) & newgrp sbox <<'END' sleep 3 /scratchbox/login sb-conf select FREMANTLE_X86 /scratchbox/login af-sb-init.sh restart END
#include <QApplication> #include <QLabel> int main(int argc, char *argv[]) { QApplication app(argc, argv); QLabel *label = new QLabel("Hello World"); label->show(); return app.exec(); }
ls
[sbox-FREMANTLE_X86: ~] > ls HelloWorld maemo-sdk-rootstrap_5.0_10.2010.19-1_armel.tgz MyDocs maemo-sdk-rootstrap_5.0_10.2010.19-1_i386.tgz [sbox-FREMANTLE_X86: ~] >
cd HelloWorld
[sbox-FREMANTLE_X86: ~] > cd HelloWorld [sbox-FREMANTLE_X86: ~/HelloWorld] > ls HelloWorld.cpp [sbox-FREMANTLE_X86: ~/HelloWorld] >
qmake -project
qmake
make
[sbox-FREMANTLE_X86: ~/HelloWorld] > qmake -project QFileInfo::absolutePath: Constructed with empty filename [sbox-FREMANTLE_X86: ~/HelloWorld] > qmake [sbox-FREMANTLE_X86: ~/HelloWorld] > make g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_X86/usr/share/qt4/mkspecs/linux-g++ -I. -I/targets/FREMANTLE_X86/usr/include/QtCore -I/targets/FREMANTLE_X86/usr/include/QtGui -I/targets/FREMANTLE_X86/usr/include -I. -I. -o HelloWorld.o HelloWorld.cpp g++ -Wl,-O1 -Wl,-rpath,/usr/lib -o HelloWorld HelloWorld.o -L/usr/lib -lQtGui -L/usr/lib -L/usr/X11R6/lib -lQtCore -lpthread [sbox-FREMANTLE_X86: ~/HelloWorld] >
run-standalone.sh ./HelloWorld