Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin tag of musl-cross, tpmtotp and msrtools #618

Merged
merged 6 commits into from
Dec 6, 2019
Merged

Conversation

osresearch
Copy link
Collaborator

These were the only three that were being pulled from git heads rather than specific tags or releases.

Also changes the top level Makefile extraction of tarballs to use --strip 1, which ensures that the extracted directory matches the name in $($(MODULE)-dir).

Add `--strip 1` to tar file extraction in the `Makefile`,
which ensures that the directory name in `build/` will
match the one listed in `$($(MODULE)_dir)`.

Signed-off-by: Trammell hudson <[email protected]>
@tlaurion
Copy link
Collaborator

@osresearch : please check #499

@tlaurion
Copy link
Collaborator

@flammit @osresearch: Not working.

Clean redo:

docker run -it fedora:29
dnf install -y @development-tools gcc-c++ gcc-gnat zlib-devel perl-Digest-MD5 perl-Digest-SHA uuid-devel pcsc-tools ncurses-devel lbzip2 libuuid-devel lzma elfutils-libelf-devel bc bzip2 bison flex git gnupg iasl m4 nasm patch python wget libusb-devel cmake automake pv bsdiff autoconf libtool expat-devel boost-devel libaio-devel cpio
git clone https://github.com/osresearch/heads.git
git merge musl-cross-pin
make BOARD=x230

Output:

Cloning into 'heads'...
remote: Enumerating objects: 5360, done.
remote: Total 5360 (delta 0), reused 0 (delta 0), pack-reused 5360
Receiving objects: 100% (5360/5360), 2.40 MiB | 550.00 KiB/s, done.
Resolving deltas: 100% (3572/3572), done.
[root@1d128ed3012d /]# cd heads/
[root@1d128ed3012d heads]# git checkout musl-cross-pin
Branch 'musl-cross-pin' set up to track remote branch 'musl-cross-pin' from 'origin'.
Switched to a new branch 'musl-cross-pin'
[root@1d128ed3012d heads]# git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
[root@1d128ed3012d heads]# git merge musl-cross-pin
Updating 4f0e778..2980eb0
Fast-forward
 Makefile                                               |  7 ++++---
 modules/msrtools                                       | 11 ++++++-----
 modules/musl-cross                                     | 10 ++++++----
 modules/tpmtotp                                        | 10 +++++-----
 patches/{musl-cross.patch => musl-cross-81d563e.patch} | 12 ++++++++++++
 5 files changed, 33 insertions(+), 17 deletions(-)
 rename patches/{musl-cross.patch => musl-cross-81d563e.patch} (57%)
[root@1d128ed3012d heads]# make BOARD=x230
2019-11-09 03:37:39+00:00 WGET https://www.coreboot.org/releases/coreboot-blobs-4.8.1.tar.xz
--2019-11-09 03:37:39--  https://www.coreboot.org/releases/coreboot-blobs-4.8.1.tar.xz
Resolving www.coreboot.org (www.coreboot.org)... 78.46.105.101, 2a01:4f8:121:1254::2
Connecting to www.coreboot.org (www.coreboot.org)|78.46.105.101|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7075992 (6.7M) [application/octet-stream]
Saving to: ‘/heads/packages/coreboot-blobs-4.8.1.tar.xz.tmp’

/heads/packages/coreboot-blobs-4.8.1.tar.x 100%[=====================================================================================>]   6.75M   552KB/s    in 13s     

2019-11-09 03:37:53 (546 KB/s) - ‘/heads/packages/coreboot-blobs-4.8.1.tar.xz.tmp’ saved [7075992/7075992]

echo "18aa509ae3af005a05d7b1e0b0246dc640249c14fc828f5144b6fd20bb10e295  /heads/packages/coreboot-blobs-4.8.1.tar.xz" | sha256sum --check -
/heads/packages/coreboot-blobs-4.8.1.tar.xz: OK
mkdir -p "/heads/build/coreboot-4.8.1/3rdparty/blobs/"
tar -xf "/heads/packages/coreboot-blobs-4.8.1.tar.xz" --strip 1 -C "/heads/build/coreboot-4.8.1/3rdparty/blobs/"
if [ -r patches/coreboot-blobs-4.8.1.patch ]; then ( cd /heads/build/coreboot-4.8.1/3rdparty/blobs/ ; patch -p1 ) < patches/coreboot-blobs-4.8.1.patch || exit 1 ; fi
if [ -d patches/coreboot-blobs-4.8.1 ] && [ -r patches/coreboot-blobs-4.8.1 ] ; then for patch in patches/coreboot-blobs-4.8.1/*.patch ; do echo "Applying patch file : $patch " ; ( cd /heads/build/coreboot-4.8.1/3rdparty/blobs/ ; patch -p1 ) < $patch || exit 1 ; done ; fi
2019-11-09 03:37:54+00:00 CONFIG coreboot-blobs
2019-11-09 03:37:54+00:00 MAKE coreboot-blobs
2019-11-09 03:37:54+00:00 DONE coreboot-blobs
2019-11-09 03:37:54+00:00 WGET https://www.coreboot.org/releases/coreboot-4.8.1.tar.xz
--2019-11-09 03:37:54--  https://www.coreboot.org/releases/coreboot-4.8.1.tar.xz
Resolving www.coreboot.org (www.coreboot.org)... 78.46.105.101, 2a01:4f8:121:1254::2
Connecting to www.coreboot.org (www.coreboot.org)|78.46.105.101|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 31763064 (30M) [application/octet-stream]
Saving to: ‘/heads/packages/coreboot-4.8.1.tar.xz.tmp’

/heads/packages/coreboot-4.8.1.tar.xz.tmp  100%[=====================================================================================>]  30.29M   634KB/s    in 56s     

2019-11-09 03:38:51 (558 KB/s) - ‘/heads/packages/coreboot-4.8.1.tar.xz.tmp’ saved [31763064/31763064]

echo "f0ddf4db0628c1fe1e8348c40084d9cbeb5771400c963fd419cda3995b69ad23  /heads/packages/coreboot-4.8.1.tar.xz" | sha256sum --check -
/heads/packages/coreboot-4.8.1.tar.xz: OK
mkdir -p "/heads/build/coreboot-4.8.1/"
tar -xf "/heads/packages/coreboot-4.8.1.tar.xz" --strip 1 -C "/heads/build/coreboot-4.8.1/"
if [ -r patches/coreboot-4.8.1.patch ]; then ( cd /heads/build/coreboot-4.8.1/ ; patch -p1 ) < patches/coreboot-4.8.1.patch || exit 1 ; fi
if [ -d patches/coreboot-4.8.1 ] && [ -r patches/coreboot-4.8.1 ] ; then for patch in patches/coreboot-4.8.1/*.patch ; do echo "Applying patch file : $patch " ; ( cd /heads/build/coreboot-4.8.1/ ; patch -p1 ) < $patch || exit 1 ; done ; fi
Applying patch file : patches/coreboot-4.8.1/0000-measuredboot.patch 
patching file src/Kconfig
patching file src/drivers/pc80/tpm/romstage.c
patching file src/drivers/pc80/tpm/tis.c
patching file src/include/program_loading.h
patching file src/lib/cbfs.c
patching file src/lib/hardwaremain.c
patching file src/lib/rmodule.c
patching file src/security/tpm/Makefile.inc
patching file src/security/tpm/sha1.c
patching file src/security/tpm/sha1.h
patching file src/security/tpm/tss.h
patching file src/security/tpm/tss/tcg-1.2/tss.c
Applying patch file : patches/coreboot-4.8.1/0001-mb-purism-librem_skl-add-support-for-13v4-15v4-board.patch 
patching file src/mainboard/purism/librem_skl/Kconfig
Hunk #1 succeeded at 21 (offset -4 lines).
Hunk #2 succeeded at 32 (offset -4 lines).
Hunk #3 succeeded at 55 (offset -4 lines).
Hunk #4 succeeded at 69 (offset -4 lines).
patching file src/mainboard/purism/librem_skl/Kconfig.name
Applying patch file : patches/coreboot-4.8.1/0002-arch-x86-acpi-Add-DMAR-RMRR-helper-functions.patch 
patching file src/arch/x86/acpi.c
patching file src/arch/x86/include/arch/acpi.h
patching file src/northbridge/intel/gm45/acpi.c
patching file src/northbridge/intel/haswell/acpi.c
patching file src/northbridge/intel/sandybridge/acpi.c
patching file src/soc/intel/broadwell/acpi.c
patching file src/soc/intel/fsp_broadwell_de/acpi.c
patching file src/soc/intel/skylake/acpi.c
Applying patch file : patches/coreboot-4.8.1/0003-soc-intel-skylake-Generate-ACPI-RMRR-table.patch 
patching file src/soc/intel/common/block/include/intelblocks/systemagent.h
patching file src/soc/intel/common/block/systemagent/systemagent_early.c
patching file src/soc/intel/skylake/acpi.c
Applying patch file : patches/coreboot-4.8.1/0007-intel-fsp-fsp2_0-Fix-FSP-2.0-headers-to-match-github.patch 
patching file src/vendorcode/intel/fsp/fsp2_0/skykabylake/MemInfoHob.h
Applying patch file : patches/coreboot-4.8.1/0009-Add-heads-TPM-measurements-to-Skylake-Kabylake.patch 
patching file src/arch/x86/postcar.c
patching file src/drivers/intel/fsp2_0/memory_init.c
patching file src/drivers/intel/fsp2_0/silicon_init.c
patching file src/drivers/pc80/tpm/Makefile.inc
patching file src/security/tpm/Makefile.inc
Hunk #1 succeeded at 13 with fuzz 2 (offset 9 lines).
Applying patch file : patches/coreboot-4.8.1/0020-kgpe-d16.patch 
patching file src/mainboard/asus/kgpe-d16/Kconfig
patching file src/mainboard/asus/kgpe-d16/devicetree.cb
patching file src/mainboard/asus/kgpe-d16/dsdt.asl
patching file src/mainboard/asus/kgpe-d16/mainboard.c
patching file src/mainboard/asus/kgpe-d16/romstage.c
Applying patch file : patches/coreboot-4.8.1/0030-sandybridge.patch 
patching file src/northbridge/intel/sandybridge/romstage.c
Applying patch file : patches/coreboot-4.8.1/0050-buildgcc-Do-not-try-to-install-GCC-if-build-failed.patch 
patching file util/crossgcc/buildgcc
Applying patch file : patches/coreboot-4.8.1/0051-buildgcc-Update-IASL-to-20180531.patch 
patching file util/crossgcc/buildgcc
patching file util/crossgcc/patches/acpica-unix2-20161222_iasl.patch
patching file util/crossgcc/patches/acpica-unix2-20180531_iasl.patch
patching file util/crossgcc/sum/acpica-unix2-20161222.tar.gz.cksum
patching file util/crossgcc/sum/acpica-unix2-20180531.tar.gz.cksum
Applying patch file : patches/coreboot-4.8.1/0052-crossgcc-Update-to-clang-6.0-cmake-3.11.3.patch 
patching file util/crossgcc/buildgcc
patching file util/crossgcc/sum/cfe-4.0.0.src.tar.xz.cksum
patching file util/crossgcc/sum/cfe-6.0.0.src.tar.xz.cksum
patching file util/crossgcc/sum/clang-tools-extra-4.0.0.src.tar.xz.cksum
patching file util/crossgcc/sum/clang-tools-extra-6.0.0.src.tar.xz.cksum
patching file util/crossgcc/sum/cmake-3.11.3.tar.gz.cksum
patching file util/crossgcc/sum/cmake-3.9.0-rc3.tar.gz.cksum
patching file util/crossgcc/sum/compiler-rt-4.0.0.src.tar.xz.cksum
patching file util/crossgcc/sum/compiler-rt-6.0.0.src.tar.xz.cksum
patching file util/crossgcc/sum/llvm-4.0.0.src.tar.xz.cksum
patching file util/crossgcc/sum/llvm-6.0.0.src.tar.xz.cksum
Applying patch file : patches/coreboot-4.8.1/0053-src-Get-rid-of-unneeded-whitespace.patch 
patching file util/crossgcc/buildgcc
Applying patch file : patches/coreboot-4.8.1/0054-util-crossgcc-Allow-building-a-new-gcc-against-new-b.patch 
patching file util/crossgcc/buildgcc
Applying patch file : patches/coreboot-4.8.1/0055-crosgcc-patches-Add-make-patch-for-GLIBC-glob-interf.patch 
patching file util/crossgcc/patches/make-4.2.1_gnu_glob_interface_v2.patch
Applying patch file : patches/coreboot-4.8.1/0056-util-crossgcc-update-to-gcc-8.1.0-and-binutils-2.30.patch 
patching file util/crossgcc/buildgcc
patching file util/crossgcc/patches/binutils-2.30_mips-gold.patch (renamed from util/crossgcc/patches/binutils-2.29.1_mips-gold.patch)
patching file util/crossgcc/patches/binutils-2.30_nds32.patch
patching file util/crossgcc/patches/binutils-2.30_no-bfd-doc.patch (renamed from util/crossgcc/patches/binutils-2.29.1_no-bfd-doc.patch)
patching file util/crossgcc/patches/gcc-6.3.0_ada-raise.patch
patching file util/crossgcc/patches/gcc-6.3.0_elf_biarch.patch
patching file util/crossgcc/patches/gcc-6.3.0_memmodel.patch
patching file util/crossgcc/patches/gcc-6.3.0_nds32_ite.patch
patching file util/crossgcc/patches/gcc-6.3.0_no-p-var.patch
patching file util/crossgcc/patches/gcc-6.3.0_pointer_integer.patch
patching file util/crossgcc/patches/gcc-6.3.0_riscv.patch
patching file util/crossgcc/patches/gcc-8.1.0_ada-musl_workaround.patch (renamed from util/crossgcc/patches/gcc-6.3.0_ada-musl_workaround.patch)
patching file util/crossgcc/patches/gcc-8.1.0_armv6s-m.patch
patching file util/crossgcc/patches/gcc-8.1.0_gnat.patch (renamed from util/crossgcc/patches/gcc-6.3.0_gnat.patch)
patching file util/crossgcc/patches/gcc-8.1.0_libgcc.patch (renamed from util/crossgcc/patches/gcc-6.3.0_libgcc.patch)
patching file util/crossgcc/patches/gcc-8.1.0_nds32_ite.patch
patching file util/crossgcc/sum/binutils-2.29.1.tar.xz.cksum
patching file util/crossgcc/sum/binutils-2.30.tar.xz.cksum
patching file util/crossgcc/sum/gcc-6.3.0.tar.bz2.cksum
patching file util/crossgcc/sum/gcc-8.1.0.tar.xz.cksum
Applying patch file : patches/coreboot-4.8.1/0057-util-crosgcc-patches-update-make-4.2.1-patches.patch 
patching file util/crossgcc/patches/make-4.2.1_0053-glob-Do-not-assume-glibc-glob-internals.patch
patching file util/crossgcc/patches/make-4.2.1_0068-configure.ac-Support-GLIBC-glob-interface-version-2.patch
patching file util/crossgcc/patches/make-4.2.1_gnu_glob_interface_v2.patch
Applying patch file : patches/coreboot-4.8.1/0058-util-crosgcc-Fix-most-shellcheck-errors-in-buildgcc.patch 
patching file util/crossgcc/buildgcc
Applying patch file : patches/coreboot-4.8.1/0059-util-Add-description.md-to-each-util.patch 
patching file util/crossgcc/description.md
echo '******* Building crossgcc-i386 (this might take a while) ******'
******* Building crossgcc-i386 (this might take a while) ******
make -C "/heads/build/coreboot-4.8.1" CPUS=`nproc` crossgcc-i386
make[1]: Entering directory '/heads/build/coreboot-4.8.1'
Welcome to the coreboot cross toolchain builder v1.52 (June 11th, 2018)

Building toolchain using 2 thread(s).

Target architecture is i386-elf

Found compatible Ada compiler, enabling Ada support by default.

./buildgcc: line 1198: (: command not found
./buildgcc: line 1199: (: command not found
Downloading and verifing tarballs ...
 * gmp-6.1.2.tar.xz (downloading from https://ftpmirror.gnu.org/gmp/gmp-6.1.2.tar.xz)... 100%... hash verified ("9dc6981197a7d92f339192eea974f5eca48fcffe")
 * mpfr-3.1.5.tar.xz (downloading from https://ftpmirror.gnu.org/mpfr/mpfr-3.1.5.tar.xz)...   0%... Failed to download mpfr-3.1.5.tar.xz.
make[3]: *** [Makefile:26: build_gcc] Error 1
make[2]: *** [Makefile:48: build-i386] Error 2
make[1]: *** [util/crossgcc/Makefile.inc:46: crossgcc-i386] Error 2
make[1]: Leaving directory '/heads/build/coreboot-4.8.1'
make: *** [modules/coreboot:55: /heads/build/coreboot-4.8.1/util/crossgcc/xgcc/bin/i386-elf-gcc] Error 2
[root@1d128ed3012d heads]# make BOARD=x230
echo '******* Building crossgcc-i386 (this might take a while) ******'
******* Building crossgcc-i386 (this might take a while) ******
make -C "/heads/build/coreboot-4.8.1" CPUS=`nproc` crossgcc-i386
make[1]: Entering directory '/heads/build/coreboot-4.8.1'
Welcome to the coreboot cross toolchain builder v1.52 (June 11th, 2018)

Building toolchain using 2 thread(s).

Target architecture is i386-elf

Found compatible Ada compiler, enabling Ada support by default.

./buildgcc: line 1198: (: command not found
./buildgcc: line 1199: (: command not found
Downloading and verifing tarballs ...
 * gmp-6.1.2.tar.xz (cached)... hash verified ("9dc6981197a7d92f339192eea974f5eca48fcffe")
 * mpfr-3.1.5.tar.xz (downloading from https://ftpmirror.gnu.org/mpfr/mpfr-3.1.5.tar.xz)... 100%... hash verified ("c0fab77c6da4cb710c81cc04092fb9bea11a9403")
 * mpc-1.0.3.tar.gz (downloading from https://ftpmirror.gnu.org/mpc/mpc-1.0.3.tar.gz)... 100%... hash verified ("b8be66396c726fdc36ebb0f692ed8a8cca3bcc66")
 * binutils-2.30.tar.xz (downloading from https://ftpmirror.gnu.org/binutils/binutils-2.30.tar.xz)... 100%... hash verified ("574d3b5650413d6ee65195a4f5ecbddc3a38f718")
 * gcc-8.1.0.tar.xz (downloading from https://ftpmirror.gnu.org/gcc/gcc-8.1.0/gcc-8.1.0.tar.xz)... 100%... hash verified ("b34031ba9ff3e248b2c62de0825e49a1e0e01998")
Downloaded tarballs ... ok
Unpacking and patching ...
 * gmp-6.1.2.tar.xz
   o gmp-6.1.2_freebsd-configure.patch
 * mpfr-3.1.5.tar.xz
 * mpc-1.0.3.tar.gz
 * binutils-2.30.tar.xz
   o binutils-2.30_mips-gold.patch
   o binutils-2.30_nds32.patch
   o binutils-2.30_no-bfd-doc.patch
 * gcc-8.1.0.tar.xz
   o gcc-8.1.0_ada-musl_workaround.patch
   o gcc-8.1.0_armv6s-m.patch
   o gcc-8.1.0_gnat.patch
   o gcc-8.1.0_libgcc.patch
   o gcc-8.1.0_nds32_ite.patch
Unpacked and patched ... ok
Building packages ...
Building GMP v6.1.2 for host ... ok
Building MPFR v3.1.5 for host ... ok
Building MPC v1.0.3 for host ... ok
Building BINUTILS v2.30 for target ... ok
Building GCC v8.1.0 for target ... ok
Packages built ... ok
Copied EDK2 tools template ... ok
Cleaning up temporary files... ok

You can now run i386-elf cross GCC from /heads/build/coreboot-4.8.1/util/crossgcc/xgcc.
Welcome to the coreboot cross toolchain builder v1.52 (June 11th, 2018)

Building toolchain using 2 thread(s).

Downloading and verifing tarballs ...
 * acpica-unix2-20180531.tar.gz (downloading from https://acpica.org/sites/acpica/files/acpica-unix2-20180531.tar.gz)... 100%... hash verified ("17717140438d506533b4a56e34350749d7b84d6c")
Downloaded tarballs ... ok
Unpacking and patching ...
 * acpica-unix2-20180531.tar.gz
   o acpica-unix2-20180531_iasl.patch
Unpacked and patched ... ok
Building packages ...
Building IASL v20180531 for host ... ok
Packages built ... ok
Copied EDK2 tools template ... ok
Cleaning up temporary files... ok

You can now run IASL ACPI compiler from /heads/build/coreboot-4.8.1/util/crossgcc/xgcc.
make[1]: Leaving directory '/heads/build/coreboot-4.8.1'
#echo '******* Building crossgcc-arm (this might take a while) ******'
#make -C "/heads/build/coreboot-4.8.1" crossgcc-arm
2019-11-09 18:09:16+00:00 CONFIG coreboot
2019-11-09 18:09:18+00:00 WGET https://github.com/GregorR/musl-cross/archive/81d563e.tar.gz
--2019-11-09 18:09:18--  https://github.com/GregorR/musl-cross/archive/81d563e.tar.gz
Resolving github.com (github.com)... 140.82.118.4
Connecting to github.com (github.com)|140.82.118.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/GregorR/musl-cross/tar.gz/81d563efda786c73474a7f7550ad83b06c3fc585 [following]
--2019-11-09 18:09:20--  https://codeload.github.com/GregorR/musl-cross/tar.gz/81d563efda786c73474a7f7550ad83b06c3fc585
Resolving codeload.github.com (codeload.github.com)... 140.82.113.10
Connecting to codeload.github.com (codeload.github.com)|140.82.113.10|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-gzip]
Saving to: ‘/heads/packages/musl-cross-81d563e.tar.gz.tmp’

/heads/packages/musl-cross-81d563e.tar.gz.     [   <=>                                                                                ] 106.73K   227KB/s    in 0.5s    

2019-11-09 18:09:22 (227 KB/s) - ‘/heads/packages/musl-cross-81d563e.tar.gz.tmp’ saved [109294]

echo "6362751b2442dc273c0889e5ef3ce6306a38b9c415cbe8cb4cfe3b8c6d776e96  /heads/packages/musl-cross-81d563e.tar.gz" | sha256sum --check -
/heads/packages/musl-cross-81d563e.tar.gz: OK
mkdir -p "/heads/build/musl-cross/"
tar -xf "/heads/packages/musl-cross-81d563e.tar.gz" --strip 1 -C "/heads/build/musl-cross/"
if [ -r patches/musl-cross-81d563e.patch ]; then ( cd /heads/build/musl-cross/ ; patch -p1 ) < patches/musl-cross-81d563e.patch || exit 1 ; fi
patching file config.sh
patching file hashes/gmp-6.1.0.tar.bz2.sha256
patching file hashes/mpfr-3.1.4.tar.bz2.sha256
patching file hashes/mpc-1.0.3.tar.gz.sha256
if [ -d patches/musl-cross-81d563e ] && [ -r patches/musl-cross-81d563e ] ; then for patch in patches/musl-cross-81d563e/*.patch ; do echo "Applying patch file : $patch " ; ( cd /heads/build/musl-cross/ ; patch -p1 ) < $patch || exit 1 ; done ; fi
2019-11-09 18:09:22+00:00 CONFIG musl-cross
2019-11-09 18:09:22+00:00 MAKE musl-cross
2019-11-09 18:52:42+00:00 DONE musl-cross
2019-11-09 18:52:42+00:00 WGET https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.62.tar.xz
--2019-11-09 18:52:42--  https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.62.tar.xz
Resolving cdn.kernel.org (cdn.kernel.org)... 151.101.193.176
Connecting to cdn.kernel.org (cdn.kernel.org)|151.101.193.176|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 100957512 (96M) [application/x-xz]
Saving to: ‘/heads/packages/linux-4.14.62.tar.xz.tmp’

/heads/packages/linux-4.14.62.tar.xz.tmp   100%[=====================================================================================>]  96.28M   447KB/s    in 4m 48s  

2019-11-09 18:57:52 (343 KB/s) - ‘/heads/packages/linux-4.14.62.tar.xz.tmp’ saved [100957512/100957512]

echo "51ca4d7e8ee156dc0f19bc7768915cfae41dbb0b4f251e4fa8b178c5674c22ab  /heads/packages/linux-4.14.62.tar.xz" | sha256sum --check -
/heads/packages/linux-4.14.62.tar.xz: OK
mkdir -p "/heads/build/linux-4.14.62/"
tar -xf "/heads/packages/linux-4.14.62.tar.xz" --strip 1 -C "/heads/build/linux-4.14.62/"
if [ -r patches/linux-4.14.62.patch ]; then ( cd /heads/build/linux-4.14.62/ ; patch -p1 ) < patches/linux-4.14.62.patch || exit 1 ; fi
if [ -d patches/linux-4.14.62 ] && [ -r patches/linux-4.14.62 ] ; then for patch in patches/linux-4.14.62/*.patch ; do echo "Applying patch file : $patch " ; ( cd /heads/build/linux-4.14.62/ ; patch -p1 ) < $patch || exit 1 ; done ; fi
Applying patch file : patches/linux-4.14.62/0000-efi_bds.patch 
patching file arch/x86/boot/compressed/eboot.c
Applying patch file : patches/linux-4.14.62/0001-fake-acpi.patch 
patching file drivers/acpi/acpica/evxfevnt.c
patching file drivers/acpi/acpica/hwacpi.c
Applying patch file : patches/linux-4.14.62/0002-nmi-squelch.patch 
patching file arch/x86/kernel/nmi.c
Hunk #1 succeeded at 292 (offset -11 lines).
Hunk #2 succeeded at 302 (offset -11 lines).
Applying patch file : patches/linux-4.14.62/0003-fake-trampoline.patch 
patching file arch/x86/realmode/init.c
Hunk #1 succeeded at 37 (offset 2 lines).
Hunk #2 succeeded at 151 (offset 13 lines).
Applying patch file : patches/linux-4.14.62/0010-winterfell-ahci.patch 
patching file drivers/ata/libahci.c
Hunk #1 succeeded at 543 (offset 6 lines).
2019-11-09 18:58:09+00:00 CONFIG linux
2019-11-09 18:58:14+00:00 MAKE linux
tail /heads/build/log/linux.log
-----
/heads/build/../crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-objdump: arch/x86/lib/memmove_64.o: File format not recognized
/heads/build/../crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-objdump: arch/x86/lib/retpoline.o: unable to initialize decompress status for section .debug_line
/heads/build/../crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-objdump: arch/x86/lib/retpoline.o: unable to initialize decompress status for section .debug_line
/heads/build/../crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-objdump: arch/x86/lib/retpoline.o: File format not recognized
  AR      arch/x86/lib/built-in.o
  AR      virt/lib/built-in.o
  AR      virt/built-in.o
  GEN     .version
  CHK     include/generated/compile.h
  AR      built-in.o
  LD      vmlinux.o
/heads/build/../crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-ld: arch/x86/kernel/head_64.o: unable to initialize decompress status for section .debug_line
/heads/build/../crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-ld: arch/x86/kernel/head_64.o: unable to initialize decompress status for section .debug_line
/heads/build/../crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-ld: arch/x86/kernel/head_64.o: unable to initialize decompress status for section .debug_line
/heads/build/../crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-ld: arch/x86/kernel/head_64.o: unable to initialize decompress status for section .debug_line
built-in.o: member arch/x86/kernel/head_64.o in archive is not an object
make[3]: *** [/heads/build/linux-4.14.62/Makefile:1016: vmlinux] Error 1
make[2]: *** [Makefile:146: sub-make] Error 2
make[1]: *** [Makefile:24: __sub-make] Error 2
make[1]: Leaving directory '/heads/build/linux-4.14.62/linux-x230'
make: *** [Makefile:379: /heads/build/linux-4.14.62/linux-x230/.build] Error 1
[root@1d128ed3012d heads]# less /heads/build/log/linux.log

@osresearch
Copy link
Collaborator Author

A clean checkout and build on ubuntu-18.04 worked. However, I just noticed that you're getting twp different errors. The first is it looks like the coreboot cross tools failed:

Downloading and verifing tarballs ...
 * gmp-6.1.2.tar.xz (downloading from https://ftpmirror.gnu.org/gmp/gmp-6.1.2.tar.xz)... 100%... hash verified ("9dc6981197a7d92f339192eea974f5eca48fcffe")
 * mpfr-3.1.5.tar.xz (downloading from https://ftpmirror.gnu.org/mpfr/mpfr-3.1.5.tar.xz)...   0%... Failed to download mpfr-3.1.5.tar.xz.
make[3]: *** [Makefile:26: build_gcc] Error 1
make[2]: *** [Makefile:48: build-i386] Error 2
make[1]: *** [util/crossgcc/Makefile.inc:46: crossgcc-i386] Error 2
make[1]: Leaving directory '/heads/build/coreboot-4.8.1'
make: *** [modules/coreboot:55: /heads/build/coreboot-4.8.1/util/crossgcc/xgcc/bin/i386-elf-gcc] Error 2

The second is that the path to the musl-cross binaries is right, but something is producing weird object files:

/heads/build/../crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-objdump: arch/x86/lib/memmove_64.o: File format not recognized
/heads/build/../crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-objdump: arch/x86/lib/retpoline.o: unable to initialize decompress status for section .debug_line

I'm retrying in docker now.

@osresearch
Copy link
Collaborator Author

The checkout and merge command didn't work; I instead just checked out the musl-cross-pin branch. This resulted in the same error, however.

Digging into the files that are causing the problem, they are ones that are assembled from .S files. And I notice that they have debug sections that none of the others have.

arch/x86/kernel/head_64.o:            ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), with debug_info, not stripped
arch/x86/kernel/head64.o:             ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped

@tlaurion
Copy link
Collaborator

@tlaurion
Copy link
Collaborator

tlaurion commented Nov 16, 2019

@osresearch : even if using ubuntu:18.04 as base docker image. Same pipeline referenced before. No joy.

https://forum.gitlab.com/t/cannot-replicate-gitlabci-pipeline-failure-of-build-on-locally-ran-ubuntu-docker-image/31813

@osresearch
Copy link
Collaborator Author

osresearch commented Nov 26, 2019

Looks like the problem is the system's libelf is bleeding into the objtool that the Linux kernel is using the fixup the stack unwinding. Someone from gentoo noticed it as well: https://wiki.gentoo.org/wiki/Binutils_2.32_upgrade_notes/elfutils_0.175:_unable_to_initialize_decompress_status_for_section_.debug_info

Starting from dev-libs/elfutils-0.175 libelf writes compressed section alignment according to the ELF spec (see https://sourceware.org/PR23916). Unfortunately GNU assembler (gas from binutis-2.31.1 and older) writes non-conformant alignment. This means that libelf processing of such ELF files "corrupts" object files for binutils-2.31.
binutils-2.32 now writes conformant ELF alignments (see https://sourceware.org/PR23919) but the result is not compatible to binutils-2.31.

However, musl-cross is using binutils 2.27, so the x86_64-linux-musl-gas output is messed up when the ORC unwinder (linked against system libelf-0.177) runs on the file:

./tools/objtool/objtool orc generate  --no-fp  "arch/x86/kernel/head_64.o";

If we change CONFIG_UNWINDER_ORC to CONFIG_UNWINDER_GUESS, the kernel builds on a clean Fedora 30 machine. This will require touching all of the Linux config files. it still doesn't work.

rofl0r and others added 2 commits December 2, 2019 23:03
this should fix issues with compressed ELF header sections.
@osresearch
Copy link
Collaborator Author

Looks like there is a problem with how I'm unpacking the coreboot blobs. They are being unpacked into build/coreboot-4.8.1/3rdparty/blobs/3rdparty/blobs/cpu/intel/model_206ax/microcode.bin, which is not quite right.

@tlaurion
Copy link
Collaborator

tlaurion commented Dec 3, 2019

Building on the way (fedora-30), have passed where it failed before.

@tlaurion
Copy link
Collaborator

tlaurion commented Dec 3, 2019

Success on fedora-30 docker-ce:
a6580fc35abc05909f22acb679c6cb0b300299b28ece5a3d130591a558e2a593 /heads/build/x230/coreboot.rom

@tlaurion
Copy link
Collaborator

tlaurion commented Dec 3, 2019

Building on ubuntu:18.04 clean docker-ce.

@tlaurion
Copy link
Collaborator

tlaurion commented Dec 6, 2019

Finally fixes the build system.

@tlaurion tlaurion merged commit 8af849c into master Dec 6, 2019
@tlaurion
Copy link
Collaborator

@rofl0r @osresearch

This breaks the compiler and doesn't resolve anything, really.

My local builds (remote GitlabCI build don't even boot, even if builds don't fail) crash dump on lvm binary calls.

@rofl0r
Copy link
Contributor

rofl0r commented Dec 11, 2019

crash dump on lvm binary calls.

wasn't it the kernel that gets built with musl-cross?

@tlaurion
Copy link
Collaborator

tlaurion commented Dec 12, 2019

@osresearch @rofl0r
From my understanding, musl-cross is used to build make, gcc which is then used to build coreboot, the kernel and all the other modules inside of heads.

@osresearch suggested moving to musl-cross-make here for better portability.

Considering pinning musl-cross to latest prior working commit id which otherwise is causing regressions. Heads build system being broken for way too long now :|

Related opened issues: #619 #617 #631 #630 #571

@rofl0r
Copy link
Contributor

rofl0r commented Dec 12, 2019

From my understanding, musl is used to build gcc which is then used to build kernel and other binaries....

oh. from the report by @osresearch i figured the trouble with binutils was happening while linking the wacky objcopy generated stuff the kernel uses. if musl-cross is used to build a gcc, and that gcc works, it doesn't sound as if it's musl-cross's fault.

Considering pinning musl-cross to latest working commit id.

yes, and maybe the last known working kernel version. latest is not always necessarily greatest.

Heads build system being broken for way too long now :|

when i studied the CI output of this PR, it looked to me like there's at least 3 different x86_64 toolchains built during the process. this is not only inefficient from a build-time/energy consumption point of view, but also rather complex to maintain and pinpoint from where issues are coming from.

i suppose it would be advantageous to use a single toolchain for all these steps.
i'd also recommend to use musl-cross-make for this purpose, which sports modern toolchains, while musl-cross is focused on keeping old toolchains working.

@tlaurion
Copy link
Collaborator

tlaurion commented Dec 12, 2019

@rofl0r I thought we were building musl-cross only for x86_64 from config.sh patch here?

And then the CI caches the build system and reuses it for each subsequent builds. The goal of doing so was to have reproducible builds across distributions. You have other advices?

@rofl0r
Copy link
Contributor

rofl0r commented Dec 12, 2019

i was refering to coreboot / cross toolchain mentioned in this comment #618 (comment)

though upon looking at it again, it seems to be building an arm and an i386 toolchain, plus the musl-cross x86_64 toolchain. there seem to be various gcc and binutils versions involved. so it might be preferable to use only musl-cross-make built for arm and built for i386, both in the same configuration, unless there's a really good reason to use x86_64 over 32 bit x86 binaries somewhere in the process (or x86_64 toolchain with -m32 and -ffree-standing to build bios-level i386 stuff). is there a log of a full build somewhere? the CI reports here in this PR are all cut off due to errors at various stages.

@tlaurion
Copy link
Collaborator

Playing around GitlabCI for a while, but output gets cut off without any reason and resulting artifacts don't work, as opposed to locally built roms in cleanly downloaded docker images, reproducing what is in .gitlabci.yaml file.

@rofl0r : Latest successful build, resulting in a artifacts that once flashed brick systems (x230), is here.

Building locally with verbose build output. Will comment with full ouput in next comment.

@rofl0r
Copy link
Contributor

rofl0r commented Dec 12, 2019

@rofl0r : Latest successful build, resulting in a artifacts that once flashed brick systems (x230), is here.

hmm, this log is quite different. the only toolchain build i've seen is:

 echo '******* Building crossgcc-i386 (this might take a while) ******'
2036 ./buildgcc: line 1198: (: command not found
2037 ./buildgcc: line 1199: (: command not found
2065 Building BINUTILS v2.30 for target ... ok
2066 Building GCC v8.1.0 for target ... 

@tlaurion
Copy link
Collaborator

tlaurion commented Dec 12, 2019

@rofl0r :

git clone https://gitlab.com/tlaurion/heads
cd heads
git checkout PrivacyBeast_X230_QubesOS_Certified_thin-provisioning-tools_staging
make BOARD=x230-libremkey V=1

mkdir -p "/home/user/heads/build/coreboot-4.8.1/3rdparty/blobs/"
tar -xf "/home/user/heads/packages/coreboot-blobs-4.8.1.tar.xz" --strip 3 -C "/home/user/heads/build/coreboot-4.8.1/3rdparty/blobs/"
if [ -r patches/coreboot-blobs-4.8.1.patch ]; then ( cd /home/user/heads/build/coreboot-4.8.1/3rdparty/blobs/ ; patch -p1 ) < patches/coreboot-blobs-4.8.1.patch || exit 1 ; fi
if [ -d patches/coreboot-blobs-4.8.1 ] && [ -r patches/coreboot-blobs-4.8.1 ] ; then for patch in patches/coreboot-blobs-4.8.1/.patch ; do echo "Applying patch file : $patch " ; ( cd /home/user/heads/build/coreboot-4.8.1/3rdparty/blobs/ ; patch -p1 ) < $patch || exit 1 ; done ; fi
2019-12-12 16:57:58-05:00 CONFIG coreboot-blobs
echo -e 'all:\n\ttouch .built' > Makefile
2019-12-12 16:57:58-05:00 MAKE coreboot-blobs
make -C "/home/user/heads/build/coreboot-4.8.1/3rdparty/blobs"
make[1]: Entering directory '/home/user/heads/build/coreboot-4.8.1/3rdparty/blobs'
touch .built
make[1]: Leaving directory '/home/user/heads/build/coreboot-4.8.1/3rdparty/blobs'
2019-12-12 16:57:58-05:00 DONE coreboot-blobs
touch /home/user/heads/build/coreboot-4.8.1/3rdparty/blobs/.build
mkdir -p "/home/user/heads/build/coreboot-4.8.1/"
tar -xf "/home/user/heads/packages/coreboot-4.8.1.tar.xz" --strip 1 -C "/home/user/heads/build/coreboot-4.8.1/"
if [ -r patches/coreboot-4.8.1.patch ]; then ( cd /home/user/heads/build/coreboot-4.8.1/ ; patch -p1 ) < patches/coreboot-4.8.1.patch || exit 1 ; fi
if [ -d patches/coreboot-4.8.1 ] && [ -r patches/coreboot-4.8.1 ] ; then for patch in patches/coreboot-4.8.1/
.patch ; do echo "Applying patch file : $patch " ; ( cd /home/user/heads/build/coreboot-4.8.1/ ; patch -p1 ) < $patch || exit 1 ; done ; fi
Applying patch file : patches/coreboot-4.8.1/0000-measuredboot.patch
patching file src/Kconfig
patching file src/drivers/pc80/tpm/romstage.c
patching file src/drivers/pc80/tpm/tis.c
patching file src/include/program_loading.h
patching file src/lib/cbfs.c
patching file src/lib/hardwaremain.c
patching file src/lib/rmodule.c
patching file src/security/tpm/Makefile.inc
patching file src/security/tpm/sha1.c
patching file src/security/tpm/sha1.h
patching file src/security/tpm/tss.h
patching file src/security/tpm/tss/tcg-1.2/tss.c
Applying patch file : patches/coreboot-4.8.1/0001-mb-purism-librem_skl-add-support-for-13v4-15v4-board.patch
patching file src/mainboard/purism/librem_skl/Kconfig
Hunk #1 succeeded at 21 (offset -4 lines).
Hunk #2 succeeded at 32 (offset -4 lines).
Hunk #3 succeeded at 55 (offset -4 lines).
Hunk #4 succeeded at 69 (offset -4 lines).
patching file src/mainboard/purism/librem_skl/Kconfig.name
Applying patch file : patches/coreboot-4.8.1/0002-arch-x86-acpi-Add-DMAR-RMRR-helper-functions.patch
patching file src/arch/x86/acpi.c
patching file src/arch/x86/include/arch/acpi.h
patching file src/northbridge/intel/gm45/acpi.c
patching file src/northbridge/intel/haswell/acpi.c
patching file src/northbridge/intel/sandybridge/acpi.c
patching file src/soc/intel/broadwell/acpi.c
patching file src/soc/intel/fsp_broadwell_de/acpi.c
patching file src/soc/intel/skylake/acpi.c
Applying patch file : patches/coreboot-4.8.1/0003-soc-intel-skylake-Generate-ACPI-RMRR-table.patch
patching file src/soc/intel/common/block/include/intelblocks/systemagent.h
patching file src/soc/intel/common/block/systemagent/systemagent_early.c
patching file src/soc/intel/skylake/acpi.c
Applying patch file : patches/coreboot-4.8.1/0007-intel-fsp-fsp2_0-Fix-FSP-2.0-headers-to-match-github.patch
patching file src/vendorcode/intel/fsp/fsp2_0/skykabylake/MemInfoHob.h
Applying patch file : patches/coreboot-4.8.1/0009-Add-heads-TPM-measurements-to-Skylake-Kabylake.patch
patching file src/arch/x86/postcar.c
patching file src/drivers/intel/fsp2_0/memory_init.c
patching file src/drivers/intel/fsp2_0/silicon_init.c
patching file src/drivers/pc80/tpm/Makefile.inc
patching file src/security/tpm/Makefile.inc
Hunk #1 succeeded at 13 with fuzz 2 (offset 9 lines).
Applying patch file : patches/coreboot-4.8.1/0020-kgpe-d16.patch
patching file src/mainboard/asus/kgpe-d16/Kconfig
patching file src/mainboard/asus/kgpe-d16/devicetree.cb
patching file src/mainboard/asus/kgpe-d16/dsdt.asl
patching file src/mainboard/asus/kgpe-d16/mainboard.c
patching file src/mainboard/asus/kgpe-d16/romstage.c
Applying patch file : patches/coreboot-4.8.1/0030-sandybridge.patch
patching file src/northbridge/intel/sandybridge/romstage.c
Applying patch file : patches/coreboot-4.8.1/0050-buildgcc-Do-not-try-to-install-GCC-if-build-failed.patch
patching file util/crossgcc/buildgcc
Applying patch file : patches/coreboot-4.8.1/0051-buildgcc-Update-IASL-to-20180531.patch
patching file util/crossgcc/buildgcc
patching file util/crossgcc/patches/acpica-unix2-20161222_iasl.patch
patching file util/crossgcc/patches/acpica-unix2-20180531_iasl.patch
patching file util/crossgcc/sum/acpica-unix2-20161222.tar.gz.cksum
patching file util/crossgcc/sum/acpica-unix2-20180531.tar.gz.cksum
Applying patch file : patches/coreboot-4.8.1/0052-crossgcc-Update-to-clang-6.0-cmake-3.11.3.patch
patching file util/crossgcc/buildgcc
patching file util/crossgcc/sum/cfe-4.0.0.src.tar.xz.cksum
patching file util/crossgcc/sum/cfe-6.0.0.src.tar.xz.cksum
patching file util/crossgcc/sum/clang-tools-extra-4.0.0.src.tar.xz.cksum
patching file util/crossgcc/sum/clang-tools-extra-6.0.0.src.tar.xz.cksum
patching file util/crossgcc/sum/cmake-3.11.3.tar.gz.cksum
patching file util/crossgcc/sum/cmake-3.9.0-rc3.tar.gz.cksum
patching file util/crossgcc/sum/compiler-rt-4.0.0.src.tar.xz.cksum
patching file util/crossgcc/sum/compiler-rt-6.0.0.src.tar.xz.cksum
patching file util/crossgcc/sum/llvm-4.0.0.src.tar.xz.cksum
patching file util/crossgcc/sum/llvm-6.0.0.src.tar.xz.cksum
Applying patch file : patches/coreboot-4.8.1/0053-src-Get-rid-of-unneeded-whitespace.patch
patching file util/crossgcc/buildgcc
Applying patch file : patches/coreboot-4.8.1/0054-util-crossgcc-Allow-building-a-new-gcc-against-new-b.patch
patching file util/crossgcc/buildgcc
Applying patch file : patches/coreboot-4.8.1/0055-crosgcc-patches-Add-make-patch-for-GLIBC-glob-interf.patch
patching file util/crossgcc/patches/make-4.2.1_gnu_glob_interface_v2.patch
Applying patch file : patches/coreboot-4.8.1/0056-util-crossgcc-update-to-gcc-8.1.0-and-binutils-2.30.patch
patching file util/crossgcc/buildgcc
patching file util/crossgcc/patches/binutils-2.30_mips-gold.patch (renamed from util/crossgcc/patches/binutils-2.29.1_mips-gold.patch)
patching file util/crossgcc/patches/binutils-2.30_nds32.patch
patching file util/crossgcc/patches/binutils-2.30_no-bfd-doc.patch (renamed from util/crossgcc/patches/binutils-2.29.1_no-bfd-doc.patch)
patching file util/crossgcc/patches/gcc-6.3.0_ada-raise.patch
patching file util/crossgcc/patches/gcc-6.3.0_elf_biarch.patch
patching file util/crossgcc/patches/gcc-6.3.0_memmodel.patch
patching file util/crossgcc/patches/gcc-6.3.0_nds32_ite.patch
patching file util/crossgcc/patches/gcc-6.3.0_no-p-var.patch
patching file util/crossgcc/patches/gcc-6.3.0_pointer_integer.patch
patching file util/crossgcc/patches/gcc-6.3.0_riscv.patch
patching file util/crossgcc/patches/gcc-8.1.0_ada-musl_workaround.patch (renamed from util/crossgcc/patches/gcc-6.3.0_ada-musl_workaround.patch)
patching file util/crossgcc/patches/gcc-8.1.0_armv6s-m.patch
patching file util/crossgcc/patches/gcc-8.1.0_gnat.patch (renamed from util/crossgcc/patches/gcc-6.3.0_gnat.patch)
patching file util/crossgcc/patches/gcc-8.1.0_libgcc.patch (renamed from util/crossgcc/patches/gcc-6.3.0_libgcc.patch)
patching file util/crossgcc/patches/gcc-8.1.0_nds32_ite.patch
patching file util/crossgcc/sum/binutils-2.29.1.tar.xz.cksum
patching file util/crossgcc/sum/binutils-2.30.tar.xz.cksum
patching file util/crossgcc/sum/gcc-6.3.0.tar.bz2.cksum
patching file util/crossgcc/sum/gcc-8.1.0.tar.xz.cksum
Applying patch file : patches/coreboot-4.8.1/0057-util-crosgcc-patches-update-make-4.2.1-patches.patch
patching file util/crossgcc/patches/make-4.2.1_0053-glob-Do-not-assume-glibc-glob-internals.patch
patching file util/crossgcc/patches/make-4.2.1_0068-configure.ac-Support-GLIBC-glob-interface-version-2.patch
patching file util/crossgcc/patches/make-4.2.1_gnu_glob_interface_v2.patch
Applying patch file : patches/coreboot-4.8.1/0058-util-crosgcc-Fix-most-shellcheck-errors-in-buildgcc.patch
patching file util/crossgcc/buildgcc
Applying patch file : patches/coreboot-4.8.1/0059-util-Add-description.md-to-each-util.patch
patching file util/crossgcc/description.md
echo '******* Building crossgcc-i386 (this might take a while) '
******* Building crossgcc-i386 (this might take a while) ******
make -C "/home/user/heads/build/coreboot-4.8.1" CPUS=nproc crossgcc-i386
make[1]: Entering directory '/home/user/heads/build/coreboot-4.8.1'
rm -rf doxygen
make -C payloads/coreinfo clean; make -C payloads/nvramcui clean; make -C payloads/libpayload clean; make -C payloads/external/depthcharge clean; make -C payloads/external/SeaBIOS clean; make -C payloads/external/U-Boot clean; make -C payloads/external/Memtest86Plus clean; make -C payloads/external/iPXE clean; make -C payloads/external/tint clean; make -C payloads/external/tianocore clean; make -C payloads/external/GRUB2 clean;
rm -rf build/
.elf build/
.o .xcompile
rm -f nvramcui.elf
rm -rf doxygen
rm -f build/libpayload.a
rm -f .xcompile
rm -f
rmdir -p 2>/dev/null >/dev/null || true
rm -f .ccwrap junit_config junit_config.old
rm -rf build
rm -rf /home/user/heads/build/coreboot-4.8.1/payloads/external/depthcharge/depthcharge/build
test -d seabios/out && rm -rf seabios/out || exit 0
test -d u-boot && make -C u-boot clean || exit 0
test -d /home/user/heads/build/coreboot-4.8.1/payloads/external/Memtest86Plus/memtest86plus && make -C /home/user/heads/build/coreboot-4.8.1/payloads/external/Memtest86Plus/memtest86plus clean || exit 0
test -d ipxe && make -C ipxe/src veryclean || exit 0
rm -f ipxe/ipxe.rom
test -d tint && make -C tint clean || exit 0
test -d /home/user/heads/build/coreboot-4.8.1/payloads/external/tianocore/tianocore && (cd /home/user/heads/build/coreboot-4.8.1/payloads/external/tianocore/tianocore; rm -rf Build; rm -f Conf/tools_def.txt) || exit 0
test -f grub2/build/Makefile && make -C grub2/build clean || exit 0
rm -f build/ramstage?
build/coreboot.romstage build/coreboot.pre
build/coreboot.bootblock build/coreboot.a
rm -rf build/bootblock?
build/romstage?
build/location.*
rm -f build/option_table.* build/crt0.S build/ldscript
rm -f build/mainboard//static.c build/mainboard//config.py build/mainboard//static.dot
rm -f build/mainboard//crt0.s build/mainboard//crt0.disasm
rm -f build/mainboard//romstage.inc
rm -f build/mainboard//bootblock.* build/dsdt.*
rm -f build/cpu/x86/smm/smm_bin.c build/cpu/x86/smm/smm.* build/cpu/x86/smm/smm
rm -rf build .xcompile
make -C util/crossgcc build-i386 build_iasl SKIP_GDB=1
bash ./buildgcc -p i386-elf -j 2
-d /home/user/heads/build/coreboot-4.8.1/util/crossgcc/xgcc
Welcome to the coreboot cross toolchain builder v1.52 (June 11th, 2018)

Building toolchain using 2 thread(s).

Target architecture is i386-elf

Found compatible Ada compiler, enabling Ada support by default.

./buildgcc: line 1198: (: command not found
./buildgcc: line 1199: (: command not found
Downloading and verifing tarballs ...

  • gmp-6.1.2.tar.xz (cached)... hash verified ("9dc6981197a7d92f339192eea974f5eca48fcffe")
  • mpfr-3.1.5.tar.xz (cached)... hash verified ("c0fab77c6da4cb710c81cc04092fb9bea11a9403")
  • mpc-1.0.3.tar.gz (cached)... hash verified ("b8be66396c726fdc36ebb0f692ed8a8cca3bcc66")
  • binutils-2.30.tar.xz (cached)... hash verified ("574d3b5650413d6ee65195a4f5ecbddc3a38f718")
  • gcc-8.1.0.tar.xz (cached)... hash verified ("b34031ba9ff3e248b2c62de0825e49a1e0e01998")
    Downloaded tarballs ... ok
    Unpacking and patching ...
  • gmp-6.1.2.tar.xz
    o gmp-6.1.2_freebsd-configure.patch
  • mpfr-3.1.5.tar.xz
  • mpc-1.0.3.tar.gz
  • binutils-2.30.tar.xz
    o binutils-2.30_mips-gold.patch
    o binutils-2.30_nds32.patch
    o binutils-2.30_no-bfd-doc.patch
  • gcc-8.1.0.tar.xz
    o gcc-8.1.0_ada-musl_workaround.patch
    o gcc-8.1.0_armv6s-m.patch
    o gcc-8.1.0_gnat.patch
    o gcc-8.1.0_libgcc.patch
    o gcc-8.1.0_nds32_ite.patch
    Unpacked and patched ... ok
    Building packages ...
    Building GMP v6.1.2 for host ... ok
    Building MPFR v3.1.5 for host ... ok
    Building MPC v1.0.3 for host ... ok
    Building BINUTILS v2.30 for target ... ok
    Building GCC v8.1.0 for target ...
    ...

@rofl0r
Copy link
Contributor

rofl0r commented Dec 12, 2019

your log above seems to be interpreted as markup rather than raw data. but it's identical to the one on gitlab: only an i386 toolchain is built, no mention of musl-cross. did you ever try to build coreboot with an external toolchain (i assume "cross-gcc" is what coreboot builds as part of its own build)?

@tlaurion
Copy link
Collaborator

@rofl0r : Full 42MB output of build here attached, failing in the middle for flaky internet connection and resumed.
FullBuildOutput.zip

@tlaurion
Copy link
Collaborator

tlaurion commented Dec 13, 2019

i was refering to coreboot / cross toolchain mentioned in this comment #618 (comment)

though upon looking at it again, it seems to be building an arm and an i386 toolchain, plus the musl-cross x86_64 toolchain. there seem to be various gcc and binutils versions involved. so it might be preferable to use only musl-cross-make built for arm and built for i386, both in the same configuration, unless there's a really good reason to use x86_64 over 32 bit x86 binaries somewhere in the process (or x86_64 toolchain with -m32 and -ffree-standing to build bios-level i386 stuff). is there a log of a full build somewhere? the CI reports here in this PR are all cut off due to errors at various stages.

@rofl0r : So something like this is what you would be suggesting?

@rofl0r
Copy link
Contributor

rofl0r commented Dec 13, 2019

@rofl0r : So something like this is what you would be suggesting?

it certainly can't hurt if the user can override CC, CFLAGS, etc and use his existing toolchain instead of building it every time from scratch. though the flags' names used there look kinda non-standard, but they're probably modeled after what the build already uses.

since the PR doesn't touch anything related to coreboot or musl-gcc, it's not really helping with the amount of toolchains getting built. i wonder whether that's only a CI-thing though or baked into the heads build process.

studying the log i noticed that the arm compiler build of coreboot is commented out so that leaves us with an i386 toolchain built for coreboot, and musl-cross x86_64 for the rest. i also noticed that during heads build musl 1.1.15 is getting built, and its musl-gcc wrapper used during build of later packages, instead of the version the cross-compiler targets.

anyway, in order to move forward i personally would probably roll back to the last known working commit here (i.e. make a new branch based on that version), then pin the version of musl-cross and the other 2 packages mentioned in the PR title to the version that was used back then. that should bring the project back to a working state, from where each package that's been updated since can be updated in isolation and checked whether that caused the issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants