|
| 1 | +# SPDX-License-Identifier: Apache-2.0 |
| 2 | +# |
| 3 | +# Copyright (C) 2024-2025, ARM Limited and contributors. |
| 4 | +# |
| 5 | +# Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 6 | +# not use this file except in compliance with the License. |
| 7 | +# You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 13 | +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | +# |
| 17 | +# This Dockerfile creates an image to run devlib CI tests. |
| 18 | +# |
| 19 | +# Running ``docker build -t devlib .`` command in ``.ci`` directory |
| 20 | +# creates the docker image. |
| 21 | +# |
| 22 | +# The image can be runned via ``docker run -it --privileged devlib`` command. |
| 23 | +# |
| 24 | + |
| 25 | +FROM ubuntu:22.04 |
| 26 | + |
| 27 | +ENV DEBIAN_FRONTEND=noninteractive |
| 28 | + |
| 29 | +RUN apt-get update && \ |
| 30 | + apt-get install -y --no-install-recommends \ |
| 31 | + aapt \ |
| 32 | + bc \ |
| 33 | + bison \ |
| 34 | + build-essential \ |
| 35 | + cmake \ |
| 36 | + cpio \ |
| 37 | + file \ |
| 38 | + flex \ |
| 39 | + git \ |
| 40 | + libelf-dev \ |
| 41 | + libncurses5-dev \ |
| 42 | + libssl-dev \ |
| 43 | + locales \ |
| 44 | + python3-pip \ |
| 45 | + python3.10-venv \ |
| 46 | + qemu-system-arm \ |
| 47 | + qemu-system-x86 \ |
| 48 | + rsync \ |
| 49 | + sudo \ |
| 50 | + unzip \ |
| 51 | + wget \ |
| 52 | + vim \ |
| 53 | + xz-utils \ |
| 54 | + bridge-utils \ |
| 55 | + cpu-checker \ |
| 56 | + libvirt-clients \ |
| 57 | + libvirt-daemon \ |
| 58 | + qemu \ |
| 59 | + qemu-kvm && \ |
| 60 | + apt-get -y autoremove && \ |
| 61 | + apt-get -y autoclean && \ |
| 62 | + apt-get clean && \ |
| 63 | + rm -rf /var/cache/apt |
| 64 | + |
| 65 | +COPY tools/android /devlib/tools/android |
| 66 | +COPY tools/buildroot /devlib/tools/buildroot |
| 67 | + |
| 68 | +# Set ANDROID_CMDLINE_VERSION environment variable if you want to use a |
| 69 | +# specific version of Android command line tools rather than default |
| 70 | +# which is ``11076708`` as of writing this comment. |
| 71 | +RUN cd /devlib/tools/android && ./setup_host.sh |
| 72 | + |
| 73 | +# Set BUILDROOT_VERSION environment variable if you want to use a specific |
| 74 | +# branch of buildroot rather than default which is ``2023.11.1`` as of |
| 75 | +# writing this comment. |
| 76 | +RUN cd /devlib/tools/buildroot && \ |
| 77 | + ./generate-kernel-initrd.sh && \ |
| 78 | + ./generate-kernel-initrd.sh -a x86_64 && \ |
| 79 | + mkdir -p /tmp/buildroot/buildroot-v2023.11.1-aarch64/output && \ |
| 80 | + mkdir -p /tmp/buildroot/buildroot-v2023.11.1-x86_64/output && \ |
| 81 | + mv /devlib/tools/buildroot/buildroot-v2023.11.1-aarch64/output/images /tmp/buildroot/buildroot-v2023.11.1-aarch64/output && \ |
| 82 | + mv /devlib/tools/buildroot/buildroot-v2023.11.1-x86_64/output/images /tmp/buildroot/buildroot-v2023.11.1-x86_64/output && \ |
| 83 | + rm -rf /devlib/tools/buildroot && \ |
| 84 | + mv /tmp/buildroot /devlib/tools/buildroot |
| 85 | + |
0 commit comments