Philippe Mathieu-Daudé | 36dc5fe | 2018-05-01 21:21:43 -0300 | [diff] [blame] | 1 | # |
| 2 | # Docker TriCore cross-compiler target |
| 3 | # |
Alex Bennée | 39ce923 | 2021-07-21 00:27:01 +0100 | [diff] [blame] | 4 | # This docker target builds on the Debian Buster base image but |
| 5 | # doesn't inherit from the common one to avoid bringing in unneeded |
| 6 | # dependencies. |
Philippe Mathieu-Daudé | 36dc5fe | 2018-05-01 21:21:43 -0300 | [diff] [blame] | 7 | # |
| 8 | # Copyright (c) 2018 Philippe Mathieu-Daudé |
| 9 | # |
| 10 | # SPDX-License-Identifier: GPL-2.0-or-later |
| 11 | # |
Paolo Bonzini | 87f77f5 | 2023-08-08 16:02:57 +0200 | [diff] [blame] | 12 | FROM docker.io/library/debian:11-slim |
Philippe Mathieu-Daudé | 36dc5fe | 2018-05-01 21:21:43 -0300 | [diff] [blame] | 13 | |
| 14 | MAINTAINER Philippe Mathieu-Daudé <f4bug@amsat.org> |
| 15 | |
Alex Bennée | 39ce923 | 2021-07-21 00:27:01 +0100 | [diff] [blame] | 16 | RUN apt update && \ |
| 17 | DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \ |
| 18 | DEBIAN_FRONTEND=noninteractive eatmydata apt install -yy \ |
Paolo Bonzini | 3265d1f | 2022-01-05 13:50:08 +0000 | [diff] [blame] | 19 | bison \ |
Alex Bennée | 39ce923 | 2021-07-21 00:27:01 +0100 | [diff] [blame] | 20 | bzip2 \ |
| 21 | ca-certificates \ |
| 22 | ccache \ |
Bastian Koppelmann | 3c471b0 | 2023-02-28 19:06:40 +0000 | [diff] [blame] | 23 | curl \ |
Philippe Mathieu-Daudé | 7ac17cb | 2023-01-24 18:01:05 +0000 | [diff] [blame] | 24 | flex \ |
Alex Bennée | 39ce923 | 2021-07-21 00:27:01 +0100 | [diff] [blame] | 25 | g++ \ |
| 26 | gcc \ |
| 27 | git \ |
| 28 | libglib2.0-dev \ |
| 29 | libpixman-1-dev \ |
Alex Bennée | 39ce923 | 2021-07-21 00:27:01 +0100 | [diff] [blame] | 30 | locales \ |
| 31 | make \ |
| 32 | ninja-build \ |
Alex Bennée | 39ce923 | 2021-07-21 00:27:01 +0100 | [diff] [blame] | 33 | pkgconf \ |
| 34 | python3-pip \ |
| 35 | python3-setuptools \ |
John Snow | a22a4b2 | 2023-05-10 23:54:19 -0400 | [diff] [blame] | 36 | python3-wheel \ |
Daniel P. Berrangé | c1d822c | 2024-07-29 15:44:01 +0100 | [diff] [blame] | 37 | python3-venv && \ |
| 38 | dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt |
Alex Bennée | 39ce923 | 2021-07-21 00:27:01 +0100 | [diff] [blame] | 39 | |
Paolo Bonzini | 7ace219 | 2023-08-08 23:35:47 +0200 | [diff] [blame] | 40 | RUN /usr/bin/pip3 install tomli |
| 41 | |
Bastian Koppelmann | 3c471b0 | 2023-02-28 19:06:40 +0000 | [diff] [blame] | 42 | RUN curl -#SL https://github.com/bkoppelmann/package_940/releases/download/tricore-toolchain-9.40/tricore-toolchain-9.4.0.tar.gz \ |
| 43 | | tar -xzC /usr/local/ |
Philippe Mathieu-Daudé | 36dc5fe | 2018-05-01 21:21:43 -0300 | [diff] [blame] | 44 | |
Alex Bennée | 39ce923 | 2021-07-21 00:27:01 +0100 | [diff] [blame] | 45 | # This image can only build a very minimal QEMU as well as the tests |
| 46 | ENV DEF_TARGET_LIST tricore-softmmu |
| 47 | ENV QEMU_CONFIGURE_OPTS --disable-user --disable-tools --disable-fdt |
Daniel P. Berrangé | bad7a27 | 2024-05-13 12:15:49 +0100 | [diff] [blame] | 48 | ENV MAKE /usr/bin/make |
Alex Bennée | 93bd295 | 2023-02-28 19:06:48 +0000 | [diff] [blame] | 49 | # As a final step configure the user (if env is defined) |
| 50 | ARG USER |
| 51 | ARG UID |
| 52 | RUN if [ "${USER}" ]; then \ |
| 53 | id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi |