mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
Removing syno-toolkit
This commit is contained in:
parent
2a5a58a479
commit
bb87af3e35
@ -1,15 +0,0 @@
|
|||||||
FROM scratch
|
|
||||||
ARG PLATFORM
|
|
||||||
ARG TOOLKIT_VER
|
|
||||||
ARG CACHE_DIR
|
|
||||||
|
|
||||||
ENV PLATFORM=${PLATFORM} TOOLKIT_VER=${TOOLKIT_VER}
|
|
||||||
ADD ${CACHE_DIR}/base_env-${TOOLKIT_VER}.txz /
|
|
||||||
ADD ${CACHE_DIR}/ds.${PLATFORM}-${TOOLKIT_VER}.env.txz /
|
|
||||||
ADD ${CACHE_DIR}/ds.${PLATFORM}-${TOOLKIT_VER}.dev.txz /
|
|
||||||
ADD rootfs /
|
|
||||||
|
|
||||||
WORKDIR /input
|
|
||||||
VOLUME /input /output
|
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/do.sh"]
|
|
@ -1,9 +0,0 @@
|
|||||||
bromolow 3.10.108
|
|
||||||
apollolake 4.4.180
|
|
||||||
broadwell 4.4.180
|
|
||||||
broadwellnk 4.4.180
|
|
||||||
denverton 4.4.180
|
|
||||||
geminilake 4.4.180
|
|
||||||
v1000 4.4.180
|
|
||||||
r1000 4.4.180
|
|
||||||
epyc7002 5.10.55
|
|
@ -1,61 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
CACHE_DIR="cache"
|
|
||||||
PLATFORM_FILE="PLATFORMS"
|
|
||||||
TOOLKIT_VER=7.1
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
function trap_cancel() {
|
|
||||||
echo "Press Control+C once more terminate the process (or wait 2s for it to restart)"
|
|
||||||
sleep 2 || exit 1
|
|
||||||
}
|
|
||||||
trap trap_cancel SIGINT SIGTERM
|
|
||||||
cd `dirname $0`
|
|
||||||
|
|
||||||
# Read platforms/kerver version
|
|
||||||
echo "Reading platforms"
|
|
||||||
declare -A PLATFORMS
|
|
||||||
while read PLATFORM KVER; do
|
|
||||||
PLATFORMS[${PLATFORM}]="${KVER}"
|
|
||||||
done < ${PLATFORM_FILE}
|
|
||||||
|
|
||||||
# Download toolkits
|
|
||||||
mkdir -p ${CACHE_DIR}
|
|
||||||
|
|
||||||
# Check base environment
|
|
||||||
echo -n "Checking ${CACHE_DIR}/base_env-${TOOLKIT_VER}.txz... "
|
|
||||||
if [ ! -f "${CACHE_DIR}/base_env-${TOOLKIT_VER}.txz" ]; then
|
|
||||||
URL="https://global.download.synology.com/download/ToolChain/toolkit/${TOOLKIT_VER}/${PLATFORM}/base_env-${TOOLKIT_VER}.txz"
|
|
||||||
echo "Downloading ${URL}"
|
|
||||||
curl -L "${URL}" -o "${CACHE_DIR}/base_env-${TOOLKIT_VER}.txz"
|
|
||||||
else
|
|
||||||
echo "OK"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check all platforms
|
|
||||||
for PLATFORM in ${!PLATFORMS[@]}; do
|
|
||||||
echo -n "Checking ${CACHE_DIR}/ds.${PLATFORM}-${TOOLKIT_VER}.dev.txz... "
|
|
||||||
if [ ! -f "${CACHE_DIR}/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"
|
|
||||||
echo "Downloading ${URL}"
|
|
||||||
curl -L "${URL}" -o "${CACHE_DIR}/ds.${PLATFORM}-${TOOLKIT_VER}.dev.txz"
|
|
||||||
else
|
|
||||||
echo "OK"
|
|
||||||
fi
|
|
||||||
echo -n "Checking ${CACHE_DIR}/ds.${PLATFORM}-${TOOLKIT_VER}.env.txz... "
|
|
||||||
if [ ! -f "${CACHE_DIR}/ds.${PLATFORM}-${TOOLKIT_VER}.env.txz" ]; then
|
|
||||||
URL="https://global.download.synology.com/download/ToolChain/toolkit/${TOOLKIT_VER}/${PLATFORM}/ds.${PLATFORM}-${TOOLKIT_VER}.env.txz"
|
|
||||||
echo "Downloading ${URL}"
|
|
||||||
curl -L "${URL}" -o "${CACHE_DIR}/ds.${PLATFORM}-${TOOLKIT_VER}.env.txz"
|
|
||||||
else
|
|
||||||
echo "OK"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Generate docker images
|
|
||||||
for PLATFORM in ${!PLATFORMS[@]}; do
|
|
||||||
docker buildx build . --build-arg PLATFORM=${PLATFORM} --build-arg TOOLKIT_VER=${TOOLKIT_VER} --build-arg CACHE_DIR="${CACHE_DIR}" \
|
|
||||||
--tag fbelavenuto/syno-toolkit:${PLATFORM}-${TOOLKIT_VER} --load
|
|
||||||
done
|
|
@ -1,10 +0,0 @@
|
|||||||
export PATH="/usr/local/x86_64-pc-linux-gnu/bin:${PATH}"
|
|
||||||
[[ "$-" != *i* ]] && return
|
|
||||||
export LS_OPTIONS='--color=auto'
|
|
||||||
export SHELL='linux'
|
|
||||||
eval "`dircolors`"
|
|
||||||
alias ls='ls -F -h --color=always -v --author --time-style=long-iso'
|
|
||||||
alias ll='ls -l'
|
|
||||||
alias l='ls -l -a'
|
|
||||||
alias h='history 25'
|
|
||||||
alias j='jobs -l'
|
|
@ -1,56 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
function compile-module {
|
|
||||||
echo -e "Compiling module for \033[7m${PLATFORM}\033[0m..."
|
|
||||||
cp -R /input /tmp
|
|
||||||
PARMS="${PLATFORM^^}-Y=y ${PLATFORM^^}-M=m"
|
|
||||||
if [ -f "/tmp/input/defines.${PLATFORM}" ]; then
|
|
||||||
PARMS+=" `cat "/tmp/input/defines.${PLATFORM}" | xargs`"
|
|
||||||
fi
|
|
||||||
make -j`nproc` -C ${KSRC} M=/tmp/input ${PARMS} modules
|
|
||||||
while read F; do
|
|
||||||
strip -g "${F}"
|
|
||||||
echo "Copying `basename ${F}`"
|
|
||||||
cp "${F}" "/output"
|
|
||||||
chown 1000.1000 "/output/`basename ${F}`"
|
|
||||||
done < <(find /tmp/input -name \*.ko)
|
|
||||||
}
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
function compile-lkm {
|
|
||||||
cp -R /input /tmp
|
|
||||||
make -C "/tmp/input" dev-v7
|
|
||||||
strip -g "/tmp/input/redpill.ko"
|
|
||||||
mv "/tmp/input/redpill.ko" "/output/redpill-dev.ko"
|
|
||||||
chown 1000.1000 /output/redpill-dev.ko
|
|
||||||
make -C "/tmp/input" clean
|
|
||||||
make -C "/tmp/input" prod-v7
|
|
||||||
strip -g "/tmp/input/redpill.ko"
|
|
||||||
mv "/tmp/input/redpill.ko" "/output/redpill-prod.ko"
|
|
||||||
chown 1000.1000 /output/redpill-prod.ko
|
|
||||||
}
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
if [ $# -lt 1 ]; then
|
|
||||||
echo "Use: <command> (<params>)"
|
|
||||||
echo "Commands: shell | compile-module | compile-lkm"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
export KSRC="/usr/local/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/lib/modules/DSM-${TOOLKIT_VER}/build"
|
|
||||||
export LINUX_SRC="/usr/local/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/lib/modules/DSM-${TOOLKIT_VER}/build"
|
|
||||||
export CROSS_COMPILE="/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-"
|
|
||||||
export ARCH=x86_64
|
|
||||||
export CC="x86_64-pc-linux-gnu-gcc"
|
|
||||||
export LD="x86_64-pc-linux-gnu-ld"
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
shell) shift && bash -l $@ ;;
|
|
||||||
compile-module) compile-module ;;
|
|
||||||
compile-lkm) compile-lkm ;;
|
|
||||||
*) echo "Command not recognized: $1" ;;
|
|
||||||
esac
|
|
Loading…
x
Reference in New Issue
Block a user