Skip to content

Commit

Permalink
Add a dockerfile for the toolchain image
Browse files Browse the repository at this point in the history
  • Loading branch information
matlaj committed Mar 27, 2024
1 parent 6fc6019 commit 5277421
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM debian:bookworm as build-stage

RUN apt-get update && apt-get install -y \
build-essential flex bison cmake texinfo device-tree-compiler git \
u-boot-tools lzop libusb-1.0-0-dev python3 python-is-python3 \
unzip libpython3-dev python3-dev locales

# https://devel.rtems.org/ticket/4726
RUN echo "en_US.ISO-8859-15 ISO-8859-15" >> /etc/locale.gen \
&& locale-gen
ENV LANG=en_US.iso885915

WORKDIR /grisp2-rtems-toolchain
COPY . .
RUN make install

ENV GRISP_TOOLCHAIN=/grisp2-rtems-toolchain/rtems/5
ENV GRISP_TC_ROOT=/grisp2-rtems-toolchain/rtems/5
ENV PATH="/grisp2-rtems-toolchain/rtems/5/bin:${PATH}"

# ------------------------------------------------------------------------------

FROM debian:bookworm-slim as run-stage

RUN apt-get update && apt-get install -y \
build-essential flex bison cmake texinfo device-tree-compiler git \
u-boot-tools lzop libusb-1.0-0-dev python3 python-is-python3 \
unzip libpython3-dev python3-dev && \
apt-get clean && rm -rf /var/lib/apt/lists/*

WORKDIR /grisp2-rtems-toolchain
COPY --from=build-stage /grisp2-rtems-toolchain/rtems/5/ rtems/5/

ENV GRISP_TOOLCHAIN=/grisp2-rtems-toolchain/rtems/5
ENV GRISP_TC_ROOT=/grisp2-rtems-toolchain/rtems/5
ENV PATH="/grisp2-rtems-toolchain/rtems/5/bin:${PATH}"

0 comments on commit 5277421

Please sign in to comment.