Skip to content

Commit f009acb

Browse files
authored
Merge pull request #842 from tlaurion/CPUS_as_make_argument
Add 'CPUS' as make BOARD=X argument
2 parents 0eb1f69 + e3c81a9 commit f009acb

File tree

4 files changed

+29
-29
lines changed

4 files changed

+29
-29
lines changed

.circleci/config.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
# command: |
5151
# ./build/make-4.2.1/make \
5252
# CROSS=/cross/bin/x86_64-linux-musl- \
53-
# --load 2 \
53+
# CPUS=4 \
5454
# V=1 \
5555
# BOARD=qemu-linuxboot \
5656
#
@@ -59,11 +59,29 @@ jobs:
5959
# - store-artifacts:
6060
# path: build/qemu-linuxboot/hashes.txt
6161

62+
- run:
63+
name: librem_mini-NoTPM
64+
command: |
65+
rm -rf build/librem_mini-NoTPM/* build/log/* && make CPUS=4 \
66+
V=1 \
67+
BOARD=librem_mini-NoTPM || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
68+
no_output_timeout: 3h
69+
- run:
70+
name: Ouput librem_mini-NoTPM hashes
71+
command: |
72+
cat build/librem_mini-NoTPM/hashes.txt \
73+
- run:
74+
name: Archiving build logs for librem_mini-NoTPM
75+
command: |
76+
tar zcvf build/librem_mini-NoTPM/logs.tar.gz build/log/*
77+
- store-artifacts:
78+
path: build/librem_mini-NoTPM
79+
6280
- run:
6381
name: x230-flash
6482
#We delete build/make-4.2.1/ directory until issue #799 is fixed.
6583
command: |
66-
rm -rf build/x230-flash/* build/log/* && make --load 2 \
84+
rm -rf build/x230-flash/* build/log/* && make CPUS=4 \
6785
V=1 \
6886
BOARD=x230-flash || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
6987
no_output_timeout: 3h
@@ -81,7 +99,7 @@ jobs:
8199
- run:
82100
name: t430-flash
83101
command: |
84-
rm -rf build/t430-flash/* build/log/* && make --load 2 \
102+
rm -rf build/t430-flash/* build/log/* && make CPUS=4 \
85103
V=1 \
86104
BOARD=t430-flash || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
87105
no_output_timeout: 3h
@@ -99,7 +117,7 @@ jobs:
99117
- run:
100118
name: t430
101119
command: |
102-
rm -rf build/t430/* build/log/* && make --load 2 \
120+
rm -rf build/t430/* build/log/* && make CPUS=4 \
103121
V=1 \
104122
BOARD=t430 || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
105123
no_output_timeout: 3h
@@ -117,7 +135,7 @@ jobs:
117135
- run:
118136
name: x230
119137
command: |
120-
rm -rf build/x230/* build/log/* && make --load 2 \
138+
rm -rf build/x230/* build/log/* && make CPUS=4 \
121139
V=1 \
122140
BOARD=x230 || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
123141
no_output_timeout: 3h
@@ -135,7 +153,7 @@ jobs:
135153
- run:
136154
name: x230-hotp-verification
137155
command: |
138-
rm -rf build/x230-hotp-verification/* build/log/* && make --load 2 \
156+
rm -rf build/x230-hotp-verification/* build/log/* && make CPUS=4 \
139157
V=1 \
140158
BOARD=x230-hotp-verification || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
141159
no_output_timeout: 3h
@@ -150,28 +168,10 @@ jobs:
150168
- store-artifacts:
151169
path: build/x230-hotp-verification
152170

153-
- run:
154-
name: librem_mini-NoTPM
155-
command: |
156-
rm -rf build/librem_mini-NoTPM/* build/log/* && make --load 2 \
157-
V=1 \
158-
BOARD=librem_mini-NoTPM || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
159-
no_output_timeout: 3h
160-
- run:
161-
name: Ouput librem_mini-NoTPM hashes
162-
command: |
163-
cat build/librem_mini-NoTPM/hashes.txt \
164-
- run:
165-
name: Archiving build logs for librem_mini-NoTPM
166-
command: |
167-
tar zcvf build/librem_mini-NoTPM/logs.tar.gz build/log/*
168-
- store-artifacts:
169-
path: build/librem_mini-NoTPM
170-
171171
- run:
172172
name: qemu-coreboot
173173
command: |
174-
rm -rf build/qemu-coreboot/* build/log/* && make --load 2 \
174+
rm -rf build/qemu-coreboot/* build/log/* && make CPUS=4 \
175175
V=1 \
176176
BOARD=qemu-coreboot || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
177177
no_output_timeout: 3h

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ INSTALL := $(pwd)/install
1616
log_dir := $(build)/log
1717

1818
# Controls how many parallel jobs are invoked in subshells
19-
CPUS := $(shell nproc)
19+
CPUS ?= $(shell nproc)
2020
#MAKE_JOBS ?= -j$(CPUS) --max-load 16
2121

2222
# Create the log directory if it doesn't already exist

modules/coreboot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ $(COREBOOT_TOOLCHAIN):
6767
else
6868
COREBOOT_TOOLCHAIN="$(build)/$(coreboot_base_dir)/.xcompile"
6969
$(COREBOOT_TOOLCHAIN): $(build)/$(coreboot_base_dir)/.canary
70-
$(MAKE) -C "$(build)/$(coreboot_base_dir)" CPUS=`nproc` crossgcc-i386
70+
$(MAKE) -C "$(build)/$(coreboot_base_dir)" CPUS=$$CPUS crossgcc-i386
7171
endif
7272

7373
$(build)/$(coreboot_dir)/.configured: $(COREBOOT_IASL) $(COREBOOT_TOOLCHAIN)
7474
$(COREBOOT_IASL): $(build)/$(coreboot_base_dir)/.canary
75-
$(MAKE) -C "$(build)/$(coreboot_base_dir)" CPUS=`nproc` iasl
75+
$(MAKE) -C "$(build)/$(coreboot_base_dir)" CPUS=$$CPUS iasl
7676

7777
# Force a rebuild if the inputs have changed
7878
$(build)/$(coreboot_dir)/.build: \

modules/linuxboot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ linuxboot_configure := \
2121
if [ "$(linuxboot_board)" = "qemu" ]; then \
2222
echo >&2 "Pre-building edk2 OVMF" ; \
2323
( cd $(build)/$(linuxboot_base_dir)/edk2/OvmfPkg ; \
24-
./build.sh -n `nproc` \
24+
./build.sh -n $$CPUS \
2525
) || exit 1 ; \
2626
fi ; \
2727
touch .config ; \

0 commit comments

Comments
 (0)