mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 02:25:23 +00:00
This removes some unsafe code, improving the interface so that it cannot be misused (e.g. previously, different Vec<u8> instances could be passed to fdt functions that did not validate the contents). The new implementation also adds some extra error checking to catch invalid string values in all API entry points that accept strings, as well as out-of-order node nesting that would result in DTB data that did not conform to the spec. BUG=b:175729255 TEST=cargo test -p arch TEST=Boot Crostini on kevin (arm) TEST=diff old and new dts from `dtc -I fs -O dts /proc/device-tree` Change-Id: I567d562ed1b447aa0d282b68c71758edea13ffc0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2713569 Reviewed-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
48 lines
1.4 KiB
Docker
48 lines
1.4 KiB
Docker
# Copyright 2021 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
#
|
|
# Docker container to build crosvm for the host architecture.
|
|
|
|
# Build-argument of the image tag of dependencies to use. Set to the same
|
|
# version as `ci/image_tag`
|
|
ARG TAG
|
|
|
|
# Stage containing VM data to be used later.
|
|
# (COPY --from does not allow the use of ARGs)
|
|
FROM gcr.io/crosvm-packages/crosvm_test_vm_amd64:${TAG} as vm
|
|
|
|
# Main stage
|
|
FROM gcr.io/crosvm-packages/crosvm_base:${TAG}
|
|
|
|
# Install libraries needed to compile crosvm and it's dependencies.
|
|
RUN apt-get install --yes --no-install-recommends \
|
|
libcap-dev \
|
|
libdbus-1-dev \
|
|
libdrm-dev \
|
|
libepoxy-dev \
|
|
libssl-dev \
|
|
libwayland-dev \
|
|
qemu-system-x86
|
|
|
|
RUN apt-get install --yes -t testing --no-install-recommends \
|
|
libdrm-dev \
|
|
libepoxy-dev
|
|
|
|
# Allow GCC/Rust to find packages and libraries stored on the scratch volume.
|
|
ENV LIBRARY_PATH=/workspace/scratch/lib
|
|
ENV LD_LIBRARY_PATH=/workspace/scratch/lib
|
|
ENV PKG_CONFIG_PATH=/workspace/scratch/lib/pkgconfig
|
|
|
|
# Include test VM inside this container
|
|
COPY --from=vm \
|
|
/workspace/vm/* \
|
|
/workspace/vm/
|
|
COPY --from=vm \
|
|
/root/.ssh /root/.ssh
|
|
|
|
# Setup entrypoint and interactive shell
|
|
WORKDIR /workspace/src/platform/crosvm
|
|
COPY bashrc /root/.bashrc
|
|
COPY entrypoint /workspace
|
|
ENTRYPOINT ["/workspace/entrypoint"]
|