-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Add a disabled builder for aarch64 emulated tests #43226
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
FROM ubuntu:16.04 | ||
|
||
RUN apt-get update -y && apt-get install -y --no-install-recommends \ | ||
bc \ | ||
bzip2 \ | ||
ca-certificates \ | ||
cmake \ | ||
cpio \ | ||
curl \ | ||
file \ | ||
g++ \ | ||
gcc-aarch64-linux-gnu \ | ||
git \ | ||
libc6-dev \ | ||
libc6-dev-arm64-cross \ | ||
make \ | ||
python2.7 \ | ||
qemu-system-aarch64 \ | ||
xz-utils | ||
|
||
ENV ARCH=arm64 \ | ||
CROSS_COMPILE=aarch64-linux-gnu- | ||
|
||
WORKDIR /build | ||
|
||
# Compile the kernel that we're going to run and be emulating with. This is | ||
# basically just done to be compatible with the QEMU target that we're going | ||
# to be using when running tests. If any other kernel works or if any | ||
# other QEMU target works with some other stock kernel, we can use that too! | ||
# | ||
# The `config` config file was a previously generated config file for | ||
# the kernel. This file was generated by running `make defconfig` | ||
# followed by `make menuconfig` and then enabling the IPv6 protocol page. | ||
COPY disabled/aarch64-gnu/config /build/.config | ||
RUN curl https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.4.42.tar.xz | \ | ||
tar xJf - && \ | ||
cd /build/linux-4.4.42 && \ | ||
cp /build/.config . && \ | ||
make -j$(nproc) all && \ | ||
cp arch/arm64/boot/Image /tmp && \ | ||
cd /build && \ | ||
rm -rf linux-4.4.42 | ||
|
||
# Compile an instance of busybox as this provides a lightweight system and init | ||
# binary which we will boot into. Only trick here is configuring busybox to | ||
# build static binaries. | ||
RUN curl https://www.busybox.net/downloads/busybox-1.21.1.tar.bz2 | tar xjf - && \ | ||
cd busybox-1.21.1 && \ | ||
make defconfig && \ | ||
sed -i 's/.*CONFIG_STATIC.*/CONFIG_STATIC=y/' .config && \ | ||
make -j$(nproc) && \ | ||
make install && \ | ||
mv _install /tmp/rootfs && \ | ||
cd /build && \ | ||
rm -rf busybox-1.12.1 | ||
|
||
# Download the ubuntu rootfs, which we'll use as a chroot for all our tests. | ||
WORKDIR /tmp | ||
RUN mkdir rootfs/ubuntu | ||
RUN curl http://cdimage.ubuntu.com/ubuntu-base/releases/16.04/release/ubuntu-base-16.04-core-arm64.tar.gz | \ | ||
tar xzf - -C rootfs/ubuntu && \ | ||
cd rootfs && mkdir proc sys dev etc etc/init.d | ||
|
||
# Copy over our init script, which starts up our test server and also a few | ||
# other misc tasks. | ||
COPY scripts/qemu-bare-bones-rcS rootfs/etc/init.d/rcS | ||
RUN chmod +x rootfs/etc/init.d/rcS | ||
|
||
# Helper to quickly fill the entropy pool in the kernel. | ||
COPY scripts/qemu-bare-bones-addentropy.c /tmp/addentropy.c | ||
RUN aarch64-linux-gnu-gcc addentropy.c -o rootfs/addentropy -static | ||
|
||
COPY scripts/dumb-init.sh /scripts/ | ||
RUN sh /scripts/dumb-init.sh | ||
|
||
COPY scripts/sccache.sh /scripts/ | ||
RUN sh /scripts/sccache.sh | ||
|
||
ENTRYPOINT ["/usr/bin/dumb-init", "--"] | ||
|
||
ENV RUST_CONFIGURE_ARGS \ | ||
--target=aarch64-unknown-linux-gnu \ | ||
--qemu-aarch64-rootfs=/tmp/rootfs | ||
ENV SCRIPT python2.7 ../x.py test --target aarch64-unknown-linux-gnu | ||
ENV NO_CHANGE_USER=1 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we use
zImage
for armhf, it'd probably be nice if we did the same here just for consistency.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would yeah, but the normal build process didn't create that, so we didn't have it to use it :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should mention that I know nothing about kernel build processes, I just found that this particular configuration didn't create a
zImage