-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update MUSL Linux kernel headers and re-enable Linux tests
- Loading branch information
Showing
42 changed files
with
466 additions
and
445 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
FROM ubuntu:19.04 | ||
RUN apt-get update | ||
RUN apt-get install -y --no-install-recommends \ | ||
gcc libc6-dev ca-certificates | ||
gcc libc6-dev ca-certificates linux-headers-generic | ||
|
||
RUN apt search linux-headers | ||
RUN ls /usr/src | ||
|
||
ENV PATH=$PATH:/rust/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#!/usr/bin/env sh | ||
# | ||
# Install musl and musl-sanitized linux kernel headers | ||
# to musl-{$1} directory | ||
|
||
set -ex | ||
|
||
MUSL_VERSION=1.1.22 | ||
MUSL="musl-${MUSL_VERSION}" | ||
|
||
# Download, configure, build, and install musl: | ||
curl --retry 5 https://www.musl-libc.org/releases/${MUSL}.tar.gz | tar xzf - | ||
|
||
cd $MUSL | ||
case ${1} in | ||
aarch64) | ||
musl_arch=aarch64 | ||
kernel_arch=arm64 | ||
CC=aarch64-linux-gnu-gcc \ | ||
./configure --prefix="/musl-${musl_arch}" --enable-wrapper=yes | ||
make install -j4 | ||
;; | ||
arm) | ||
musl_arch=arm | ||
kernel_arch=arm | ||
CC=arm-linux-gnueabihf-gcc CFLAGS="-march=armv6 -marm -mfpu=vfp" \ | ||
./configure --prefix="/musl-${musl_arch}" --enable-wrapper=yes | ||
make install -j4 | ||
;; | ||
i686) | ||
# cross-compile musl for i686 using the system compiler on an x86_64 | ||
# system. | ||
musl_arch=i686 | ||
kernel_arch=i386 | ||
# Specifically pass -m32 in CFLAGS and override CC when running | ||
# ./configure, since otherwise the script will fail to find a compiler. | ||
CC=gcc CFLAGS="-m32" \ | ||
./configure --prefix="/musl-${musl_arch}" --disable-shared --target=i686 | ||
# unset CROSS_COMPILE when running make; otherwise the makefile will | ||
# call the non-existent binary 'i686-ar'. | ||
make CROSS_COMPILE= install -j4 | ||
;; | ||
x86_64) | ||
musl_arch=x86_64 | ||
kernel_arch=x86_64 | ||
./configure --prefix="/musl-${musl_arch}" | ||
make install -j4 | ||
;; | ||
*) | ||
echo "Unknown target arch: \"${1}\"" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
|
||
# shellcheck disable=SC2103 | ||
cd .. | ||
rm -rf $MUSL | ||
|
||
# Download, configure, build, and install musl-sanitized kernel headers: | ||
curl --retry 5 -L \ | ||
https://github.com/sabotage-linux/kernel-headers/archive/v4.4.2-1.tar.gz | \ | ||
tar xzf - | ||
( | ||
cd kernel-headers-4.4.2-1 | ||
make ARCH="${kernel_arch}" prefix="/musl-${musl_arch}" install -j4 | ||
) | ||
rm -rf kernel-headers-4.4.2-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.