Skip to content

Commit

Permalink
Adding experimental RS4021xs+ support
Browse files Browse the repository at this point in the history
  • Loading branch information
pocopico committed Sep 27, 2022
1 parent f3f5c28 commit 0ffd048
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
newrploader.sh
62 changes: 62 additions & 0 deletions custom_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,68 @@
}
]
},
{
"id": "rs4021xsp-7.1.0-42661",
"platform_version": "rs4021xsp-7.1.0-42661",
"user_config_json": "rs4021xsp_user_config-test.json",
"docker_base_image": "debian:8-slim",
"redpill_lkm_make_target": "dev-v7",
"compile_with": "toolkit_dev",
"downloads": {
"kernel": {
"url": "https://sourceforge.net/projects/dsgpl/files/Synology%20NAS%20GPL%20Source/25426branch/broadwellnk-source/linux-4.4.x.txz/download",
"sha256": "d3e85eb80f16a83244fcae6016ab6783cd8ac55e3af2b4240455261396e1e1be"
},
"toolkit_dev": {
"url": "https://sourceforge.net/projects/dsgpl/files/toolkit/DSM7.0/ds.broadwellnk-7.0.dev.txz/download",
"sha256": "0d9edca67d9e7e14c2529bbb58341b623936124d5264f71f1e4acbacf3ea202d"
}
},
"redpill_lkm": {
"source_url": "https://github.com/pocopico/redpill-lkm.git",
"branch": "master"
},
"redpill_load": {
"source_url": "https://github.com/pocopico/redpill-load.git",
"branch": "develop"
},
"add_extensions": [
{
"redpill-misc": "https://github.com/pocopico/redpill-load/raw/develop/redpill-misc/rpext-index.json"
}
]
},
{
"id": "rs4021xsp-7.1.1-42962",
"platform_version": "rs4021xsp-7.1.1-42962",
"user_config_json": "rs4021xsp_user_config-test.json",
"docker_base_image": "debian:8-slim",
"redpill_lkm_make_target": "dev-v7",
"compile_with": "toolkit_dev",
"downloads": {
"kernel": {
"url": "https://sourceforge.net/projects/dsgpl/files/Synology%20NAS%20GPL%20Source/25426branch/broadwellnk-source/linux-4.4.x.txz/download",
"sha256": "d3e85eb80f16a83244fcae6016ab6783cd8ac55e3af2b4240455261396e1e1be"
},
"toolkit_dev": {
"url": "https://sourceforge.net/projects/dsgpl/files/toolkit/DSM7.0/ds.broadwellnk-7.0.dev.txz/download",
"sha256": "0d9edca67d9e7e14c2529bbb58341b623936124d5264f71f1e4acbacf3ea202d"
}
},
"redpill_lkm": {
"source_url": "https://github.com/pocopico/redpill-lkm.git",
"branch": "master"
},
"redpill_load": {
"source_url": "https://github.com/pocopico/redpill-load.git",
"branch": "develop"
},
"add_extensions": [
{
"redpill-misc": "https://github.com/pocopico/redpill-load/raw/develop/redpill-misc/rpext-index.json"
}
]
},
{
"id": "v1000-7.0.1-42218",
"platform_version": "v1000-7.0.1-42218",
Expand Down
30 changes: 22 additions & 8 deletions rploader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
#
# Author :
# Date : 220914
# Version : 0.9.2.4
# Version : 0.9.2.5
#
#
# User Variables :

rploaderver="0.9.2.4"
rploaderver="0.9.2.5"
build="main"
redpillmake="prod"

Expand Down Expand Up @@ -81,6 +81,7 @@ function history() {
0.9.2.2 Upgrade your system by adding TCRP Friend with command bringfriend
0.9.2.3 Adding experimental DS2422+ support
0.9.2.4 Added the redpillmake variable to select between prod and dev modules
0.9.2.5 Adding experimental RS4021xs+ support
--------------------------------------------------------------------------------------
EOF

Expand Down Expand Up @@ -231,7 +232,7 @@ function syntaxcheck() {

serialgen)
echo "Syntax error, You have to specify one of the existing models"
echo "DS3615xs DS3617xs DS916+ DS918+ DS920+ DS3622xs+ FS6400 DVA3219 DVA3221 DS1621+ DVA1622 DS2422+"
echo "DS3615xs DS3617xs DS916+ DS918+ DS920+ DS3622xs+ FS6400 DVA3219 DVA3221 DS1621+ DVA1622 DS2422+ RS4021xs+"
;;

patchdtc)
Expand Down Expand Up @@ -425,6 +426,8 @@ function processpat() {
SYNOMODEL="dva1622_$TARGET_REVISION" && MODEL="DVA1622"
elif [ "${TARGET_PLATFORM}" = "ds2422p" ]; then
SYNOMODEL="ds2422p_$TARGET_REVISION" && MODEL="DS2422+"
elif [ "${TARGET_PLATFORM}" = "rs4021xsp" ]; then
SYNOMODEL="rs4021xsp_$TARGET_REVISION" && MODEL="RS4021xs+"
fi

if [ ! -d "${temp_pat_folder}" ]; then
Expand Down Expand Up @@ -575,7 +578,7 @@ function addrequiredexts() {
cd /home/tc/redpill-load/ && ./ext-manager.sh _update_platform_exts ${SYNOMODEL} ${extension}
done

if [ ${TARGET_PLATFORM} = "geminilake" ] || [ ${TARGET_PLATFORM} = "v1000" ] || [ ${TARGET_PLATFORM} = "dva1622" ] || [ ${TARGET_PLATFORM} = "ds2422p" ]; then
if [ ${TARGET_PLATFORM} = "geminilake" ] || [ ${TARGET_PLATFORM} = "v1000" ] || [ ${TARGET_PLATFORM} = "dva1622" ] || [ ${TARGET_PLATFORM} = "ds2422p" ] || [ ${TARGET_PLATFORM} = "rs4021xsp" ]; then
#patchdtc
echo "Patch dtc is superseded by fbelavenuto dtbpatch"
fi
Expand Down Expand Up @@ -1882,7 +1885,7 @@ function serialgen() {

[ "$2" == "realmac" ] && let keepmac=1 || let keepmac=0

if [ "$1" = "DS3615xs" ] || [ "$1" = "DS3617xs" ] || [ "$1" = "DS916+" ] || [ "$1" = "DS918+" ] || [ "$1" = "DS920+" ] || [ "$1" = "DS3622xs+" ] || [ "$1" = "FS6400" ] || [ "$1" = "DVA3219" ] || [ "$1" = "DVA3221" ] || [ "$1" = "DS1621+" ] || [ "$1" = "DVA1622" ] || [ "$1" = "DS2422+" ]; then
if [ "$1" = "DS3615xs" ] || [ "$1" = "DS3617xs" ] || [ "$1" = "DS916+" ] || [ "$1" = "DS918+" ] || [ "$1" = "DS920+" ] || [ "$1" = "DS3622xs+" ] || [ "$1" = "FS6400" ] || [ "$1" = "DVA3219" ] || [ "$1" = "DVA3221" ] || [ "$1" = "DS1621+" ] || [ "$1" = "DVA1622" ] || [ "$1" = "DS2422+" ] || [ "$1" = "RS4021xs+" ]; then
serial="$(generateSerial $1)"
mac="$(generateMacAddress $1)"
realmac=$(ifconfig eth0 | head -1 | awk '{print $NF}')
Expand Down Expand Up @@ -1916,7 +1919,7 @@ function serialgen() {
fi
else
echo "Error : $1 is not an available model for serial number generation. "
echo "Available Models : DS3615xs DS3617xs DS916+ DS918+ DS920+ DS3622xs+ FS6400 DVA3219 DVA3221 DS1621+ DVA1622 DS2422+"
echo "Available Models : DS3615xs DS3617xs DS916+ DS918+ DS920+ DS3622xs+ FS6400 DVA3219 DVA3221 DS1621+ DVA1622 DS2422+ RS4021xs+"
fi

}
Expand Down Expand Up @@ -1972,6 +1975,10 @@ function beginArray() {
permanent="S7R"
serialstart="2080"
;;
RS4021xs+)
permanent="SQR"
serialstart="2030 2040 20C0 2150"
;;
esac

}
Expand Down Expand Up @@ -2050,6 +2057,9 @@ function generateSerial() {
DS2422+)
serialnum=$(toupper "$(echo "$serialstart" | tr ' ' '\n' | sort -R | tail -1)$permanent"$(generateRandomLetter)$(generateRandomValue)$(generateRandomValue)$(generateRandomValue)$(generateRandomValue)$(generateRandomLetter))
;;
RS4021xs+)
serialnum=$(toupper "$(echo "$serialstart" | tr ' ' '\n' | sort -R | tail -1)$permanent"$(generateRandomLetter)$(generateRandomValue)$(generateRandomValue)$(generateRandomValue)$(generateRandomValue)$(generateRandomLetter))
;;
esac

echo $serialnum
Expand Down Expand Up @@ -2316,7 +2326,7 @@ mountshare, version, monitor, help
- serialgen <synomodel> <option> :
Generates a serial number and mac address for the following platforms
DS3615xs DS3617xs DS916+ DS918+ DS920+ DS3622xs+ FS6400 DVA3219 DVA3221 DS1621+ DVA1622 DS2422+
DS3615xs DS3617xs DS916+ DS918+ DS920+ DS3622xs+ FS6400 DVA3219 DVA3221 DS1621+ DVA1622 DS2422+ RS4021xs+
Valid Options : realmac , keeps the real mac of interface eth0
Expand Down Expand Up @@ -2462,6 +2472,8 @@ function getstaticmodule() {
SYNOMODEL="dva1622_$TARGET_REVISION"
elif [ "${TARGET_PLATFORM}" = "ds2422p" ]; then
SYNOMODEL="ds2422p_$TARGET_REVISION" && MODEL="DS2422+"
elif [ "${TARGET_PLATFORM}" = "rs4021xsp" ]; then
SYNOMODEL="rs4021xsp_$TARGET_REVISION" && MODEL="RS4021xs+"
fi

echo "Looking for redpill for : $SYNOMODEL "
Expand Down Expand Up @@ -2884,7 +2896,7 @@ function getvars() {
KERNEL_MAJOR="3"
MODULE_ALIAS_FILE="modules.alias.3.json"
;;
apollolake | broadwell | broadwellnk | v1000 | denverton | geminilake | dva1622 | ds2422p)
apollolake | broadwell | broadwellnk | v1000 | denverton | geminilake | dva1622 | ds2422p | rs4021xsp)
KERNEL_MAJOR="4"
MODULE_ALIAS_FILE="modules.alias.4.json"
;;
Expand All @@ -2908,6 +2920,8 @@ function getvars() {
SYNOMODEL="dva1622_$TARGET_REVISION" && MODEL="DVA1622"
elif [ "${TARGET_PLATFORM}" = "ds2422p" ]; then
SYNOMODEL="ds2422p_$TARGET_REVISION" && MODEL="DS2422+"
elif [ "${TARGET_PLATFORM}" = "rs4021xsp" ]; then
SYNOMODEL="rs4021xsp_$TARGET_REVISION" && MODEL="RS4021xs+"
fi

#echo "Platform : $platform_selected"
Expand Down

0 comments on commit 0ffd048

Please sign in to comment.