-
-
Notifications
You must be signed in to change notification settings - Fork 189
/
Copy pathconfig.yml
336 lines (295 loc) · 10.5 KB
/
config.yml
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
version: 2.1
commands:
build_board:
parameters:
target:
type: string
steps:
- run:
name: Install dependencies
command: |
apt update
apt install -y build-essential zlib1g-dev uuid-dev libdigest-sha-perl libelf-dev bc bzip2 bison flex git gnupg iasl m4 nasm patch python python2 python3 wget gnat cpio ccache pkg-config cmake libusb-1.0-0-dev autoconf texinfo ncurses-dev doxygen graphviz udev libudev1 libudev-dev automake libtool rsync innoextract
- run:
name: Make Board
command: |
rm -rf build/<<parameters.target>>/* build/log/* && make CPUS=16 V=1 BOARD=<<parameters.target>> || touch ./tmpDir/failed_build
no_output_timeout: 3h
- run:
name: Output build failing logs
command: |
if [[ -f ./tmpDir/failed_build ]]; then find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1;else echo "Not failing. Continuing..."; fi \
- run:
name: Output hashes
command: |
cat build/<<parameters.target>>/hashes.txt \
- run:
name: Archiving build logs.
command: |
tar zcvf build/<<parameters.target>>/logs.tar.gz build/log/*
- store_artifacts:
path: build/<<parameters.target>>
jobs:
prep_env:
docker:
- image: debian:10
steps:
- run:
name: Install dependencies
command: |
apt update
apt install -y build-essential zlib1g-dev uuid-dev libdigest-sha-perl libelf-dev bc bzip2 bison flex git gnupg iasl m4 nasm patch python python2 python3 wget gnat cpio ccache pkg-config cmake libusb-1.0-0-dev autoconf texinfo ncurses-dev doxygen graphviz udev libudev1 libudev-dev automake libtool rsync innoextract
- checkout
- run:
name: git reset
command: |
git reset --hard "$CIRCLE_SHA1" \
- run:
name: Make tmp dir
command: |
mkdir ./tmpDir \
- run:
name: Creating all modules and patches digest (All modules cache digest)
command: |
find ./patches/ ./modules/ -type f | sort -h |xargs sha256sum > ./tmpDir/all_modules_and_patches.sha256sums \
- run:
name: Creating coreboot (and associated patches) and musl-cross-make modules digest (musl-cross-make and coreboot cache digest)
command: |
find ./modules/coreboot ./modules/musl-cross* ./patches/coreboot* -type f | sort -h | xargs sha256sum > ./tmpDir/coreboot_musl-cross.sha256sums \
- run:
name: Creating musl-cross-make and musl-cross-make patches digest (musl-cross-make cache digest)
command: |
find modules/musl-cross* -type f | sort -h | xargs sha256sum > ./tmpDir/musl-cross.sha256sums \
- restore_cache:
keys:
#Restore existing cache for matching modules digest, validated to be exactly the same as in github current commit.
#This cache was made on top of below caches, if previously existing. If no module definition changed, we reuse this one. Otherwise...
- heads-modules-and-patches-{{ checksum "./tmpDir/all_modules_and_patches.sha256sums" }}{{ .Environment.CACHE_VERSION }}
#If precedent cache not found, restore cache for coreboot module (and patches) and musl-cross-make digests (bi-yearly modified)
#Otehrwise....
- heads-coreboot-musl-cross-{{ checksum "./tmpDir/coreboot_musl-cross.sha256sums" }}{{ .Environment.CACHE_VERSION }}
#If precedent cache not found. Restore cache for musl-cross-make module digest (rarely modified).
#Otherwise, we build cleanly.
- heads-musl-cross-{{ checksum "./tmpDir/musl-cross.sha256sums" }}{{ .Environment.CACHE_VERSION }}
- run:
name: Download and neuter xx20 ME (keep generated GBE and extracted IFD in tree)
command: |
./blobs/xx20/download_parse_me.sh
- run:
name: Download and neuter xx30 ME (keep generated GBE and extracted IFD in tree)
# Below when we download me_cleaner it's not really that important to validate it's
# integrity. This is because ./blobs/xx30/download_clean_me.sh does a hash check on
# it's result anyway.
command: |
wget -O ./blobs/xx30/me_cleaner.py https://raw.githubusercontent.com/corna/me_cleaner/master/me_cleaner.py
chmod +x ./blobs/xx30/me_cleaner.py
./blobs/xx30/download_clean_me.sh -m $(readlink -f ./blobs/xx30/me_cleaner.py)
- persist_to_workspace:
root: ~/
paths:
- .
build_and_persist:
docker:
- image: debian:10
parameters:
target:
type: string
steps:
- attach_workspace:
at: ~/
- build_board:
target: <<parameters.target>>
- persist_to_workspace:
root: ~/
paths:
- .
build:
docker:
- image: debian:10
parameters:
target:
type: string
steps:
- attach_workspace:
at: ~/
- build_board:
target: <<parameters.target>>
save_cache:
docker:
- image: debian:10
steps:
- attach_workspace:
at: ~/
- save_cache:
#Generate cache for the same musl-cross module definition if hash is not previously existing
key: heads-musl-cross-{{ checksum "./tmpDir/musl-cross.sha256sums" }}{{ .Environment.CACHE_VERSION }}
paths:
- crossgcc
- build/musl-cross-*
- save_cache:
#Generate cache for the same coreboot mnd musl-cross-make modules definition if hash is not previously existing
key: heads-coreboot-musl-cross-{{ checksum "./tmpDir/coreboot_musl-cross.sha256sums" }}{{ .Environment.CACHE_VERSION }}
paths:
- build/coreboot-*
- crossgcc
- build/musl-cross-*
- save_cache:
#Generate cache for the exact same modules definitions if hash is not previously existing
key: heads-modules-and-patches-{{ checksum "./tmpDir/all_modules_and_patches.sha256sums" }}{{ .Environment.CACHE_VERSION }}
paths:
- packages
- crossgcc
- build
- install
workflows:
version: 2
build_and_test:
jobs:
- prep_env
# Below, sequentially build one board for each coreboot
# version. The last board in the sequence is the dependency
# for the parallel boards built at the end, and also save_cache.
# Coreboot 4.11
- build_and_persist:
name: kgpe-d16_workstation
target: kgpe-d16_workstation
requires:
- prep_env
# Coreboot 4.13
- build_and_persist:
name: x230-hotp-maximized
target: x230-hotp-maximized
requires:
- kgpe-d16_workstation
- save_cache:
requires:
- x230-hotp-maximized
#
#
# Those onboarding new boards should add their entries below.
#
#
- build:
name: x220-hotp-maximized
target: x220-hotp-maximized
requires:
- x230-hotp-maximized
- build:
name: x220-maximized
target: x220-maximized
requires:
- x230-hotp-maximized
- build:
name: t420-hotp-maximized
target: t420-hotp-maximized
requires:
- x230-hotp-maximized
- build:
name: t420-maximized
target: t420-maximized
requires:
- x230-hotp-maximized
- build:
name: x230-flash
target: x230-flash
requires:
- x230-hotp-maximized
- build:
name: t430-flash
target: t430-flash
requires:
- x230-hotp-maximized
- build:
name: t430
target: t430
requires:
- x230-hotp-maximized
- build:
name: x230
target: x230
requires:
- x230-hotp-maximized
- build:
name: x230-hotp-verification
target: x230-hotp-verification
requires:
- x230-hotp-maximized
- build:
name: t430-hotp-maximized
target: t430-hotp-maximized
requires:
- x230-hotp-maximized
- build:
name: t430-maximized
target: t430-maximized
requires:
- x230-hotp-maximized
- build:
name: qemu-coreboot
target: qemu-coreboot
requires:
- x230-hotp-maximized
- build:
name: qemu-coreboot-fbwhiptail
target: qemu-coreboot-fbwhiptail
requires:
- x230-hotp-maximized
- build:
name: kgpe-d16_workstation-usb_keyboard
target: kgpe-d16_workstation-usb_keyboard
requires:
- x230-hotp-maximized
- build:
name: kgpe-d16_server
target: kgpe-d16_server
requires:
- x230-hotp-maximized
- build:
name: kgpe-d16_server-whiptail
target: kgpe-d16_server-whiptail
requires:
- x230-hotp-maximized
- build:
name: librem_mini
target: librem_mini
requires:
- x230-hotp-maximized
- build:
name: librem_l1um
target: librem_l1um
requires:
- x230-hotp-maximized
- build:
name: librem_mini_v2
target: librem_mini_v2
requires:
- x230-hotp-maximized
########################
########################
### OLD STUFF ###
########################
########################
# linuxboot steps need something to pass in the kernel header path
# skipping for now
# - run:
# name: qemu-linuxboot-edk2
# command: |
# ./build/make-4.2.1/make \
# CROSS=/cross/bin/x86_64-linux-musl- \
# BOARD=qemu-linuxboot \
# `/bin/pwd`/build/linuxboot-git/build/qemu/.configured \
# # Run first to avoid too many processes
#
# - run:
# name: qemu-linuxboot
# command: |
# ./build/make-4.2.1/make \
# CROSS=/cross/bin/x86_64-linux-musl- \
# CPUS=16 \
# V=1 \
# BOARD=qemu-linuxboot \
#
# - store-artifacts:
# path: build/qemu-linuxboot/linuxboot.rom
# - store-artifacts:
# path: build/qemu-linuxboot/hashes.txt