mirror of
https://github.com/fbelavenuto/arpl.git
synced 2025-12-24 06:42:06 +08:00
Compare commits
10 Commits
v1.0-beta5
...
v1.0-beta6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
029b97b981 | ||
|
|
950166fc7d | ||
|
|
5afb934769 | ||
|
|
d1deb55921 | ||
|
|
cc8c6a3812 | ||
|
|
523bbfbc50 | ||
|
|
2d76ba320f | ||
|
|
5495484c9a | ||
|
|
7b67dd0456 | ||
|
|
aa0976ca4f |
@@ -3,7 +3,7 @@ ARG PLATFORMS="@@@PLATFORMS@@@"
|
||||
ARG TOOLKIT_VER="@@@TOOLKIT_VER@@@"
|
||||
|
||||
# Copy downloaded toolkits
|
||||
ADD cache/$TOOLKIT_VER /cache
|
||||
ADD cache /cache
|
||||
# Extract toolkits
|
||||
RUN for V in ${PLATFORMS}; do \
|
||||
echo "${V}" | while IFS=':' read PLATFORM KVER; do \
|
||||
|
||||
@@ -23,6 +23,7 @@ function prepare() {
|
||||
URLS["geminilake"]="https://global.download.synology.com/download/ToolChain/toolchain/${TOOLCHAIN_VER}/Intel%20x86%20Linux%204.4.180%20%28GeminiLake%29/geminilake-${GCCLIB_VER}_x86_64-GPL.txz"
|
||||
URLS["v1000"]="https://global.download.synology.com/download/ToolChain/toolchain/${TOOLCHAIN_VER}/Intel%20x86%20Linux%204.4.180%20%28V1000%29/v1000-${GCCLIB_VER}_x86_64-GPL.txz"
|
||||
URLS["r1000"]="https://global.download.synology.com/download/ToolChain/toolchain/${TOOLCHAIN_VER}/AMD%20x86%20Linux%204.4.180%20%28r1000%29/r1000-${GCCLIB_VER}_x86_64-GPL.txz"
|
||||
URLS["epyc7002"]="https://global.download.synology.com/download/ToolChain/toolchain/${TOOLCHAIN_VER}/AMD%20x86%20Linux%20Linux%205.10.55%20%28epyc7002%29/epyc7002-${GCCLIB_VER}_x86_64-GPL.txz"
|
||||
|
||||
# Read platforms/kerver version
|
||||
echo "Reading platforms"
|
||||
|
||||
@@ -9,15 +9,16 @@ function export-vars() {
|
||||
echo "Use: export-vars <platform>"
|
||||
exit 1
|
||||
fi
|
||||
export PLATFORM="${1}"
|
||||
export KSRC="/opt/${1}/build"
|
||||
export CROSS_COMPILE="/opt/${1}/bin/x86_64-pc-linux-gnu-"
|
||||
export CFLAGS="-I/opt/${1}/include"
|
||||
export LDFLAGS="-I/opt/${1}/lib"
|
||||
export LD_LIBRARY_PATH="/opt/${1}/lib"
|
||||
export ARCH=x86_64
|
||||
export PATH="/opt/${1}/bin:${PATH}"
|
||||
export CC="x86_64-pc-linux-gnu-gcc"
|
||||
export LD="x86_64-pc-linux-gnu-ld"
|
||||
export PATH="/opt/${1}/bin:${PATH}"
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
|
||||
2
docker/syno-toolkit/rootfs/etc/profile.d/login.sh
Normal file → Executable file
2
docker/syno-toolkit/rootfs/etc/profile.d/login.sh
Normal file → Executable file
@@ -1,3 +1,4 @@
|
||||
export PATH="/usr/local/x86_64-pc-linux-gnu/bin:${PATH}"
|
||||
[[ "$-" != *i* ]] && return
|
||||
export LS_OPTIONS='--color=auto'
|
||||
export SHELL='linux'
|
||||
@@ -7,4 +8,3 @@ alias ll='ls -l'
|
||||
alias l='ls -l -a'
|
||||
alias h='history 25'
|
||||
alias j='jobs -l'
|
||||
export PATH="/opt/${PLATFORM}/bin:${PATH}"
|
||||
@@ -29,30 +29,6 @@ function compile-lkm {
|
||||
chown 1000.1000 /output/redpill-prod.ko
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# function compile-drivers {
|
||||
# while read platform kver; do
|
||||
# SRC_PATH="/opt/${platform}"
|
||||
# echo "Compiling for ${platform}-${kver}"
|
||||
# cd /opt/linux-${kver}/drivers
|
||||
# while read dir; do
|
||||
# if [ -f "${dir}/Makefile" ]; then
|
||||
# echo "Driver `basename ${dir}`"
|
||||
# grep "CONFIG_.*/.*" "${dir}/Makefile" | sed 's/.*\(CONFIG_[^)]*\).*/\1=n/g' > /tmp/env
|
||||
# grep "CONFIG_.*\.o.*" "${dir}/Makefile" | sed 's/.*\(CONFIG_[^)]*\).*/\1=m/g' >> /tmp/env
|
||||
# make -C "${SRC_PATH}" M=$(readlink -f "${dir}") clean
|
||||
# cat /tmp/env | xargs -d '\n' make -C "${SRC_PATH}" M=$(readlink -f "${dir}") modules $@
|
||||
# fi
|
||||
# done < <(find -type d)
|
||||
# DST_PATH="/output/compiled-mods/${platform}-${kver}"
|
||||
# mkdir -p "${DST_PATH}"
|
||||
# while read f; do
|
||||
# strip -g "${f}"
|
||||
# mv "${f}" "${DST_PATH}"
|
||||
# done < <(find -name \*.ko)
|
||||
# done </opt/platforms
|
||||
# }
|
||||
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
|
||||
@@ -61,13 +37,9 @@ if [ $# -lt 1 ]; then
|
||||
echo "Commands: shell | compile-module | compile-lkm"
|
||||
exit 1
|
||||
fi
|
||||
export PATH="/usr/local/x86_64-pc-linux-gnu/bin:${PATH}"
|
||||
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 CFLAGS="-I/opt/${1}/include"
|
||||
#export LDFLAGS="-I/opt/${1}/lib"
|
||||
#export LD_LIBRARY_PATH="/opt/${1}/lib"
|
||||
export ARCH=x86_64
|
||||
export CC="x86_64-pc-linux-gnu-gcc"
|
||||
export LD="x86_64-pc-linux-gnu-ld"
|
||||
@@ -76,6 +48,5 @@ case $1 in
|
||||
shell) shift && bash -l $@ ;;
|
||||
compile-module) compile-module ;;
|
||||
compile-lkm) compile-lkm ;;
|
||||
# compile-drivers) compile-drivers ;;
|
||||
*) echo "Command not recognized: $1" ;;
|
||||
esac
|
||||
|
||||
@@ -15,7 +15,7 @@ BOARD_PATH="${CONFIG_DIR}/board/arpl"
|
||||
|
||||
echo "Creating image file"
|
||||
# Create image zeroed
|
||||
dd if="/dev/zero" of="${IMAGE_FILE}" bs=1M count=500 conv=sync 2>/dev/null
|
||||
dd if="/dev/zero" of="${IMAGE_FILE}" bs=1M count=1024 conv=sync 2>/dev/null
|
||||
# Copy grub stage1 to image
|
||||
dd if="${BOARD_PATH}/grub.bin" of="${IMAGE_FILE}" conv=notrunc,sync 2>/dev/null
|
||||
# Create partitions on image
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
ARPL_VERSION="1.0-beta5"
|
||||
ARPL_VERSION="1.0-beta6"
|
||||
|
||||
# Define paths
|
||||
TMP_PATH="/tmp"
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
. /opt/arpl/include/addons.sh
|
||||
. /opt/arpl/include/modules.sh
|
||||
|
||||
# Check partition 3 space, if < 2GiB uses ramdisk
|
||||
RAMCACHE=0
|
||||
# Check partition 3 space, if < 2GiB is necessary clean cache folder
|
||||
CLEARCACHE=0
|
||||
LOADER_DISK="`blkid | grep 'LABEL="ARPL3"' | cut -d3 -f1`"
|
||||
LOADER_DEVICE_NAME=`echo ${LOADER_DISK} | sed 's|/dev/||'`
|
||||
if [ `cat /sys/block/${LOADER_DEVICE_NAME}/${LOADER_DEVICE_NAME}3/size` -lt 4194304 ]; then
|
||||
RAMCACHE=1
|
||||
CLEARCACHE=1
|
||||
fi
|
||||
|
||||
# Get actual IP
|
||||
@@ -616,12 +616,11 @@ function extractDsmFiles() {
|
||||
RAMDISK_HASH="`readModelKey "${MODEL}" "builds.${BUILD}.pat.ramdisk-hash"`"
|
||||
ZIMAGE_HASH="`readModelKey "${MODEL}" "builds.${BUILD}.pat.zimage-hash"`"
|
||||
|
||||
if [ ${RAMCACHE} -eq 0 ]; then
|
||||
OUT_PATH="${CACHE_PATH}/dl"
|
||||
echo "Cache in disk"
|
||||
else
|
||||
OUT_PATH="${TMP_PATH}/dl"
|
||||
echo "Cache in ram"
|
||||
OUT_PATH="${CACHE_PATH}/dl"
|
||||
|
||||
if [ ${CLEARCACHE} -eq 1 ]; then
|
||||
echo "Cleaning cache"
|
||||
rm -rf "${OUT_PATH}"
|
||||
fi
|
||||
mkdir -p "${OUT_PATH}"
|
||||
|
||||
@@ -703,7 +702,7 @@ function extractDsmFiles() {
|
||||
if [ $? -ne 0 ]; then
|
||||
dialog --backtitle "`backtitle`" --title "Error extracting" --textbox "${LOG_FILE}" 0 0
|
||||
fi
|
||||
|
||||
rm "${OLDPAT_PATH}"
|
||||
# Extract all files from rd.gz
|
||||
(cd "${RAMDISK_PATH}"; xz -dc < rd.gz | cpio -idm) >/dev/null 2>&1 || true
|
||||
# Copy only necessary files
|
||||
@@ -1058,7 +1057,7 @@ while true; do
|
||||
fi
|
||||
echo "u \"Edit user config file manually\"" >> "${TMP_PATH}/menu"
|
||||
echo "k \"Choose a keymap\" " >> "${TMP_PATH}/menu"
|
||||
[ ${RAMCACHE} -eq 0 -a -d "${CACHE_PATH}/dl" ] && echo "c \"Clean disk cache\"" >> "${TMP_PATH}/menu"
|
||||
[ ${CLEARCACHE} -eq 0 -a -d "${CACHE_PATH}/dl" ] && echo "c \"Clean disk cache\"" >> "${TMP_PATH}/menu"
|
||||
echo "p \"Update menu\"" >> "${TMP_PATH}/menu"
|
||||
echo "e \"Exit\"" >> "${TMP_PATH}/menu"
|
||||
dialog --clear --default-item ${NEXT} --backtitle "`backtitle`" --colors \
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -7,6 +7,7 @@ set -e
|
||||
declare -A KVERS
|
||||
KVERS["DS918+"]="4.4.180"
|
||||
KVERS["DS920+"]="4.4.180"
|
||||
KVERS["DS923+"]="4.4.180"
|
||||
KVERS["DS1520+"]="4.4.180"
|
||||
KVERS["DS1621+"]="4.4.180"
|
||||
KVERS["DS2422+"]="4.4.180"
|
||||
@@ -22,7 +23,7 @@ RELEASE="7.1.1"
|
||||
BUILDNUMBER="42962"
|
||||
EXTRA=""
|
||||
|
||||
for MODEL in DS918+ DS920+ DS1520+ DS1621+ DS2422+ DS3615xs DS3617xs DS3622xs+ DVA1622 DVA3221 DVA3219 FS2500 RS4021xs+; do
|
||||
for MODEL in DS918+ DS920+ DS923+ DS1520+ DS1621+ DS2422+ DS3615xs DS3617xs DS3622xs+ DVA1622 DVA3221 DVA3219 FS2500 RS4021xs+; do
|
||||
MODEL_CODED=`echo ${MODEL} | sed 's/+/%2B/g'`
|
||||
URL="https://global.download.synology.com/download/DSM/release/${RELEASE}/${BUILDNUMBER}${EXTRA}/DSM_${MODEL_CODED}_${BUILDNUMBER}.pat"
|
||||
#URL="https://archive.synology.com/download/Os/DSM/${RELEASE}-${BUILDNUMBER}/DSM_${MODEL_CODED}_${BUILDNUMBER}.pat"
|
||||
|
||||
5
rss.json
5
rss.json
@@ -61,6 +61,11 @@
|
||||
"mLink": "https://global.download.synology.com/download/DSM/release/7.1.1/42962/DSM_DS920%2B_42962.pat",
|
||||
"mCheckSum": "ba9fbd499791d19859dd9a53372b016a"
|
||||
},
|
||||
{
|
||||
"mUnique": "synology_r1000_923+",
|
||||
"mLink": "https://global.download.synology.com/download/DSM/release/7.1.1/42962/DSM_DS923%2B_42962.pat",
|
||||
"mCheckSum": "fdff6232dacf9bd3b189506f51577128"
|
||||
},
|
||||
{
|
||||
"mUnique": "synology_geminilake_dva1622",
|
||||
"mLink": "https://global.download.synology.com/download/DSM/release/7.1.1/42962/DSM_DVA1622_42962.pat",
|
||||
|
||||
5
rss.xml
5
rss.xml
@@ -57,6 +57,11 @@
|
||||
<mLink>https://global.download.synology.com/download/DSM/release/7.1.1/42962/DSM_DS920%2B_42962.pat</mLink>
|
||||
<mCheckSum>ba9fbd499791d19859dd9a53372b016a</mCheckSum>
|
||||
</model>
|
||||
<model>
|
||||
<mUnique>synology_r1000_923+</mUnique>
|
||||
<mLink>https://global.download.synology.com/download/DSM/release/7.1.1/42962/DSM_DS923%2B_42962.pat</mLink>
|
||||
<mCheckSum>fdff6232dacf9bd3b189506f51577128</mCheckSum>
|
||||
</model>
|
||||
<model>
|
||||
<mUnique>synology_geminilake_dva1622</mUnique>
|
||||
<mLink>https://global.download.synology.com/download/DSM/release/7.1.1/42962/DSM_DVA1622_42962.pat</mLink>
|
||||
|
||||
Reference in New Issue
Block a user