Adding linux vanilla source to docker image

This commit is contained in:
Fabio Belavenuto 2022-07-11 22:10:54 -03:00
parent 05bad9b462
commit 2085053c98
2 changed files with 16 additions and 2 deletions

View File

@ -11,7 +11,12 @@ RUN for V in ${PLATFORMS}; do \
mkdir "/opt/${PLATFORM}" && \
tar -xaf "/cache/ds.${PLATFORM}-${TOOLKIT_VER}.dev.txz" -C "/opt/${PLATFORM}" --strip-components=10 \
"usr/local/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/lib/modules/DSM-7.0/build" && \
echo -e "${PLATFORM}\t${KVER}" >> /opt/platforms; \
echo -e "${PLATFORM}\t${KVER}" >> /opt/platforms && \
if [ ! -d "/opt/linux-${KVER}" ]; then \
mkdir "/opt/linux-${KVER}" && \
echo "Extracting linux-${KVER}.tar.xz" && \
tar -xaf "/cache/linux-${KVER}.tar.xz" -C "/opt/linux-${KVER}" --strip-components=1; \
fi; \
done; \
done
@ -22,7 +27,7 @@ ENV SHELL=/bin/bash \
RUN apt update --yes && \
apt install --yes --no-install-recommends --no-install-suggests \
build-essential nano make ncurses-dev && \
build-essential nano make ncurses-dev bc libssl-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

View File

@ -20,6 +20,7 @@ done <../PLATFORMS
mkdir -p cache
TOOLKIT_VER="7.0"
for PLATFORM in ${!PLATFORMS[@]}; do
KVER="${PLATFORMS[${PLATFORM}]}"
echo -n "Checking cache/ds.${PLATFORM}-${TOOLKIT_VER}.dev.txz... "
if [ ! -f "cache/ds.${PLATFORM}-${TOOLKIT_VER}.dev.txz" ]; then
URL="https://global.download.synology.com/download/ToolChain/toolkit/${TOOLKIT_VER}/${PLATFORM}/ds.${PLATFORM}-${TOOLKIT_VER}.dev.txz"
@ -28,6 +29,14 @@ for PLATFORM in ${!PLATFORMS[@]}; do
else
echo "OK"
fi
echo -n "Checking cache/linux-${KVER}.tar.xz... "
if [ ! -f "cache/linux-${KVER}.tar.xz" ]; then
URL="https://cdn.kernel.org/pub/linux/kernel/v${KVER:0:1}.x/linux-${KVER}.tar.xz"
echo "Downloading ${URL}"
curl -L "${URL}" -o "cache/linux-${KVER}.tar.xz"
else
echo "OK"
fi
done
# Generate Dockerfile