Skip to content

Commit

Permalink
Merge pull request #842 from tlaurion/CPUS_as_make_argument
Browse files Browse the repository at this point in the history
Add 'CPUS' as make BOARD=X argument
  • Loading branch information
tlaurion authored Sep 29, 2020
2 parents 0eb1f69 + e3c81a9 commit f009acb
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 29 deletions.
50 changes: 25 additions & 25 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
# command: |
# ./build/make-4.2.1/make \
# CROSS=/cross/bin/x86_64-linux-musl- \
# --load 2 \
# CPUS=4 \
# V=1 \
# BOARD=qemu-linuxboot \
#
Expand All @@ -59,11 +59,29 @@ jobs:
# - store-artifacts:
# path: build/qemu-linuxboot/hashes.txt

- run:
name: librem_mini-NoTPM
command: |
rm -rf build/librem_mini-NoTPM/* build/log/* && make CPUS=4 \
V=1 \
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) \
no_output_timeout: 3h
- run:
name: Ouput librem_mini-NoTPM hashes
command: |
cat build/librem_mini-NoTPM/hashes.txt \
- run:
name: Archiving build logs for librem_mini-NoTPM
command: |
tar zcvf build/librem_mini-NoTPM/logs.tar.gz build/log/*
- store-artifacts:
path: build/librem_mini-NoTPM

- run:
name: x230-flash
#We delete build/make-4.2.1/ directory until issue #799 is fixed.
command: |
rm -rf build/x230-flash/* build/log/* && make --load 2 \
rm -rf build/x230-flash/* build/log/* && make CPUS=4 \
V=1 \
BOARD=x230-flash || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
Expand All @@ -81,7 +99,7 @@ jobs:
- run:
name: t430-flash
command: |
rm -rf build/t430-flash/* build/log/* && make --load 2 \
rm -rf build/t430-flash/* build/log/* && make CPUS=4 \
V=1 \
BOARD=t430-flash || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
Expand All @@ -99,7 +117,7 @@ jobs:
- run:
name: t430
command: |
rm -rf build/t430/* build/log/* && make --load 2 \
rm -rf build/t430/* build/log/* && make CPUS=4 \
V=1 \
BOARD=t430 || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
Expand All @@ -117,7 +135,7 @@ jobs:
- run:
name: x230
command: |
rm -rf build/x230/* build/log/* && make --load 2 \
rm -rf build/x230/* build/log/* && make CPUS=4 \
V=1 \
BOARD=x230 || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
Expand All @@ -135,7 +153,7 @@ jobs:
- run:
name: x230-hotp-verification
command: |
rm -rf build/x230-hotp-verification/* build/log/* && make --load 2 \
rm -rf build/x230-hotp-verification/* build/log/* && make CPUS=4 \
V=1 \
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) \
no_output_timeout: 3h
Expand All @@ -150,28 +168,10 @@ jobs:
- store-artifacts:
path: build/x230-hotp-verification

- run:
name: librem_mini-NoTPM
command: |
rm -rf build/librem_mini-NoTPM/* build/log/* && make --load 2 \
V=1 \
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) \
no_output_timeout: 3h
- run:
name: Ouput librem_mini-NoTPM hashes
command: |
cat build/librem_mini-NoTPM/hashes.txt \
- run:
name: Archiving build logs for librem_mini-NoTPM
command: |
tar zcvf build/librem_mini-NoTPM/logs.tar.gz build/log/*
- store-artifacts:
path: build/librem_mini-NoTPM

- run:
name: qemu-coreboot
command: |
rm -rf build/qemu-coreboot/* build/log/* && make --load 2 \
rm -rf build/qemu-coreboot/* build/log/* && make CPUS=4 \
V=1 \
BOARD=qemu-coreboot || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ INSTALL := $(pwd)/install
log_dir := $(build)/log

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

# Create the log directory if it doesn't already exist
Expand Down
4 changes: 2 additions & 2 deletions modules/coreboot
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ $(COREBOOT_TOOLCHAIN):
else
COREBOOT_TOOLCHAIN="$(build)/$(coreboot_base_dir)/.xcompile"
$(COREBOOT_TOOLCHAIN): $(build)/$(coreboot_base_dir)/.canary
$(MAKE) -C "$(build)/$(coreboot_base_dir)" CPUS=`nproc` crossgcc-i386
$(MAKE) -C "$(build)/$(coreboot_base_dir)" CPUS=$$CPUS crossgcc-i386
endif

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

# Force a rebuild if the inputs have changed
$(build)/$(coreboot_dir)/.build: \
Expand Down
2 changes: 1 addition & 1 deletion modules/linuxboot
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ linuxboot_configure := \
if [ "$(linuxboot_board)" = "qemu" ]; then \
echo >&2 "Pre-building edk2 OVMF" ; \
( cd $(build)/$(linuxboot_base_dir)/edk2/OvmfPkg ; \
./build.sh -n `nproc` \
./build.sh -n $$CPUS \
) || exit 1 ; \
fi ; \
touch .config ; \
Expand Down

0 comments on commit f009acb

Please sign in to comment.