summaryrefslogtreecommitdiff
path: root/docs/sb2.1
blob: 8e0a9548396c71ac345c8ae7adc3e74282c6c646 (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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
.TH sb2 1 "11 September 2007" "2.0" "sb2 man page"
.SH NAME
sb2 \- crosscompiling environment
.SH SYNOPSIS
.B sb2
[options] [command] [arguments] [...]
.SH DESCRIPTION
.B sb2
Runs command in scratchbox2. If no command is given, a bash shell
in scratchbox2 environment is started.
.SH OPTIONS
.TP
\-v
Display version number.
.TP
\-L LEVEL
Enable logging. Following values for logging LEVEL are available: error, warning, notice, info, debug, noise, noise2.
.TP
\-d
Use debug mode: log all redirections (logging LEVEL=debug) to log file under directory $HOME/sb2_logs .
.TP
\-h
Print help.
.TP
\-t TARGET
Define TARGET to use. Use sb2-config -d TARGET to set a default.
.TP
\-e
Use emulation mode, avoid executing any host binaries except qemu.
.TP
\-m MODE
Use mapping mode MODE given in argument. Following MODE values are supported: devel, emulate, install, simple, tools.
.TP
\-M FILE
Read mapping rules from FILE.
.TP
\-s DIRECTORY
Use redirection rules from the DIRECTORY given in argument.
.TP
\-Q BUGLIST
Emulate bugs of the scratchbox 1 (BUGLIST consists of letters: 'x' enables exec permission checking bug emulation).
.TP
\-r
Disable creating reverse mapping rules: functions like getcwd() and realpath() will always return the real path.
.TP
\-O OPTIONS
Set options for the selected mapping mode. OPTIONS is a mode-specific string.
.TP
\-R
Execute commands in fakeroot environment.
.TP
\-S FILE
Create a persistent session: Write session information to FILE
.TP
\-J FILE
Join a persistent session assossiated with FILE.
.TP
\-D FILE
Delete a persistent session assosiated with FILE. 
Warning: this does not check if the session is still in use!
.TP
\-W DIR
Use DIR as the session directory when creating the session (The default is to
create the session in /tmp). DIR must be an absolute path and must not exist.
Note that long pathnames may cause trouble with socket operations, so try to
keep DIR as short as possible. 
.TP
\-c
When creating a session, also create a private copy of target_root (rootstrap). Note that this can be really slow, depending on the size of the orig.target_root.
.TP
\-C DIR
When creating a session, create copy of DIR and use it as the
target_root (rootstrap). Note that this can be really slow. See alse option -c.
.TP
\-T DIRECTORY
Use DIRECTORY as tools_root (override the value which was specified to sb2-init when the target specification was created).

.SH ENVIRONMENT
There are quite many environment variables being used. Since sb2 is still
very volatile, the best documentation is in the source of sb2 script itself.

.SH EXAMPLES
.TP
sb2 ./configure
.TP
sb2 make
.TP
sb2 -eR make install
.TP
sb2 -R -m emulate make install

.SH CONFIGURATION
To configure sb2, do something like this:

.nf
mkdir $HOME/buildroot
cd $HOME/buildroot
[fetch a rootfs from somewhere and extract it here]
sb2-init -c /abs/path/to/qemu-arm TARGET /path/to/cross-compiler/bin/arm-linux-gcc
.fi

To change default scratchbox2 target:

sb2-config -d another_target

.SH FILES
.P
.I ~/.scratchbox2/config
.SH SEE ALSO
.BR gcc (1),
.BR ld (1),
.BR fakeroot (1),
No known bugs at this time.
.SH AUTHOR
.nf
Riku Voipio
.fi