diff --git a/.github/workflows/pants.yml b/.github/workflows/pants.yml new file mode 100644 index 0000000..64bc110 --- /dev/null +++ b/.github/workflows/pants.yml @@ -0,0 +1,45 @@ +# Copyright 2020 Pants project contributors. +# Licensed under the Apache License, Version 2.0 (see LICENSE). + +# See https://pants.readme.io/docs/using-pants-in-ci for tips on how to set up your CI with Pants. + +name: Pants linting + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + env: + PANTS_CONFIG_FILES: pants.ci.toml + strategy: + matrix: + python-version: [3.9] + + steps: + - uses: actions/checkout@v4 + + - uses: pantsbuild/actions/init-pants@v9 + with: + # cache0 makes it easy to bust the cache if needed + gha-cache-key: cache0-py${{ matrix.python_version }} + named-caches-hash: ${{ hashFiles('build-support/lockfiles/*.lock') }} + + - name: Bootstrap Pants + run: | + pants --version + + - name: Lint + run: | + pants update-build-files --check lint :: + + # - name: Upload pants log + # uses: actions/upload-artifact@v2 + # with: + # name: pants-log + # path: .pants.d/pants.log + # if: always() # We want the log even on failures. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d574b6d --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +# Pants workspace files +/.pants.d/ +/dist/ +/.pids +/.pants.workdir.file_lock* diff --git a/README.md b/README.md index 60514ae..63bf96d 100644 --- a/README.md +++ b/README.md @@ -1 +1,12 @@ -# Dockerfiles \ No newline at end of file +# Dockerfiles + + +## Deprecations/Removals + +### TI-specific toolchains + +My usage of TI-specific toolchains was dropped in favour of using Yocto or Buildroot directly, as the TI pre-packaged toolchains have a slow release/support cycle. I considered these Dockerfiles deprecated as of March 31, 2022 - and they were removed on June 12, 2024 + +### arm-none-eabi-gcc + +Support was been dropped in favour of the similar (and more consistently named) `robotpajamas/gcc-arm-none-eabi` starting on March 31, 2022 - and the associated Dockerfile was removed on June 12, 2024. \ No newline at end of file diff --git a/arm-none-eabi-gcc/Dockerfile b/arm-none-eabi-gcc/Dockerfile deleted file mode 100644 index 2f730e5..0000000 --- a/arm-none-eabi-gcc/Dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -FROM ubuntu:20.04 - -LABEL maintainer="suresh@robotpajamas.com" - -SHELL ["/bin/bash", "-o", "pipefail", "-c"] -ARG DEBIAN_FRONTEND=non-interactive - -# hadolint ignore=DL3008 -RUN apt-get update \ - && apt-get install -y -qq --no-install-recommends \ - bzip2 \ - ca-certificates \ - tar \ - wget \ - && rm -rf /var/lib/apt/lists/* \ - && groupadd -r armoire \ - && useradd --no-log-init -u 1000 -r -g armoire armothy - -WORKDIR /gcc -RUN wget -qO- https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 | tar -xj - -ENV PATH "/gcc/gcc-arm-none-eabi-9-2020-q2-update/bin:$PATH" -CMD ["bash"] - diff --git a/arm-none-eabi-gcc/README.md b/arm-none-eabi-gcc/README.md deleted file mode 100644 index ed8b5df..0000000 --- a/arm-none-eabi-gcc/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# arm-none-eabi-gcc - -## March 31, 2022 - -This is no longer maintained - support has been dropped in favour of the similar (and more consistently named) `robotpajamas/gcc-arm-none-eabi` - -This folder will be removed in a future commit. diff --git a/buildroot/BUILD.pants b/buildroot/BUILD.pants new file mode 100644 index 0000000..116c224 --- /dev/null +++ b/buildroot/BUILD.pants @@ -0,0 +1,3 @@ +docker_image( + name="buildroot", +) diff --git a/buildroot/Dockerfile b/buildroot/Dockerfile index 39e6202..22db327 100644 --- a/buildroot/Dockerfile +++ b/buildroot/Dockerfile @@ -10,30 +10,30 @@ ARG DEBIAN_FRONTEND=non-interactive USER root RUN apt-get update \ && apt-get install -y -qq --no-install-recommends \ - bash \ - bc \ - binutils \ - cpio \ - build-essential \ - bzip2 \ - ca-certificates \ - file \ - gcc \ - g++ \ - git \ - libncurses5-dev \ - make \ - nano \ - patch \ - perl \ - python3 \ - rsync \ - sed \ - tar \ - unzip \ - wget \ + bash=5.1-2+deb11u1 \ + bc=1.07.1-2+b2 \ + binutils=2.35.2-2 \ + cpio=2.13+dfsg-7.1~deb11u1 \ + build-essential=12.9 \ + bzip2=1.0.8-4 \ + ca-certificates=20210119 \ + file=1:5.39-3+deb11u1 \ + g++=4:10.2.1-1 \ + gcc=4:10.2.1-1 \ + git=1:2.30.2-1+deb11u2 \ + libncurses5-dev=6.2+20201114-2+deb11u2 \ + make=4.3-4.1 \ + nano=5.4-2+deb11u2 \ + patch=2.7.6-7 \ + perl=5.32.1-4+deb11u3 \ + python3=3.9.2-3 \ + rsync=3.2.3-4+deb11u1 \ + sed=4.7-1 \ + tar=1.34+dfsg-1+deb11u1 \ + unzip=6.0-26+deb11u1 \ + wget=1.21-1+deb11u1 \ && rm -rf /var/lib/apt/lists/* \ - && wget -O- https://buildroot.org/downloads/${BUILDROOT_VERSION}.tar.gz | tar -xvz \ + && wget --progress=dot:giga -O- https://buildroot.org/downloads/${BUILDROOT_VERSION}.tar.gz | tar -xvz \ && mv /${BUILDROOT_VERSION} /buildroot \ && mkdir -p /app /app/cache /app/src /app/output \ && chown -R armothy:armoire /app /buildroot diff --git a/gcc-arm-linux-gnueabihf/BUILD.pants b/gcc-arm-linux-gnueabihf/BUILD.pants new file mode 100644 index 0000000..023a4d0 --- /dev/null +++ b/gcc-arm-linux-gnueabihf/BUILD.pants @@ -0,0 +1,3 @@ +docker_image( + name="gcc-arm-linux-gnueabihf", +) diff --git a/gcc-arm-none-eabi/BUILD.pants b/gcc-arm-none-eabi/BUILD.pants new file mode 100644 index 0000000..c751cef --- /dev/null +++ b/gcc-arm-none-eabi/BUILD.pants @@ -0,0 +1,3 @@ +docker_image( + name="gcc-arm-none-eabi", +) diff --git a/gcf-cythonize/BUILD.pants b/gcf-cythonize/BUILD.pants new file mode 100644 index 0000000..f3eb27f --- /dev/null +++ b/gcf-cythonize/BUILD.pants @@ -0,0 +1,9 @@ +file( + name="entrypoint", + source="docker-entrypoint.sh", +) + +docker_image( + name="gcf-cythonize", + dependencies=[":entrypoint"], +) diff --git a/gcf-cythonize/Dockerfile b/gcf-cythonize/Dockerfile index 2049e4d..d3bb34c 100644 --- a/gcf-cythonize/Dockerfile +++ b/gcf-cythonize/Dockerfile @@ -7,7 +7,7 @@ RUN /opt/python/cp38-cp38/bin/python -m pip install cython==3.0a6 \ && useradd -u 1000 -r -g cythonite cythonizer USER cythonizer -COPY --chown=cythonizer:cythonite ./docker-entrypoint.sh /docker-entrypoint.sh +COPY --chown=cythonizer:cythonite gcf-cythonize/docker-entrypoint.sh /docker-entrypoint.sh RUN chmod +x /docker-entrypoint.sh WORKDIR /app diff --git a/linux-kernel-builder/BUILD.pants b/linux-kernel-builder/BUILD.pants new file mode 100644 index 0000000..5231d9c --- /dev/null +++ b/linux-kernel-builder/BUILD.pants @@ -0,0 +1,3 @@ +docker_image( + name="linux-kernel-builder", +) diff --git a/linux-kernel-builder/Dockerfile b/linux-kernel-builder/Dockerfile index 08ac6d7..c2e1300 100644 --- a/linux-kernel-builder/Dockerfile +++ b/linux-kernel-builder/Dockerfile @@ -10,16 +10,17 @@ ARG DEBIAN_FRONTEND=non-interactive USER root RUN apt-get update \ && apt-get install -y -qq --no-install-recommends \ - bash \ - bc \ - bison \ - build-essential \ - flex \ - git \ - libmpc-dev \ - libncurses5-dev \ - libssl-dev \ - make \ + bash=5.1-2+deb11u1 \ + bc=1.07.1-2+b2 \ + bison=2:3.7.5+dfsg-1 \ + build-essential=12.9 \ + ca-certificates=20210119 \ + flex=2.6.4-8 \ + git=1:2.30.2-1+deb11u2 \ + libmpc-dev=1.2.0-1 \ + libncurses5-dev=6.2+20201114-2+deb11u2 \ + libssl-dev=1.1.1w-0+deb11u1 \ + make=4.3-4.1 \ && rm -rf /var/lib/apt/lists/* \ && mkdir -p /app \ && mkdir -p /ccache \ diff --git a/pants.ci.toml b/pants.ci.toml new file mode 100644 index 0000000..71b2a69 --- /dev/null +++ b/pants.ci.toml @@ -0,0 +1,4 @@ +[GLOBAL] +colors = true +dynamic_ui = false +pantsd = false diff --git a/pants.toml b/pants.toml new file mode 100644 index 0000000..1c3831a --- /dev/null +++ b/pants.toml @@ -0,0 +1,15 @@ +[GLOBAL] +pants_version = "2.21.0" +pantsd = true +build_patterns = ["BUILD.pants", "BUILD"] + +backend_packages = [ + "pants.backend.docker", + "pants.backend.docker.lint.hadolint", +] + +[python] +interpreter_constraints = [">=3.9,<4"] + +[anonymous-telemetry] +enabled = false diff --git a/ti-arago/Dockerfile b/ti-arago/Dockerfile deleted file mode 100644 index 8a38331..0000000 --- a/ti-arago/Dockerfile +++ /dev/null @@ -1,83 +0,0 @@ -FROM ubuntu:18.04 as builder - -LABEL maintainer="suresh@robotpajamas.com" - -SHELL ["/bin/bash", "-c"] -ARG DEBIAN_FRONTEND=non-interactive - -# hadolint ignore=DL3008 -RUN apt-get update \ - && apt-get install -y -qq --no-install-recommends \ - ca-certificates \ - git \ - tar \ - wget \ - xz-utils - -WORKDIR /gcc - -RUN wget https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz -RUN tar -Jxvf gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz -RUN rm gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz - -RUN wget https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz -RUN tar -Jxvf gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz -RUN rm gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz - -RUN git clone git://arago-project.org/git/projects/oe-layersetup.git /arago -WORKDIR /arago - - -FROM ubuntu:18.04 - -SHELL ["/bin/bash", "-c"] -ARG DEBIAN_FRONTEND=non-interactive -WORKDIR /arago - -# Pull required building packages and configure timezone and locale to avoid Python complaints -# hadolint ignore=DL3008 -RUN apt-get update \ - && apt-get install -y -qq --no-install-recommends \ - build-essential \ - ca-certificates \ - chrpath \ - cpio \ - diffstat \ - file \ - gawk \ - git \ - lib32ncurses5 \ - lib32z1 \ - libc6-i386 \ - libstdc++6-i386-cross \ - locales \ - python \ - python3 \ - python3-distutils \ - tar \ - texinfo \ - wget \ - && rm -rf /var/lib/apt/lists/* \ - && echo 'LANG="en_US.UTF-8"'>/etc/default/locale \ - && locale-gen en en_US en_US.UTF-8 \ - && dpkg-reconfigure --frontend=noninteractive locales \ - && update-locale LANG=en_US.UTF-8 \ - && echo "dash dash/sh boolean false" | debconf-set-selections \ - && dpkg-reconfigure -p critical dash \ - && groupadd -r bitbakery \ - && useradd --no-log-init -u 1000 -r -g bitbakery bitbaker \ - && chown bitbaker:bitbakery /arago - -ENV LANG=en_US.UTF-8 -ENV LANGUAGE=en_US.UTF-8 -ENV LC_ALL=en_US.UTF-8 - -# Required for bitbake compilation -ENV TOOLCHAIN_PATH_ARMV7=/gcc/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf -ENV TOOLCHAIN_PATH_ARMV8=/gcc/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu - -USER bitbaker -COPY --from=builder --chown=bitbaker:bitbakery /gcc /gcc -COPY --from=builder --chown=bitbaker:bitbakery /arago /arago - -CMD ["bash"] \ No newline at end of file diff --git a/ti-arago/README.md b/ti-arago/README.md deleted file mode 100644 index 2d95877..0000000 --- a/ti-arago/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# ti-arago - -## March 31, 2022 - -This image is no longer maintained. My usage of TI-specific toolchains have been dropped in favour of using Yocto or Buildroot directly, as the TI pre-packaged toolchains have a slow release/support cycle. - -This folder will be deleted in a future commit. diff --git a/ti-processor-sdk-linux-am335x/Dockerfile b/ti-processor-sdk-linux-am335x/Dockerfile deleted file mode 100644 index 284cc3d..0000000 --- a/ti-processor-sdk-linux-am335x/Dockerfile +++ /dev/null @@ -1,49 +0,0 @@ -FROM ubuntu:18.04 as builder - -LABEL maintainer="suresh@robotpajamas.com" - -SHELL ["/bin/bash", "-c"] -ARG DEBIAN_FRONTEND=non-interactive - -# hadolint ignore=DL3008,DL3015 -RUN apt-get update \ - && apt-get install -y -qq expect lsb-release sudo wget build-essential autoconf automake bison flex libssl-dev bc u-boot-tools \ - && rm -rf /var/lib/apt/lists/* - -WORKDIR /ti-processor-sdk-linux-am335x - -RUN wget https://software-dl.ti.com/processor-sdk-linux/esd/AM335X/latest/exports/ti-processor-sdk-linux-am335x-evm-07.03.00.005-Linux-x86-Install.bin -RUN chmod +x ./ti-processor-sdk-linux-am335x-evm-07.03.00.005-Linux-x86-Install.bin -RUN ./ti-processor-sdk-linux-am335x-evm-07.03.00.005-Linux-x86-Install.bin --mode unattended --prefix . -RUN rm ./ti-processor-sdk-linux-am335x-evm-07.03.00.005-Linux-x86-Install.bin -COPY ./prompts.sh . -RUN chmod +x ./prompts.sh -RUN sudo ./prompts.sh && sudo ./prompts.sh -RUN rm ./prompts.sh - - -FROM ubuntu:18.04 - -SHELL ["/bin/bash", "-c"] -ARG DEBIAN_FRONTEND=non-interactive - -# hadolint ignore=DL3008 -RUN apt-get update \ - && apt-get install -y -qq --no-install-recommends \ - autoconf \ - automake \ - bc \ - bison \ - build-essential \ - flex \ - libssl-dev \ - u-boot-tools \ - && rm -rf /var/lib/apt/lists/* \ - && groupadd -r bitbakery \ - && useradd --no-log-init -u 1000 -r -g bitbakery bitbaker - -USER bitbaker -WORKDIR /ti-processor-sdk-linux-am335x -COPY --from=builder --chown=bitbaker:bitbakery /ti-processor-sdk-linux-am335x . - -CMD ["make"] diff --git a/ti-processor-sdk-linux-am335x/README.md b/ti-processor-sdk-linux-am335x/README.md deleted file mode 100644 index 910a654..0000000 --- a/ti-processor-sdk-linux-am335x/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# ti-processor-sdk-linux-am335x - -## March 31, 2022 - -This image is no longer maintained. My usage of TI-specific toolchains have been dropped in favour of using Yocto or Buildroot directly, as the TI pre-packaged toolchains have a slow release/support cycle. - -This folder will be deleted in a future commit. diff --git a/ti-processor-sdk-linux-am335x/prompts.sh b/ti-processor-sdk-linux-am335x/prompts.sh deleted file mode 100644 index b78a82b..0000000 --- a/ti-processor-sdk-linux-am335x/prompts.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/expect - -set timeout 1 -spawn ./setup.sh -expect "Verify and enter your Linux username below" { send "root\n" } -expect "Do you have administrator privilieges" { send "y\n" } -interact diff --git a/ti-processor-sdk-linux-arago/Dockerfile b/ti-processor-sdk-linux-arago/Dockerfile deleted file mode 100644 index 447d188..0000000 --- a/ti-processor-sdk-linux-arago/Dockerfile +++ /dev/null @@ -1,83 +0,0 @@ -FROM ubuntu:18.04 as builder - -LABEL maintainer="suresh@robotpajamas.com" - -SHELL ["/bin/bash", "-c"] -ARG DEBIAN_FRONTEND=non-interactive - -# hadolint ignore=DL3008 -RUN apt-get update \ - && apt-get install -y -qq --no-install-recommends \ - ca-certificates \ - git \ - tar \ - wget \ - xz-utils - -WORKDIR /gcc - -RUN wget https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz -RUN tar -Jxvf gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz -RUN rm gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz - -RUN wget https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz -RUN tar -Jxvf gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz -RUN rm gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz - -RUN git clone git://arago-project.org/git/projects/oe-layersetup.git /arago - - -FROM ubuntu:18.04 - -SHELL ["/bin/bash", "-c"] -ARG DEBIAN_FRONTEND=non-interactive -WORKDIR /arago - -# Pull required building packages and configure timezone and locale to avoid Python complaints -# hadolint ignore=DL3008 -RUN apt-get update \ - && apt-get install -y -qq --no-install-recommends \ - build-essential \ - ca-certificates \ - chrpath \ - cpio \ - diffstat \ - file \ - gawk \ - git \ - lib32ncurses5 \ - lib32z1 \ - libc6-i386 \ - libstdc++6-i386-cross \ - locales \ - python \ - python3 \ - python3-distutils \ - tar \ - texinfo \ - wget \ - && rm -rf /var/lib/apt/lists/* \ - && echo 'LANG="en_US.UTF-8"'>/etc/default/locale \ - && locale-gen en en_US en_US.UTF-8 \ - && dpkg-reconfigure --frontend=noninteractive locales \ - && update-locale LANG=en_US.UTF-8 \ - && echo "dash dash/sh boolean false" | debconf-set-selections \ - && dpkg-reconfigure -p critical dash \ - && groupadd -r bitbakery \ - && useradd --no-log-init -u 1000 -r -g bitbakery bitbaker \ - && chown bitbaker:bitbakery /arago - -USER bitbaker -COPY --from=builder --chown=bitbaker:bitbakery /gcc /gcc -COPY --from=builder --chown=bitbaker:bitbakery /arago /arago - -ENV LANG=en_US.UTF-8 -ENV LANGUAGE=en_US.UTF-8 -ENV LC_ALL=en_US.UTF-8 - -# Required for bitbake compilation -ENV TOOLCHAIN_PATH_ARMV7=/gcc/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf -ENV TOOLCHAIN_PATH_ARMV8=/gcc/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu -ENV MACHINE=am335x-evm - -CMD ["bash"] diff --git a/ti-processor-sdk-linux-arago/README.md b/ti-processor-sdk-linux-arago/README.md deleted file mode 100644 index 4fefe93..0000000 --- a/ti-processor-sdk-linux-arago/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# ti-processor-sdk-linux-arago - -## March 31, 2022 - -This image is no longer maintained. My usage of TI-specific toolchains have been dropped in favour of using Yocto or Buildroot directly, as the TI pre-packaged toolchains have a slow release/support cycle. - -This folder will be deleted in a future commit. diff --git a/u-boot-builder/BUILD.pants b/u-boot-builder/BUILD.pants new file mode 100644 index 0000000..fc30dd7 --- /dev/null +++ b/u-boot-builder/BUILD.pants @@ -0,0 +1,9 @@ +file( + name="entrypoint", + source="docker-entrypoint.sh", +) + +docker_image( + name="u-boot-builder", + dependencies=[":entrypoint"], +) diff --git a/u-boot-builder/Dockerfile b/u-boot-builder/Dockerfile index ae5453d..6aa6634 100644 --- a/u-boot-builder/Dockerfile +++ b/u-boot-builder/Dockerfile @@ -10,16 +10,16 @@ ARG DEBIAN_FRONTEND=non-interactive USER root RUN apt-get update \ && apt-get install -y -qq --no-install-recommends \ - bash \ - bc \ - bison \ - build-essential \ - ca-certificates \ - flex \ - git \ - libncurses5-dev \ - libssl-dev \ - make \ + bash=5.1-2+deb11u1 \ + bc=1.07.1-2+b2 \ + bison=2:3.7.5+dfsg-1 \ + build-essential=12.9 \ + ca-certificates=20210119 \ + flex=2.6.4-8 \ + git=1:2.30.2-1+deb11u2 \ + libncurses5-dev=6.2+20201114-2+deb11u2 \ + libssl-dev=1.1.1w-0+deb11u1 \ + make=4.3-4.1 \ && rm -rf /var/lib/apt/lists/* \ && mkdir -p /app \ && mkdir -p /ccache \ @@ -30,7 +30,7 @@ RUN apt-get update \ USER armothy WORKDIR /app -COPY docker-entrypoint.sh / +COPY u-boot-builder/docker-entrypoint.sh / ENV DEFCONFIG="qemu_arm_defconfig" ENTRYPOINT ["/docker-entrypoint.sh"]