Debian buster base matches the TV's glibc version. Includes fake WEBOS_NDK wrapping standard cross-compiler, stub shared libraries for luna-service2 and glib-2.0, and a build script that produces a deployable ARM soft-float binary. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
37 lines
1.7 KiB
INI
37 lines
1.7 KiB
INI
FROM debian:buster-slim
|
|
|
|
# Buster is archived — point sources at archive.debian.org
|
|
RUN sed -i 's|deb.debian.org|archive.debian.org|g; s|security.debian.org|archive.debian.org|g; /buster-updates/d' /etc/apt/sources.list && \
|
|
apt-get update && apt-get install -y --no-install-recommends \
|
|
curl ca-certificates pkg-config cmake git \
|
|
gcc libc6-dev gcc-arm-linux-gnueabi binutils-arm-linux-gnueabi libc6-dev-armel-cross \
|
|
python3 \
|
|
xz-utils && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Node.js 20 binary (supports glibc 2.28+, has import.meta.dirname)
|
|
RUN curl -fsSL https://nodejs.org/dist/v20.18.1/node-v20.18.1-linux-x64.tar.xz | \
|
|
tar -xJ --strip-components=1 -C /usr/local && \
|
|
npm install -g pnpm@9
|
|
|
|
# Rust with ARM soft-float target
|
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
|
|
sh -s -- -y --default-toolchain stable --profile minimal && \
|
|
. /root/.cargo/env && \
|
|
rustup target add armv7-unknown-linux-gnueabi
|
|
|
|
# Create a fake WEBOS_NDK that wraps the standard cross-compiler
|
|
RUN mkdir -p /opt/webos-ndk/bin && \
|
|
ln -s /usr/bin/arm-linux-gnueabi-gcc /opt/webos-ndk/bin/arm-webos-linux-gnueabi-gcc && \
|
|
ln -s /usr/bin/arm-linux-gnueabi-ar /opt/webos-ndk/bin/arm-webos-linux-gnueabi-ar && \
|
|
ln -s /usr/bin/arm-linux-gnueabi-strip /opt/webos-ndk/bin/arm-webos-linux-gnueabi-strip && \
|
|
mkdir -p /opt/webos-ndk/arm-webos-linux-gnueabi/sysroot/usr/include && \
|
|
cp -a /usr/arm-linux-gnueabi/include/* /opt/webos-ndk/arm-webos-linux-gnueabi/sysroot/usr/include/ && \
|
|
mkdir -p /opt/webos-ndk/arm-webos-linux-gnueabi/sysroot/usr/lib && \
|
|
cp -a /usr/arm-linux-gnueabi/lib/* /opt/webos-ndk/arm-webos-linux-gnueabi/sysroot/usr/lib/
|
|
|
|
ENV WEBOS_NDK=/opt/webos-ndk
|
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
|
|
|
WORKDIR /build
|