blob: 43cd37070e48905f9333b42256e2fc4cbe062308 [file] [log] [blame]
Tom Rini04549e92021-03-15 13:19:01 -04001# SPDX-License-Identifier: GPL-2.0+
2# This Dockerfile is used to build an image containing basic stuff to be used
3# to build U-Boot and run our test suites.
4
Tom Rinie0c84c82024-08-21 09:41:20 -06005FROM ubuntu:jammy-20240808
Tom Rini92160da2024-08-19 15:07:19 -06006LABEL org.opencontainers.image.authors="Tom Rini <trini@konsulko.com>"
7LABEL org.opencontainers.image.description=" This image is for building U-Boot inside a container"
Tom Rini04549e92021-03-15 13:19:01 -04008
Simon Glass7aafac02024-11-27 11:17:26 -06009# Used by docker to set the target platform: valid values are linux/arm64/v8
10# and linux/amd64
11ARG TARGETPLATFORM
12
13# Used by docker to set the build platform: the only valid value is linux/amd64
14ARG BUILDPLATFORM
15
Tom Rini04549e92021-03-15 13:19:01 -040016# Make sure apt is happy
17ENV DEBIAN_FRONTEND=noninteractive
18
Simon Glass7aafac02024-11-27 11:17:26 -060019RUN echo "Building on $BUILDPLATFORM, for target $TARGETPLATFORM"
20
Tom Rini04549e92021-03-15 13:19:01 -040021# Add LLVM repository
Tom Rini3f88c792024-11-27 11:17:25 -060022RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
23 --mount=type=cache,target=/var/lib/apt,sharing=locked \
24 apt-get update && apt-get install -y gnupg2 wget xz-utils
Tom Rini04549e92021-03-15 13:19:01 -040025RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
Tom Rinie752a3a2024-03-10 15:59:28 -040026RUN echo deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main | tee /etc/apt/sources.list.d/llvm.list
Tom Rini04549e92021-03-15 13:19:01 -040027
Tom Rini3bd5ed72023-08-25 13:21:26 -040028# Manually install the kernel.org "Crosstool" based toolchains for gcc-13.2.0
29RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.2.0/x86_64-gcc-13.2.0-nolibc-aarch64-linux.tar.xz | tar -C /opt -xJ
30RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.2.0/x86_64-gcc-13.2.0-nolibc-arc-linux.tar.xz | tar -C /opt -xJ
31RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.2.0/x86_64-gcc-13.2.0-nolibc-arm-linux-gnueabi.tar.xz | tar -C /opt -xJ
32RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.2.0/x86_64-gcc-13.2.0-nolibc-i386-linux.tar.xz | tar -C /opt -xJ
33RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.2.0/x86_64-gcc-13.2.0-nolibc-m68k-linux.tar.xz | tar -C /opt -xJ
34RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.2.0/x86_64-gcc-13.2.0-nolibc-mips-linux.tar.xz | tar -C /opt -xJ
35RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.2.0/x86_64-gcc-13.2.0-nolibc-microblaze-linux.tar.xz | tar -C /opt -xJ
36RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.2.0/x86_64-gcc-13.2.0-nolibc-nios2-linux.tar.xz | tar -C /opt -xJ
37RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.2.0/x86_64-gcc-13.2.0-nolibc-powerpc-linux.tar.xz | tar -C /opt -xJ
38RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.2.0/x86_64-gcc-13.2.0-nolibc-riscv64-linux.tar.xz | tar -C /opt -xJ
39RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.2.0/x86_64-gcc-13.2.0-nolibc-riscv32-linux.tar.xz | tar -C /opt -xJ
40RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.2.0/x86_64-gcc-13.2.0-nolibc-sh2-linux.tar.xz | tar -C /opt -xJ
Tom Rinif3fb9cd2024-11-27 11:17:21 -060041RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.2.0/x86_64-gcc-13.2.0-nolibc-x86_64-linux.tar.xz | tar -C /opt -xJ
Tom Rini04549e92021-03-15 13:19:01 -040042
43# Manually install other toolchains
Tom Rini0a78bc32021-07-02 10:41:58 -040044RUN wget -O - https://github.com/foss-xtensa/toolchain/releases/download/2020.07/x86_64-2020.07-xtensa-dc233c-elf.tar.gz | tar -C /opt -xz
Tom Rini04549e92021-03-15 13:19:01 -040045
46# Update and install things from apt now
Tom Rini3f88c792024-11-27 11:17:25 -060047RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
48 --mount=type=cache,target=/var/lib/apt,sharing=locked \
49 apt-get update && apt-get install -y \
Tom Rini04549e92021-03-15 13:19:01 -040050 automake \
51 autopoint \
52 bc \
53 binutils-dev \
54 bison \
55 build-essential \
Simon Glassbe17cb32023-08-24 13:55:46 -060056 cgpt \
Tom Rinie752a3a2024-03-10 15:59:28 -040057 clang-17 \
Tom Rini04549e92021-03-15 13:19:01 -040058 coreutils \
59 cpio \
Tom Rini04549e92021-03-15 13:19:01 -040060 curl \
61 device-tree-compiler \
62 dosfstools \
63 e2fsprogs \
64 efitools \
Huang Jianan11e04432022-02-26 15:05:51 +080065 erofs-utils \
Heinrich Schuchardt4e202672021-11-09 19:51:20 +010066 expect \
Tom Rini04549e92021-03-15 13:19:01 -040067 fakeroot \
68 flex \
Heinrich Schuchardt4e202672021-11-09 19:51:20 +010069 gawk \
Tom Rini04549e92021-03-15 13:19:01 -040070 gdisk \
Tom Rini12248ed2024-11-27 11:17:23 -060071 gettext \
Tom Rini04549e92021-03-15 13:19:01 -040072 git \
73 gnu-efi \
Heinrich Schuchardt4e202672021-11-09 19:51:20 +010074 gnutls-dev \
Tom Rini04549e92021-03-15 13:19:01 -040075 graphviz \
Tom Rini04549e92021-03-15 13:19:01 -040076 help2man \
77 iasl \
78 imagemagick \
79 iputils-ping \
Tom Riniac6c3332023-01-11 12:24:57 -050080 libc6-i386 \
Bin Mengf551a532021-08-26 23:33:33 +080081 libconfuse-dev \
Tom Rinic8982d22021-06-10 10:57:36 -040082 libgit2-dev \
Heinrich Schuchardt4e202672021-11-09 19:51:20 +010083 libjson-glib-dev \
Tom Rini04549e92021-03-15 13:19:01 -040084 libguestfs-tools \
AKASHI Takahiro3edc3472022-02-01 10:32:36 +090085 libgnutls28-dev \
86 libgnutls30 \
Tom Rini04549e92021-03-15 13:19:01 -040087 liblz4-tool \
88 libpixman-1-dev \
Tom Rinic8982d22021-06-10 10:57:36 -040089 libpython3-dev \
Tom Rini04549e92021-03-15 13:19:01 -040090 libsdl1.2-dev \
91 libsdl2-dev \
Heinrich Schuchardt4e202672021-11-09 19:51:20 +010092 libseccomp-dev \
Tom Rini83da2322023-07-13 10:16:28 -040093 libslirp-dev \
Tom Rini04549e92021-03-15 13:19:01 -040094 libssl-dev \
Heinrich Schuchardt4e202672021-11-09 19:51:20 +010095 libtool \
Tom Rini04549e92021-03-15 13:19:01 -040096 libudev-dev \
97 libusb-1.0-0-dev \
Alper Nebi Yasak5d249e92021-06-21 21:51:54 +030098 linux-image-kvm \
Tom Rini04549e92021-03-15 13:19:01 -040099 lzma-alone \
100 lzop \
101 mount \
102 mtd-utils \
103 mtools \
Heinrich Schuchardt4e202672021-11-09 19:51:20 +0100104 net-tools \
Bin Meng00afccd2021-08-26 23:33:32 +0800105 ninja-build \
Tom Rini04549e92021-03-15 13:19:01 -0400106 openssl \
107 picocom \
108 parted \
109 pkg-config \
Tom Rinic8982d22021-06-10 10:57:36 -0400110 python-is-python3 \
111 python2.7 \
112 python3 \
113 python3-dev \
Tom Rini04549e92021-03-15 13:19:01 -0400114 python3-pip \
Simon Glassb955cd22022-10-13 06:25:57 -0600115 python3-pyelftools \
Tom Rini04549e92021-03-15 13:19:01 -0400116 python3-sphinx \
Tom Rinic8982d22021-06-10 10:57:36 -0400117 python3-virtualenv \
Tom Rini04549e92021-03-15 13:19:01 -0400118 rpm2cpio \
119 sbsigntool \
Heinrich Schuchardt4e202672021-11-09 19:51:20 +0100120 socat \
121 softhsm2 \
Tom Rini04549e92021-03-15 13:19:01 -0400122 sparse \
123 srecord \
124 sudo \
125 swig \
Heinrich Schuchardtc2c98ea2022-12-30 05:41:01 +0100126 texinfo \
Tom Rini04549e92021-03-15 13:19:01 -0400127 util-linux \
128 uuid-dev \
129 virtualenv \
Simon Glassbe17cb32023-08-24 13:55:46 -0600130 vboot-kernel-utils \
131 vboot-utils \
Heinrich Schuchardt905d0752024-02-28 08:23:09 +0100132 xilinx-bootgen \
Tom Rini0a78bc32021-07-02 10:41:58 -0400133 xxd \
Tom Rini3f88c792024-11-27 11:17:25 -0600134 zip
Tom Rini04549e92021-03-15 13:19:01 -0400135
Alper Nebi Yasak5d249e92021-06-21 21:51:54 +0300136# Make kernels readable for libguestfs tools to work correctly
137RUN chmod +r /boot/vmlinu*
138
Tom Rini04549e92021-03-15 13:19:01 -0400139# Build GRUB UEFI targets for ARM & RISC-V, 32-bit and 64-bit
140RUN git clone git://git.savannah.gnu.org/grub.git /tmp/grub && \
141 cd /tmp/grub && \
Tom Rini12248ed2024-11-27 11:17:23 -0600142 git checkout grub-2.12 && \
Tom Rini77d48f12022-11-22 12:31:58 -0500143 git config --global user.name "GitLab CI Runner" && \
144 git config --global user.email trini@konsulko.com && \
Tom Rini04549e92021-03-15 13:19:01 -0400145 ./bootstrap && \
146 mkdir -p /opt/grub && \
147 ./configure --target=aarch64 --with-platform=efi \
148 CC=gcc \
Tom Rini3bd5ed72023-08-25 13:21:26 -0400149 TARGET_CC=/opt/gcc-13.2.0-nolibc/aarch64-linux/bin/aarch64-linux-gcc \
150 TARGET_OBJCOPY=/opt/gcc-13.2.0-nolibc/aarch64-linux/bin/aarch64-linux-objcopy \
151 TARGET_STRIP=/opt/gcc-13.2.0-nolibc/aarch64-linux/bin/aarch64-linux-strip \
152 TARGET_NM=/opt/gcc-13.2.0-nolibc/aarch64-linux/bin/aarch64-linux-nm \
153 TARGET_RANLIB=/opt/gcc-13.2.0-nolibc/aarch64-linux/bin/aarch64-linux-ranlib && \
Tom Rini4bac0392024-11-27 11:17:22 -0600154 make -j$(nproc) && \
Tom Rini04549e92021-03-15 13:19:01 -0400155 ./grub-mkimage -O arm64-efi -o /opt/grub/grubaa64.efi --prefix= -d \
156 grub-core cat chain configfile echo efinet ext2 fat halt help linux \
157 lsefisystab loadenv lvm minicmd normal part_msdos part_gpt reboot \
158 search search_fs_file search_fs_uuid search_label serial sleep test \
159 true && \
160 make clean && \
161 ./configure --target=arm --with-platform=efi \
162 CC=gcc \
Tom Rini3bd5ed72023-08-25 13:21:26 -0400163 TARGET_CC=/opt/gcc-13.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-gcc \
164 TARGET_OBJCOPY=/opt/gcc-13.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-objcopy \
165 TARGET_STRIP=/opt/gcc-13.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-strip \
166 TARGET_NM=/opt/gcc-13.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-nm \
167 TARGET_RANLIB=/opt/gcc-13.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ranlib && \
Tom Rini4bac0392024-11-27 11:17:22 -0600168 make -j$(nproc) && \
Tom Rini04549e92021-03-15 13:19:01 -0400169 ./grub-mkimage -O arm-efi -o /opt/grub/grubarm.efi --prefix= -d \
170 grub-core cat chain configfile echo efinet ext2 fat halt help linux \
171 lsefisystab loadenv lvm minicmd normal part_msdos part_gpt reboot \
172 search search_fs_file search_fs_uuid search_label serial sleep test \
173 true && \
174 make clean && \
175 ./configure --target=riscv64 --with-platform=efi \
176 CC=gcc \
Tom Rini3bd5ed72023-08-25 13:21:26 -0400177 TARGET_CC=/opt/gcc-13.2.0-nolibc/riscv64-linux/bin/riscv64-linux-gcc \
178 TARGET_OBJCOPY=/opt/gcc-13.2.0-nolibc/riscv64-linux/bin/riscv64-linux-objcopy \
179 TARGET_STRIP=/opt/gcc-13.2.0-nolibc/riscv64-linux/bin/riscv64-linux-strip \
180 TARGET_NM=/opt/gcc-13.2.0-nolibc/riscv64-linux/bin/riscv64-linux-nm \
181 TARGET_RANLIB=/opt/gcc-13.2.0-nolibc/riscv64-linux/bin/riscv64-linux-ranlib && \
Tom Rini4bac0392024-11-27 11:17:22 -0600182 make -j$(nproc) && \
Tom Rini04549e92021-03-15 13:19:01 -0400183 ./grub-mkimage -O riscv64-efi -o /opt/grub/grubriscv64.efi --prefix= -d \
184 grub-core cat chain configfile echo efinet ext2 fat halt help linux \
185 lsefisystab loadenv lvm minicmd normal part_msdos part_gpt reboot \
186 search search_fs_file search_fs_uuid search_label serial sleep test \
187 true && \
Tom Rinie8403a92024-11-27 11:17:24 -0600188 make clean && \
189 ./configure --target=i386 --with-platform=efi \
190 CC=gcc \
191 TARGET_CC=/opt/gcc-13.2.0-nolibc/i386-linux/bin/i386-linux-gcc \
192 TARGET_OBJCOPY=/opt/gcc-13.2.0-nolibc/i386-linux/bin/i386-linux-objcopy \
193 TARGET_STRIP=/opt/gcc-13.2.0-nolibc/i386-linux/bin/i386-linux-strip \
194 TARGET_NM=/opt/gcc-13.2.0-nolibc/i386-linux/bin/i386-linux-nm \
195 TARGET_RANLIB=/opt/gcc-13.2.0-nolibc/i386-linux/bin/i386-linux-ranlib && \
196 make -j$(nproc) && \
197 ./grub-mkimage -O i386-efi -o /opt/grub/grub_x86.efi --prefix= -d \
198 grub-core normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd && \
199 make clean && \
200 ./configure --target=x86_64 --with-platform=efi \
201 CC=gcc \
202 TARGET_CC=/opt/gcc-13.2.0-nolibc/x86_64-linux/bin/x86_64-linux-gcc \
203 TARGET_OBJCOPY=/opt/gcc-13.2.0-nolibc/x86_64-linux/bin/x86_64-linux-objcopy \
204 TARGET_STRIP=/opt/gcc-13.2.0-nolibc/x86_64-linux/bin/x86_64-linux-strip \
205 TARGET_NM=/opt/gcc-13.2.0-nolibc/x86_64-linux/bin/x86_64-linux-nm \
206 TARGET_RANLIB=/opt/gcc-13.2.0-nolibc/x86_64-linux/bin/x86_64-linux-ranlib && \
207 make -j$(nproc) && \
208 ./grub-mkimage -O x86_64-efi -o /opt/grub/grub_x64.efi --prefix= -d \
209 grub-core normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd && \
Tom Rini04549e92021-03-15 13:19:01 -0400210 rm -rf /tmp/grub
211
Tom Rinib60c1d72023-02-07 12:50:13 -0500212RUN git clone https://gitlab.com/qemu-project/qemu.git /tmp/qemu && \
Tom Rini04549e92021-03-15 13:19:01 -0400213 cd /tmp/qemu && \
Heinrich Schuchardt24069c22024-01-12 03:17:57 +0100214 git checkout v8.2.0 && \
Bin Meng00afccd2021-08-26 23:33:32 +0800215 # config user.name and user.email to make 'git am' happy
216 git config user.name u-boot && \
217 git config user.email u-boot@denx.de && \
Heinrich Schuchardt24069c22024-01-12 03:17:57 +0100218 git format-patch 0c7ffc977195~..0c7ffc977195 && \
219 git am 0001-hw-net-cadence_gem-Fix-MDIO_OP_xxx-values.patch && \
Tom Rini139e9952024-03-11 10:02:43 -0400220 git cherry-pick d3c79c3974 && \
Tom Rini26a41832023-03-21 15:28:00 -0400221 ./configure --prefix=/opt/qemu --target-list="aarch64-softmmu,arm-softmmu,i386-softmmu,m68k-softmmu,mips-softmmu,mips64-softmmu,mips64el-softmmu,mipsel-softmmu,ppc-softmmu,riscv32-softmmu,riscv64-softmmu,sh4-softmmu,x86_64-softmmu,xtensa-softmmu" && \
Tom Rini04549e92021-03-15 13:19:01 -0400222 make -j$(nproc) all install && \
223 rm -rf /tmp/qemu
224
Heinrich Schuchardt2b4a6562024-02-28 08:43:11 +0100225# Build fiptool
226RUN git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git /tmp/tf-a && \
227 cd /tmp/tf-a/ && \
228 git checkout v2.10.0 && \
229 cd tools/fiptool && \
Tom Rini4bac0392024-11-27 11:17:22 -0600230 make -j$(nproc) && \
Heinrich Schuchardt2b4a6562024-02-28 08:43:11 +0100231 mkdir -p /usr/local/bin && \
232 cp fiptool /usr/local/bin && \
233 rm -rf /tmp/tf-a
234
Bin Mengf551a532021-08-26 23:33:33 +0800235# Build genimage (required by some targets to generate disk images)
236RUN wget -O - https://github.com/pengutronix/genimage/releases/download/v14/genimage-14.tar.xz | tar -C /tmp -xJ && \
237 cd /tmp/genimage-14 && \
238 ./configure && \
239 make -j$(nproc) && \
240 make install && \
241 rm -rf /tmp/genimage-14
242
Heinrich Schuchardt4e202672021-11-09 19:51:20 +0100243# Build libtpms
244RUN git clone https://github.com/stefanberger/libtpms /tmp/libtpms && \
245 cd /tmp/libtpms && \
246 ./autogen.sh && \
247 ./configure && \
248 make -j$(nproc) && \
249 make install && \
250 ldconfig && \
251 rm -rf /tmp/libtpms
252
253# Build swtpm
254RUN git clone https://github.com/stefanberger/swtpm /tmp/swtpm && \
255 cd /tmp/swtpm && \
256 ./autogen.sh && \
257 ./configure && \
258 make -j$(nproc) && \
259 make install && \
260 rm -rf /tmp/swtpm
261
Simon Glass523cb6d2023-01-15 14:15:59 -0700262# Build trace-cmd
263RUN mkdir /tmp/trace && \
264 git clone https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git /tmp/trace/libtraceevent && \
265 cd /tmp/trace/libtraceevent && \
266 make -j$(nproc) && \
267 sudo make install && \
268 git clone https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git /tmp/trace/libtracefs && \
269 cd /tmp/trace/libtracefs && \
270 make -j$(nproc) && \
271 sudo make install && \
272 git clone https://github.com/rostedt/trace-cmd.git /tmp/trace/trace-cmd && \
273 cd /tmp/trace/trace-cmd && \
274 make -j$(nproc) && \
275 sudo make install && \
276 rm -rf /tmp/trace
277
Tom Rini9e2b09e2024-02-13 09:39:26 -0500278# Build coreboot
Simon Glass78b9c8a2024-10-14 16:32:05 -0600279RUN wget -O - https://coreboot.org/releases/coreboot-24.08.tar.xz | tar -C /tmp -xJ && \
280 cd /tmp/coreboot-24.08 && \
Tom Rini9e2b09e2024-02-13 09:39:26 -0500281 make crossgcc-i386 CPUS=$(nproc) && \
282 make -C payloads/coreinfo olddefconfig && \
283 make -C payloads/coreinfo && \
284 make olddefconfig && \
Simon Glass78b9c8a2024-10-14 16:32:05 -0600285 echo CONFIG_GENERIC_LINEAR_FRAMEBUFFER=y | tee -a .config && \
286 echo CONFIG_USE_OPTION_TABLE=y | tee -a .config && \
287 make olddefconfig && \
Tom Rini9e2b09e2024-02-13 09:39:26 -0500288 make -j $(nproc) && \
289 sudo mkdir /opt/coreboot && \
290 sudo cp build/coreboot.rom build/cbfstool /opt/coreboot/
291
Tom Rini04549e92021-03-15 13:19:01 -0400292# Create our user/group
293RUN echo uboot ALL=NOPASSWD: ALL > /etc/sudoers.d/uboot
294RUN useradd -m -U uboot
295USER uboot:uboot
296
Tom Rini54573e02023-03-23 14:57:58 -0400297# Populate the cache for pip to use. Get these via wget as the
298# COPY / ADD directives don't work as we need them to.
299RUN wget -O /tmp/pytest-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/test/py/requirements.txt
300RUN wget -O /tmp/sphinx-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/doc/sphinx/requirements.txt
Tom Rini763160f2024-01-18 12:10:07 -0500301RUN wget -O /tmp/buildman-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/tools/buildman/requirements.txt
Tom Rini54573e02023-03-23 14:57:58 -0400302RUN virtualenv -p /usr/bin/python3 /tmp/venv && \
303 . /tmp/venv/bin/activate && \
304 pip install -r /tmp/pytest-requirements.txt \
Tom Rini763160f2024-01-18 12:10:07 -0500305 -r /tmp/sphinx-requirements.txt \
306 -r /tmp/buildman-requirements.txt && \
Tom Rini54573e02023-03-23 14:57:58 -0400307 deactivate && \
Tom Rini763160f2024-01-18 12:10:07 -0500308 rm -rf /tmp/venv /tmp/*-requirements.txt
Tom Rini54573e02023-03-23 14:57:58 -0400309
Tom Rini04549e92021-03-15 13:19:01 -0400310# Create the buildman config file
311RUN /bin/echo -e "[toolchain]\nroot = /usr" > ~/.buildman
Tom Rini3bd5ed72023-08-25 13:21:26 -0400312RUN /bin/echo -e "kernelorg = /opt/gcc-13.2.0-nolibc/*" >> ~/.buildman
Tom Rini0a78bc32021-07-02 10:41:58 -0400313RUN /bin/echo -e "\n[toolchain-prefix]\nxtensa = /opt/2020.07/xtensa-dc233c-elf/bin/xtensa-dc233c-elf-" >> ~/.buildman;
Tom Rini04549e92021-03-15 13:19:01 -0400314RUN /bin/echo -e "\n[toolchain-alias]\nsh = sh2" >> ~/.buildman
Tom Rini04549e92021-03-15 13:19:01 -0400315RUN /bin/echo -e "\nx86 = i386" >> ~/.buildman;
Safae Ouajihaaa366f2023-02-06 00:50:21 +0100316
317# Add mkbootimg tool
318RUN git clone https://android.googlesource.com/platform/system/tools/mkbootimg /home/uboot/mkbootimg
319ENV PYTHONPATH "${PYTHONPATH}:/home/uboot/mkbootimg"