forked from groeck/linux-build-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
369 lines (291 loc) · 9.65 KB
/
README
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
Repositories and packages
-------------------------
Use aarch64 with gcc 4.8.1 built with buildroot. gcc 4.8.3 works as well.
Use qemu-2.0.0-local branch; we need patches applied on top of qemu 2.0.0.
Note: qemu 2.1.0 is required for aarch64 (arm64).
README in the qemu directory describes distribution.
----
Packages to install (Debian/Ubuntu):
automake
autoconf
autotools-dev
build-essential
buildbot
buildbot-slave
coccinelle
device-tree-compiler
genext2fs
nfs-client
fakeroot
git
git-email
initramfs-tools
libglib2.0-dev
libssh2-1
libssh2-1-dev
libcurl4-openssl-dev
libiscsi-dev
libpixman-1-dev
libxml2-dev
lzop
module-init-tools
qemu-system
qemu-user
qemu-utils
u-boot-tools
Ubuntu pre 14.04:
ia32-libs
Ubuntu 14.04:
lib32z1 lib32ncurses5 lib32bz2-1.0
make sure /bin/sh points to bash.
sudo update-alternatives --install /bin/sh sh /bin/bash 99
---
genfatfs:
Clone from [email protected]:xobs/genfatfs.git.
Build and install into bin directory.
---
smatch:
Prerequisites: libsqlite3-dev sqlite3 libsqlite3-0 libgtk2.0-dev
Either
cd /opt/buildbot
git clone git://repo.or.cz/smatch.git
or
cd /opt/buildbot/smatch
git pull
then:
make clean
make PREFIX=/opt/buildbot install
---
arc:
get buildroot from http://buildroot.uclibc.org/download.html.
configure for ARC little endian (big endian is broken, at least with 2013.05).
Commands to run (assuming gcc 4.4.7):
make toolchain
cd output
mkdir arc
mv host arc/gcc-4.4.7
tar czf /tmp/x86_64-gcc-4.4.7-uclibc_arc-linux.tar.gz arc
The result can be installed in /opt/kernel as usual.
Path and prefix to use:
PATH=/opt/kernel/arc/gcc-4.4.7/usr/bin
CROSS_COMPILE=arc-buildroot-linux-uclibc-
Building little endian arc 4.8.3 from 2014.11 works as well.
---
openrisc:
Kernel can be built with openrisc toolchain from kernel.org, but finding
a matching toolchain to build a root file system may be difficult.
In general, don't build kernel and root file system from different
tool chains. The ABI has changed over time, so the result likely won't
work unless you are really lucky. A hanging (silent) kernel or odd
tracebacks are an indication of a kernel / user space ABI mismatch.
A toolchain built using http://opencores.org/or1k/OpenRISC_GNU_tool_chain
is seen to be working if both kernel and root file system are built with
the same toolchain. Kernels at least up to 3.17-rc4 need a patch to be
able to build it with the resulting toolchain. See
rootfs/openrisc/run-qemu-openrisc.sh for details.
Current approach here is to use the kernel toolchain for kernel test builds,
and to use the new toolchain built from the opencores.org for qemu tests.
This avoids having to patch the kernel for build tests to succeed.
---
xtensa:
Same as above; buildroot 2014.08-rc3 is recommended.
Use qemu_xtensa_lx60_defconfig as starting base. Also enable
BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y
BR2_TOOLCHAIN_BUILDROOT_INET_IPV6=y
BR2_TOOLCHAIN_BUILDROOT_INET_RPC=y
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
Build commands:
make qemu_xtensa_lx60_defconfig
make menuconfig # Add the above configuration flags
make toolchain
cd output
mkdir xtensa
mv host xtensa/gcc-4.8.3-dc232b
tar czf /tmp/x86_64-gcc-4.8.3-dc232b-uclibc_xtensa-linux.tar.gz xtensa
gcc 4.6.3 from kernel.org is not recommended and may fail randomly
with 'jump target out of range' errors. Also, it won't let you run
the qemu target. Note that you _must_ use the same toolchain for both
kernel and rootfs builds.
qemu 2.1.0 is required.
---
arm:
[ tested with tip of buildroot tree as of 8/23/2014 ]
buildroot, configure for arm little endian, cortex-A7
EABI, VFPv4-D16 (defaults)
gcc 4.8.x, glibc 2.19
binutils 2.24
3.16 kernel headers
make toolchain
cd output
mkdir arm
mv host arm/gcc-4.8.3
tar czf /tmp/x86_64-gcc-4.8.3-glibc_arm-linux.tar.gz arm
---
Microblaze
[ tested with tip of buildroot tree as of 8/23/2014 ]
Big endian, gcc 4.9.1, glibc 2.19, binutils 2.24
3.16 kernel headers
make toolchain
cd output
mkdir microblaze
mv host arm/gcc-4.9.1
tar czf /tmp/x86_64-gcc-4.9.1-glibc_microblaze-linux.tar.gz microblaze
---
metag:
Download minimorph SDK from
http://www.imgtec.com/meta_insider/utilities/Minimorph_1_0-rel009.tar.gz
Inside is ./metag-linux-GPL-Minimorph_1_0-rel009.tar.gz.
Contains buildroot sources. Untar, then run the following commands.
cd GPL/buildroot
make comet_minimorph_defconfig
make
cd output
mkdir metag
mv host metag/gcc-4.2.4
tar czf /tmp/x86_64-gcc-4.2.4-uclibc_metag-linux.tar.gz metag
Install in /opt/kernel.
Path and prefix to use:
PATH=/opt/kernel/metag/gcc-4.2.4/usr/bin
CROSS_COMPILE= metag-unknown-linux-uclibc-
Note: As of 7/15/2014, the minimorph SDK is no longer available from above
location (the meta insider web page seems to have disappeared entirely).
Contact me for a copy of the toolchain if needed.
Toolchain sources are available at [email protected]:img-meta/metag-buildroot.git.
Run "make meta2_defconfig" followed by "make"; this should build the toolchain
in the output/host directory.
metag qemu:
Clone [email protected]:img-meta/qemu.git and build.
Install qemu-system-meta in your binary directory.
---
NIOS II
Toolchain available from CodeSourcery. Untested.
http://sourcery.mentor.com/public/gnu_toolchain/nios2-linux-gnu/sourceryg++-2013.05-43-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2
---
powerpc64
Build from Yocto.
$ git clone git://git.yoctoproject.org/poky.git
$ cd poky
$ git checkout daisy # for 1.6
$ git clone git://git.yoctoproject.org/meta-fsl-ppc
$ cd meta-fsl-ppc
$ git checkout daisy # for 1.6
$ cd ..
$ . ./oe-init-build-env
$ vi conf/bblayers.conf
Add <path>/meta-fsl-ppc to BBLAYERS definition.
$ MACHINE=p5040ds-64b bitbake meta-toolchain
[ this will take a while ]
SDK will be in tmp/deploy/sdk directory, for example
"poky-eglibc-x86_64-meta-toolchain-ppc64e5500-toolchain-1.6.sh"
Execute with sudo to install in target directory (I use the default).
---
qemu
Local patches are required. See groeck/qemu repository at kernel.org.
Look for local and linaro branches.
Packages needed to build:
libglib2.0-dev
libssh2-1-dev
libcurl4-openssl-dev
libiscsi-dev
autoconf
libpixman-1-dev
Build:
git clone [email protected]:groeck/qemu.git
cd qemu
git checkout v2.4.0-local
./configure --prefix=/opt/buildbot
make install
git checkout v2.3.50-local-linaro
./configure --prefix=/opt/buildbot
make
cp arm-softmmu/qemu-system-arm /opt/buildbot/bin/linaro
Distribution:
[ If necessary update VERSION file ]
make clean
./configure --prefix=/opt/buildbot
make dist
[ creates tarball ]
---
buildbot
Requires the following patch.
To install,
- clone and checkout buildbot source
- select base version (branch)
- apply the patch
- If you have a local installation from source, install the result
- Otherwise, loook for web/base.py in the distribution directory.
Example: Ubuntu Trusty (14.04)
File is in /usr/lib/python2.7/dist-packages/buildbot/status/web/base.py
Installation commands:
cd <installdir>
sudo mv base.py base.py.orig
sudo mv base.pyc base.pyc.orig
sudo cp <src>/master/buildbot/status/web/base.py .
Optional:
sudo python
>>> import py_compile
>>> py_compile.compile('base.py')
>>> exit()
From 8a0af9a95cfedbecd090132c6637792cbc6530ff Mon Sep 17 00:00:00 2001
From: Guenter Roeck <[email protected]>
Date: Sun, 15 Jun 2014 08:23:20 -0700
Subject: [PATCH] Add split and regex_replace to Jinja filters
Used for more complex expressions on buildbot 'builders' page.
Also enable do and loopcontrols extensions.
Signed-off-by: Guenter Roeck <[email protected]>
---
master/buildbot/status/web/base.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/master/buildbot/status/web/base.py b/master/buildbot/status/web/base.py
index 24a4b8e..0eff637 100644
--- a/master/buildbot/status/web/base.py
+++ b/master/buildbot/status/web/base.py
@@ -14,7 +14,7 @@
# Copyright Buildbot Team Members
-import urlparse, urllib, time, re
+import urlparse, urllib, time, re, string
import os, cgi, sys, locale
import jinja2
from zope.interface import Interface
@@ -510,7 +510,7 @@ def createJinjaEnv(revlink=None, changecommentlink=None,
loader = jinja2.ChoiceLoader(all_loaders)
env = jinja2.Environment(loader=loader,
- extensions=['jinja2.ext.i18n'],
+ extensions=['jinja2.ext.i18n', 'jinja2.ext.do', 'jinja2.ext.loopcontrols'],
trim_blocks=True,
undefined=AlmostStrictUndefined)
@@ -519,6 +519,8 @@ def createJinjaEnv(revlink=None, changecommentlink=None,
env.tests['mapping'] = lambda obj : isinstance(obj, dict)
env.filters.update(dict(
+ split = split,
+ regex_replace = regex_replace,
urlencode = urllib.quote,
email = emailfilter,
user = userfilter,
@@ -531,6 +533,12 @@ def createJinjaEnv(revlink=None, changecommentlink=None,
return env
+def split(s, sep):
+ return string.split(s, sep)
+
+def regex_replace(s, find, replace):
+ return re.sub(find, replace, s)
+
def emailfilter(value):
''' Escape & obfuscate e-mail addresses
--
1.9.1
---
score
- Use and build latest binutils (post June 13, 2014).
- Use and build gcc 4.9 (tip of tree as of June 22, 2014).
gcc configuration:
../gcc/configure --prefix=/opt/kernel/score --program-prefix=score-elf-
--target=score-elf --without-header --disable-nls --enable-languages=c
--disable-threads --disable-shared --enable-werror=no
target_configargs=enable_vtable_verify=yes --enable-obsolete --disable-libssp
--disable-libquadmath
Do _not_ configure/build gcc from its source directory; that will fail.
---
unicore32
See http://mprc.pku.edu.cn/~guanxuetao/linux/ for toolchain. Current version
is http://mprc.pku.edu.cn/~guanxuetao/linux/uc4-1.0.5-hard.tgz.