forked from gtxaspec/prudynt-t
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (37 loc) · 1.48 KB
/
Dockerfile
File metadata and controls
49 lines (37 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM --platform=linux/amd64 debian:bookworm-slim
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /src
RUN apt-get update && \
apt-get install -y --no-install-recommends --no-install-suggests \
build-essential bc bison cpio curl file flex git libncurses-dev \
make rsync unzip wget whiptail gcc lzop u-boot-tools \
ca-certificates cmake && \
rm -rf /var/lib/apt/lists/*
ENV TOOLCHAIN_URL=https://github.com/themactep/thingino-firmware/releases/download/toolchain-x86_64/thingino-toolchain-x86_64_xburst1_4_4_musl_gcc14-linux-mipsel.tar.gz
ENV TOOLCHAIN_DIR=/opt/mipsel-thingino-linux-musl_sdk-buildroot
RUN mkdir -p /opt && \
cd /opt && \
wget "$TOOLCHAIN_URL" -O thingino-toolchain.tar.gz && \
tar -xf thingino-toolchain.tar.gz && \
cd mipsel-thingino-linux-musl_sdk-buildroot && \
./relocate-sdk.sh
ENV PATH="${TOOLCHAIN_DIR}/bin:${PATH}"
ENV CC="${TOOLCHAIN_DIR}/bin/mipsel-linux-gcc"
ENV CXX="${TOOLCHAIN_DIR}/bin/mipsel-linux-g++"
ARG TARGET=T31
ARG BUILD_TYPE=static
ENV TARGET=${TARGET}
ENV BUILD_TYPE=${BUILD_TYPE}
COPY . /deps
RUN bash -c 'case "$BUILD_TYPE" in \
static) \
SUFFIX="-static";; \
hybrid) \
SUFFIX="-hybrid";; \
*) \
SUFFIX="";; \
esac && export SUFFIX'
RUN cd /deps && PRUDYNT_CROSS="mipsel-linux-" ./build.sh deps $TARGET $SUFFIX
CMD cp -r /deps/3rdparty /src && \
PRUDYNT_CROSS="mipsel-linux-" ./build.sh prudynt $TARGET $SUFFIX && \
mv bin/prudynt "bin/prudynt-${TARGET}-${BUILD_TYPE}"