blob: e7be4e542b3d799dda6a29232dcc6bc595391aff [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 Rini344bdb12024-12-08 11:07:32 -06005FROM ubuntu:jammy-20240911.1
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 Glassef4ca582024-11-27 11:17:29 -060019# Set architectures to build for (leaving out ARM which is an exception)
20ENV ARCHS="aarch64 arc i386 m68k mips microblaze nios2 powerpc riscv64 riscv32 sh2 x86_64"
21
22# Mirror containing the toolchains
23ENV MIRROR=https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin
24
25# Toolchain version
Tom Rinib76fa132025-01-28 17:02:05 -060026ENV TCVER=14.2.0
Simon Glassef4ca582024-11-27 11:17:29 -060027
Simon Glass7aafac02024-11-27 11:17:26 -060028RUN echo "Building on $BUILDPLATFORM, for target $TARGETPLATFORM"
29
Tom Rini04549e92021-03-15 13:19:01 -040030# Add LLVM repository
Tom Rini3f88c792024-11-27 11:17:25 -060031RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
32 --mount=type=cache,target=/var/lib/apt,sharing=locked \
33 apt-get update && apt-get install -y gnupg2 wget xz-utils
Tom Rini04549e92021-03-15 13:19:01 -040034RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
Tom Rinib76fa132025-01-28 17:02:05 -060035RUN echo deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main | tee /etc/apt/sources.list.d/llvm.list
Tom Rini04549e92021-03-15 13:19:01 -040036
Simon Glassef4ca582024-11-27 11:17:29 -060037# Create a list of URLs to process, then pass them into a 'while read' loop
38RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then HOSTARCH=x86_64; else HOSTARCH=arm64; fi; ( \
39 # Manually install the kernel.org "Crosstool"-based toolchains
40 for arch in $ARCHS; do \
41 echo $MIRROR/$HOSTARCH/$TCVER/${HOSTARCH}-gcc-$TCVER-nolibc-${arch}-linux.tar.xz; \
42 done; \
43 \
44 # Deal with ARM, which has a 'gnueabi' suffix
45 echo $MIRROR/${HOSTARCH}/$TCVER/${HOSTARCH}-gcc-$TCVER-nolibc-arm-linux-gnueabi.tar.xz; \
46 \
47 ) | while read url; do \
48 # Read the URL and unpack it into /opt
49 wget -O - $url | tar -C /opt -xJ; \
50 done
Tom Rini04549e92021-03-15 13:19:01 -040051
52# Manually install other toolchains
Simon Glassef4ca582024-11-27 11:17:29 -060053RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
54 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; \
55 fi
Tom Rini04549e92021-03-15 13:19:01 -040056
57# Update and install things from apt now
Tom Rini3f88c792024-11-27 11:17:25 -060058RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
59 --mount=type=cache,target=/var/lib/apt,sharing=locked \
60 apt-get update && apt-get install -y \
Tom Rini04549e92021-03-15 13:19:01 -040061 automake \
62 autopoint \
63 bc \
64 binutils-dev \
65 bison \
66 build-essential \
Leonard Anderweit8957b2e2025-04-01 10:46:41 +020067 byacc \
Simon Glassbe17cb32023-08-24 13:55:46 -060068 cgpt \
Tom Rinib76fa132025-01-28 17:02:05 -060069 clang-18 \
Tom Rini04549e92021-03-15 13:19:01 -040070 coreutils \
71 cpio \
Tom Rini04549e92021-03-15 13:19:01 -040072 curl \
73 device-tree-compiler \
74 dosfstools \
75 e2fsprogs \
76 efitools \
Huang Jianan11e04432022-02-26 15:05:51 +080077 erofs-utils \
Marek Vasut60b83672025-03-17 04:12:50 +010078 exfatprogs \
Heinrich Schuchardt4e202672021-11-09 19:51:20 +010079 expect \
Tom Rini04549e92021-03-15 13:19:01 -040080 fakeroot \
81 flex \
Heinrich Schuchardt4e202672021-11-09 19:51:20 +010082 gawk \
Tom Rini04549e92021-03-15 13:19:01 -040083 gdisk \
Tom Rini12248ed2024-11-27 11:17:23 -060084 gettext \
Tom Rini04549e92021-03-15 13:19:01 -040085 git \
86 gnu-efi \
Heinrich Schuchardt4e202672021-11-09 19:51:20 +010087 gnutls-dev \
Tom Rini04549e92021-03-15 13:19:01 -040088 graphviz \
Tom Rini04549e92021-03-15 13:19:01 -040089 help2man \
90 iasl \
91 imagemagick \
92 iputils-ping \
Bin Mengf551a532021-08-26 23:33:33 +080093 libconfuse-dev \
Tom Rinic8982d22021-06-10 10:57:36 -040094 libgit2-dev \
Heinrich Schuchardt4e202672021-11-09 19:51:20 +010095 libjson-glib-dev \
AKASHI Takahiro3edc3472022-02-01 10:32:36 +090096 libgnutls28-dev \
97 libgnutls30 \
Tom Rini04549e92021-03-15 13:19:01 -040098 liblz4-tool \
99 libpixman-1-dev \
Tom Rinic8982d22021-06-10 10:57:36 -0400100 libpython3-dev \
Tom Rini04549e92021-03-15 13:19:01 -0400101 libsdl1.2-dev \
102 libsdl2-dev \
Heinrich Schuchardt4e202672021-11-09 19:51:20 +0100103 libseccomp-dev \
Tom Rini83da2322023-07-13 10:16:28 -0400104 libslirp-dev \
Tom Rini04549e92021-03-15 13:19:01 -0400105 libssl-dev \
Heinrich Schuchardt4e202672021-11-09 19:51:20 +0100106 libtool \
Tom Rini04549e92021-03-15 13:19:01 -0400107 libudev-dev \
108 libusb-1.0-0-dev \
109 lzma-alone \
110 lzop \
111 mount \
112 mtd-utils \
113 mtools \
Heinrich Schuchardt4e202672021-11-09 19:51:20 +0100114 net-tools \
Bin Meng00afccd2021-08-26 23:33:32 +0800115 ninja-build \
Tom Rini04549e92021-03-15 13:19:01 -0400116 openssl \
117 picocom \
118 parted \
119 pkg-config \
Tom Rinic8982d22021-06-10 10:57:36 -0400120 python-is-python3 \
121 python2.7 \
122 python3 \
123 python3-dev \
Tom Rini04549e92021-03-15 13:19:01 -0400124 python3-pip \
125 python3-sphinx \
Tom Rinic8982d22021-06-10 10:57:36 -0400126 python3-virtualenv \
Tom Rini04549e92021-03-15 13:19:01 -0400127 rpm2cpio \
128 sbsigntool \
Heinrich Schuchardt4e202672021-11-09 19:51:20 +0100129 socat \
130 softhsm2 \
Tom Rini04549e92021-03-15 13:19:01 -0400131 sparse \
132 srecord \
133 sudo \
134 swig \
Heinrich Schuchardtc2c98ea2022-12-30 05:41:01 +0100135 texinfo \
Tom Rini04549e92021-03-15 13:19:01 -0400136 util-linux \
137 uuid-dev \
138 virtualenv \
Simon Glassbe17cb32023-08-24 13:55:46 -0600139 vboot-kernel-utils \
140 vboot-utils \
Heinrich Schuchardt905d0752024-02-28 08:23:09 +0100141 xilinx-bootgen \
Tom Rini0a78bc32021-07-02 10:41:58 -0400142 xxd \
Tom Rini3f88c792024-11-27 11:17:25 -0600143 zip
Tom Rini04549e92021-03-15 13:19:01 -0400144
Tom Rini04549e92021-03-15 13:19:01 -0400145# Build GRUB UEFI targets for ARM & RISC-V, 32-bit and 64-bit
146RUN git clone git://git.savannah.gnu.org/grub.git /tmp/grub && \
147 cd /tmp/grub && \
Tom Rini12248ed2024-11-27 11:17:23 -0600148 git checkout grub-2.12 && \
Tom Rini77d48f12022-11-22 12:31:58 -0500149 git config --global user.name "GitLab CI Runner" && \
150 git config --global user.email trini@konsulko.com && \
Tom Rini04549e92021-03-15 13:19:01 -0400151 ./bootstrap && \
152 mkdir -p /opt/grub && \
153 ./configure --target=aarch64 --with-platform=efi \
154 CC=gcc \
Tom Rini69349882024-12-08 11:07:25 -0600155 TARGET_CC=/opt/gcc-${TCVER}-nolibc/aarch64-linux/bin/aarch64-linux-gcc \
156 TARGET_OBJCOPY=/opt/gcc-${TCVER}-nolibc/aarch64-linux/bin/aarch64-linux-objcopy \
157 TARGET_STRIP=/opt/gcc-${TCVER}-nolibc/aarch64-linux/bin/aarch64-linux-strip \
158 TARGET_NM=/opt/gcc-${TCVER}-nolibc/aarch64-linux/bin/aarch64-linux-nm \
159 TARGET_RANLIB=/opt/gcc-${TCVER}-nolibc/aarch64-linux/bin/aarch64-linux-ranlib && \
Tom Rini4bac0392024-11-27 11:17:22 -0600160 make -j$(nproc) && \
Tom Rini04549e92021-03-15 13:19:01 -0400161 ./grub-mkimage -O arm64-efi -o /opt/grub/grubaa64.efi --prefix= -d \
162 grub-core cat chain configfile echo efinet ext2 fat halt help linux \
163 lsefisystab loadenv lvm minicmd normal part_msdos part_gpt reboot \
164 search search_fs_file search_fs_uuid search_label serial sleep test \
165 true && \
166 make clean && \
167 ./configure --target=arm --with-platform=efi \
168 CC=gcc \
Tom Rini69349882024-12-08 11:07:25 -0600169 TARGET_CC=/opt/gcc-${TCVER}-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-gcc \
170 TARGET_OBJCOPY=/opt/gcc-${TCVER}-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-objcopy \
171 TARGET_STRIP=/opt/gcc-${TCVER}-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-strip \
172 TARGET_NM=/opt/gcc-${TCVER}-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-nm \
173 TARGET_RANLIB=/opt/gcc-${TCVER}-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ranlib && \
Tom Rini4bac0392024-11-27 11:17:22 -0600174 make -j$(nproc) && \
Tom Rini04549e92021-03-15 13:19:01 -0400175 ./grub-mkimage -O arm-efi -o /opt/grub/grubarm.efi --prefix= -d \
176 grub-core cat chain configfile echo efinet ext2 fat halt help linux \
177 lsefisystab loadenv lvm minicmd normal part_msdos part_gpt reboot \
178 search search_fs_file search_fs_uuid search_label serial sleep test \
179 true && \
180 make clean && \
Tom Rinib76fa132025-01-28 17:02:05 -0600181 grub_cv_cc_mcmodel=no ./configure --target=riscv64 --with-platform=efi \
Tom Rini04549e92021-03-15 13:19:01 -0400182 CC=gcc \
Tom Rini69349882024-12-08 11:07:25 -0600183 TARGET_CC=/opt/gcc-${TCVER}-nolibc/riscv64-linux/bin/riscv64-linux-gcc \
184 TARGET_OBJCOPY=/opt/gcc-${TCVER}-nolibc/riscv64-linux/bin/riscv64-linux-objcopy \
185 TARGET_STRIP=/opt/gcc-${TCVER}-nolibc/riscv64-linux/bin/riscv64-linux-strip \
186 TARGET_NM=/opt/gcc-${TCVER}-nolibc/riscv64-linux/bin/riscv64-linux-nm \
187 TARGET_RANLIB=/opt/gcc-${TCVER}-nolibc/riscv64-linux/bin/riscv64-linux-ranlib && \
Tom Rini4bac0392024-11-27 11:17:22 -0600188 make -j$(nproc) && \
Tom Rini04549e92021-03-15 13:19:01 -0400189 ./grub-mkimage -O riscv64-efi -o /opt/grub/grubriscv64.efi --prefix= -d \
190 grub-core cat chain configfile echo efinet ext2 fat halt help linux \
191 lsefisystab loadenv lvm minicmd normal part_msdos part_gpt reboot \
192 search search_fs_file search_fs_uuid search_label serial sleep test \
193 true && \
Tom Rinie8403a92024-11-27 11:17:24 -0600194 make clean && \
195 ./configure --target=i386 --with-platform=efi \
196 CC=gcc \
Tom Rini69349882024-12-08 11:07:25 -0600197 TARGET_CC=/opt/gcc-${TCVER}-nolibc/i386-linux/bin/i386-linux-gcc \
198 TARGET_OBJCOPY=/opt/gcc-${TCVER}-nolibc/i386-linux/bin/i386-linux-objcopy \
199 TARGET_STRIP=/opt/gcc-${TCVER}-nolibc/i386-linux/bin/i386-linux-strip \
200 TARGET_NM=/opt/gcc-${TCVER}-nolibc/i386-linux/bin/i386-linux-nm \
201 TARGET_RANLIB=/opt/gcc-${TCVER}-nolibc/i386-linux/bin/i386-linux-ranlib && \
Tom Rinie8403a92024-11-27 11:17:24 -0600202 make -j$(nproc) && \
203 ./grub-mkimage -O i386-efi -o /opt/grub/grub_x86.efi --prefix= -d \
204 grub-core normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd && \
205 make clean && \
206 ./configure --target=x86_64 --with-platform=efi \
207 CC=gcc \
Tom Rini69349882024-12-08 11:07:25 -0600208 TARGET_CC=/opt/gcc-${TCVER}-nolibc/x86_64-linux/bin/x86_64-linux-gcc \
209 TARGET_OBJCOPY=/opt/gcc-${TCVER}-nolibc/x86_64-linux/bin/x86_64-linux-objcopy \
210 TARGET_STRIP=/opt/gcc-${TCVER}-nolibc/x86_64-linux/bin/x86_64-linux-strip \
211 TARGET_NM=/opt/gcc-${TCVER}-nolibc/x86_64-linux/bin/x86_64-linux-nm \
212 TARGET_RANLIB=/opt/gcc-${TCVER}-nolibc/x86_64-linux/bin/x86_64-linux-ranlib && \
Tom Rinie8403a92024-11-27 11:17:24 -0600213 make -j$(nproc) && \
214 ./grub-mkimage -O x86_64-efi -o /opt/grub/grub_x64.efi --prefix= -d \
215 grub-core normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd && \
Tom Rini04549e92021-03-15 13:19:01 -0400216 rm -rf /tmp/grub
217
Tom Rinib60c1d72023-02-07 12:50:13 -0500218RUN git clone https://gitlab.com/qemu-project/qemu.git /tmp/qemu && \
Tom Rini04549e92021-03-15 13:19:01 -0400219 cd /tmp/qemu && \
Heinrich Schuchardt24069c22024-01-12 03:17:57 +0100220 git checkout v8.2.0 && \
Bin Meng00afccd2021-08-26 23:33:32 +0800221 # config user.name and user.email to make 'git am' happy
222 git config user.name u-boot && \
223 git config user.email u-boot@denx.de && \
Heinrich Schuchardt24069c22024-01-12 03:17:57 +0100224 git format-patch 0c7ffc977195~..0c7ffc977195 && \
225 git am 0001-hw-net-cadence_gem-Fix-MDIO_OP_xxx-values.patch && \
Tom Rini139e9952024-03-11 10:02:43 -0400226 git cherry-pick d3c79c3974 && \
Tom Rini26a41832023-03-21 15:28:00 -0400227 ./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 -0400228 make -j$(nproc) all install && \
229 rm -rf /tmp/qemu
230
Heinrich Schuchardt2b4a6562024-02-28 08:43:11 +0100231# Build fiptool
232RUN git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git /tmp/tf-a && \
233 cd /tmp/tf-a/ && \
Tom Rinif1210b12025-04-08 14:21:40 -0600234 git checkout v2.12.0 && \
Heinrich Schuchardt2b4a6562024-02-28 08:43:11 +0100235 cd tools/fiptool && \
Tom Rini4bac0392024-11-27 11:17:22 -0600236 make -j$(nproc) && \
Heinrich Schuchardt2b4a6562024-02-28 08:43:11 +0100237 mkdir -p /usr/local/bin && \
238 cp fiptool /usr/local/bin && \
239 rm -rf /tmp/tf-a
240
Bin Mengf551a532021-08-26 23:33:33 +0800241# Build genimage (required by some targets to generate disk images)
242RUN wget -O - https://github.com/pengutronix/genimage/releases/download/v14/genimage-14.tar.xz | tar -C /tmp -xJ && \
243 cd /tmp/genimage-14 && \
244 ./configure && \
245 make -j$(nproc) && \
246 make install && \
247 rm -rf /tmp/genimage-14
248
Heinrich Schuchardt4e202672021-11-09 19:51:20 +0100249# Build libtpms
250RUN git clone https://github.com/stefanberger/libtpms /tmp/libtpms && \
251 cd /tmp/libtpms && \
252 ./autogen.sh && \
253 ./configure && \
254 make -j$(nproc) && \
255 make install && \
256 ldconfig && \
257 rm -rf /tmp/libtpms
258
259# Build swtpm
260RUN git clone https://github.com/stefanberger/swtpm /tmp/swtpm && \
261 cd /tmp/swtpm && \
262 ./autogen.sh && \
263 ./configure && \
264 make -j$(nproc) && \
265 make install && \
266 rm -rf /tmp/swtpm
267
Simon Glass523cb6d2023-01-15 14:15:59 -0700268# Build trace-cmd
269RUN mkdir /tmp/trace && \
270 git clone https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git /tmp/trace/libtraceevent && \
271 cd /tmp/trace/libtraceevent && \
272 make -j$(nproc) && \
273 sudo make install && \
274 git clone https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git /tmp/trace/libtracefs && \
275 cd /tmp/trace/libtracefs && \
276 make -j$(nproc) && \
277 sudo make install && \
278 git clone https://github.com/rostedt/trace-cmd.git /tmp/trace/trace-cmd && \
279 cd /tmp/trace/trace-cmd && \
280 make -j$(nproc) && \
281 sudo make install && \
282 rm -rf /tmp/trace
283
Tom Rini9e2b09e2024-02-13 09:39:26 -0500284# Build coreboot
Simon Glass78b9c8a2024-10-14 16:32:05 -0600285RUN wget -O - https://coreboot.org/releases/coreboot-24.08.tar.xz | tar -C /tmp -xJ && \
286 cd /tmp/coreboot-24.08 && \
Tom Rini9e2b09e2024-02-13 09:39:26 -0500287 make crossgcc-i386 CPUS=$(nproc) && \
288 make -C payloads/coreinfo olddefconfig && \
289 make -C payloads/coreinfo && \
290 make olddefconfig && \
Simon Glass78b9c8a2024-10-14 16:32:05 -0600291 echo CONFIG_GENERIC_LINEAR_FRAMEBUFFER=y | tee -a .config && \
292 echo CONFIG_USE_OPTION_TABLE=y | tee -a .config && \
293 make olddefconfig && \
Tom Rini9e2b09e2024-02-13 09:39:26 -0500294 make -j $(nproc) && \
295 sudo mkdir /opt/coreboot && \
Tom Rini1994e542025-02-12 16:24:15 -0600296 sudo cp build/coreboot.rom build/cbfstool /opt/coreboot/ && \
297 rm -rf /tmp/coreboot-24.08
Tom Rini9e2b09e2024-02-13 09:39:26 -0500298
Tom Rini04549e92021-03-15 13:19:01 -0400299# Create our user/group
300RUN echo uboot ALL=NOPASSWD: ALL > /etc/sudoers.d/uboot
301RUN useradd -m -U uboot
302USER uboot:uboot
303
Tom Rini54573e02023-03-23 14:57:58 -0400304# Populate the cache for pip to use. Get these via wget as the
305# COPY / ADD directives don't work as we need them to.
306RUN wget -O /tmp/pytest-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/test/py/requirements.txt
307RUN wget -O /tmp/sphinx-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/doc/sphinx/requirements.txt
Tom Rini9a4b1112025-02-04 17:12:09 -0600308RUN wget -O /tmp/binman-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/tools/binman/requirements.txt
Tom Rini763160f2024-01-18 12:10:07 -0500309RUN wget -O /tmp/buildman-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/tools/buildman/requirements.txt
Tom Rini9a4b1112025-02-04 17:12:09 -0600310RUN wget -O /tmp/patman-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/tools/patman/requirements.txt
311RUN wget -O /tmp/u_boot_pylib-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/tools/u_boot_pylib/requirements.txt
Tom Rini54573e02023-03-23 14:57:58 -0400312RUN virtualenv -p /usr/bin/python3 /tmp/venv && \
313 . /tmp/venv/bin/activate && \
314 pip install -r /tmp/pytest-requirements.txt \
Tom Rini763160f2024-01-18 12:10:07 -0500315 -r /tmp/sphinx-requirements.txt \
Tom Rini9a4b1112025-02-04 17:12:09 -0600316 -r /tmp/binman-requirements.txt \
317 -r /tmp/buildman-requirements.txt \
318 -r /tmp/patman-requirements.txt \
319 -r /tmp/u_boot_pylib-requirements.txt && \
Tom Rini54573e02023-03-23 14:57:58 -0400320 deactivate && \
Tom Rini763160f2024-01-18 12:10:07 -0500321 rm -rf /tmp/venv /tmp/*-requirements.txt
Tom Rini54573e02023-03-23 14:57:58 -0400322
Tom Rini04549e92021-03-15 13:19:01 -0400323# Create the buildman config file
Tom Rinif1b9e2a2024-12-08 11:07:30 -0600324RUN /bin/echo -e "[toolchain]\nkernelorg = /opt/gcc-${TCVER}-nolibc/*" > ~/.buildman
325RUN /bin/echo -e "root = /usr" >> ~/.buildman
Tom Rini5d18a672024-12-08 11:07:24 -0600326RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
327 /bin/echo -e "\n[toolchain-prefix]\nxtensa = /opt/2020.07/xtensa-dc233c-elf/bin/xtensa-dc233c-elf-" >> ~/.buildman; \
328 fi
Tom Rini64d32672024-12-08 11:07:29 -0600329RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
330 /bin/echo -e "\n[toolchain-prefix]\naarch64 = /opt/gcc-${TCVER}-nolibc/aarch64-linux/bin/aarch64-linux-" >> ~/.buildman; \
331 fi
Tom Rini04549e92021-03-15 13:19:01 -0400332RUN /bin/echo -e "\n[toolchain-alias]\nsh = sh2" >> ~/.buildman
Tom Rini04549e92021-03-15 13:19:01 -0400333RUN /bin/echo -e "\nx86 = i386" >> ~/.buildman;
Safae Ouajihaaa366f2023-02-06 00:50:21 +0100334
335# Add mkbootimg tool
336RUN git clone https://android.googlesource.com/platform/system/tools/mkbootimg /home/uboot/mkbootimg
Simon Glassf8e20122024-11-27 11:17:28 -0600337ENV PYTHONPATH="${PYTHONPATH}:/home/uboot/mkbootimg"