Tom Rini | 04549e9 | 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 | 2f91848 | 2023-03-21 15:31:19 -0400 | [diff] [blame] | 5 | FROM ubuntu:jammy-20230308 |
Tom Rini | 04549e9 | 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 | ad9b2fd | 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 | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 16 | |
Tom Rini | 77d48f1 | 2022-11-22 12:31:58 -0500 | [diff] [blame] | 17 | # Manually install the kernel.org "Crosstool" based toolchains for gcc-12.2.0 |
| 18 | RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.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/12.2.0/x86_64-gcc-12.2.0-nolibc-arm-linux-gnueabi.tar.xz | tar -C /opt -xJ |
| 20 | RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-i386-linux.tar.xz | tar -C /opt -xJ |
| 21 | RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-m68k-linux.tar.xz | tar -C /opt -xJ |
| 22 | RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-mips-linux.tar.xz | tar -C /opt -xJ |
| 23 | RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-microblaze-linux.tar.xz | tar -C /opt -xJ |
| 24 | RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-nios2-linux.tar.xz | tar -C /opt -xJ |
| 25 | RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-powerpc-linux.tar.xz | tar -C /opt -xJ |
| 26 | RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-riscv64-linux.tar.xz | tar -C /opt -xJ |
| 27 | RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-riscv32-linux.tar.xz | tar -C /opt -xJ |
| 28 | RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-sh2-linux.tar.xz | tar -C /opt -xJ |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 29 | |
| 30 | # Manually install other toolchains |
Tom Rini | 0a78bc3 | 2021-07-02 10:41:58 -0400 | [diff] [blame] | 31 | 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 |
| 32 | RUN wget -O - https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2021.03-release/arc_gnu_2021.03_prebuilt_uclibc_le_archs_linux_install.tar.gz | tar --no-same-owner -C /opt -xz |
Tom Rini | 04549e9 | 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 | ad9b2fd | 2023-03-21 15:07:45 -0400 | [diff] [blame] | 42 | clang-16 \ |
Tom Rini | 04549e9 | 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 | 11e0443 | 2022-02-26 15:05:51 +0800 | [diff] [blame] | 51 | erofs-utils \ |
Heinrich Schuchardt | 4e20267 | 2021-11-09 19:51:20 +0100 | [diff] [blame] | 52 | expect \ |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 53 | fakeroot \ |
| 54 | flex \ |
Heinrich Schuchardt | 4e20267 | 2021-11-09 19:51:20 +0100 | [diff] [blame] | 55 | gawk \ |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 56 | gdisk \ |
| 57 | git \ |
| 58 | gnu-efi \ |
Heinrich Schuchardt | 4e20267 | 2021-11-09 19:51:20 +0100 | [diff] [blame] | 59 | gnutls-dev \ |
Tom Rini | 04549e9 | 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 | ac6c333 | 2023-01-11 12:24:57 -0500 | [diff] [blame] | 67 | libc6-i386 \ |
Bin Meng | f551a53 | 2021-08-26 23:33:33 +0800 | [diff] [blame] | 68 | libconfuse-dev \ |
Tom Rini | c8982d2 | 2021-06-10 10:57:36 -0400 | [diff] [blame] | 69 | libgit2-dev \ |
Heinrich Schuchardt | 4e20267 | 2021-11-09 19:51:20 +0100 | [diff] [blame] | 70 | libjson-glib-dev \ |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 71 | libguestfs-tools \ |
AKASHI Takahiro | 3edc347 | 2022-02-01 10:32:36 +0900 | [diff] [blame] | 72 | libgnutls28-dev \ |
| 73 | libgnutls30 \ |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 74 | liblz4-tool \ |
| 75 | libpixman-1-dev \ |
Tom Rini | c8982d2 | 2021-06-10 10:57:36 -0400 | [diff] [blame] | 76 | libpython3-dev \ |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 77 | libsdl1.2-dev \ |
| 78 | libsdl2-dev \ |
Heinrich Schuchardt | 4e20267 | 2021-11-09 19:51:20 +0100 | [diff] [blame] | 79 | libseccomp-dev \ |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 80 | libssl-dev \ |
Heinrich Schuchardt | 4e20267 | 2021-11-09 19:51:20 +0100 | [diff] [blame] | 81 | libtool \ |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 82 | libudev-dev \ |
| 83 | libusb-1.0-0-dev \ |
Alper Nebi Yasak | 5d249e9 | 2021-06-21 21:51:54 +0300 | [diff] [blame] | 84 | linux-image-kvm \ |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 85 | lzma-alone \ |
| 86 | lzop \ |
| 87 | mount \ |
| 88 | mtd-utils \ |
| 89 | mtools \ |
Heinrich Schuchardt | 4e20267 | 2021-11-09 19:51:20 +0100 | [diff] [blame] | 90 | net-tools \ |
Bin Meng | 00afccd | 2021-08-26 23:33:32 +0800 | [diff] [blame] | 91 | ninja-build \ |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 92 | openssl \ |
| 93 | picocom \ |
| 94 | parted \ |
| 95 | pkg-config \ |
Tom Rini | c8982d2 | 2021-06-10 10:57:36 -0400 | [diff] [blame] | 96 | python-is-python3 \ |
| 97 | python2.7 \ |
| 98 | python3 \ |
| 99 | python3-dev \ |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 100 | python3-pip \ |
Simon Glass | b955cd2 | 2022-10-13 06:25:57 -0600 | [diff] [blame] | 101 | python3-pyelftools \ |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 102 | python3-sphinx \ |
Tom Rini | c8982d2 | 2021-06-10 10:57:36 -0400 | [diff] [blame] | 103 | python3-virtualenv \ |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 104 | rpm2cpio \ |
| 105 | sbsigntool \ |
| 106 | sloccount \ |
Heinrich Schuchardt | 4e20267 | 2021-11-09 19:51:20 +0100 | [diff] [blame] | 107 | socat \ |
| 108 | softhsm2 \ |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 109 | sparse \ |
| 110 | srecord \ |
| 111 | sudo \ |
| 112 | swig \ |
Heinrich Schuchardt | c2c98ea | 2022-12-30 05:41:01 +0100 | [diff] [blame] | 113 | texinfo \ |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 114 | util-linux \ |
| 115 | uuid-dev \ |
| 116 | virtualenv \ |
Tom Rini | 0a78bc3 | 2021-07-02 10:41:58 -0400 | [diff] [blame] | 117 | xxd \ |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 118 | zip \ |
| 119 | && rm -rf /var/lib/apt/lists/* |
| 120 | |
Alper Nebi Yasak | 5d249e9 | 2021-06-21 21:51:54 +0300 | [diff] [blame] | 121 | # Make kernels readable for libguestfs tools to work correctly |
| 122 | RUN chmod +r /boot/vmlinu* |
| 123 | |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 124 | # Build GRUB UEFI targets for ARM & RISC-V, 32-bit and 64-bit |
| 125 | RUN git clone git://git.savannah.gnu.org/grub.git /tmp/grub && \ |
| 126 | cd /tmp/grub && \ |
Tom Rini | 0a78bc3 | 2021-07-02 10:41:58 -0400 | [diff] [blame] | 127 | git checkout grub-2.06 && \ |
Tom Rini | 77d48f1 | 2022-11-22 12:31:58 -0500 | [diff] [blame] | 128 | git config --global user.name "GitLab CI Runner" && \ |
| 129 | git config --global user.email trini@konsulko.com && \ |
| 130 | git cherry-pick 049efdd72eb7baa7b2bf8884391ee7fe650da5a0 && \ |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 131 | ./bootstrap && \ |
| 132 | mkdir -p /opt/grub && \ |
| 133 | ./configure --target=aarch64 --with-platform=efi \ |
| 134 | CC=gcc \ |
Tom Rini | 77d48f1 | 2022-11-22 12:31:58 -0500 | [diff] [blame] | 135 | TARGET_CC=/opt/gcc-12.2.0-nolibc/aarch64-linux/bin/aarch64-linux-gcc \ |
| 136 | TARGET_OBJCOPY=/opt/gcc-12.2.0-nolibc/aarch64-linux/bin/aarch64-linux-objcopy \ |
| 137 | TARGET_STRIP=/opt/gcc-12.2.0-nolibc/aarch64-linux/bin/aarch64-linux-strip \ |
| 138 | TARGET_NM=/opt/gcc-12.2.0-nolibc/aarch64-linux/bin/aarch64-linux-nm \ |
| 139 | TARGET_RANLIB=/opt/gcc-12.2.0-nolibc/aarch64-linux/bin/aarch64-linux-ranlib && \ |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 140 | make && \ |
| 141 | ./grub-mkimage -O arm64-efi -o /opt/grub/grubaa64.efi --prefix= -d \ |
| 142 | grub-core cat chain configfile echo efinet ext2 fat halt help linux \ |
| 143 | lsefisystab loadenv lvm minicmd normal part_msdos part_gpt reboot \ |
| 144 | search search_fs_file search_fs_uuid search_label serial sleep test \ |
| 145 | true && \ |
| 146 | make clean && \ |
| 147 | ./configure --target=arm --with-platform=efi \ |
| 148 | CC=gcc \ |
Tom Rini | 77d48f1 | 2022-11-22 12:31:58 -0500 | [diff] [blame] | 149 | TARGET_CC=/opt/gcc-12.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-gcc \ |
| 150 | TARGET_OBJCOPY=/opt/gcc-12.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-objcopy \ |
| 151 | TARGET_STRIP=/opt/gcc-12.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-strip \ |
| 152 | TARGET_NM=/opt/gcc-12.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-nm \ |
| 153 | TARGET_RANLIB=/opt/gcc-12.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ranlib && \ |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 154 | make && \ |
| 155 | ./grub-mkimage -O arm-efi -o /opt/grub/grubarm.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=riscv64 --with-platform=efi \ |
| 162 | CC=gcc \ |
Tom Rini | 77d48f1 | 2022-11-22 12:31:58 -0500 | [diff] [blame] | 163 | TARGET_CC=/opt/gcc-12.2.0-nolibc/riscv64-linux/bin/riscv64-linux-gcc \ |
| 164 | TARGET_OBJCOPY=/opt/gcc-12.2.0-nolibc/riscv64-linux/bin/riscv64-linux-objcopy \ |
| 165 | TARGET_STRIP=/opt/gcc-12.2.0-nolibc/riscv64-linux/bin/riscv64-linux-strip \ |
| 166 | TARGET_NM=/opt/gcc-12.2.0-nolibc/riscv64-linux/bin/riscv64-linux-nm \ |
| 167 | TARGET_RANLIB=/opt/gcc-12.2.0-nolibc/riscv64-linux/bin/riscv64-linux-ranlib && \ |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 168 | make && \ |
| 169 | ./grub-mkimage -O riscv64-efi -o /opt/grub/grubriscv64.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 && \ |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 174 | rm -rf /tmp/grub |
| 175 | |
Tom Rini | b60c1d7 | 2023-02-07 12:50:13 -0500 | [diff] [blame] | 176 | RUN git clone https://gitlab.com/qemu-project/qemu.git /tmp/qemu && \ |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 177 | cd /tmp/qemu && \ |
| 178 | git submodule update --init dtc && \ |
Bin Meng | 00afccd | 2021-08-26 23:33:32 +0800 | [diff] [blame] | 179 | git checkout v6.1.0 && \ |
| 180 | # config user.name and user.email to make 'git am' happy |
| 181 | git config user.name u-boot && \ |
| 182 | git config user.email u-boot@denx.de && \ |
| 183 | # manually apply the bug fix for QEMU 6.1.0 Xilinx Zynq UART emulation codes |
| 184 | wget -O - http://patchwork.ozlabs.org/project/qemu-devel/patch/20210823020813.25192-2-bmeng.cn@gmail.com/mbox/ | git am && \ |
Tom Rini | 26a4183 | 2023-03-21 15:28:00 -0400 | [diff] [blame] | 185 | ./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 | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 186 | make -j$(nproc) all install && \ |
| 187 | rm -rf /tmp/qemu |
| 188 | |
Heinrich Schuchardt | 4c04c44 | 2023-01-13 20:31:33 +0100 | [diff] [blame] | 189 | # Build QEMU supporting Nokia n900 emulation |
| 190 | RUN mkdir -p /opt/nokia && \ |
| 191 | cd /tmp && \ |
| 192 | git clone https://git.linaro.org/qemu/qemu-linaro.git && \ |
| 193 | cd /tmp/qemu-linaro && \ |
| 194 | git checkout 8f8d8e0796efe1a6f34cdd83fb798f3c41217ec1 && \ |
| 195 | ./configure --enable-system --target-list=arm-softmmu \ |
| 196 | --python=/usr/bin/python2.7 --disable-sdl --disable-gtk \ |
| 197 | --disable-curses --audio-drv-list= --audio-card-list= \ |
| 198 | --disable-werror --disable-xen --disable-xen-pci-passthrough \ |
| 199 | --disable-brlapi --disable-vnc --disable-curl --disable-slirp \ |
| 200 | --disable-kvm --disable-user --disable-linux-user --disable-bsd-user \ |
| 201 | --disable-guest-base --disable-uuid --disable-vde --disable-linux-aio \ |
| 202 | --disable-cap-ng --disable-attr --disable-blobs --disable-docs \ |
| 203 | --disable-spice --disable-libiscsi --disable-smartcard-nss \ |
| 204 | --disable-usb-redir --disable-guest-agent --disable-seccomp \ |
| 205 | --disable-glusterfs --disable-nptl --disable-fdt && \ |
| 206 | make -j$(nproc) && \ |
| 207 | cp /tmp/qemu-linaro/arm-softmmu/qemu-system-arm /opt/nokia && \ |
| 208 | rm -rf /tmp/qemu-linaro |
| 209 | |
Bin Meng | f551a53 | 2021-08-26 23:33:33 +0800 | [diff] [blame] | 210 | # Build genimage (required by some targets to generate disk images) |
| 211 | RUN wget -O - https://github.com/pengutronix/genimage/releases/download/v14/genimage-14.tar.xz | tar -C /tmp -xJ && \ |
| 212 | cd /tmp/genimage-14 && \ |
| 213 | ./configure && \ |
| 214 | make -j$(nproc) && \ |
| 215 | make install && \ |
| 216 | rm -rf /tmp/genimage-14 |
| 217 | |
Heinrich Schuchardt | 4e20267 | 2021-11-09 19:51:20 +0100 | [diff] [blame] | 218 | # Build libtpms |
| 219 | RUN git clone https://github.com/stefanberger/libtpms /tmp/libtpms && \ |
| 220 | cd /tmp/libtpms && \ |
| 221 | ./autogen.sh && \ |
| 222 | ./configure && \ |
| 223 | make -j$(nproc) && \ |
| 224 | make install && \ |
| 225 | ldconfig && \ |
| 226 | rm -rf /tmp/libtpms |
| 227 | |
| 228 | # Build swtpm |
| 229 | RUN git clone https://github.com/stefanberger/swtpm /tmp/swtpm && \ |
| 230 | cd /tmp/swtpm && \ |
| 231 | ./autogen.sh && \ |
| 232 | ./configure && \ |
| 233 | make -j$(nproc) && \ |
| 234 | make install && \ |
| 235 | rm -rf /tmp/swtpm |
| 236 | |
Simon Glass | 523cb6d | 2023-01-15 14:15:59 -0700 | [diff] [blame] | 237 | # Build trace-cmd |
| 238 | RUN mkdir /tmp/trace && \ |
| 239 | git clone https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git /tmp/trace/libtraceevent && \ |
| 240 | cd /tmp/trace/libtraceevent && \ |
| 241 | make -j$(nproc) && \ |
| 242 | sudo make install && \ |
| 243 | git clone https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git /tmp/trace/libtracefs && \ |
| 244 | cd /tmp/trace/libtracefs && \ |
| 245 | make -j$(nproc) && \ |
| 246 | sudo make install && \ |
| 247 | git clone https://github.com/rostedt/trace-cmd.git /tmp/trace/trace-cmd && \ |
| 248 | cd /tmp/trace/trace-cmd && \ |
| 249 | make -j$(nproc) && \ |
| 250 | sudo make install && \ |
| 251 | rm -rf /tmp/trace |
| 252 | |
Heinrich Schuchardt | c49eca0 | 2023-01-13 19:25:01 +0100 | [diff] [blame] | 253 | # Files to run Nokia RX-51 (aka N900) tests |
| 254 | RUN mkdir -p /opt/nokia && \ |
| 255 | cd /opt/nokia && \ |
| 256 | wget https://raw.githubusercontent.com/pali/u-boot-maemo/master/debian/u-boot-gen-combined && \ |
Tom Rini | ccf4de5 | 2023-02-27 10:49:54 -0500 | [diff] [blame] | 257 | chmod 0755 u-boot-gen-combined && \ |
Heinrich Schuchardt | c49eca0 | 2023-01-13 19:25:01 +0100 | [diff] [blame] | 258 | wget http://repository.maemo.org/qemu-n900/qemu-n900.tar.gz && \ |
| 259 | wget http://repository.maemo.org/pool/maemo5.0/free/k/kernel/kernel_2.6.28-20103103+0m5_armel.deb && \ |
| 260 | wget http://repository.maemo.org/pool/maemo5.0/free/g/glibc/libc6_2.5.1-1eglibc27+0m5_armel.deb && \ |
| 261 | wget http://repository.maemo.org/pool/maemo5.0/free/b/busybox/busybox_1.10.2.legal-1osso30+0m5_armel.deb |
| 262 | |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 263 | # Create our user/group |
| 264 | RUN echo uboot ALL=NOPASSWD: ALL > /etc/sudoers.d/uboot |
| 265 | RUN useradd -m -U uboot |
| 266 | USER uboot:uboot |
| 267 | |
Tom Rini | 54573e0 | 2023-03-23 14:57:58 -0400 | [diff] [blame] | 268 | # Populate the cache for pip to use. Get these via wget as the |
| 269 | # COPY / ADD directives don't work as we need them to. |
| 270 | RUN wget -O /tmp/pytest-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/test/py/requirements.txt |
| 271 | RUN wget -O /tmp/sphinx-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/doc/sphinx/requirements.txt |
| 272 | RUN virtualenv -p /usr/bin/python3 /tmp/venv && \ |
| 273 | . /tmp/venv/bin/activate && \ |
| 274 | pip install -r /tmp/pytest-requirements.txt \ |
| 275 | -r /tmp/sphinx-requirements.txt && \ |
| 276 | deactivate && \ |
| 277 | rm -rf /tmp/venv /tmp/pytest-requirements.txt /tmp/sphinx-requirements.txt |
| 278 | |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 279 | # Create the buildman config file |
| 280 | RUN /bin/echo -e "[toolchain]\nroot = /usr" > ~/.buildman |
Tom Rini | 77d48f1 | 2022-11-22 12:31:58 -0500 | [diff] [blame] | 281 | RUN /bin/echo -e "kernelorg = /opt/gcc-12.2.0-nolibc/*" >> ~/.buildman |
Tom Rini | 0a78bc3 | 2021-07-02 10:41:58 -0400 | [diff] [blame] | 282 | RUN /bin/echo -e "arc = /opt/arc_gnu_2021.03_prebuilt_uclibc_le_archs_linux_install" >> ~/.buildman |
| 283 | RUN /bin/echo -e "\n[toolchain-prefix]\nxtensa = /opt/2020.07/xtensa-dc233c-elf/bin/xtensa-dc233c-elf-" >> ~/.buildman; |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 284 | RUN /bin/echo -e "\n[toolchain-alias]\nsh = sh2" >> ~/.buildman |
Tom Rini | 04549e9 | 2021-03-15 13:19:01 -0400 | [diff] [blame] | 285 | RUN /bin/echo -e "\nsandbox = x86_64" >> ~/.buildman |
| 286 | RUN /bin/echo -e "\nx86 = i386" >> ~/.buildman; |
Safae Ouajih | aaa366f | 2023-02-06 00:50:21 +0100 | [diff] [blame] | 287 | |
| 288 | # Add mkbootimg tool |
| 289 | RUN git clone https://android.googlesource.com/platform/system/tools/mkbootimg /home/uboot/mkbootimg |
| 290 | ENV PYTHONPATH "${PYTHONPATH}:/home/uboot/mkbootimg" |