Skip to content

Commit

Permalink
make names, paths and files shorter
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Mar 6, 2024
1 parent 8b17895 commit d7a7d42
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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}",
Expand Down
22 changes: 6 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand All @@ -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}

21 changes: 19 additions & 2 deletions local_patch/patch-rsb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

# 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
24 changes: 0 additions & 24 deletions local_patch/rtems-gcc-13.2-newlib-head.cfg

This file was deleted.

0 comments on commit d7a7d42

Please sign in to comment.