From 140b1476ad55822938870cc8daec79d0d7a6115a Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 6 Jun 2015 15:22:02 +0200 Subject: reproducible coreboot: build using all cores (and use one core less on the second build), add coreboot logo and use their css --- bin/reproducible_coreboot.sh | 49 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 42 insertions(+), 7 deletions(-) (limited to 'bin') diff --git a/bin/reproducible_coreboot.sh b/bin/reproducible_coreboot.sh index 96f6191c..3bfb2cfe 100755 --- a/bin/reproducible_coreboot.sh +++ b/bin/reproducible_coreboot.sh @@ -4,7 +4,7 @@ # © 2015 Mattia Rizzolo # released under the GPLv=2 -DEBUG=true +DEBUG=false . /srv/jenkins/bin/common-functions.sh common_init "$@" @@ -152,17 +152,23 @@ cd coreboot git submodule update --init --checkout 3rdparty/blobs COREBOOT="$(git log -1 | head -3)" +NUM_CPU=$(cat /proc/cpuinfo |grep ^processor|wc -l) echo "=============================================================================" echo "$(date -u) - Building cross compilers for ${ARCHS} now." echo "=============================================================================" for ARCH in ${ARCHS} ; do - make crossgcc-$ARCH + make -j $NUM_CPU crossgcc-$ARCH done echo "=============================================================================" echo "$(date -u) - Building coreboot images now - first build run." echo "=============================================================================" export TZ="/usr/share/zoneinfo/Etc/GMT+12" +# prevent failing using more than one CPU +sed -i 's#MAKE=$i#MAKE=make#' util/abuild/abuild +# use all cores for first build +sed -i "s#cpus=1#cpus=$NUM_CPU#" util/abuild/abuild +# actually build everything bash util/abuild/abuild || true cd coreboot-builds @@ -181,6 +187,9 @@ echo "========================================================================== export TZ="/usr/share/zoneinfo/Etc/GMT-14" export LANG="fr_CH.UTF-8" export LC_ALL="fr_CH.UTF-8" +# use allmost all cores for second build +NEW_NUM_CPU=$(echo $NUM_CPU-1|bc) +sed -i "s#cpus=$NUM_CPU#cpus=$NEW_NUM_CPU#" util/abuild/abuild bash util/abuild/abuild || true export LANG="en_GB.UTF-8" @@ -209,22 +218,48 @@ echo "$(date -u) - Running $DBDVERSION on coreboot images now" echo "=============================================================================" create_results_dirs +# FIXME: should not update inplace but in $(mktemp) PAGE=$BASE/coreboot/coreboot.html -echo "

Reproducible Coreboot

This is work in progress - only TZ, LANG and LC_CTYPE variations yet and no fancy html.

" > $PAGE
+cat > PAGE <<- EOF
+
+
+  
+    
+    
+    coreboot
+    
+  
+  
+    
+
+

 

+

coreboot

+
+

coreboot™: fast and flexible and reproducible Open Source firmware?

+
+
+EOF +echo "

Reproducible Coreboot

This is work in progress - only TZ, LANG, LC_CTYPE variable and number of cores variations yet and no fancy html.

" > $PAGE
 echo -n $COREBOOT >> $PAGE
-echo "
    " >> $PAGE +echo "
" >> $PAGE +echo " " >> $PAGE +cat >> PAGE <<- EOF + + + + +EOF cd .. echo "Enjoy $REPRODUCIBLE_URL/coreboot/coreboot.html" -- cgit v1.2.3-70-g09d2