mirror of
https://github.com/fbelavenuto/arpl.git
synced 2025-12-24 14:52:05 +08:00
Compare commits
28 Commits
v1.0-beta1
...
test1-more
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8df97f2cf7 | ||
|
|
1cc8488d44 | ||
|
|
630cd019db | ||
|
|
68ceba090d | ||
|
|
10a3390eda | ||
|
|
14dee10280 | ||
|
|
e0d6f5487e | ||
|
|
e3c79978fb | ||
|
|
af04acef77 | ||
|
|
abc533f6e5 | ||
|
|
bd34a24665 | ||
|
|
6a49f24473 | ||
|
|
994c0e21f1 | ||
|
|
9ce8f6deb7 | ||
|
|
d61c3a9f3a | ||
|
|
d8ad963a02 | ||
|
|
d71c4215a1 | ||
|
|
c5e81b59b4 | ||
|
|
d4c2e8dbca | ||
|
|
178374e498 | ||
|
|
85778bbf58 | ||
|
|
ed8f511766 | ||
|
|
7b02fc8d25 | ||
|
|
034b40dad9 | ||
|
|
ad6d6f69cb | ||
|
|
ef8fc415ac | ||
|
|
0ef66dc098 | ||
|
|
936dccb19d |
53
.github/workflows/main.yml
vendored
53
.github/workflows/main.yml
vendored
@@ -22,13 +22,45 @@ jobs:
|
||||
path: .buildroot
|
||||
key: ${{ runner.os }}-${{ hashFiles('files/configs/arpl_defconfig') }}
|
||||
|
||||
# Install dependencies
|
||||
# Install dependencies
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libelf-dev qemu-utils
|
||||
sudo cp -f files/board/arpl/overlayfs/usr/bin/yq /usr/bin/yq
|
||||
|
||||
# Get latests LKM, addons and modules
|
||||
- name: Get latests LKM, addons and Modules
|
||||
run: |
|
||||
# Get latest LKMs
|
||||
echo "Getting latest LKMs"
|
||||
TAG=`curl -s https://api.github.com/repos/fbelavenuto/redpill-lkm/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}'`
|
||||
STATUS=`curl -w "%{http_code}" -L "https://github.com/fbelavenuto/redpill-lkm/releases/download/${TAG}/rp-lkms.zip" -o /tmp/rp-lkms.zip`
|
||||
echo "Status=${STATUS}"
|
||||
[ ${STATUS} -ne 200 ] && exit 1
|
||||
|
||||
# Get latest addons and install its
|
||||
echo "Getting latest Addons"
|
||||
TAG=`curl -s https://api.github.com/repos/fbelavenuto/arpl-addons/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}'`
|
||||
STATUS=`curl -w "%{http_code}" -L "https://github.com/fbelavenuto/arpl-addons/releases/download/${TAG}/addons.zip" -o /tmp/addons.zip`
|
||||
echo "Status=${STATUS}"
|
||||
[ ${STATUS} -ne 200 ] && exit 1
|
||||
|
||||
# Get latest modules
|
||||
echo "Getting latest modules"
|
||||
MODULES_DIR="files/board/arpl/p3/modules"
|
||||
TAG=`curl -s https://api.github.com/repos/fbelavenuto/arpl-modules/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}'`
|
||||
while read PLATFORM KVER; do
|
||||
FILE="${PLATFORM}-${KVER}"
|
||||
STATUS=`curl -w "%{http_code}" -L "https://github.com/fbelavenuto/arpl-modules/releases/download/${TAG}/${FILE}.tgz" -o "${MODULES_DIR}/${FILE}.tgz"`
|
||||
echo "Status=${STATUS}"
|
||||
[ ${STATUS} -ne 200 ] && exit 1
|
||||
done < PLATFORMS
|
||||
STATUS=`curl -w "%{http_code}" -L "https://github.com/fbelavenuto/arpl-modules/releases/download/${TAG}/firmware.tgz" -o "${MODULES_DIR}/firmware.tgz"`
|
||||
echo "Status=${STATUS}"
|
||||
[ ${STATUS} -ne 200 ] && exit 1
|
||||
echo OK
|
||||
|
||||
# Prepare buildroot for first make (for cache)
|
||||
- name: Prepare buildroot
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
@@ -54,16 +86,10 @@ jobs:
|
||||
rm -rf .buildroot/board/arpl/overlayfs
|
||||
rm -rf .buildroot/board/arpl/p1
|
||||
rm -rf .buildroot/board/arpl/p3
|
||||
# Get latest LKMs
|
||||
echo "Getting latest LKMs"
|
||||
TAG=`curl -s https://api.github.com/repos/fbelavenuto/redpill-lkm/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}'`
|
||||
curl -L "https://github.com/fbelavenuto/redpill-lkm/releases/download/${TAG}/rp-lkms.zip" -o /tmp/rp-lkms.zip
|
||||
# Unzip LKMs
|
||||
rm -rf files/board/arpl/p3/lkms/*
|
||||
unzip /tmp/rp-lkms.zip -d files/board/arpl/p3/lkms
|
||||
# Get latest addons and install its
|
||||
echo "Getting latest Addons"
|
||||
TAG=`curl -s https://api.github.com/repos/fbelavenuto/arpl-addons/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}'`
|
||||
curl -L "https://github.com/fbelavenuto/arpl-addons/releases/download/${TAG}/addons.zip" -o /tmp/addons.zip
|
||||
# Install Addons
|
||||
mkdir -p /tmp/addons
|
||||
unzip /tmp/addons.zip -d /tmp/addons
|
||||
DEST_PATH="files/board/arpl/p3/addons"
|
||||
@@ -74,15 +100,6 @@ jobs:
|
||||
echo "Extracting ${PKG} to ${DEST_PATH}/${ADDON}"
|
||||
tar xaf "${PKG}" -C "${DEST_PATH}/${ADDON}"
|
||||
done
|
||||
# Get latest modules
|
||||
echo "Getting latest modules"
|
||||
MODULES_DIR="files/board/arpl/p3/modules"
|
||||
TAG=`curl -s https://api.github.com/repos/fbelavenuto/arpl-modules/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}'`
|
||||
while read PLATFORM KVER; do
|
||||
FILE="${PLATFORM}-${KVER}"
|
||||
curl -L "https://github.com/fbelavenuto/arpl-modules/releases/download/${TAG}/${FILE}.tgz" -o "${MODULES_DIR}/${FILE}.tgz"
|
||||
done < PLATFORMS
|
||||
curl -L "https://github.com/fbelavenuto/arpl-modules/releases/download/${TAG}/firmware.tgz" -o "${MODULES_DIR}/firmware.tgz"
|
||||
# Copy files
|
||||
echo "Copying files"
|
||||
sed 's/^ARPL_VERSION=.*/ARPL_VERSION="'${VERSION}'"/' -i files/board/arpl/overlayfs/opt/arpl/include/consts.sh
|
||||
|
||||
@@ -14,6 +14,13 @@ RUN for V in ${PLATFORMS}; do \
|
||||
"usr/local/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/lib/modules/DSM-${TOOLKIT_VER}" && \
|
||||
echo "Extracting ${PLATFORM}-toolchain.txz" && \
|
||||
tar -xaf "/cache/${PLATFORM}-toolchain.txz" -C "/opt/${PLATFORM}" --strip-components=1; \
|
||||
KVER_MAJOR="`echo ${KVER} | rev | cut -d. -f2- | rev`"; \
|
||||
if [ ! -d "/opt/linux-${KVER_MAJOR}.x" -a -f "/cache/linux-${KVER_MAJOR}.x.txz" ]; then \
|
||||
echo "Extracting linux-${KVER_MAJOR}.x.txz" && \
|
||||
tar -xaf "/cache/linux-${KVER_MAJOR}.x.txz" -C "/opt"; \
|
||||
rm -rf /opt/${PLATFORM}/source && \
|
||||
ln -s /opt/linux-${KVER_MAJOR}.x /opt/${PLATFORM}/source; \
|
||||
fi; \
|
||||
done; \
|
||||
done
|
||||
|
||||
@@ -28,14 +35,15 @@ RUN apt update --yes && \
|
||||
build-essential make ncurses-dev libssl-dev autogen automake pkg-config libtool xsltproc gperf && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
useradd --home-dir /input --no-create-home --shell /bin/bash --uid 1000 arpl && \
|
||||
echo "arpl ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/arpl
|
||||
useradd --create-home --shell /bin/bash --uid 1000 --user-group arpl && \
|
||||
echo "arpl ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/arpl && \
|
||||
mkdir /output && chown 1000:1000 /output
|
||||
|
||||
COPY --from=stage /opt /opt
|
||||
COPY --from=stage --chown=1000:1000 /opt /opt
|
||||
COPY files/ /
|
||||
|
||||
USER arpl
|
||||
WORKDIR /input
|
||||
VOLUME /input /output
|
||||
USER arpl
|
||||
|
||||
ENTRYPOINT ["/opt/do.sh"]
|
||||
|
||||
@@ -25,6 +25,7 @@ function prepare() {
|
||||
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"
|
||||
declare -A PLATFORMS
|
||||
@@ -40,7 +41,7 @@ function prepare() {
|
||||
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}"
|
||||
echo -e "No\nDownloading ${URL}"
|
||||
curl -L "${URL}" -o "${CACHE_DIR}/ds.${PLATFORM}-${TOOLKIT_VER}.dev.txz"
|
||||
else
|
||||
echo "OK"
|
||||
@@ -48,13 +49,25 @@ function prepare() {
|
||||
echo -n "Checking ${CACHE_DIR}/${PLATFORM}-toolchain.txz... "
|
||||
if [ ! -f "${CACHE_DIR}/${PLATFORM}-toolchain.txz" ]; then
|
||||
URL=${URLS["${PLATFORM}"]}
|
||||
echo "Downloading ${URL}"
|
||||
echo -e "No\nDownloading ${URL}"
|
||||
curl -L "${URL}" -o "${CACHE_DIR}/${PLATFORM}-toolchain.txz"
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
done
|
||||
|
||||
for KERNEL in 3.10.x 4.4.x 5.10.x; do
|
||||
URL=${URLS["${KERNEL}"]}
|
||||
[ -z "${URL}" ] && continue
|
||||
echo -n "Checking ${CACHE_DIR}/linux-${KERNEL}.txz... "
|
||||
if [ ! -f "${CACHE_DIR}/linux-${KERNEL}.txz" ]; then
|
||||
echo -e "No\nDownloading ${URL}"
|
||||
curl -L "${URL}" -o "${CACHE_DIR}/linux-${KERNEL}.txz"
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
done
|
||||
|
||||
# Generate Dockerfile
|
||||
echo "Generating Dockerfile"
|
||||
cp Dockerfile.template Dockerfile
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -eo pipefail
|
||||
|
||||
###############################################################################
|
||||
function export-vars() {
|
||||
@@ -18,12 +18,16 @@ function export-vars() {
|
||||
export ARCH=x86_64
|
||||
export CC="x86_64-pc-linux-gnu-gcc"
|
||||
export LD="x86_64-pc-linux-gnu-ld"
|
||||
export PATH="/opt/${1}/bin:${PATH}"
|
||||
echo "export PATH=\"/opt/${1}/bin:${PATH}\"" | \
|
||||
sudo tee /etc/profile.d/path.sh >/dev/null
|
||||
sudo chmod +x /etc/profile.d/path.sh
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
function shell() {
|
||||
cp /opt/${2}/build/System.map /input
|
||||
cp -fv /opt/${2}/build/.config /opt/${2}/source/
|
||||
cp -fv /opt/${2}/build/System.map /opt/${2}/source/
|
||||
cp -fv /opt/${2}/build/Module.symvers /opt/${2}/source/
|
||||
export-vars $2
|
||||
shift 2
|
||||
bash -l $@
|
||||
@@ -52,8 +56,7 @@ function compile-module {
|
||||
cp -R /input /tmp
|
||||
export-vars ${PLATFORM}
|
||||
PARMS="${PLATFORM^^}-Y=y ${PLATFORM^^}-M=m"
|
||||
if [ -f "/tmp/input/defines.${1}" ]
|
||||
then
|
||||
if [ -f "/tmp/input/defines.${1}" ]; then
|
||||
PARMS+=" `cat "/tmp/input/defines.${1}" | xargs`"
|
||||
fi
|
||||
make -j`nproc` -C "/opt/${PLATFORM}/build" M="/tmp/input" ${PARMS} modules
|
||||
|
||||
9
docker/syno-toolkit/PLATFORMS
Normal file
9
docker/syno-toolkit/PLATFORMS
Normal file
@@ -0,0 +1,9 @@
|
||||
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
|
||||
@@ -3,7 +3,7 @@
|
||||
set -e
|
||||
|
||||
CACHE_DIR="cache"
|
||||
PLATFORM_FILE="../../PLATFORMS"
|
||||
PLATFORM_FILE="PLATFORMS"
|
||||
TOOLKIT_VER=7.1
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -6,7 +6,11 @@ set -e
|
||||
function compile-module {
|
||||
echo -e "Compiling module for \033[7m${PLATFORM}\033[0m..."
|
||||
cp -R /input /tmp
|
||||
make -C ${KSRC} M=/tmp/input ${PLATFORM^^}-Y=y ${PLATFORM^^}-M=m modules
|
||||
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}`"
|
||||
|
||||
@@ -18,8 +18,16 @@ CONFIG_CGROUP_FREEZER=y
|
||||
CONFIG_CPUSETS=y
|
||||
CONFIG_CGROUP_CPUACCT=y
|
||||
CONFIG_NAMESPACES=y
|
||||
CONFIG_SYSFS_DEPRECATED=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
# CONFIG_RD_GZIP is not set
|
||||
# CONFIG_RD_BZIP2 is not set
|
||||
# CONFIG_RD_LZMA is not set
|
||||
# CONFIG_RD_LZO is not set
|
||||
# CONFIG_RD_LZ4 is not set
|
||||
# CONFIG_RD_ZSTD is not set
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
CONFIG_KCMP=y
|
||||
CONFIG_EMBEDDED=y
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
CONFIG_PROFILING=y
|
||||
@@ -42,17 +50,19 @@ CONFIG_PM_TRACE_RTC=y
|
||||
CONFIG_ACPI_VIDEO=y
|
||||
CONFIG_ACPI_DOCK=y
|
||||
CONFIG_ACPI_BGRT=y
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
|
||||
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
|
||||
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
|
||||
CONFIG_X86_ACPI_CPUFREQ=y
|
||||
CONFIG_X86_POWERNOW_K8=y
|
||||
CONFIG_INTEL_IDLE=y
|
||||
CONFIG_IA32_EMULATION=y
|
||||
# CONFIG_VIRTUALIZATION is not set
|
||||
CONFIG_KPROBES=y
|
||||
CONFIG_JUMP_LABEL=y
|
||||
# CONFIG_GCC_PLUGINS is not set
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
# CONFIG_BLK_DEBUG_FS is not set
|
||||
CONFIG_PARTITION_ADVANCED=y
|
||||
CONFIG_BINFMT_MISC=y
|
||||
CONFIG_NET=y
|
||||
@@ -79,7 +89,8 @@ CONFIG_TCP_CONG_ADVANCED=y
|
||||
# CONFIG_TCP_CONG_WESTWOOD is not set
|
||||
# CONFIG_TCP_CONG_HTCP is not set
|
||||
CONFIG_TCP_MD5SIG=y
|
||||
# CONFIG_IPV6 is not set
|
||||
CONFIG_IPV6=m
|
||||
# CONFIG_IPV6_SIT is not set
|
||||
CONFIG_NETLABEL=y
|
||||
CONFIG_NETFILTER=y
|
||||
# CONFIG_NETFILTER_ADVANCED is not set
|
||||
@@ -92,7 +103,6 @@ CONFIG_NF_NAT=y
|
||||
CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y
|
||||
CONFIG_NETFILTER_XT_TARGET_NFLOG=y
|
||||
CONFIG_NETFILTER_XT_TARGET_SECMARK=y
|
||||
CONFIG_NETFILTER_XT_TARGET_TCPMSS=y
|
||||
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
|
||||
CONFIG_NETFILTER_XT_MATCH_POLICY=y
|
||||
CONFIG_NETFILTER_XT_MATCH_STATE=y
|
||||
@@ -101,6 +111,8 @@ CONFIG_IP_NF_FILTER=y
|
||||
CONFIG_IP_NF_TARGET_REJECT=y
|
||||
CONFIG_IP_NF_TARGET_MASQUERADE=m
|
||||
CONFIG_IP_NF_MANGLE=y
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_NET_SCHED=y
|
||||
CONFIG_NET_EMATCH=y
|
||||
CONFIG_NET_CLS_ACT=y
|
||||
@@ -115,6 +127,7 @@ CONFIG_FW_LOADER_COMPRESS=y
|
||||
CONFIG_DEBUG_DEVRES=y
|
||||
CONFIG_CONNECTOR=y
|
||||
CONFIG_EFI_VARS=y
|
||||
# CONFIG_EFI_CUSTOM_SSDT_OVERLAYS is not set
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_VIRTIO_BLK=m
|
||||
CONFIG_BLK_DEV_NVME=y
|
||||
@@ -353,13 +366,13 @@ CONFIG_HW_RANDOM=y
|
||||
CONFIG_NVRAM=y
|
||||
CONFIG_HPET=y
|
||||
# CONFIG_HPET_MMAP is not set
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_I801=y
|
||||
CONFIG_WATCHDOG=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_AGP=y
|
||||
CONFIG_AGP_AMD64=y
|
||||
CONFIG_AGP_INTEL=y
|
||||
CONFIG_DRM=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FIRMWARE_EDID=y
|
||||
CONFIG_FB_MODE_HELPERS=y
|
||||
@@ -422,6 +435,7 @@ CONFIG_LEDS_TRIGGERS=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
# CONFIG_RTC_HCTOSYS is not set
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_SYNC_FILE=y
|
||||
CONFIG_VIRT_DRIVERS=y
|
||||
CONFIG_VBOXGUEST=m
|
||||
CONFIG_VIRTIO_PCI=m
|
||||
@@ -452,7 +466,9 @@ CONFIG_AUTOFS4_FS=y
|
||||
CONFIG_MSDOS_FS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_PROC_KCORE=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_HUGETLBFS=y
|
||||
CONFIG_EFIVAR_FS=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V3_ACL=y
|
||||
CONFIG_NFS_V4=y
|
||||
|
||||
@@ -18,9 +18,6 @@ printf "\033[1;44m%*s\033[0m\n" ${COLUMNS} ""
|
||||
TITLE="BOOTING..."
|
||||
printf "\033[1;33m%*s\033[0m\n" $(((${#TITLE}+${COLUMNS})/2)) "${TITLE}"
|
||||
|
||||
history -w
|
||||
sync
|
||||
|
||||
# Check if DSM zImage changed, patch it if necessary
|
||||
ZIMAGE_HASH="`readConfigKey "zimage-hash" "${USER_CONFIG_FILE}"`"
|
||||
if [ "`sha256sum "${ORI_ZIMAGE_FILE}" | awk '{print$1}'`" != "${ZIMAGE_HASH}" ]; then
|
||||
@@ -29,7 +26,7 @@ if [ "`sha256sum "${ORI_ZIMAGE_FILE}" | awk '{print$1}'`" != "${ZIMAGE_HASH}" ];
|
||||
if [ $? -ne 0 ]; then
|
||||
dialog --backtitle "`backtitle`" --title "Error" \
|
||||
--msgbox "zImage not patched:\n`<"${LOG_FILE}"`" 12 70
|
||||
return 1
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -41,7 +38,7 @@ if [ "`sha256sum "${ORI_RDGZ_FILE}" | awk '{print$1}'`" != "${RAMDISK_HASH}" ];
|
||||
if [ $? -ne 0 ]; then
|
||||
dialog --backtitle "`backtitle`" --title "Error" \
|
||||
--msgbox "Ramdisk not patched:\n`<"${LOG_FILE}"`" 12 70
|
||||
return 1
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -142,8 +139,7 @@ if [ "${DIRECT}" = "true" ]; then
|
||||
echo -e "\033[1;33mReboot to boot directly in DSM\033[0m"
|
||||
grub-editenv ${GRUB_PATH}/grubenv set next_entry="direct"
|
||||
reboot
|
||||
sleep 100
|
||||
exit
|
||||
exit 0
|
||||
fi
|
||||
echo -e "\033[1;37mLoading DSM kernel...\033[0m"
|
||||
|
||||
@@ -156,4 +152,4 @@ else
|
||||
fi
|
||||
echo -e "\033[1;37mBooting...\033[0m"
|
||||
poweroff
|
||||
while true; do sleep 1; done # infinity loop
|
||||
exit 0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
ARPL_VERSION="1.0-beta11a"
|
||||
ARPL_VERSION="1.0-beta13a"
|
||||
|
||||
# Define paths
|
||||
TMP_PATH="/tmp"
|
||||
|
||||
@@ -50,7 +50,10 @@ ln -s "${CACHE_PATH}/ssh" "/etc/ssh"
|
||||
# Link bash history to cache volume
|
||||
rm -rf ~/.bash_history
|
||||
ln -s ${CACHE_PATH}/.bash_history ~/.bash_history
|
||||
|
||||
touch ~/.bash_history
|
||||
if ! grep -q "menu.sh" ~/.bash_history; then
|
||||
echo "menu.sh " >> ~/.bash_history
|
||||
fi
|
||||
# Check if exists directories into P3 partition, if yes remove and link it
|
||||
if [ -d "${CACHE_PATH}/model-configs" ]; then
|
||||
rm -rf "${MODEL_CONFIG_PATH}"
|
||||
@@ -155,7 +158,9 @@ elif grep -q "IWANTTOCHANGETHECONFIG" /proc/cmdline; then
|
||||
fi
|
||||
|
||||
# If is to boot automatically, do it
|
||||
[ ${BOOT} -eq 1 ] && boot.sh
|
||||
if [ ${BOOT} -eq 1 ]; then
|
||||
boot.sh && exit 0
|
||||
fi
|
||||
|
||||
# Wait for an IP
|
||||
COUNT=0
|
||||
|
||||
@@ -968,7 +968,7 @@ function keymapMenu() {
|
||||
KEYMAP=${resp}
|
||||
writeConfigKey "layout" "${LAYOUT}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "keymap" "${KEYMAP}" "${USER_CONFIG_FILE}"
|
||||
zcat /usr/share/keymaps/i386/${LAYOUT}/${KEYMAP}.map.gz | loadkeys
|
||||
loadkeys /usr/share/keymaps/i386/${LAYOUT}/${KEYMAP}.map.gz
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
@@ -1162,7 +1162,7 @@ function updateMenu() {
|
||||
|
||||
if [ "x$1" = "xb" -a -n "${MODEL}" -a -n "${BUILD}" -a loaderIsConfigured ]; then
|
||||
make
|
||||
boot
|
||||
boot && exit 0 || sleep 5
|
||||
fi
|
||||
# Main loop
|
||||
NEXT="m"
|
||||
@@ -1206,7 +1206,7 @@ while true; do
|
||||
i) synoinfoMenu; NEXT="v" ;;
|
||||
v) advancedMenu; NEXT="d" ;;
|
||||
d) make; NEXT="b" ;;
|
||||
b) boot ;;
|
||||
b) boot && exit 0 || sleep 5 ;;
|
||||
k) keymapMenu ;;
|
||||
c) dialog --backtitle "`backtitle`" --title "Cleaning" --aspect 18 \
|
||||
--prgbox "rm -rfv \"${CACHE_PATH}/dl\"" 0 0 ;;
|
||||
@@ -1216,4 +1216,3 @@ while true; do
|
||||
done
|
||||
clear
|
||||
echo -e "Call \033[1;32mmenu.sh\033[0m to return to menu"
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ synoinfo: &synoinfo
|
||||
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json"
|
||||
#supportraidgroup: "no"
|
||||
cmdline: &cmdline
|
||||
intel_iommu: igfx_off
|
||||
HddEnableDynamicPower: 1
|
||||
|
||||
@@ -6,6 +6,7 @@ synoinfo: &synoinfo
|
||||
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json"
|
||||
#supportraidgroup: "no"
|
||||
cmdline: &cmdline
|
||||
SMBusHddDynamicPower: 1
|
||||
syno_hdd_powerup_seq: 0
|
||||
|
||||
@@ -2,12 +2,12 @@ id: "DS2422+"
|
||||
synoinfo: &synoinfo
|
||||
support_disk_compatibility: "no"
|
||||
support_memory_compatibility: "no"
|
||||
supportraidgroup: "no"
|
||||
supportssdcache: "no"
|
||||
support_led_brightness_adjustment: "no"
|
||||
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json"
|
||||
#supportraidgroup: "no"
|
||||
cmdline: &cmdline
|
||||
SMBusHddDynamicPower: 1
|
||||
vender_format_version: 2
|
||||
|
||||
@@ -2,13 +2,13 @@ id: "DS3615xs"
|
||||
synoinfo: &synoinfo
|
||||
support_disk_compatibility: "no"
|
||||
support_memory_compatibility: "no"
|
||||
supportraidgroup: "no"
|
||||
supportssdcache: "no"
|
||||
esataportcfg: "0x0"
|
||||
usbportcfg: "0x8700"
|
||||
support_led_brightness_adjustment: "no"
|
||||
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
#supportraidgroup: "no"
|
||||
cmdline: &cmdline
|
||||
syno_hdd_powerup_seq: 0
|
||||
HddHotplug: 0
|
||||
|
||||
@@ -2,13 +2,13 @@ id: "DS3617xs"
|
||||
synoinfo: &synoinfo
|
||||
support_disk_compatibility: "no"
|
||||
support_memory_compatibility: "no"
|
||||
supportraidgroup: "no"
|
||||
supportssdcache: "no"
|
||||
esataportcfg: "0x00"
|
||||
usbportcfg: "0x8700"
|
||||
support_led_brightness_adjustment: "no"
|
||||
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
#supportraidgroup: "no"
|
||||
cmdline: &cmdline
|
||||
syno_hdd_powerup_seq: 0
|
||||
HddHotplug: 0
|
||||
|
||||
@@ -2,7 +2,6 @@ id: "DS3622xs+"
|
||||
synoinfo: &synoinfo
|
||||
support_disk_compatibility: "no"
|
||||
support_memory_compatibility: "no"
|
||||
supportraidgroup: "no"
|
||||
esataportcfg: "0x00"
|
||||
support_bde_internal_10g: "no"
|
||||
support_oob_ctl: "no"
|
||||
@@ -10,6 +9,7 @@ synoinfo: &synoinfo
|
||||
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml" # http://update7.synology.com/autoupdate/genRSS.php
|
||||
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml" # https://update7.synology.com/autoupdate/genRSS.php
|
||||
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json" # https://update7.synology.com/autoupdate/v2/getList
|
||||
#supportraidgroup: "no"
|
||||
cmdline: &cmdline
|
||||
syno_hdd_powerup_seq: 0
|
||||
HddHotplug: 0
|
||||
|
||||
@@ -9,7 +9,8 @@ synoinfo: &synoinfo
|
||||
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json"
|
||||
#support_ssd_cache: yes
|
||||
#support_ssd_cache: "yes"
|
||||
#supportraidgroup: "no"
|
||||
cmdline: &cmdline
|
||||
syno_hdd_powerup_seq: 0
|
||||
HddHotplug: 0
|
||||
|
||||
@@ -6,6 +6,7 @@ synoinfo: &synoinfo
|
||||
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json"
|
||||
#supportraidgroup: "no"
|
||||
cmdline: &cmdline
|
||||
intel_iommu: "igfx_off"
|
||||
HddEnableDynamicPower: 1
|
||||
|
||||
@@ -6,6 +6,7 @@ synoinfo: &synoinfo
|
||||
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json"
|
||||
#supportraidgroup: "no"
|
||||
cmdline: &cmdline
|
||||
SMBusHddDynamicPower: 1
|
||||
synoboot2:
|
||||
@@ -20,10 +21,7 @@ dom: 2
|
||||
dt: true
|
||||
serial:
|
||||
prefix:
|
||||
- "2030"
|
||||
- "2040"
|
||||
- "20C0"
|
||||
- "2150"
|
||||
- "2270"
|
||||
middle: "TQR"
|
||||
suffix: "alpha"
|
||||
disks: 4
|
||||
|
||||
@@ -7,6 +7,7 @@ synoinfo: &synoinfo
|
||||
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json"
|
||||
#supportraidgroup: "no"
|
||||
cmdline: &cmdline
|
||||
intel_iommu: "igfx_off"
|
||||
HddEnableDynamicPower: 1
|
||||
|
||||
@@ -10,6 +10,7 @@ synoinfo: &synoinfo
|
||||
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json"
|
||||
#supportraidgroup: "no"
|
||||
cmdline: &cmdline
|
||||
syno_hdd_powerup_seq: 0
|
||||
HddHotplug: 0
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
id: "DVA3221"
|
||||
synoinfo: &synoinfo
|
||||
support_disk_compatibility: "no"
|
||||
support_memory_compatibility: "no"
|
||||
support_memory_compatibility: "yes"
|
||||
esataportcfg: "0x00"
|
||||
support_bde_internal_10g: "no"
|
||||
support_led_brightness_adjustment: "no"
|
||||
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json"
|
||||
#supportraidgroup: "no"
|
||||
cmdline: &cmdline
|
||||
syno_hdd_powerup_seq: 0
|
||||
HddHotplug: 0
|
||||
|
||||
@@ -6,6 +6,7 @@ synoinfo: &synoinfo
|
||||
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json"
|
||||
#supportraidgroup: "no"
|
||||
cmdline: &cmdline
|
||||
intel_iommu: igfx_off
|
||||
SMBusHddDynamicPower: 1
|
||||
|
||||
@@ -6,10 +6,10 @@ synoinfo: &synoinfo
|
||||
esataportcfg: "0x0"
|
||||
support_led_brightness_adjustment: "no"
|
||||
support_syno_hybrid_raid: "yes"
|
||||
supportraidgroup: "no"
|
||||
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json"
|
||||
#supportraidgroup: "no"
|
||||
cmdline: &cmdline
|
||||
syno_hdd_powerup_seq: 0
|
||||
HddHotplug: 0
|
||||
@@ -23,8 +23,8 @@ beta: true
|
||||
dom: 2
|
||||
serial:
|
||||
prefix:
|
||||
- "0000"
|
||||
middle: "XXX"
|
||||
- "2250"
|
||||
middle: "T2R"
|
||||
suffix: "alpha"
|
||||
disks: 16
|
||||
dt: false
|
||||
|
||||
@@ -6,6 +6,7 @@ synoinfo: &synoinfo
|
||||
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
|
||||
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json"
|
||||
#supportraidgroup: "no"
|
||||
cmdline: &cmdline
|
||||
SMBusHddDynamicPower: 1
|
||||
synoboot2:
|
||||
|
||||
@@ -32,6 +32,8 @@ MODEL="`readConfigKey "model" "${USER_CONFIG_FILE}"`"
|
||||
BUILD="`readConfigKey "build" "${USER_CONFIG_FILE}"`"
|
||||
LKM="`readConfigKey "lkm" "${USER_CONFIG_FILE}"`"
|
||||
SN="`readConfigKey "sn" "${USER_CONFIG_FILE}"`"
|
||||
LAYOUT="`readConfigKey "layout" "${USER_CONFIG_FILE}"`"
|
||||
KEYMAP="`readConfigKey "keymap" "${USER_CONFIG_FILE}"`"
|
||||
|
||||
if [ ${BUILD} -ne ${buildnumber} ]; then
|
||||
echo -e "\033[A\n\033[1;32mBuild number changed from \033[1;31m${BUILD}\033[1;32m to \033[1;31m${buildnumber}\033[0m"
|
||||
@@ -130,9 +132,14 @@ echo -n "."
|
||||
mkdir -p "${RAMDISK_PATH}/addons"
|
||||
echo "#!/bin/sh" > "${RAMDISK_PATH}/addons/addons.sh"
|
||||
echo 'echo "addons.sh called with params ${@}"' >> "${RAMDISK_PATH}/addons/addons.sh"
|
||||
echo "export PLATFORM=${PLATFORM}" >> "${RAMDISK_PATH}/addons/addons.sh"
|
||||
echo "export MODEL=${MODEL}" >> "${RAMDISK_PATH}/addons/addons.sh"
|
||||
echo "export BUILD=${BUILD}" >> "${RAMDISK_PATH}/addons/addons.sh"
|
||||
echo "export LAYOUT=${LAYOUT}" >> "${RAMDISK_PATH}/addons/addons.sh"
|
||||
echo "export KEYMAP=${KEYMAP}" >> "${RAMDISK_PATH}/addons/addons.sh"
|
||||
chmod +x "${RAMDISK_PATH}/addons/addons.sh"
|
||||
|
||||
# Required addons: eudev, dtbpatch/maxdisks, powersched
|
||||
# Required addons: eudev, dtbpatch/maxdisks, wol
|
||||
installAddon eudev
|
||||
echo "/addons/eudev.sh \${1} " >> "${RAMDISK_PATH}/addons/addons.sh" 2>"${LOG_FILE}" || dieLog
|
||||
if [ "${DT}" = "true" ]; then
|
||||
@@ -142,8 +149,8 @@ else
|
||||
installAddon maxdisks
|
||||
echo "/addons/maxdisks.sh \${1} ${MAXDISKS}" >> "${RAMDISK_PATH}/addons/addons.sh" 2>"${LOG_FILE}" || dieLog
|
||||
fi
|
||||
installAddon powersched
|
||||
echo "/addons/powersched.sh \${1} " >> "${RAMDISK_PATH}/addons/addons.sh" 2>"${LOG_FILE}" || dieLog
|
||||
installAddon wol
|
||||
echo "/addons/wol.sh \${1} " >> "${RAMDISK_PATH}/addons/addons.sh" 2>"${LOG_FILE}" || dieLog
|
||||
# User addons
|
||||
for ADDON in ${!ADDONS[@]}; do
|
||||
PARAMS=${ADDONS[${ADDON}]}
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.0-beta11a
|
||||
1.0-beta13a
|
||||
|
||||
@@ -14,6 +14,19 @@ insmod ext2
|
||||
set default="boot"
|
||||
set timeout="5"
|
||||
set timeout_style="menu"
|
||||
set vesa_mode=1
|
||||
|
||||
if [ -s $prefix/grubenv ]; then
|
||||
load_env
|
||||
fi
|
||||
if [ "${next_entry}" ]; then
|
||||
set default="${next_entry}"
|
||||
unset next_entry
|
||||
save_env next_entry
|
||||
fi
|
||||
if [ "${vesa_mode}" ]; then
|
||||
set vesa_mode=${vesa_mode}
|
||||
fi
|
||||
|
||||
function load_video {
|
||||
if [ x$feature_all_video_module = xy ]; then
|
||||
@@ -30,45 +43,36 @@ function load_video {
|
||||
}
|
||||
|
||||
load_video
|
||||
if loadfont unicode ; then
|
||||
if loadfont unicode; then
|
||||
set gfxmode=auto
|
||||
insmod gfxterm
|
||||
#set gfxpayload=800x600
|
||||
terminal_output gfxterm
|
||||
fi
|
||||
|
||||
set menu_color_normal=light-cyan/blue
|
||||
set menu_color_highlight=white/blue
|
||||
set menu_color_normal=light-green/blue
|
||||
set menu_color_highlight=black/green
|
||||
|
||||
if serial --unit=0 --speed=115200; then
|
||||
terminal_input --append serial_com0
|
||||
terminal_output --append serial_com0
|
||||
fi
|
||||
|
||||
if [ -s $prefix/grubenv ]; then
|
||||
load_env
|
||||
fi
|
||||
if [ "${default}" ]; then
|
||||
set default="${default}"
|
||||
fi
|
||||
if [ "${next_entry}" ]; then
|
||||
set default="${next_entry}"
|
||||
set next_entry=
|
||||
save_env next_entry
|
||||
fi
|
||||
|
||||
if serial --unit=0 --speed=115200; then
|
||||
terminal_input --append serial_com0
|
||||
terminal_output --append serial_com0
|
||||
fi
|
||||
function set_gfxpayload {
|
||||
if [ ${vesa_mode} -eq 1 ]; then
|
||||
set gfxpayload=keep
|
||||
else
|
||||
set gfxpayload=text
|
||||
fi
|
||||
}
|
||||
|
||||
set TERM=tty2
|
||||
|
||||
search --set=root --label "ARPL3"
|
||||
if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
|
||||
if [ "${default}" = "direct" ]; then
|
||||
set timeout="1"
|
||||
menuentry 'Boot DSM kernel directly' --id direct {
|
||||
load_video
|
||||
set_gfxpayload
|
||||
echo "Loading DSM kernel..."
|
||||
linux /zImage-dsm console=ttyS0,115200n8 earlyprintk log_buf_len=32M earlycon=uart8250,io,0x3f8,115200n8 root=/dev/md0 loglevel=15 ${dsm_cmdline}
|
||||
echo "Loading DSM initramfs..."
|
||||
@@ -77,7 +81,7 @@ if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
|
||||
}
|
||||
fi
|
||||
menuentry 'Boot DSM' --id boot {
|
||||
load_video
|
||||
set_gfxpayload
|
||||
echo "Loading kernel..."
|
||||
linux /bzImage-arpl console=${TERM} net.ifnames=0
|
||||
echo "Loading initramfs..."
|
||||
@@ -85,22 +89,35 @@ if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
|
||||
echo "Booting..."
|
||||
}
|
||||
menuentry 'Force re-install DSM' --id junior {
|
||||
load_video
|
||||
set_gfxpayload
|
||||
echo "Loading kernel..."
|
||||
linux /bzImage-arpl console=${TERM} net.ifnames=0 force_junior
|
||||
echo "Loading initramfs..."
|
||||
initrd /initrd-arpl
|
||||
echo "Booting..."
|
||||
}
|
||||
else
|
||||
set timeout="1"
|
||||
fi
|
||||
|
||||
menuentry 'Configure loader' --id config {
|
||||
load_video
|
||||
set_gfxpayload
|
||||
echo "Loading kernel..."
|
||||
linux /bzImage-arpl console=${TERM} net.ifnames=0 IWANTTOCHANGETHECONFIG
|
||||
echo "Loading initramfs..."
|
||||
initrd /initrd-arpl
|
||||
echo "Booting..."
|
||||
}
|
||||
|
||||
if [ ${vesa_mode} = 1 ]; then
|
||||
menuentry 'Change vesa to text video mode' --id videomode {
|
||||
set vesa_mode=0
|
||||
save_env vesa_mode
|
||||
configfile ${prefix}/grub.cfg
|
||||
}
|
||||
else
|
||||
menuentry 'Change text to vesa video mode' --id videomode {
|
||||
set vesa_mode=1
|
||||
save_env vesa_mode
|
||||
reboot
|
||||
configfile ${prefix}/grub.cfg
|
||||
}
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user