mirror of
https://github.com/linuxboot/linuxboot
synced 2024-11-21 23:59:59 +00:00
Make musl-cross a normal Heads module.
This merges pull request #99 by @blackwellops and removes the ./bootstrap script since the musl-cross can be built as part of the normal dependency tree.
This commit is contained in:
parent
bac717407f
commit
3008bb6945
@ -28,9 +28,7 @@ Building heads
|
||||
In order to build reproducible firmware images, Heads builds a specific
|
||||
version of gcc and uses it to compile the Linux kernel and various tools
|
||||
that go into the initrd. Unfortunately this means the first step is a
|
||||
little slow... After cloning the tree, cd into it and run `./bootstrap`
|
||||
to download and build binutils, gcc and all of their dependencies into
|
||||
`./crossgcc/`.
|
||||
little slow since it will clone the `musl-cross` tree and build gcc...
|
||||
|
||||
Once that is done, the top level `Makefile` will handle most of the
|
||||
remaining details -- it downloads the various packages, verifies the
|
||||
|
28
bootstrap
28
bootstrap
@ -1,28 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Download and build the musl-libc cross compiler.
|
||||
# This should be worked around eventually to use the coreboot
|
||||
# cross compile suite that we've already built, but for now
|
||||
# we'll download yet another copy of gcc...
|
||||
|
||||
DIRNAME="`dirname $0`"
|
||||
BASE="`cd "$DIRNAME" ; /bin/pwd `"
|
||||
|
||||
die() { echo >&2 "$@"; exit 1; }
|
||||
|
||||
if [ ! -d build/musl-cross ]; then
|
||||
cd build
|
||||
git clone https://github.com/GregorR/musl-cross.git \
|
||||
|| die "clone failed"
|
||||
|
||||
cd musl-cross
|
||||
patch -p1 < ../../patches/musl-cross.patch \
|
||||
|| die "patch of configuration failed!"
|
||||
else
|
||||
cd build/musl-cross
|
||||
fi
|
||||
|
||||
export CC_BASE_PREFIX="$BASE/crossgcc"
|
||||
echo "export CC_BASE_PREFIX='$CC_BASE_PREFIX'"
|
||||
|
||||
./build.sh \
|
||||
|| die "compiler build failed!"
|
@ -27,4 +27,4 @@ musl_configure := ./configure \
|
||||
musl_target := -j 8 install
|
||||
#musl_target := install
|
||||
|
||||
musl_depends := kernel-headers
|
||||
musl_depends := kernel-headers musl-cross
|
||||
|
14
modules/musl-cross
Normal file
14
modules/musl-cross
Normal file
@ -0,0 +1,14 @@
|
||||
modules += musl-cross
|
||||
|
||||
musl-cross_version := git
|
||||
musl-cross_dir := musl-cross-$(musl-cross_version)
|
||||
musl-cross_repo := https://github.com/GregorR/musl-cross
|
||||
|
||||
musl-cross_output := $(pwd)/crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-gcc
|
||||
|
||||
musl-cross_configure := \
|
||||
echo > Makefile -n \
|
||||
'$(musl-cross_output):\n\tCC_BASE_PREFIX="$(pwd)/crossgcc" ./build.sh'
|
||||
|
||||
musl-cross_target :=
|
||||
|
Loading…
Reference in New Issue
Block a user