Skip to content

Commit a5a1be6

Browse files
committed
switch to ubuntu 24.04
1 parent 31c5d3d commit a5a1be6

File tree

5 files changed

+48
-62
lines changed

5 files changed

+48
-62
lines changed

Dockerfile.beatnik

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:22.04 as environment
1+
FROM ubuntu:24.04 as environment
22

33
ENV VIRTUALENV /venv
44
ENV RTEMS_MAJOR=6
@@ -28,27 +28,30 @@ RUN apt-get update -y && apt-get upgrade -y && \
2828
&& rm -rf /var/lib/apt/lists/* && \
2929
busybox --install
3030

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+
3138
# setup a python venv - requried by the RSB to find 'python'
32-
RUN python3 -mvenv ${VIRTUALENV}
39+
RUN uv venv --python 3.11 ${VIRTUALENV}
3340
ENV PATH=${VIRTUALENV}/bin:${PATH}
3441

35-
# get the RTEMS Source Builder
42+
# get and patch the RTEMS Source Builder
3643
WORKDIR ${RTEMS_TOP}
44+
COPY local_patch /local_patch
3745
RUN curl https://ftp.rtems.org/pub/rtems/releases/${RTEMS_MAJOR}/${RTEMS_VERSION}/sources/rtems-source-builder-${RTEMS_VERSION}.tar.xz \
3846
| 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
4449

45-
# get the kernel
50+
# get and patch the kernel
4651
RUN curl https://ftp.rtems.org/pub/rtems/releases/${RTEMS_MAJOR}/${RTEMS_VERSION}/sources/rtems-${RTEMS_VERSION}.tar.xz \
4752
| 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 && \
5255
cd kernel && \
5356
./waf bspdefaults --rtems-bsps=${RTEMS_ARCH}/${RTEMS_BSP} > config.ini && \
5457
sed -i -e "s|RTEMS_POSIX_API = False|RTEMS_POSIX_API = True|" config.ini
@@ -80,9 +83,8 @@ from environment AS runtime_prep
8083
# To make this container target smaller we take just the BSP
8184
COPY --from=developer ${RTEMS_PREFIX} ${RTEMS_PREFIX}
8285

83-
# remove files that are not required
86+
# remove files that are not required and using space
8487
RUN rm -r \
85-
${RTEMS_PREFIX}/share/doc \
8688
${RTEMS_PREFIX}/share/man \
8789
${RTEMS_PREFIX}/share/info \
8890
${RTEMS_PREFIX}/powerpc-rtems6/lib/ldscripts

local_patch/VMEConfig.patch renamed to local_patch/kernel.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ index 7df626a..2e6884b 100644
99
-CFLAGS_OPTIMIZE_V = -O2 -g
1010
+CFLAGS_OPTIMIZE_V = -O2 -g -mstrict-align
1111
CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
12-
12+
1313
LDFLAGS = -Wl,--gc-sections
1414
diff --git a/kernel/bsps/powerpc/beatnik/include/bsp/VMEConfig.h b/kernel/bsps/powerpc/beatnik/include/bsp/VMEConfig.h
1515
index 986a016..535abc1 100644
@@ -22,6 +22,6 @@ index 986a016..535abc1 100644
2222
-#define _VME_A32_WIN0_ON_VME 0x20000000
2323
+//#define _VME_A32_WIN0_ON_VME 0x20000000
2424
+#define _VME_A32_WIN0_ON_VME 0x00800000
25-
25+
2626
/* if _VME_DRAM_OFFSET is defined, the BSP
2727
* will map our RAM onto the VME bus, starting

local_patch/patch-rsb.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

local_patch/rsb.patch

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
diff --git a/rsb/rtems/config/tools/rtems-default-tools.bset b/rsb/rtems/config/tools/rtems-default-tools.bset
2+
index 68d4bc2..87f5124 100644
3+
--- a/rsb/rtems/config/tools/rtems-default-tools.bset
4+
+++ b/rsb/rtems/config/tools/rtems-default-tools.bset
5+
@@ -33,7 +33,8 @@ devel/gmp-internal
6+
devel/mpfr-internal
7+
%{with_rtems_gsed}
8+
%{with_rtems_texinfo}
9+
-%{with_rtems_gdb}
10+
+# don't build gdb as it is fussy about python and not usable on our boards
11+
+#%{with_rtems_gdb}
12+
%{with_rtems_binutils}
13+
%{with_rtems_gcc}
14+
%{with_rtems_tools}
15+
diff --git a/rsb/rtems/config/tools/rtems-gcc-13.3-newlib-head.cfg b/rsb/rtems/config/tools/rtems-gcc-13.3-newlib-head.cfg
16+
index 3fc4145..3508016 100644
17+
--- a/rsb/rtems/config/tools/rtems-gcc-13.3-newlib-head.cfg
18+
+++ b/rsb/rtems/config/tools/rtems-gcc-13.3-newlib-head.cfg
19+
@@ -24,6 +24,10 @@
20+
21+
%define gcc_pre_install %include tools/rtems-install-stdcxx.cfg
22+
23+
+# patch gcc to build only for m4700 powerpc variant
24+
+%patch add gcc file:///local_patch/gcc.patch
25+
+%hash sha256 gcc.patch 9c2b548cf4c2b4dd202993b221afef14bd1ce9b799b2209755507190648fdffe
26+
+
27+
%define with_threads 1
28+
%define with_plugin 0
29+
%define with_iconv 1

local_patch/rtems-gcc-13.3-newlib-head.cfg

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)