summaryrefslogtreecommitdiff
path: root/README
blob: 265fd7885911e439a2ed2a9e46f39695b6b6c8f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
All files are licensed under GNU LGPL version 2.1 unless specifically 
stated otherwise in the file itself.

This is development code, it is broken. Don't expect to use it for
anything resembling production use. However, I firmly believe this is
infinitely more functional than Scratchbox 1.x can ever be.



INSTALLATION


You need git to work with sbox2, get it from http://git.or.cz/.

Clone the scratchbox 2 repository:

$ git clone git://anongit.freedesktop.org/git/sbox2


Build using:

$ cd sbox2
$ ./autogen.sh
$ ./configure
$ make
$ make install prefix=$HOME/scratchbox


You need Qemu for cpu-transparency. Unfortunately at the moment no
qemu release works well with SB2, there are patches on qemu-devel
mailing list that help to make the CVS version work, I hope debian's
qemu package incorporates them soon. Meanwhile you're on your own.

If you're targeting ARM and are on a 32bit x86 machine, you can get a 
good toolchain from CodeSourcery:

http://www.codesourcery.com/gnu_toolchains/arm/download.html


For amd64 systems there's a quite functional toolchain available here:

http://people.freedesktop.org/~lle/arm-lltc-gcc412-glibc25.tar.bz2

Add the compiler to your path before continuing, alternatively you can
give the absolute path to gcc in the sb2-init step below.

Now complete sb2 target setup:

$ mkdir $HOME/buildroot
$ cd $HOME/buildroot
$ $HOME/scratchbox/bin/sb2-init arm-none-linux-gnueabi-gcc

That will automatically generate a working sb2.config for the compiler
given on the command line.

At this point you can simply run sb2:

$ ../scratchbox/bin/sb2



MAEMO DEVELOPMENT


Download the latest rootstrap from:

http://repository.maemo.org/stable/3.1/armel/maemo-sdk-rootstrap_3.1_armel.tgz

Extract that to $HOME/buildroot

Edit $HOME/buildroot/etc/apt/apt.conf so that it looks like this:
-- snip --
APT {
Architecture armel;
}
-- snip --

Then build a proper libtool for your active toolchain by running 
this inside sb2:

[SB2] $ $HOME/scratchbox/bin/sb2-build-libtool

In order to build debian packages, you have to use -d switch for
dpkg-buildpackage to skip build dependency checking. A proper command line 
would be for example:

dpkg-buildpackage -rfakeroot -d


That's all folks, enjoy!