From 837b3162d205dcfb11ab0f26bbc4c49277e4979f Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 10 Jun 2015 13:23:30 +0200 Subject: reproducible coreboot: add toolchain(s) information to coreboot.html --- bin/reproducible_coreboot.sh | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'bin/reproducible_coreboot.sh') diff --git a/bin/reproducible_coreboot.sh b/bin/reproducible_coreboot.sh index a4074658..7b41f8d8 100755 --- a/bin/reproducible_coreboot.sh +++ b/bin/reproducible_coreboot.sh @@ -95,8 +95,10 @@ NUM_CPU=$(cat /proc/cpuinfo |grep '^processor'|wc -l) echo "=============================================================================" echo "$(date -u) - Building cross compilers for ${ARCHS} now." - GOT_XTOOLCHAIN=false +# +# build the cross toolchains +# set +e for ARCH in ${ARCHS} ; do echo "=============================================================================" @@ -112,6 +114,26 @@ set -e if ! $GOT_XTOOLCHAIN ; then echo "Need at least one cross toolchain, aborting." fi +# +# create html about toolchains used +# +TOOLCHAIN_HTML=$(mktemp) +echo "" > $TOOLCHAIN_HTML +cd util/crossgcc/tarballs +for i in * ; do + echo " " >> $TOOLCHAIN_HTML +done +echo "
cross toolchain sourcesha256sum
$i" >> $TOOLCHAIN_HTML + sha256sum $i | cut -d " " -f1 >> $TOOLCHAIN_HTML + echo "
" >> $TOOLCHAIN_HTML +echo "" >> $TOOLCHAIN_HTML +for i in gcc g++ make cmake flex bison iasl ; do + echo " " >> $TOOLCHAIN_HTML +done +echo "
Debian $(cat /etc/debian_version) package on $(dpkg --print-architecture)installed version
$i" >> $TOOLCHAIN_HTML + dpkg -s $i|grep '^Version'|cut -d " " -f2 >> $TOOLCHAIN_HTML + echo "
" >> $TOOLCHAIN_HTML +cd ../../.. echo "=============================================================================" echo "$(date -u) - Building coreboot ${COREBOOT_VERSION} images now - first build run." @@ -202,7 +224,7 @@ cat > $PAGE <<- EOF

EOF write_page "

Reproducible Coreboot

" -write_page "

Reproducible builds enable anyone to reproduce bit by bit identical binary packages from a given source, si that anyone can verify that a given binary derived from the source it was said to be derived. There is a lot more information about reproducible builds on the Debian wiki and on https://reproducible.debian.net.
" +write_page "

Reproducible builds enable anyone to reproduce bit by bit identical binary packages from a given source, so that anyone can verify that a given binary derived from the source it was said to be derived. There is a lot more information about reproducible builds on the Debian wiki and on https://reproducible.debian.net. The wiki has a lot more information, eg. why this is useful, what common issues exist and which workaround and solutions are known.
" write_page " Reproducible Coreboot is an effort to apply this to coreboot. Thus each coreboot.rom is build twice, with a few varitations added and then those two ROMs are compared using debbindiff. Please note that the toolchain is not varied at all as the rebuild happens on exactly the same system. More variations are expected to be seen in the wild.

" write_page "

There is a monthly run jenkins job to test the master branch of coreboot.git. Currently this job is triggered more often though, because this is still under development and brand new. The jenkins job is simply running reproducible_coreboot.sh in a Debian environemnt and this script is solely responsible for creating this page. Feel invited to join #debian-reproducible (on irc.oftc.net) to request job runs whenever sensible. Patches and other feedback are very much appreciated!

" write_page "

"
@@ -237,8 +259,10 @@ for i in * ; do
 done
 GOOD_PERCENT=$(echo "scale=1 ; ($GOOD_ROMS*100/$ALL_ROMS)" | bc)
 BAD_PERCENT=$(echo "scale=1 ; ($BAD_ROMS*100/$ALL_ROMS)" | bc)
-write_page "       

$GOOD_ROMS ($GOOD_PERCENT%) out of $ALL_ROMS built coreboot images were reproducible, while $BAD_ROMS ($BAD_PERCENT%) failed to build from source." +write_page "

$GOOD_ROMS ($GOOD_PERCENT%) out of $ALL_ROMS built coreboot images were reproducible in our test setup, while $BAD_ROMS ($BAD_PERCENT%) failed to build from source." write_page " These tests were last run on $DATE for version ${COREBOOT_VERSION}.

" +cat $TOOLCHAIN_HTML >> $PAGE +rm -f $TOOLCHAIN_HTML write_page " " write_page_footer coreboot cd .. -- cgit v1.2.3-54-g00ecf