diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 8e48f1d..7965a61 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,7 +1,7 @@ // For format details, see https://containers.dev/implementors/json_reference/ { "name": "epics-containers IOC devcontainer", - "image": "ghcr.io/epics-containers/rtems6-powerpc-linux-developer:6.2rc1-ec1b1", + "image": "ghcr.io/epics-containers/rtems6-powerpc-linux-developer:6.2rc1ec2b3", "remoteEnv": { // allows X11 apps to run inside the container "DISPLAY": "${localEnv:DISPLAY}", diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 50798f4..784fca2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,7 +5,7 @@ on: pull_request: jobs: - build-push-images: + build: # pull requests are a duplicate of a branch push if within the same repo. if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository permissions: @@ -15,20 +15,16 @@ jobs: fail-fast: true max-parallel: 1 # take advantage of caching matrix: - target: [developer, runtime] - architecture: [linux] + target: [build, bsp] include: - os: ubuntu-latest platforms: linux/amd64 + name: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-${{ matrix.target }} runs-on: ${{ matrix.os }} env: - TAG: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-${{ matrix.architecture }}-${{ matrix.target }}:${{ github.ref_name }} + TAGS: ${{ matrix.name }}:${{ github.ref_name }},${{ matrix.name }}:latest steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: recursive - name: Log in to GitHub Docker Registry uses: docker/login-action@v3 @@ -43,11 +39,8 @@ jobs: - name: Build image uses: docker/build-push-action@v5 with: - context: . - platforms: ${{ matrix.platforms }} target: ${{ matrix.target }} - build-args: TARGET_ARCHITECTURE=${{ matrix.architecture }} - tags: ${{ env.TAG }} + tags: ${{ env.TAGS }} cache-from: type=gha cache-to: type=gha,mode=max load: true @@ -59,9 +52,6 @@ jobs: if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }} uses: docker/build-push-action@v5 with: - context: . - platforms: ${{ matrix.platforms }} target: ${{ matrix.target }} - build-args: TARGET_ARCHITECTURE=${{ matrix.architecture }} - tags: ${{ env.TAG }} + tags: ${{ env.TAGS }} push: true diff --git a/Dockerfile b/Dockerfile index fccb19a..622303d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,12 +6,11 @@ ENV RTEMS_MINOR=1-rc2 ENV RTEMS_VERSION=${RTEMS_MAJOR}.${RTEMS_MINOR} ENV RTEMS_ARCH=powerpc ENV RTEMS_BSP=beatnik -ENV RTEMS_BASE=/rtems${RTEMS_VERSION}-${RTEMS_BSP}-legacy +ENV RTEMS_BASE=/rtems6-${RTEMS_BSP}-legacy ENV RTEMS_PREFIX=${RTEMS_BASE}/rtems/${RTEMS_VERSION} ENV PATH=${RTEMS_PREFIX}/bin:${PATH} -ENV LANG=en_GB.UTF-8 -FROM environment AS developer +FROM environment AS build # build tools for x86 including python and busybox (for unzip and others) # https://docs.rtems.org/branches/master/user/start/preparation.html#host-computer @@ -77,7 +76,7 @@ RUN git submodule init && \ ./waf && \ ./waf install -from environment AS runtime_prep +from environment AS bsp_prep # To make this container target smaller we take just the BSP COPY --from=developer ${RTEMS_PREFIX} ${RTEMS_PREFIX} @@ -89,7 +88,7 @@ RUN rm -r \ ${RTEMS_PREFIX}/share/info \ ${RTEMS_PREFIX}/powerpc-rtems6/lib/ldscripts -from runtime_prep AS runtime +from runtime_prep AS bsp COPY --from=runtime_prep ${RTEMS_PREFIX} ${RTEMS_PREFIX} diff --git a/local_patch/patch-rsb.sh b/local_patch/patch-rsb.sh index 00c2754..20a5242 100755 --- a/local_patch/patch-rsb.sh +++ b/local_patch/patch-rsb.sh @@ -7,5 +7,22 @@ set -xe mkdir -p $RSB/rtems/patches cp $THIS/gcc.patch $RSB/rtems/patches -cp $THIS/rtems-gcc-13.2-newlib-head.cfg $RSB/rtems/config/tools -cp $THIS/rtems-default-tools.bset $RSB/rtems/config/tools \ No newline at end of file + +# patch the gcc config file to use the above patch +echo ' +--- a/rsb/rtems/config/tools/rtems-gcc-13.2-newlib-head.cfg ++++ b/rsb/rtems/config/tools/rtems-gcc-13.2-newlib-head.cfg +@@ -13,12 +13,8 @@ + %hash sha512 newlib-%{newlib_version}.tar.gz \ + ia0ce+bdENUO3qYj00jrZB8FjSejmTWuRqEdNE8nI2llf30mh8leUn5fCoHB0Oa7rRVBjEu3n0F12ZK9skuegQ== + +-%patch add gcc file:///local_patch/gcc.patch +-%hash sha256 gcc.patch f3fd225acc18ddd16543e02d014a2cc1541216c9d9e9dd0143aa5cf74c09b54b +- + %define with_threads 1 + %define with_plugin 0 + %define with_iconv 1 + + %include %{_configdir}/gcc-13.cfg +- +' | git apply diff --git a/local_patch/rtems-gcc-13.2-newlib-head.cfg b/local_patch/rtems-gcc-13.2-newlib-head.cfg deleted file mode 100644 index 35f1c77..0000000 --- a/local_patch/rtems-gcc-13.2-newlib-head.cfg +++ /dev/null @@ -1,24 +0,0 @@ -%include %{_configdir}/checks.cfg -%include %{_configdir}/base.cfg - -%define gcc_version 13.2.0 -%source set gcc https://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.xz -%hash sha512 gcc-%{gcc_version}.tar.xz \ - 2Z5IJqcNsEUERn40np+67apYcHZs2nxcq1DN6+3EvnVevKW3ieEjKjSiC+GgtgCX3pKA7+R723HHMlHjCwhiog== - -%define newlib_version 3cacedb -%define newlib_external 1 -%define newlib_expand_name sourceware-mirror-newlib-cygwin-%{newlib_version} -%source set newlib --rsb-file=newlib-%{newlib_version}.tar.gz https://codeload.github.com/RTEMS/sourceware-mirror-newlib-cygwin/tar.gz/%{newlib_version} -%hash sha512 newlib-%{newlib_version}.tar.gz \ - ia0ce+bdENUO3qYj00jrZB8FjSejmTWuRqEdNE8nI2llf30mh8leUn5fCoHB0Oa7rRVBjEu3n0F12ZK9skuegQ== - -%patch add gcc file:///local_patch/gcc.patch -%hash sha256 gcc.patch f3fd225acc18ddd16543e02d014a2cc1541216c9d9e9dd0143aa5cf74c09b54b - -%define with_threads 1 -%define with_plugin 0 -%define with_iconv 1 - -%include %{_configdir}/gcc-13.cfg -