|
1 |
| -FROM ubuntu:22.04 as environment |
| 1 | +FROM ubuntu:24.04 as environment |
2 | 2 |
|
3 | 3 | ENV VIRTUALENV /venv
|
4 | 4 | ENV RTEMS_MAJOR=6
|
@@ -28,27 +28,30 @@ RUN apt-get update -y && apt-get upgrade -y && \
|
28 | 28 | && rm -rf /var/lib/apt/lists/* && \
|
29 | 29 | busybox --install
|
30 | 30 |
|
| 31 | +# use uv to make a python3.11 venv because the RSB does not yet support python3.12 |
| 32 | +# see https://gitlab.rtems.org/rtems/tools/rtems-source-builder/-/issues/87 |
| 33 | +RUN curl -LsSf https://github.com/astral-sh/uv/releases/download/0.6.0/uv-x86_64-unknown-linux-gnu.tar.gz -o uv.gz && \ |
| 34 | + echo cd1ac8840037940fa69fd18c51dd60ae uv.gz | md5sum -c && \ |
| 35 | + tar -xzf uv.gz -C /usr/bin --strip-components=1 && \ |
| 36 | + rm uv.gz |
| 37 | + |
31 | 38 | # setup a python venv - requried by the RSB to find 'python'
|
32 |
| -RUN python3 -mvenv ${VIRTUALENV} |
| 39 | +RUN uv venv --python 3.11 ${VIRTUALENV} |
33 | 40 | ENV PATH=${VIRTUALENV}/bin:${PATH}
|
34 | 41 |
|
35 |
| -# get the RTEMS Source Builder |
| 42 | +# get and patch the RTEMS Source Builder |
36 | 43 | WORKDIR ${RTEMS_TOP}
|
| 44 | +COPY local_patch /local_patch |
37 | 45 | RUN curl https://ftp.rtems.org/pub/rtems/releases/${RTEMS_MAJOR}/${RTEMS_VERSION}/sources/rtems-source-builder-${RTEMS_VERSION}.tar.xz \
|
38 | 46 | | tar -xJ && \
|
39 |
| - mv rtems-source-builder-${RTEMS_VERSION} rsb |
40 |
| - |
41 |
| -# add in a gcc patch to only build for m7400 |
42 |
| -COPY local_patch local_patch |
43 |
| -RUN local_patch/patch-rsb.sh |
| 47 | + mv rtems-source-builder-${RTEMS_VERSION} rsb && \ |
| 48 | + git apply /local_patch/rsb.patch |
44 | 49 |
|
45 |
| -# get the kernel |
| 50 | +# get and patch the kernel |
46 | 51 | RUN curl https://ftp.rtems.org/pub/rtems/releases/${RTEMS_MAJOR}/${RTEMS_VERSION}/sources/rtems-${RTEMS_VERSION}.tar.xz \
|
47 | 52 | | tar -xJ && \
|
48 |
| - mv rtems-${RTEMS_VERSION} kernel |
49 |
| - |
50 |
| -# patch the kernel |
51 |
| -RUN git apply local_patch/VMEConfig.patch && \ |
| 53 | + mv rtems-${RTEMS_VERSION} kernel && \ |
| 54 | + git apply /local_patch/kernel.patch && \ |
52 | 55 | cd kernel && \
|
53 | 56 | ./waf bspdefaults --rtems-bsps=${RTEMS_ARCH}/${RTEMS_BSP} > config.ini && \
|
54 | 57 | sed -i -e "s|RTEMS_POSIX_API = False|RTEMS_POSIX_API = True|" config.ini
|
@@ -80,9 +83,8 @@ from environment AS runtime_prep
|
80 | 83 | # To make this container target smaller we take just the BSP
|
81 | 84 | COPY --from=developer ${RTEMS_PREFIX} ${RTEMS_PREFIX}
|
82 | 85 |
|
83 |
| -# remove files that are not required |
| 86 | +# remove files that are not required and using space |
84 | 87 | RUN rm -r \
|
85 |
| - ${RTEMS_PREFIX}/share/doc \ |
86 | 88 | ${RTEMS_PREFIX}/share/man \
|
87 | 89 | ${RTEMS_PREFIX}/share/info \
|
88 | 90 | ${RTEMS_PREFIX}/powerpc-rtems6/lib/ldscripts
|
|
0 commit comments