Skip to content

Commit f7841d5

Browse files
author
jul-sh
authored
Build remote attestation for UEFI (#2693)
* cherry pick UEFI patch commit df48d323c53c6c21eb6dbac6c6a4dd5c16745991 * cherry pick UEFI patch commit e98c5dfdb691e09b8cd8257668affd8351b93014 * cherry pick UEFI patch commit c3598c9d04030b5dd3f6367f94c70d55ee90d8d6 * Build ring for UEFI by including it in the uefi app * Update docker container to use llvm-version var when adding repo
1 parent 76f1313 commit f7841d5

File tree

12 files changed

+574
-9
lines changed

12 files changed

+574
-9
lines changed

.devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// - https://code.visualstudio.com/docs/remote/devcontainerjson-reference
55
{
66
// Do not modify manually. This value is automatically updated by ./scripts/docker_build .
7-
"image": "sha256:1efea0378c65660a81d23f82740f666da3f57108d8cb63d1217fcf67d908093c",
7+
"image": "sha256:ab889141f07b886f02ca3ec664341d7dfada94826c5538842b795b005bc1a417",
88
"extensions": [
99
"bazelbuild.vscode-bazel",
1010
"bodil.prettier-toml",

Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,26 @@ RUN apt-get --yes update \
5252
&& git --version \
5353
&& shellcheck --version
5454

55+
# We build our own fork of ring crate from its source. This requires some extra
56+
# build config that isn't needed for the version published on crates.io, which
57+
# includes pre-generated assets.
58+
# Ring requires nasm, and a specific version of clang & llvm
59+
ARG llvm_version=14
60+
RUN echo "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-$llvm_version main" >> /etc/apt/sources.list.d/llvm.list \
61+
&& curl https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
62+
&& apt-get update --yes \
63+
&& apt-get install --no-install-recommends --yes \
64+
clang-${llvm_version} \
65+
llvm-${llvm_version} \
66+
nasm \
67+
&& rm --recursive --force /var/lib/apt/lists/*
68+
69+
# Ring epects these ENV variables in its build tooling
70+
ENV llvm_version=$llvm_version
71+
ENV CC_x86_64_unknown_uefi=clang-$llvm_version
72+
ENV AR_x86_64_unknown_uefi=llvm-ar-$llvm_version
73+
ENV NASM_EXECUTABLE=nasm
74+
5575
# Install a version of docker CLI.
5676
RUN curl --fail --silent --show-error --location https://download.docker.com/linux/debian/gpg | apt-key add -
5777
RUN echo "deb [arch=amd64] https://download.docker.com/linux/debian buster stable" > /etc/apt/sources.list.d/backports.list \

experimental/uefi/app/Cargo.lock

Lines changed: 300 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)