-
Notifications
You must be signed in to change notification settings - Fork 89
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
wip: build-env: add a simplified build container #31
Closed
Closed
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM ubuntu:18.04 | ||
|
||
ARG ZSDK_VERSION=0.11.2 | ||
|
||
# install packages toolchain: | ||
ADD install-prereqs.sh /root/install-prereqs.sh | ||
RUN /root/install-prereqs.sh && rm /root/install-prereqs.sh | ||
|
||
ENV ZEPHYR_TOOLCHAIN_VARIANT=zephyr | ||
ENV ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-${ZSDK_VERSION} | ||
ENV PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig | ||
|
||
WORKDIR /workdir |
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,66 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o pipefail | ||
set -o nounset | ||
|
||
ZSDK_VERSION=0.11.2 | ||
|
||
# install prerequisite packages: | ||
dpkg --add-architecture i386 | ||
|
||
apt-get update && apt-get upgrade -y | ||
|
||
DEBIAN_FRONTEND=noniteractive apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
ccache \ | ||
cmake \ | ||
device-tree-compiler \ | ||
dfu-util \ | ||
file \ | ||
gcc \ | ||
gcc-multilib \ | ||
git \ | ||
gnupg \ | ||
g++-multilib \ | ||
gperf \ | ||
libsdl2-dev \ | ||
make \ | ||
ninja-build \ | ||
python3-dev \ | ||
python3-pip \ | ||
python3-setuptools \ | ||
python3-tk \ | ||
python3-wheel \ | ||
wget \ | ||
xz-utils | ||
|
||
# install the latest CMake: | ||
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add - | ||
sh -c "echo 'deb https://apt.kitware.com/ubuntu/ bionic main' > /etc/apt/sources.list.d/cmake.list" | ||
|
||
apt update && apt-get install -y cmake | ||
|
||
# install west: | ||
pip3 install -U west | ||
|
||
# install Zephyr SDK: | ||
wget -q "https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZSDK_VERSION}/zephyr-sdk-${ZSDK_VERSION}-setup.run" && \ | ||
sh "zephyr-sdk-${ZSDK_VERSION}-setup.run" --quiet -- -d /opt/toolchains/zephyr-sdk-${ZSDK_VERSION} && \ | ||
rm "zephyr-sdk-${ZSDK_VERSION}-setup.run" | ||
|
||
# | ||
# Grab any other python dependencies. TODO: should we pull a particular version, instead of master? | ||
# | ||
REQTS_URL="https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/master/scripts" | ||
for file in requirements requirements-base requirements-build-test requirements-doc requirements-run-test requirements-extras | ||
do | ||
wget -q "$REQTS_URL"/"$file".txt | ||
done | ||
|
||
pip3 install -r requirements.txt | ||
|
||
for file in requirements requirements-base requirements-build-test requirements-doc requirements-run-test requirements-extras | ||
do | ||
rm "$file".txt | ||
done |
File renamed without changes.
File renamed without changes.
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.
why install cmake here when you later on get it directly from kitware?
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.
IIRC, I was scaling back the already existing tooling which may have had it?
In any event, I wasn't aware what's installed from kitware.