-
-
Notifications
You must be signed in to change notification settings - Fork 191
/
Copy pathconfig.yml
565 lines (508 loc) · 17.6 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
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
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
version: 2.1
commands:
build_board:
parameters:
arch:
type: string
target:
type: string
subcommand:
type: string
steps:
- run:
name: Make Board (console logs not contiguous because multiple CPUs used to build under CircleCI, see logs in artifacts or Output build failing logs below in case of failed step)
command: |
echo "Sourcing /devenv.sh since docker entrypoint doesn't do it as expected"
source /devenv.sh
rm -rf build/<< parameters.arch >>/<< parameters.target >>/* build/<< parameters.arch >>/log/*
make V=1 BOARD=<< parameters.target >> << parameters.subcommand >> | ts || touch ./tmpDir/failed_build
no_output_timeout: 3h
- run:
name: Output hashes
command: |
cat build/<< parameters.arch >>/<< parameters.target >>/hashes.txt || echo "No hashes.txt for this build step..."
- run:
name: Output sizes
command: |
cat build/<< parameters.arch >>/<< parameters.target >>/sizes.txt || echo "No sizes.txt for this build step..."
- run:
name: Archiving build logs.
command: |
tar zcvf build/<< parameters.arch >>/<< parameters.target >>/logs.tar.gz $(find build/ -name "*.log")
- run:
name: Output build failing logs
command: |
if [[ -f ./tmpDir/failed_build ]]; then
find "./build/<< parameters.arch >>/" -name "*.log" -type f -mmin -1 -exec tail -n +1 '{}' +
exit 1
else
echo "Step hasn't failed. Continuing with next step..."
fi
- store_artifacts:
path: build/<< parameters.arch >>/<< parameters.target >>
jobs:
prep_env:
docker:
- image: tlaurion/heads-dev-env:v0.2.4
resource_class: large
working_directory: ~/heads
steps:
- 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 .circleci/config.yml ./Makefile ./flake.lock ./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 .circleci/config.yml ./Makefile ./flake.lock ./modules/coreboot ./modules/musl-cross-make* ./patches/coreboot* -type f | sort -h | xargs sha256sum > ./tmpDir/coreboot_musl-cross-make.sha256sums
- run:
name: Creating musl-cross-make and musl-cross-make patches digest (musl-cross-make cache digest)
command: |
find .circleci/config.yml ./Makefile ./flake.lock modules/musl-cross-make* -type f | sort -h | xargs sha256sum > ./tmpDir/musl-cross-make.sha256sums
- restore_cache:
# First matched/found key wins and following keys are not tried
keys:
# 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
- nix-docker-heads-modules-and-patches-{{ checksum "./tmpDir/all_modules_and_patches.sha256sums" }}{{ .Environment.CACHE_VERSION }}
# Cache for coreboot module (and patches) and musl-cross-make digests (coreboot: triannual release)
- nix-docker-heads-coreboot-musl-cross-make-{{ checksum "./tmpDir/coreboot_musl-cross-make.sha256sums" }}{{ .Environment.CACHE_VERSION }}
# Cache for musl-cross-make module digest (rarely modified).
- nix-docker-heads-musl-cross-make-{{ checksum "./tmpDir/musl-cross-make.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 Optiplex 7010/9010 blobs
command: |
./blobs/xx30/optiplex_7010_9010.sh ./blobs/xx30
- run:
# me_cleaner.py present under heads xx30 blobs dir comes from https://github.com/corna/me_cleaner/blob/43612a630c79f3bc6f2653bfe90dfe0b7b137e08/me_cleaner.py
name: Download and neuter xx30 ME (keep generated GBE and extracted IFD in tree)
command: |
./blobs/xx30/download_clean_me_manually.sh -m $(readlink -f ./blobs/xx30/me_cleaner.py)
- run:
name: Download and extract t530 vbios roms for dgpu boards
command: |
echo skipping for now
exit 0
./blobs/xx30/vbios_t530.sh
- run:
name: Download and extract w530 vbios roms for dgpu boards
command: |
echo skipping for now
exit 0
./blobs/xx30/vbios_w530.sh
- persist_to_workspace:
root: ~/heads
paths:
- .
build_and_persist:
docker:
- image: tlaurion/heads-dev-env:v0.2.4
resource_class: large
working_directory: ~/heads
parameters:
arch:
type: string
default: x86
target:
type: string
subcommand:
type: string
steps:
- attach_workspace:
at: ~/heads
- build_board:
arch: << parameters.arch >>
target: << parameters.target >>
subcommand: << parameters.subcommand >>
- persist_to_workspace:
root: ~/heads
paths:
- packages/<< parameters.arch >>
- build/<< parameters.arch >>
- crossgcc/<< parameters.arch >>
- install/<< parameters.arch >>
build:
docker:
- image: tlaurion/heads-dev-env:v0.2.4
resource_class: large
working_directory: ~/heads
parameters:
arch:
type: string
default: x86
target:
type: string
subcommand:
type: string
steps:
- attach_workspace:
at: ~/heads
- build_board:
arch: <<parameters.arch>>
target: <<parameters.target>>
subcommand: <<parameters.subcommand>>
save_cache:
docker:
- image: tlaurion/heads-dev-env:v0.2.4
resource_class: large
working_directory: ~/heads
steps:
- attach_workspace:
at: ~/heads
- save_cache:
# Generate cache for the same musl-cross-make module definition if hash is not previously existing
# CircleCI removed their wildcard support, so we have to list precise versions to cache in directory names
key: nix-docker-heads-musl-cross-make-{{ checksum "./tmpDir/musl-cross-make.sha256sums" }}{{ .Environment.CACHE_VERSION }}
paths:
- build/ppc64/musl-cross-make-38e52db8358c043ae82b346a2e6e66bc86a53bc1
- build/x86/musl-cross-make-38e52db8358c043ae82b346a2e6e66bc86a53bc1
- crossgcc
- packages
- save_cache:
# Generate cache for the same coreboot and musl-cross-make modules definition if hash is not previously existing
# CircleCI removed their wildcard support, so we have to list precise versions to cache in directory names
key: nix-docker-heads-coreboot-musl-cross-make-{{ checksum "./tmpDir/coreboot_musl-cross-make.sha256sums" }}{{ .Environment.CACHE_VERSION }}
paths:
- build/ppc64/coreboot-talos_2
- build/ppc64/musl-cross-make-38e52db8358c043ae82b346a2e6e66bc86a53bc1
- build/x86/coreboot-4.11
- build/x86/coreboot-24.02.01
- build/x86/coreboot-dasharo
- build/x86/coreboot-purism
- build/x86/musl-cross-make-38e52db8358c043ae82b346a2e6e66bc86a53bc1
- crossgcc
- packages
- save_cache:
# Generate cache for the exact same modules definitions if hash is not previously existing
key: nix-docker-heads-modules-and-patches-{{ checksum "./tmpDir/all_modules_and_patches.sha256sums" }}{{ .Environment.CACHE_VERSION }}
paths:
- build
- crossgcc
- install
- packages
workflows:
version: 2
build_and_test:
jobs:
- prep_env
# This step builds musl-cross-make for x86 architecture, which will be used by subsequent x86 board builds
- build_and_persist:
name: x86-musl-cross-make
target: x230-hotp-maximized
subcommand: "musl-cross-make"
requires:
- prep_env
# This step builds musl-cross-make for ppc64 architecture, which will be used by subsequent ppc64 board builds
- build_and_persist:
name: ppc64-musl-cross-make
arch: ppc64
target: UNTESTED_talos-2
subcommand: "musl-cross-make"
requires:
- 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 24.02.01
- build_and_persist:
name: x230-hotp-maximized
target: x230-hotp-maximized
subcommand: ""
requires:
- x86-musl-cross-make
# coreboot purism
- build_and_persist:
name: librem_14
target: librem_14
subcommand: ""
requires:
- x230-hotp-maximized
# coreboot nitropad
# Nitropads depending on x230-hotp-maximized cache since kernel is 6.x and coreboot is git is unshared
# We use nitropad's coreboot's fork crossgcc
# No need to wait further for other board's cache
# We reuse built modules from x230-hotp-maximized cache only
- build_and_persist:
name: novacustom-nv4x_adl
target: novacustom-nv4x_adl
subcommand: ""
requires:
- x230-hotp-maximized
# coreboot talos_2
- build_and_persist:
name: UNTESTED_talos-2
arch: ppc64
target: UNTESTED_talos-2
subcommand: ""
requires:
- ppc64-musl-cross-make
# coreboot 4.11
- build_and_persist:
name: librem_l1um
target: librem_l1um
subcommand: ""
requires:
- x86-musl-cross-make
# Cache one workspace per architecture
# Make sure workspace caches are chainloaded and the last in chain for an arch is saved
- save_cache:
requires:
- UNTESTED_talos-2
- librem_14
# Those onboarding new boards should add their entries below.
# coreboot 24.02.01 boards
- build:
name: x220-hotp-maximized
target: x220-hotp-maximized
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: x220-maximized
target: x220-maximized
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: t420-hotp-maximized
target: t420-hotp-maximized
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: t420-maximized
target: t420-maximized
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: x230-hotp-maximized_usb-kb
target: x230-hotp-maximized_usb-kb
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: t430-hotp-maximized
target: t430-hotp-maximized
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: x230-maximized
target: x230-maximized
subcommand: ""
requires:
- x230-hotp-maximized
#TODO: move away of 24.02.01 coreboot and depend on optiplex specific dasharo commit
- build:
name: optiplex-7010_9010-maximized
target: optiplex-7010_9010-maximized
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: optiplex-7010_9010-hotp-maximized
target: optiplex-7010_9010-hotp-maximized
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: optiplex-7010_9010_TXT-maximized
target: optiplex-7010_9010_TXT-maximized
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: optiplex-7010_9010_TXT-hotp-maximized
target: optiplex-7010_9010_TXT-hotp-maximized
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: x230-maximized-fhd_edp
target: x230-maximized-fhd_edp
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: x230-hotp-maximized-fhd_edp
target: x230-hotp-maximized-fhd_edp
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: w530-hotp-maximized
target: w530-hotp-maximized
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: t430-maximized
target: t430-maximized
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: w530-maximized
target: w530-maximized
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: t530-maximized
target: t530-maximized
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: t530-hotp-maximized
target: t530-hotp-maximized
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: UNTESTED_t440p-maximized
target: UNTESTED_t440p-maximized
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: UNTESTED_t440p-hotp-maximized
target: UNTESTED_t440p-hotp-maximized
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: UNTESTED_w541-maximized
target: UNTESTED_w541-maximized
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: UNTESTED_w541-hotp-maximized
target: UNTESTED_w541-hotp-maximized
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: qemu-coreboot-fbwhiptail-tpm2-hotp
target: qemu-coreboot-fbwhiptail-tpm2-hotp
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: z220-cmt-maximized
target: z220-cmt-maximized
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: z220-cmt-hotp-maximized
target: z220-cmt-hotp-maximized
subcommand: ""
requires:
- x230-hotp-maximized
# coreboot purism
# librem boards
- build:
name: librem_13v2
target: librem_13v2
subcommand: ""
requires:
- librem_14
- build:
name: librem_15v3
target: librem_15v3
subcommand: ""
requires:
- librem_14
- build:
name: librem_13v4
target: librem_13v4
subcommand: ""
requires:
- librem_14
- build:
name: librem_15v4
target: librem_15v4
subcommand: ""
requires:
- librem_14
- build:
name: librem_mini
target: librem_mini
subcommand: ""
requires:
- librem_14
- build:
name: librem_mini_v2
target: librem_mini_v2
subcommand: ""
requires:
- librem_14
- build:
name: librem_11
target: librem_11
subcommand: ""
requires:
- librem_14
# dasharo release, share 24.02.01 utils/crossgcc
- build:
name: UNTESTED_nitropad-ns50
target: UNTESTED_nitropad-ns50
subcommand: ""
requires:
- novacustom-nv4x_adl
- build:
name: novacustom-v560tu
target: novacustom-v560tu
subcommand: ""
requires:
- x230-hotp-maximized
- build:
name: novacustom-v540tu
target: novacustom-v540tu
subcommand: ""
requires:
- x230-hotp-maximized
# coreboot 4.11
- build:
name: UNMAINTAINED_kgpe-d16_workstation
target: UNMAINTAINED_kgpe-d16_workstation
subcommand: ""
requires:
- librem_l1um
# coreboot 4.11
- build:
name: UNMAINTAINED_kgpe-d16_workstation-usb_keyboard
target: UNMAINTAINED_kgpe-d16_workstation-usb_keyboard
subcommand: ""
requires:
- librem_l1um
# coreboot 4.11
- build:
name: UNMAINTAINED_kgpe-d16_server
target: UNMAINTAINED_kgpe-d16_server
subcommand: ""
requires:
- librem_l1um
# coreboot 4.11
- build:
name: UNMAINTAINED_kgpe-d16_server-whiptail
target: UNMAINTAINED_kgpe-d16_server-whiptail
subcommand: ""
requires:
- librem_l1um