From eddf7b6558a20b1472932c453f5b8cf183588c40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Jasiak?= Date: Sun, 12 Sep 2021 12:14:47 +0200 Subject: [PATCH 1/7] Toolchain: bump binutils & gcc, remove x86 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * New toolchain version - 1.5.2 * Update gcc to 11.2.0 * Update binutils to 2.37 * Remove support to x86 x86 toolchain is not used by Mimiker since we don't support that architecture - let's remove support for that toolchain and reduce complexity and build time of tools. Signed-off-by: Paweł Jasiak --- toolchain/gnu/config.mk | 8 ++++---- toolchain/qemu-mimiker/Makefile | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/toolchain/gnu/config.mk b/toolchain/gnu/config.mk index bdb27860e1..b8cda68c39 100644 --- a/toolchain/gnu/config.mk +++ b/toolchain/gnu/config.mk @@ -1,6 +1,6 @@ # vim: tabstop=8 shiftwidth=8 noexpandtab list: -VERSION = 1.5.1 +VERSION = 1.5.2 # Libraries required to build the toolchain. ISL = isl-0.18 @@ -10,8 +10,8 @@ MPC = mpc-1.1.0 CLOOG = cloog-0.18.4 # The toolchain is comprised of following packages: -BINUTILS = binutils-2.35 -GCC = gcc-11.1.0 +BINUTILS = binutils-2.37 +GCC = gcc-11.2.0 GDB = gdb-10.2 ISL-URL = "http://isl.gforge.inria.fr/$(ISL).tar.xz" @@ -23,4 +23,4 @@ BINUTILS-URL = "https://ftp.gnu.org/gnu/binutils/$(BINUTILS).tar.xz" GCC-URL = "https://ftp.gnu.org/gnu/gcc/$(GCC)/$(GCC).tar.xz" GDB-URL = "https://ftp.gnu.org/gnu/gdb/$(GDB).tar.xz" -TARGETS = mipsel aarch64 amd64 +TARGETS = mipsel aarch64 diff --git a/toolchain/qemu-mimiker/Makefile b/toolchain/qemu-mimiker/Makefile index 99d56ee1c1..db974e5c8b 100644 --- a/toolchain/qemu-mimiker/Makefile +++ b/toolchain/qemu-mimiker/Makefile @@ -44,7 +44,7 @@ configure-stamp: patch-stamp --disable-bzip2 \ --disable-tpm \ --disable-linux-aio \ - --target-list=mipsel-softmmu,aarch64-softmmu,x86_64-softmmu \ + --target-list=mipsel-softmmu,aarch64-softmmu \ --with-suffix=qemu-mimiker touch $@ @@ -58,8 +58,7 @@ install-stamp: build-stamp cd qemu-build && make install DESTDIR=$(PWD)/debian/tmp cd $(PWD)/debian/tmp && \ mv usr/bin/qemu-system-mipsel usr/bin/qemu-mimiker-mipsel && \ - mv usr/bin/qemu-system-aarch64 usr/bin/qemu-mimiker-aarch64 && \ - mv usr/bin/qemu-system-x86_64 usr/bin/qemu-mimiker-x86_64 + mv usr/bin/qemu-system-aarch64 usr/bin/qemu-mimiker-aarch64 && \ touch $@ binary: binary-stamp From 6495442f981949224903d91d0c97f0cc058a5820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Jasiak?= Date: Sun, 12 Sep 2021 19:56:59 +0200 Subject: [PATCH 2/7] Containers: update environment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - build toolchain in container - bump Debian version - add ability to build & run Mimiker in local environment Example how to build local env: - git clone git@github.com:cahirwpz/mimiker.git - cd mimiker - podman build -t mimiker . - podman container run -it --rm --hostname mimiker -v /home/user/mimiker:/root/mimiker mimiker /bin/bash after last command you are in bash shell inside container, you can install your favourite set of packages or just build Mimiker. All changes are synchronized between local directory /home/user/mimiker and /root/mimiker inside container, so you can use your favourite editor and distro. podman is not required but it's recommended (in non-priv mode). It's possible to still run podman as root or use docker for that purpose but then you are on your own with permissions inside mimiker directory. Note: building container is *SLOW* and IO *INTENSIVE* process. Signed-off-by: Paweł Jasiak --- Dockerfile | 54 ++++++++++++++++++++++++++++++++------------ toolchain/Dockerfile | 11 --------- 2 files changed, 40 insertions(+), 25 deletions(-) delete mode 100644 toolchain/Dockerfile diff --git a/Dockerfile b/Dockerfile index 6a273c73a3..7c03c7f97c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,49 @@ -FROM debian:buster-backports +FROM debian:bullseye-backports AS builder WORKDIR /root +RUN apt-get -q update \ + && apt-get upgrade -y \ + && apt-get install -y --no-install-recommends \ + automake bison ca-certificates curl flex gcc g++ gettext lhasa \ + libtool make patch pkg-config python3 python3-setuptools quilt \ + texinfo xz-utils zip libpython3-dev debhelper fakeroot ninja-build \ + libglib2.0-dev libfdt-dev libpixman-1-dev \ + && rm -rf /var/lib/apt/lists/* + +COPY . /root/mimiker +RUN cd /root/mimiker/toolchain/gnu \ + && make -j $(nproc) \ + && cd /root/mimiker/toolchain/qemu-mimiker \ + && make -j $(nproc) + +FROM debian:bullseye-backports + +WORKDIR /root + +RUN apt-get -q update \ + && apt-get upgrade -y \ + && apt-get install -y --no-install-recommends \ + git make cpio curl universal-ctags cscope rsync socat patch gperf quilt \ + bmake byacc python3-pip device-tree-compiler \ + libfdt1 libpython3.9 libsdl2-2.0-0 libglib2.0-0 libpixman-1-0 \ + python3-libtmux tmux clang \ + && rm -rf /var/lib/apt/lists/* -RUN apt-get -q update && apt-get upgrade -y -RUN apt-get install -y --no-install-recommends \ - git make cpio curl exuberant-ctags cscope rsync socat patch gperf quilt \ - bmake byacc python3-pip clang-8 clang-format-8 device-tree-compiler \ - libfdt1 libpython3.7 libsdl2-2.0-0 libglib2.0-0 libpixman-1-0 # rsync required by verify-format.sh # patch & quilt required by lua and programs in contrib/ # gperf required by libterminfo # socat required by launch COPY requirements.txt . -RUN ln -s /usr/bin/clang-8 /usr/local/bin/clang -RUN ln -s /usr/bin/clang-format-8 /usr/local/bin/clang-format RUN pip3 install setuptools wheel && pip3 install -r requirements.txt -RUN curl -O https://mimiker.ii.uni.wroc.pl/download/mipsel-mimiker-elf_1.5.1_amd64.deb && \ - dpkg -i mipsel-mimiker-elf_1.5.1_amd64.deb && rm -f mipsel-mimiker-elf_1.5.1_amd64.deb -RUN curl -O https://mimiker.ii.uni.wroc.pl/download/aarch64-mimiker-elf_1.5.1_amd64.deb && \ - dpkg -i aarch64-mimiker-elf_1.5.1_amd64.deb && rm -f aarch64-mimiker-elf_1.5.1_amd64.deb -RUN curl -O https://mimiker.ii.uni.wroc.pl/download/qemu-mimiker_4.2.1+mimiker3_amd64.deb && \ - dpkg -i qemu-mimiker_4.2.1+mimiker3_amd64.deb && rm -f qemu-mimiker_4.2.1+mimiker3_amd64.deb +COPY --from=builder /root/mimiker/toolchain/gnu/mipsel-mimiker-elf_1.5.2_amd64.deb . +COPY --from=builder /root/mimiker/toolchain/gnu/aarch64-mimiker-elf_1.5.2_amd64.deb . +COPY --from=builder /root/mimiker/toolchain/qemu-mimiker_6.0.0+mimiker1_amd64.deb . +RUN dpkg -i --force-all ./mipsel-mimiker-elf_1.5.2_amd64.deb \ + && dpkg -i --force-all ./aarch64-mimiker-elf_1.5.2_amd64.deb \ + && dpkg -i --force-all ./qemu-mimiker_6.0.0+mimiker1_amd64.deb \ + && apt-get update \ + && apt-get install -y -f \ + && rm -rf /var/lib/apt/lists/* \ + && rm ./mipsel-mimiker-elf_1.5.2_amd64.deb \ + ./aarch64-mimiker-elf_1.5.2_amd64.deb \ + ./qemu-mimiker_6.0.0+mimiker1_amd64.deb diff --git a/toolchain/Dockerfile b/toolchain/Dockerfile deleted file mode 100644 index 4722bc5b5a..0000000000 --- a/toolchain/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM debian:buster - -WORKDIR /root - -RUN apt-get -q update && apt-get upgrade -y -RUN apt-get install -y --no-install-recommends \ - automake bison ca-certificates curl flex gcc g++ gettext lhasa \ - libtool make patch pkg-config python3 python3-setuptools quilt \ - texinfo xz-utils zip libpython3-dev debhelper - -COPY . . From cf65f4c33120e47800b25a38474d9f0fb1c83f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Jasiak?= Date: Sat, 18 Sep 2021 15:06:24 +0200 Subject: [PATCH 3/7] Containers: reduce size of intermediate container MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Jasiak --- Dockerfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7c03c7f97c..b4edc0f25d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,11 @@ COPY . /root/mimiker RUN cd /root/mimiker/toolchain/gnu \ && make -j $(nproc) \ && cd /root/mimiker/toolchain/qemu-mimiker \ - && make -j $(nproc) + && make -j $(nproc) \ + && mv /root/mimiker/toolchain/gnu/mipsel-mimiker-elf_1.5.2_amd64.deb /root/mipsel-mimiker-elf_1.5.2_amd64.deb \ + && mv /root/mimiker/toolchain/gnu/aarch64-mimiker-elf_1.5.2_amd64.deb /root/aarch64-mimiker-elf_1.5.2_amd64.deb \ + && mv /root/mimiker/toolchain/qemu-mimiker_6.0.0+mimiker1_amd64.deb /root/qemu-mimiker_6.0.0+mimiker1_amd64.deb \ + && rm -rf /root/mimiker FROM debian:bullseye-backports @@ -35,9 +39,9 @@ RUN apt-get -q update \ # socat required by launch COPY requirements.txt . RUN pip3 install setuptools wheel && pip3 install -r requirements.txt -COPY --from=builder /root/mimiker/toolchain/gnu/mipsel-mimiker-elf_1.5.2_amd64.deb . -COPY --from=builder /root/mimiker/toolchain/gnu/aarch64-mimiker-elf_1.5.2_amd64.deb . -COPY --from=builder /root/mimiker/toolchain/qemu-mimiker_6.0.0+mimiker1_amd64.deb . +COPY --from=builder /root/mipsel-mimiker-elf_1.5.2_amd64.deb . +COPY --from=builder /root/aarch64-mimiker-elf_1.5.2_amd64.deb . +COPY --from=builder /root/qemu-mimiker_6.0.0+mimiker1_amd64.deb . RUN dpkg -i --force-all ./mipsel-mimiker-elf_1.5.2_amd64.deb \ && dpkg -i --force-all ./aarch64-mimiker-elf_1.5.2_amd64.deb \ && dpkg -i --force-all ./qemu-mimiker_6.0.0+mimiker1_amd64.deb \ From 89b93c8528a2b442b6e978dd96400bfecac2ffc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Jasiak?= Date: Fri, 24 Sep 2021 14:34:33 +0200 Subject: [PATCH 4/7] Wiki: add toolchain page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Jasiak --- wiki/docs/_Sidebar.md | 2 +- wiki/docs/toolchain.md | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 wiki/docs/toolchain.md diff --git a/wiki/docs/_Sidebar.md b/wiki/docs/_Sidebar.md index fdb482603a..bd6b4daa42 100644 --- a/wiki/docs/_Sidebar.md +++ b/wiki/docs/_Sidebar.md @@ -5,4 +5,4 @@ - [Commenting](https://github.com/cahirwpz/mimiker/wiki/commenting) - [Onboarding](https://github.com/cahirwpz/mimiker/wiki/onboarding) - [Test infrastructure](https://github.com/cahirwpz/mimiker/wiki/tests) - +- [Toolchain](https://github.com/cahirwpz/mimiker/wiki/toolchain) diff --git a/wiki/docs/toolchain.md b/wiki/docs/toolchain.md new file mode 100644 index 0000000000..46b1d2568f --- /dev/null +++ b/wiki/docs/toolchain.md @@ -0,0 +1,41 @@ +# Toolchain + +## Local environment + +### Container image + +You can use container image used by our CI system. + +To build latest version of container run: +- `git clone git@github.com:cahirwpz/mimiker.git && cd mimiker` +- `podman build -t mimiker .` +- `podman container run -it --rm --workdir /root/mimiker --hostname mimiker -v /home/user/mimiker:/root/mimiker mimiker /bin/bash` + +after last command you are in shell inside container, you can install your +favourite set of packages or just build Mimiker with the following command: +- `make` + +All changes are synchronized between local directory `/home/user/mimiker` and +`/root/mimiker` inside container, so you can edit source files using your +favourite editor. + +It is not required but it is recommended to use podman in rootless mode. You can +use also docker as drop-in replacement, but then you are on your own with file +permissions inside `/home/user/mimiker` directory. + +Note: building container is *SLOW* and IO *INTENSIVE* process. + +### Old-style local toolchain + +If you don't want to use containers you can still build binaries by hand & +create packages - currently we support only .deb package format and latest +Debian stable distribution. + +For gnu toolchain - C compiler and set of tools required for build & debug - you +need to invoke `make` command inside `toolchain/gnu` directory. + +For qemu - emulator used for local development - run `make` command inside +`toolchain/qemu-mimiker` directory. + +That's all - if you have problems look into `Dockerfile` in top directory. It +contains list of packages & commands required to prepare toolchain. From 0160f07db23a778dc578dfe40cd7cd8f17341599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krystian=20Bac=C5=82awski?= Date: Wed, 29 Sep 2021 16:48:30 +0200 Subject: [PATCH 5/7] Some minor cleanups --- Dockerfile | 44 ++++++++++++++++++++++---------------------- requirements.txt | 1 + 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/Dockerfile b/Dockerfile index 74af061b60..cd77e0cb27 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,10 @@ # First construct an image where the toolchain gets built -FROM debian:bullseye-backports AS builder +FROM debian:bullseye-backports AS mimiker-toolchain WORKDIR /root -RUN apt-get -q update && apt-get upgrade -y +RUN apt-get -q update \ + && apt-get upgrade -y RUN apt-get install -y --no-install-recommends \ automake bison ca-certificates curl flex gcc g++ gettext lhasa \ libtool make patch pkg-config python3 python3-setuptools quilt \ @@ -15,37 +16,36 @@ RUN cd /root/mimiker/toolchain/gnu \ && make -j $(nproc) \ && cd /root/mimiker/toolchain/qemu-mimiker \ && make -j $(nproc) \ - && mv /root/mimiker/toolchain/gnu/mipsel-mimiker-elf_1.5.3_amd64.deb /root/mipsel-mimiker-elf_1.5.3_amd64.deb \ - && mv /root/mimiker/toolchain/gnu/aarch64-mimiker-elf_1.5.3_amd64.deb /root/aarch64-mimiker-elf_1.5.3_amd64.deb \ - && mv /root/mimiker/toolchain/qemu-mimiker_6.1.0+mimiker1_amd64.deb /root/qemu-mimiker_6.1.0+mimiker1_amd64.deb \ + && mv /root/mimiker/toolchain/gnu/mipsel-mimiker-elf_*_amd64.deb /root \ + && mv /root/mimiker/toolchain/gnu/aarch64-mimiker-elf_*_amd64.deb /root \ + && mv /root/mimiker/toolchain/qemu-mimiker_*_amd64.deb /root \ && rm -rf /root/mimiker # Now construct an image for end users and Mimiker continuous integration -FROM debian:bullseye-backports +FROM debian:bullseye-backports AS mimiker-ci WORKDIR /root -RUN apt-get -q update && apt-get upgrade -y +RUN apt-get -q update \ + && apt-get upgrade -y RUN apt-get install -y --no-install-recommends \ - git make cpio curl universal-ctags cscope rsync socat patch gperf quilt \ - bmake byacc python3-pip clang clang-format device-tree-compiler \ + git make cpio curl universal-ctags cscope socat patch gperf quilt \ + bmake byacc python3-pip clang clang-format device-tree-compiler tmux \ libfdt1 libpython3.9 libsdl2-2.0-0 libglib2.0-0 libpixman-1-0 \ - python3-libtmux tmux \ && rm -rf /var/lib/apt/lists/* -# rsync required by verify-format.sh -# patch & quilt required by lua and programs in contrib/ +# patch & quilt required by programs in contrib/ # gperf required by libterminfo -# socat required by launch +# socat & tmux required by launch COPY requirements.txt . RUN pip3 install setuptools wheel && pip3 install -r requirements.txt -COPY --from=builder /root/mipsel-mimiker-elf_1.5.3_amd64.deb . -COPY --from=builder /root/aarch64-mimiker-elf_1.5.3_amd64.deb . -COPY --from=builder /root/qemu-mimiker_6.1.0+mimiker1_amd64.deb . -RUN dpkg -i --force-all ./mipsel-mimiker-elf_1.5.3_amd64.deb \ - ./aarch64-mimiker-elf_1.5.3_amd64.deb \ - ./qemu-mimiker_6.1.0+mimiker1_amd64.deb \ +COPY --from=mimiker-toolchain /root/mipsel-mimiker-elf_*_amd64.deb . +COPY --from=mimiker-toolchain /root/aarch64-mimiker-elf_*_amd64.deb . +COPY --from=mimiker-toolchain /root/qemu-mimiker_*_amd64.deb . +RUN dpkg -i --force-all ./mipsel-mimiker-elf_*_amd64.deb \ + ./aarch64-mimiker-elf_*_amd64.deb \ + ./qemu-mimiker_*_amd64.deb \ && apt-get update \ && apt-get install -y -f \ && rm -rf /var/lib/apt/lists/* \ - && rm ./mipsel-mimiker-elf_1.5.3_amd64.deb \ - ./aarch64-mimiker-elf_1.5.3_amd64.deb \ - ./qemu-mimiker_6.1.0+mimiker1_amd64.deb + && rm ./mipsel-mimiker-elf_*_amd64.deb \ + ./aarch64-mimiker-elf_*_amd64.deb \ + ./qemu-mimiker_*_amd64.deb diff --git a/requirements.txt b/requirements.txt index 75a3f674c6..89a7e188e9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,4 @@ pycodestyle pexpect fdt texttable +libtmux From 4ae219eb8b455d658a2c821ceee47fba77364ebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Jasiak?= Date: Sun, 10 Oct 2021 16:37:59 +0200 Subject: [PATCH 6/7] toolchain: update ISL mirror MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Jasiak --- toolchain/gnu/config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolchain/gnu/config.mk b/toolchain/gnu/config.mk index 929436b228..327bd7b013 100644 --- a/toolchain/gnu/config.mk +++ b/toolchain/gnu/config.mk @@ -14,7 +14,7 @@ BINUTILS = binutils-2.37 GCC = gcc-11.2.0 GDB = gdb-11.1 -ISL-URL = "http://isl.gforge.inria.fr/$(ISL).tar.xz" +ISL-URL = "https://mirror.sobukus.de/files/src/isl/$(ISL).tar.xz" MPFR-URL = "ftp://ftp.gnu.org/gnu/mpfr/$(MPFR).tar.xz" GMP-URL = "https://gmplib.org/download/gmp/$(GMP).tar.xz" MPC-URL = "https://ftp.gnu.org/gnu/mpc/$(MPC).tar.gz" From 0dfcdefca925de5356ec66fd93b81181e223612b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Jasiak?= Date: Sun, 10 Oct 2021 16:39:41 +0200 Subject: [PATCH 7/7] containers: reduce number of steps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Jasiak --- Dockerfile | 59 +++++++++++++++++++++++++----------------------------- 1 file changed, 27 insertions(+), 32 deletions(-) diff --git a/Dockerfile b/Dockerfile index cd77e0cb27..9428ed0c09 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,49 +3,44 @@ FROM debian:bullseye-backports AS mimiker-toolchain WORKDIR /root -RUN apt-get -q update \ - && apt-get upgrade -y -RUN apt-get install -y --no-install-recommends \ - automake bison ca-certificates curl flex gcc g++ gettext lhasa \ - libtool make patch pkg-config python3 python3-setuptools quilt \ - texinfo xz-utils zip libpython3-dev debhelper fakeroot ninja-build \ - libglib2.0-dev libfdt-dev libpixman-1-dev \ +# Install build dependencies for toolchain +RUN apt-get update -q \ + && apt-get upgrade -q -y \ + && apt-get install -q -y --no-install-recommends \ + automake bison ca-certificates curl flex gcc g++ gettext lhasa \ + libtool make patch pkg-config python3 python3-setuptools quilt \ + texinfo xz-utils zip libpython3-dev debhelper fakeroot ninja-build \ + libglib2.0-dev libfdt-dev libpixman-1-dev \ && rm -rf /var/lib/apt/lists/* -COPY . /root/mimiker -RUN cd /root/mimiker/toolchain/gnu \ +COPY ./toolchain /root/toolchain +# Build toolchain & save .deb packages into /root/deb +RUN cd /root/toolchain/gnu \ && make -j $(nproc) \ - && cd /root/mimiker/toolchain/qemu-mimiker \ + && cd /root/toolchain/qemu-mimiker \ && make -j $(nproc) \ - && mv /root/mimiker/toolchain/gnu/mipsel-mimiker-elf_*_amd64.deb /root \ - && mv /root/mimiker/toolchain/gnu/aarch64-mimiker-elf_*_amd64.deb /root \ - && mv /root/mimiker/toolchain/qemu-mimiker_*_amd64.deb /root \ - && rm -rf /root/mimiker + && mkdir /root/deb \ + && find /root/toolchain -iname '*.deb' -exec mv -t /root/deb {} + \ + && rm -rf /root/toolchain # Now construct an image for end users and Mimiker continuous integration FROM debian:bullseye-backports AS mimiker-ci WORKDIR /root -RUN apt-get -q update \ - && apt-get upgrade -y -RUN apt-get install -y --no-install-recommends \ +COPY requirements.txt . +COPY --from=mimiker-toolchain /root/deb /root/deb +RUN apt-get update -q \ + && apt-get upgrade -q -y \ + && apt-get install -q -y --no-install-recommends \ git make cpio curl universal-ctags cscope socat patch gperf quilt \ bmake byacc python3-pip clang clang-format device-tree-compiler tmux \ libfdt1 libpython3.9 libsdl2-2.0-0 libglib2.0-0 libpixman-1-0 \ - && rm -rf /var/lib/apt/lists/* + && rm -rf /var/lib/apt/lists/* \ + && pip3 install setuptools wheel \ + && pip3 install -r requirements.txt \ + && dpkg -i --force-all /root/deb/*.deb \ + && apt-get update -q \ + && apt-get install -q -y -f \ + && rm -rf /var/lib/apt/lists/* /root/deb /root/requirements.txt # patch & quilt required by programs in contrib/ # gperf required by libterminfo # socat & tmux required by launch -COPY requirements.txt . -RUN pip3 install setuptools wheel && pip3 install -r requirements.txt -COPY --from=mimiker-toolchain /root/mipsel-mimiker-elf_*_amd64.deb . -COPY --from=mimiker-toolchain /root/aarch64-mimiker-elf_*_amd64.deb . -COPY --from=mimiker-toolchain /root/qemu-mimiker_*_amd64.deb . -RUN dpkg -i --force-all ./mipsel-mimiker-elf_*_amd64.deb \ - ./aarch64-mimiker-elf_*_amd64.deb \ - ./qemu-mimiker_*_amd64.deb \ - && apt-get update \ - && apt-get install -y -f \ - && rm -rf /var/lib/apt/lists/* \ - && rm ./mipsel-mimiker-elf_*_amd64.deb \ - ./aarch64-mimiker-elf_*_amd64.deb \ - ./qemu-mimiker_*_amd64.deb