Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 1 | # 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 Rini | 8b98769 | 2023-07-13 20:37:36 -0400 | [diff] [blame] | 5 | FROM ubuntu:jammy-20230624 |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 6 | MAINTAINER Tom Rini <trini@konsulko.com> |
| 7 | LABEL Description=" This image is for building U-Boot inside a container" |
| 8 | |
| 9 | # Make sure apt is happy |
| 10 | ENV DEBIAN_FRONTEND=noninteractive |
| 11 | |
| 12 | # Add LLVM repository |
| 13 | RUN apt-get update && apt-get install -y gnupg2 wget xz-utils && rm -rf /var/lib/apt/lists/* |
| 14 | RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - |
Tom Rini | d7e0678 | 2023-03-21 15:07:45 -0400 | [diff] [blame] | 15 | RUN echo deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main | tee /etc/apt/sources.list.d/llvm.list |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 16 | |
Tom Rini | 6d6ddab | 2023-07-13 20:37:35 -0400 | [diff] [blame] | 17 | # Manually install the kernel.org "Crosstool" based toolchains for gcc-13.1.0 |
| 18 | RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-aarch64-linux.tar.xz | tar -C /opt -xJ |
| 19 | RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-arc-linux.tar.xz | tar -C /opt -xJ |
| 20 | RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-arm-linux-gnueabi.tar.xz | tar -C /opt -xJ |
| 21 | RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-i386-linux.tar.xz | tar -C /opt -xJ |
| 22 | RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-m68k-linux.tar.xz | tar -C /opt -xJ |
| 23 | RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-mips-linux.tar.xz | tar -C /opt -xJ |
| 24 | RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-microblaze-linux.tar.xz | tar -C /opt -xJ |
| 25 | RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-nios2-linux.tar.xz | tar -C /opt -xJ |
| 26 | RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-powerpc-linux.tar.xz | tar -C /opt -xJ |
| 27 | RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-riscv64-linux.tar.xz | tar -C /opt -xJ |
| 28 | RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-riscv32-linux.tar.xz | tar -C /opt -xJ |
| 29 | RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-sh2-linux.tar.xz | tar -C /opt -xJ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 30 | |
| 31 | # Manually install other toolchains |
Tom Rini | 7bb1cc3 | 2021-07-02 10:41:58 -0400 | [diff] [blame] | 32 | RUN 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 Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 33 | |
| 34 | # Update and install things from apt now |
| 35 | RUN apt-get update && apt-get install -y \ |
| 36 | automake \ |
| 37 | autopoint \ |
| 38 | bc \ |
| 39 | binutils-dev \ |
| 40 | bison \ |
| 41 | build-essential \ |
Tom Rini | d7e0678 | 2023-03-21 15:07:45 -0400 | [diff] [blame] | 42 | clang-16 \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 43 | coreutils \ |
| 44 | cpio \ |
| 45 | cppcheck \ |
| 46 | curl \ |
| 47 | device-tree-compiler \ |
| 48 | dosfstools \ |
| 49 | e2fsprogs \ |
| 50 | efitools \ |
Huang Jianan | 2c30aa3 | 2022-02-26 15:05:51 +0800 | [diff] [blame] | 51 | erofs-utils \ |
Heinrich Schuchardt | 8a87d1a | 2021-11-09 19:51:20 +0100 | [diff] [blame] | 52 | expect \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 53 | fakeroot \ |
| 54 | flex \ |
Heinrich Schuchardt | 8a87d1a | 2021-11-09 19:51:20 +0100 | [diff] [blame] | 55 | gawk \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 56 | gdisk \ |
| 57 | git \ |
| 58 | gnu-efi \ |
Heinrich Schuchardt | 8a87d1a | 2021-11-09 19:51:20 +0100 | [diff] [blame] | 59 | gnutls-dev \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 60 | graphviz \ |
| 61 | grub-efi-amd64-bin \ |
| 62 | grub-efi-ia32-bin \ |
| 63 | help2man \ |
| 64 | iasl \ |
| 65 | imagemagick \ |
| 66 | iputils-ping \ |
Tom Rini | 85fd489 | 2023-01-11 12:24:57 -0500 | [diff] [blame] | 67 | libc6-i386 \ |
Bin Meng | 3283a05 | 2021-08-26 23:33:33 +0800 | [diff] [blame] | 68 | libconfuse-dev \ |
Tom Rini | b1c2102 | 2021-06-10 10:57:36 -0400 | [diff] [blame] | 69 | libgit2-dev \ |
Heinrich Schuchardt | 8a87d1a | 2021-11-09 19:51:20 +0100 | [diff] [blame] | 70 | libjson-glib-dev \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 71 | libguestfs-tools \ |
AKASHI Takahiro | ad3616e | 2022-02-01 10:32:36 +0900 | [diff] [blame] | 72 | libgnutls28-dev \ |
| 73 | libgnutls30 \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 74 | liblz4-tool \ |
| 75 | libpixman-1-dev \ |
Tom Rini | b1c2102 | 2021-06-10 10:57:36 -0400 | [diff] [blame] | 76 | libpython3-dev \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 77 | libsdl1.2-dev \ |
| 78 | libsdl2-dev \ |
Heinrich Schuchardt | 8a87d1a | 2021-11-09 19:51:20 +0100 | [diff] [blame] | 79 | libseccomp-dev \ |
Tom Rini | b45ab9c | 2023-07-13 10:16:28 -0400 | [diff] [blame] | 80 | libslirp-dev \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 81 | libssl-dev \ |
Heinrich Schuchardt | 8a87d1a | 2021-11-09 19:51:20 +0100 | [diff] [blame] | 82 | libtool \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 83 | libudev-dev \ |
| 84 | libusb-1.0-0-dev \ |
Alper Nebi Yasak | f9abaa5 | 2021-06-21 21:51:54 +0300 | [diff] [blame] | 85 | linux-image-kvm \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 86 | lzma-alone \ |
| 87 | lzop \ |
| 88 | mount \ |
| 89 | mtd-utils \ |
| 90 | mtools \ |
Heinrich Schuchardt | 8a87d1a | 2021-11-09 19:51:20 +0100 | [diff] [blame] | 91 | net-tools \ |
Bin Meng | a30e53c | 2021-08-26 23:33:32 +0800 | [diff] [blame] | 92 | ninja-build \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 93 | openssl \ |
| 94 | picocom \ |
| 95 | parted \ |
| 96 | pkg-config \ |
Tom Rini | b1c2102 | 2021-06-10 10:57:36 -0400 | [diff] [blame] | 97 | python-is-python3 \ |
| 98 | python2.7 \ |
| 99 | python3 \ |
| 100 | python3-dev \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 101 | python3-pip \ |
Simon Glass | 3379926 | 2022-10-13 06:25:57 -0600 | [diff] [blame] | 102 | python3-pyelftools \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 103 | python3-sphinx \ |
Tom Rini | b1c2102 | 2021-06-10 10:57:36 -0400 | [diff] [blame] | 104 | python3-virtualenv \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 105 | rpm2cpio \ |
| 106 | sbsigntool \ |
| 107 | sloccount \ |
Heinrich Schuchardt | 8a87d1a | 2021-11-09 19:51:20 +0100 | [diff] [blame] | 108 | socat \ |
| 109 | softhsm2 \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 110 | sparse \ |
| 111 | srecord \ |
| 112 | sudo \ |
| 113 | swig \ |
Heinrich Schuchardt | 5f7a507 | 2022-12-30 05:41:01 +0100 | [diff] [blame] | 114 | texinfo \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 115 | util-linux \ |
| 116 | uuid-dev \ |
| 117 | virtualenv \ |
Tom Rini | 7bb1cc3 | 2021-07-02 10:41:58 -0400 | [diff] [blame] | 118 | xxd \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 119 | zip \ |
| 120 | && rm -rf /var/lib/apt/lists/* |
| 121 | |
Alper Nebi Yasak | f9abaa5 | 2021-06-21 21:51:54 +0300 | [diff] [blame] | 122 | # Make kernels readable for libguestfs tools to work correctly |
| 123 | RUN chmod +r /boot/vmlinu* |
| 124 | |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 125 | # Build GRUB UEFI targets for ARM & RISC-V, 32-bit and 64-bit |
| 126 | RUN git clone git://git.savannah.gnu.org/grub.git /tmp/grub && \ |
| 127 | cd /tmp/grub && \ |
Tom Rini | 7bb1cc3 | 2021-07-02 10:41:58 -0400 | [diff] [blame] | 128 | git checkout grub-2.06 && \ |
Tom Rini | 09ed7e6 | 2022-11-22 12:31:58 -0500 | [diff] [blame] | 129 | git config --global user.name "GitLab CI Runner" && \ |
| 130 | git config --global user.email trini@konsulko.com && \ |
| 131 | git cherry-pick 049efdd72eb7baa7b2bf8884391ee7fe650da5a0 && \ |
Tom Rini | 6d6ddab | 2023-07-13 20:37:35 -0400 | [diff] [blame] | 132 | git cherry-pick 403d6540cd608b2706cfa0cb4713f7e4b490ff45 && \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 133 | ./bootstrap && \ |
| 134 | mkdir -p /opt/grub && \ |
| 135 | ./configure --target=aarch64 --with-platform=efi \ |
| 136 | CC=gcc \ |
Tom Rini | 6d6ddab | 2023-07-13 20:37:35 -0400 | [diff] [blame] | 137 | TARGET_CC=/opt/gcc-13.1.0-nolibc/aarch64-linux/bin/aarch64-linux-gcc \ |
| 138 | TARGET_OBJCOPY=/opt/gcc-13.1.0-nolibc/aarch64-linux/bin/aarch64-linux-objcopy \ |
| 139 | TARGET_STRIP=/opt/gcc-13.1.0-nolibc/aarch64-linux/bin/aarch64-linux-strip \ |
| 140 | TARGET_NM=/opt/gcc-13.1.0-nolibc/aarch64-linux/bin/aarch64-linux-nm \ |
| 141 | TARGET_RANLIB=/opt/gcc-13.1.0-nolibc/aarch64-linux/bin/aarch64-linux-ranlib && \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 142 | make && \ |
| 143 | ./grub-mkimage -O arm64-efi -o /opt/grub/grubaa64.efi --prefix= -d \ |
| 144 | grub-core cat chain configfile echo efinet ext2 fat halt help linux \ |
| 145 | lsefisystab loadenv lvm minicmd normal part_msdos part_gpt reboot \ |
| 146 | search search_fs_file search_fs_uuid search_label serial sleep test \ |
| 147 | true && \ |
| 148 | make clean && \ |
| 149 | ./configure --target=arm --with-platform=efi \ |
| 150 | CC=gcc \ |
Tom Rini | 6d6ddab | 2023-07-13 20:37:35 -0400 | [diff] [blame] | 151 | TARGET_CC=/opt/gcc-13.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-gcc \ |
| 152 | TARGET_OBJCOPY=/opt/gcc-13.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-objcopy \ |
| 153 | TARGET_STRIP=/opt/gcc-13.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-strip \ |
| 154 | TARGET_NM=/opt/gcc-13.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-nm \ |
| 155 | TARGET_RANLIB=/opt/gcc-13.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ranlib && \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 156 | make && \ |
| 157 | ./grub-mkimage -O arm-efi -o /opt/grub/grubarm.efi --prefix= -d \ |
| 158 | grub-core cat chain configfile echo efinet ext2 fat halt help linux \ |
| 159 | lsefisystab loadenv lvm minicmd normal part_msdos part_gpt reboot \ |
| 160 | search search_fs_file search_fs_uuid search_label serial sleep test \ |
| 161 | true && \ |
| 162 | make clean && \ |
| 163 | ./configure --target=riscv64 --with-platform=efi \ |
| 164 | CC=gcc \ |
Tom Rini | 6d6ddab | 2023-07-13 20:37:35 -0400 | [diff] [blame] | 165 | TARGET_CC=/opt/gcc-13.1.0-nolibc/riscv64-linux/bin/riscv64-linux-gcc \ |
| 166 | TARGET_OBJCOPY=/opt/gcc-13.1.0-nolibc/riscv64-linux/bin/riscv64-linux-objcopy \ |
| 167 | TARGET_STRIP=/opt/gcc-13.1.0-nolibc/riscv64-linux/bin/riscv64-linux-strip \ |
| 168 | TARGET_NM=/opt/gcc-13.1.0-nolibc/riscv64-linux/bin/riscv64-linux-nm \ |
| 169 | TARGET_RANLIB=/opt/gcc-13.1.0-nolibc/riscv64-linux/bin/riscv64-linux-ranlib && \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 170 | make && \ |
| 171 | ./grub-mkimage -O riscv64-efi -o /opt/grub/grubriscv64.efi --prefix= -d \ |
| 172 | grub-core cat chain configfile echo efinet ext2 fat halt help linux \ |
| 173 | lsefisystab loadenv lvm minicmd normal part_msdos part_gpt reboot \ |
| 174 | search search_fs_file search_fs_uuid search_label serial sleep test \ |
| 175 | true && \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 176 | rm -rf /tmp/grub |
| 177 | |
Tom Rini | e38cdc6 | 2023-02-07 12:50:13 -0500 | [diff] [blame] | 178 | RUN git clone https://gitlab.com/qemu-project/qemu.git /tmp/qemu && \ |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 179 | cd /tmp/qemu && \ |
Tom Rini | b45ab9c | 2023-07-13 10:16:28 -0400 | [diff] [blame] | 180 | git checkout v8.0.3 && \ |
Bin Meng | a30e53c | 2021-08-26 23:33:32 +0800 | [diff] [blame] | 181 | # config user.name and user.email to make 'git am' happy |
| 182 | git config user.name u-boot && \ |
| 183 | git config user.email u-boot@denx.de && \ |
Tom Rini | 3854706 | 2023-03-21 15:28:00 -0400 | [diff] [blame] | 184 | ./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 Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 185 | make -j$(nproc) all install && \ |
| 186 | rm -rf /tmp/qemu |
| 187 | |
Heinrich Schuchardt | ed319ba | 2023-01-13 20:31:33 +0100 | [diff] [blame] | 188 | # Build QEMU supporting Nokia n900 emulation |
| 189 | RUN mkdir -p /opt/nokia && \ |
| 190 | cd /tmp && \ |
| 191 | git clone https://git.linaro.org/qemu/qemu-linaro.git && \ |
| 192 | cd /tmp/qemu-linaro && \ |
| 193 | git checkout 8f8d8e0796efe1a6f34cdd83fb798f3c41217ec1 && \ |
| 194 | ./configure --enable-system --target-list=arm-softmmu \ |
| 195 | --python=/usr/bin/python2.7 --disable-sdl --disable-gtk \ |
| 196 | --disable-curses --audio-drv-list= --audio-card-list= \ |
| 197 | --disable-werror --disable-xen --disable-xen-pci-passthrough \ |
| 198 | --disable-brlapi --disable-vnc --disable-curl --disable-slirp \ |
| 199 | --disable-kvm --disable-user --disable-linux-user --disable-bsd-user \ |
| 200 | --disable-guest-base --disable-uuid --disable-vde --disable-linux-aio \ |
| 201 | --disable-cap-ng --disable-attr --disable-blobs --disable-docs \ |
| 202 | --disable-spice --disable-libiscsi --disable-smartcard-nss \ |
| 203 | --disable-usb-redir --disable-guest-agent --disable-seccomp \ |
| 204 | --disable-glusterfs --disable-nptl --disable-fdt && \ |
| 205 | make -j$(nproc) && \ |
| 206 | cp /tmp/qemu-linaro/arm-softmmu/qemu-system-arm /opt/nokia && \ |
| 207 | rm -rf /tmp/qemu-linaro |
| 208 | |
Bin Meng | 3283a05 | 2021-08-26 23:33:33 +0800 | [diff] [blame] | 209 | # Build genimage (required by some targets to generate disk images) |
| 210 | RUN wget -O - https://github.com/pengutronix/genimage/releases/download/v14/genimage-14.tar.xz | tar -C /tmp -xJ && \ |
| 211 | cd /tmp/genimage-14 && \ |
| 212 | ./configure && \ |
| 213 | make -j$(nproc) && \ |
| 214 | make install && \ |
| 215 | rm -rf /tmp/genimage-14 |
| 216 | |
Heinrich Schuchardt | 8a87d1a | 2021-11-09 19:51:20 +0100 | [diff] [blame] | 217 | # Build libtpms |
| 218 | RUN git clone https://github.com/stefanberger/libtpms /tmp/libtpms && \ |
| 219 | cd /tmp/libtpms && \ |
| 220 | ./autogen.sh && \ |
| 221 | ./configure && \ |
| 222 | make -j$(nproc) && \ |
| 223 | make install && \ |
| 224 | ldconfig && \ |
| 225 | rm -rf /tmp/libtpms |
| 226 | |
| 227 | # Build swtpm |
| 228 | RUN git clone https://github.com/stefanberger/swtpm /tmp/swtpm && \ |
| 229 | cd /tmp/swtpm && \ |
| 230 | ./autogen.sh && \ |
| 231 | ./configure && \ |
| 232 | make -j$(nproc) && \ |
| 233 | make install && \ |
| 234 | rm -rf /tmp/swtpm |
| 235 | |
Simon Glass | 71d3e79 | 2023-01-15 14:15:59 -0700 | [diff] [blame] | 236 | # Build trace-cmd |
| 237 | RUN mkdir /tmp/trace && \ |
| 238 | git clone https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git /tmp/trace/libtraceevent && \ |
| 239 | cd /tmp/trace/libtraceevent && \ |
| 240 | make -j$(nproc) && \ |
| 241 | sudo make install && \ |
| 242 | git clone https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git /tmp/trace/libtracefs && \ |
| 243 | cd /tmp/trace/libtracefs && \ |
| 244 | make -j$(nproc) && \ |
| 245 | sudo make install && \ |
| 246 | git clone https://github.com/rostedt/trace-cmd.git /tmp/trace/trace-cmd && \ |
| 247 | cd /tmp/trace/trace-cmd && \ |
| 248 | make -j$(nproc) && \ |
| 249 | sudo make install && \ |
| 250 | rm -rf /tmp/trace |
| 251 | |
Heinrich Schuchardt | 75b031e | 2023-01-13 19:25:01 +0100 | [diff] [blame] | 252 | # Files to run Nokia RX-51 (aka N900) tests |
| 253 | RUN mkdir -p /opt/nokia && \ |
| 254 | cd /opt/nokia && \ |
| 255 | wget https://raw.githubusercontent.com/pali/u-boot-maemo/master/debian/u-boot-gen-combined && \ |
Tom Rini | 7a826de | 2023-02-27 10:49:54 -0500 | [diff] [blame] | 256 | chmod 0755 u-boot-gen-combined && \ |
Heinrich Schuchardt | 75b031e | 2023-01-13 19:25:01 +0100 | [diff] [blame] | 257 | wget http://repository.maemo.org/qemu-n900/qemu-n900.tar.gz && \ |
| 258 | wget http://repository.maemo.org/pool/maemo5.0/free/k/kernel/kernel_2.6.28-20103103+0m5_armel.deb && \ |
| 259 | wget http://repository.maemo.org/pool/maemo5.0/free/g/glibc/libc6_2.5.1-1eglibc27+0m5_armel.deb && \ |
| 260 | wget http://repository.maemo.org/pool/maemo5.0/free/b/busybox/busybox_1.10.2.legal-1osso30+0m5_armel.deb |
| 261 | |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 262 | # Create our user/group |
| 263 | RUN echo uboot ALL=NOPASSWD: ALL > /etc/sudoers.d/uboot |
| 264 | RUN useradd -m -U uboot |
| 265 | USER uboot:uboot |
| 266 | |
Tom Rini | 866f302 | 2023-03-23 14:57:58 -0400 | [diff] [blame] | 267 | # Populate the cache for pip to use. Get these via wget as the |
| 268 | # COPY / ADD directives don't work as we need them to. |
| 269 | RUN wget -O /tmp/pytest-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/test/py/requirements.txt |
| 270 | RUN wget -O /tmp/sphinx-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/doc/sphinx/requirements.txt |
| 271 | RUN virtualenv -p /usr/bin/python3 /tmp/venv && \ |
| 272 | . /tmp/venv/bin/activate && \ |
| 273 | pip install -r /tmp/pytest-requirements.txt \ |
| 274 | -r /tmp/sphinx-requirements.txt && \ |
| 275 | deactivate && \ |
| 276 | rm -rf /tmp/venv /tmp/pytest-requirements.txt /tmp/sphinx-requirements.txt |
| 277 | |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 278 | # Create the buildman config file |
| 279 | RUN /bin/echo -e "[toolchain]\nroot = /usr" > ~/.buildman |
Tom Rini | 6d6ddab | 2023-07-13 20:37:35 -0400 | [diff] [blame] | 280 | RUN /bin/echo -e "kernelorg = /opt/gcc-13.1.0-nolibc/*" >> ~/.buildman |
Tom Rini | 7bb1cc3 | 2021-07-02 10:41:58 -0400 | [diff] [blame] | 281 | RUN /bin/echo -e "\n[toolchain-prefix]\nxtensa = /opt/2020.07/xtensa-dc233c-elf/bin/xtensa-dc233c-elf-" >> ~/.buildman; |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 282 | RUN /bin/echo -e "\n[toolchain-alias]\nsh = sh2" >> ~/.buildman |
Tom Rini | a643225 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 283 | RUN /bin/echo -e "\nsandbox = x86_64" >> ~/.buildman |
| 284 | RUN /bin/echo -e "\nx86 = i386" >> ~/.buildman; |
Safae Ouajih | f444939 | 2023-02-06 00:50:21 +0100 | [diff] [blame] | 285 | |
| 286 | # Add mkbootimg tool |
| 287 | RUN git clone https://android.googlesource.com/platform/system/tools/mkbootimg /home/uboot/mkbootimg |
| 288 | ENV PYTHONPATH "${PYTHONPATH}:/home/uboot/mkbootimg" |