Skip to content

Commit

Permalink
Some fixes and added support for new platform
Browse files Browse the repository at this point in the history
  • Loading branch information
pocopico committed Feb 15, 2022
1 parent cd4b155 commit b36b8b0
Show file tree
Hide file tree
Showing 9 changed files with 248 additions and 87 deletions.
28 changes: 28 additions & 0 deletions custom_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,34 @@
"branch": "develop"
}
},
{
"id": "broadwellink-7.0.1-42218",
"platform_version": "broadwellnk-7.0.1-42218",
"user_config_json": "broadwellnk_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/jumkey/redpill-lkm.git",
"branch": "develop"
},
"redpill_load": {
"source_url": "https://github.com/jumkey/redpill-load.git",
"branch": "develop"
}
},

{
"id": "apollolake-7.0-41890",
"platform_version": "apollolake-7.0-41890",
Expand Down
Binary file added modules.alias.3.json.gz
Binary file not shown.
Binary file renamed modules.alias.json.gz → modules.alias.4.json.gz
Binary file not shown.
235 changes: 165 additions & 70 deletions rpext-index.json

Large diffs are not rendered by default.

56 changes: 43 additions & 13 deletions rploader.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/bash
#
# Author :
# Date : 22011002
# Version : 0.4.4
# Date : 22020215
# Version : 0.4.5
#
#
# User Variables :

rploaderver="0.4.4"
rploaderver="0.4.5"
rploaderepo="https://github.com/pocopico/tinycore-redpill/raw/main/rploader.sh"

redpillextension="https://github.com/pocopico/rp-ext/raw/main/redpill/rpext-index.json"
Expand Down Expand Up @@ -233,7 +233,7 @@ fi

function serialgen(){

if [ "$1" = "DS3615xs" ] || [ "$1" = "DS3617xs" ] || [ "$1" = "DS916+" ] || [ "$1" = "DS918+" ] || [ "$1" = "DS920+" ] || [ "$1" = "DVA3219" ] || [ "$1" = "DVA3221" ] ; then
if [ "$1" = "DS3615xs" ] || [ "$1" = "DS3617xs" ] || [ "$1" = "DS916+" ] || [ "$1" = "DS918DS918+" ] || [ "$1" = "DS920+" ] || [ "$1" = "DS3622xs+" ] || [ "$1" = "DVA3219" ] || [ "$1" = "DVA3221" ] ; then
serial="$(generateSerial $1)"
mac="$(generateMacAddress $1)"
echo "Serial Number for Model : $serial"
Expand All @@ -251,7 +251,7 @@ function serialgen(){

else
echo "Error : $2 is not an available model for serial number generation. "
echo "Available Models : DS3615xs DS3617xs DS916+ DS918+ DS920+ DVA3219 DVA3221"
echo "Available Models : DS3615xs DS3617xs DS916+ DS918+ DS920+ DS3622xs+ DVA3219 DVA3221"
fi

}
Expand Down Expand Up @@ -282,6 +282,10 @@ DS920+)
permanent="SBR"
serialstart="2030 2040 20C0 2150"
;;
DS3622xs+)
permanent="SQR"
serialstart="2030 2040 20C0 2150"
;;
DVA3219)
permanent="RFR"
serialstart="1930 1940"
Expand Down Expand Up @@ -352,6 +356,9 @@ serialnum="`echo "$serialstart" | tr ' ' '\n' | sort -R | tail -1`$permanent"$(
DS920+)
serialnum=$(toupper "`echo "$serialstart" | tr ' ' '\n' | sort -R | tail -1`$permanent"$(generateRandomLetter)$(generateRandomValue)$(generateRandomValue)$(generateRandomValue)$(generateRandomValue)$(generateRandomLetter))
;;
DS3622xs+)
serialnum=$(toupper "`echo "$serialstart" | tr ' ' '\n' | sort -R | tail -1`$permanent"$(generateRandomLetter)$(generateRandomValue)$(generateRandomValue)$(generateRandomValue)$(generateRandomValue)$(generateRandomLetter))
;;
DVA3219)
serialnum=$(toupper "`echo "$serialstart" | tr ' ' '\n' | sort -R | tail -1`$permanent"$(generateRandomLetter)$(generateRandomValue)$(generateRandomValue)$(generateRandomValue)$(generateRandomValue)$(generateRandomLetter))
;;
Expand Down Expand Up @@ -581,7 +588,7 @@ Actions: build, ext, download, clean, update, listmod, serialgen, identifyusb, s
- serialgen: Generates a serial number and mac address for the following platforms
DS3615xs DS3617xs DS916+ DS918+ DS920+ DVA3219 DVA3221
DS3615xs DS3617xs DS916+ DS918+ DS920+ DS3622xs+ DVA3219 DVA3221
- identifyusb: Tries to identify your loader usb stick VID:PID and updates the user_config.json file
Expand Down Expand Up @@ -654,6 +661,8 @@ function getstaticmodule() {
SYNOMODEL="ds3615xs_$TARGET_REVISION"
elif [ "${TARGET_PLATFORM}" = "broadwell" ] ; then
SYNOMODEL="ds3617xs_$TARGET_REVISION"
elif [ "${TARGET_PLATFORM}" = "broadwellnk" ] ; then
SYNOMODEL="ds3622xs+_$TARGET_REVISION"
fi

echo "Looking for redpill for : $SYNOMODEL "
Expand Down Expand Up @@ -725,6 +734,8 @@ function buildloader() {
SYNOMODEL="DS3615xs"
elif [ "${TARGET_PLATFORM}" = "broadwell" ] ; then
SYNOMODEL="DS3617xs"
elif [ "${TARGET_PLATFORM}" = "broadwellnk" ] ; then
SYNOMODEL="DS3622xs+"
fi


Expand Down Expand Up @@ -896,6 +907,21 @@ function getvars() {
showhelp
exit 99
fi

case $TARGET_PLATFORM in

bromolow)
KERNEL_MAJOR="3"
MODULE_ALIAS_FILE="modules.alias.3.json"
;;
apollolake | broadwell | broadwellnk )
KERNEL_MAJOR="4"
MODULE_ALIAS_FILE="modules.alias.4.json"
;;

esac



#echo "Platform : $platform_selected"
echo "Loader source : $LD_SOURCE_URL Loader Branch : $LD_BRANCH "
Expand All @@ -911,7 +937,8 @@ function getvars() {
echo "TARGET_VERSION : $TARGET_VERSION"
echo "TARGET_REVISION : $TARGET_REVISION"
echo "REDPILL_LKM_MAKE_TARGET : $REDPILL_LKM_MAKE_TARGET"

echo "KERNEL_MAJOR : $KERNEL_MAJOR"
echo "MODULE_ALIAS_FILE= $MODULE_ALIAS_FILE"
}

function matchpciidmodule() {
Expand All @@ -923,7 +950,7 @@ function matchpciidmodule() {

#jq -e -r ".modules[] | select(.alias | test(\"(?i)${1}\")?) | .name " modules.alias.json
# Correction to work with tinycore jq
matchedmodule=`jq -e -r ".modules[] | select(.alias | contains(\"${pciid}\")?) | .name " modules.alias.json`
matchedmodule=`jq -e -r ".modules[] | select(.alias | contains(\"${pciid}\")?) | .name " $MODULE_ALIAS_FILE `

# Call listextensions for extention matching

Expand Down Expand Up @@ -1023,20 +1050,20 @@ function getmodaliasfile() {

function listmodules() {

if [ ! -f modules.alias.json ] ; then
if [ ! -f $MODULE_ALIAS_FILE ] ; then
echo "Creating module alias json file"
getmodaliasfile > modules.alias.json
getmodaliasfile > modules.alias.4.json
fi

echo -n "Testing modules.alias.json -> "
if `jq '.' modules.alias.json > /dev/null` ; then
echo -n "Testing $MODULE_ALIAS_FILE -> "
if `jq '.' $MODULE_ALIAS_FILE > /dev/null` ; then
echo "File OK"
echo "------------------------------------------------------------------------------------------------"
echo -e "It looks that you will need the following modules : \n\n"
listpci
echo "------------------------------------------------------------------------------------------------"
else
echo "Error : File modules.alias.json could not be parsed"
echo "Error : File $MODULE_ALIAS_FILE could not be parsed"
fi

}
Expand Down Expand Up @@ -1154,6 +1181,9 @@ case $1 in
;;

listmods)
getvars $2
checkinternet
gitdownload
listmodules
echo "$extensionslist"
;;
Expand Down
13 changes: 10 additions & 3 deletions serialnumbergen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ DS920+)
permanent="SBR"
serialstart="2030 2040 20C0 2150"
;;
DS3622xsp)
permanent="SQR"
serialstart="2030 2040 20C0 2150"
;;
DVA3219)
permanent="RFR"
serialstart="1930 1940"
Expand Down Expand Up @@ -96,6 +100,9 @@ serialnum="`echo "$serialstart" | tr ' ' '\n' | sort -R | tail -1`$permanent"$(
DS920+)
serialnum=$(toupper "`echo "$serialstart" | tr ' ' '\n' | sort -R | tail -1`$permanent"$(generateRandomLetter)$(generateRandomValue)$(generateRandomValue)$(generateRandomValue)$(generateRandomValue)$(generateRandomLetter))
;;
DS3622xsp)
serialnum=$(toupper "`echo "$serialstart" | tr ' ' '\n' | sort -R | tail -1`$permanent"$(generateRandomLetter)$(generateRandomValue)$(generateRandomValue)$(generateRandomValue)$(generateRandomValue)$(generateRandomLetter))
;;
DVA3219)
serialnum=$(toupper "`echo "$serialstart" | tr ' ' '\n' | sort -R | tail -1`$permanent"$(generateRandomLetter)$(generateRandomValue)$(generateRandomValue)$(generateRandomValue)$(generateRandomValue)$(generateRandomLetter))
;;
Expand All @@ -120,7 +127,7 @@ Usage: ${0} <platform>
Available platforms :
----------------------------------------------------------------------------------------
DS3615xs DS3617xs DS916+ DS918+ DS920+ DVA3219 DVA3221
DS3615xs DS3617xs DS916+ DS918+ DS920+ DS3622xsp DVA3219 DVA3221
e.g. $(basename ${0}) DS3615xs
----------------------------------------------------------------------------------------
Expand All @@ -131,11 +138,11 @@ EOF
if [ -z "$1" ] ; then
showhelp
else
if [ "$1" = "DS3615xs" ] || [ "$1" = "DS3617xs" ] || [ "$1" = "DS916+" ] || [ "$1" = "DS918+" ] || [ "$1" = "DS920+" ] || [ "$1" = "DVA3219" ] || [ "$1" = "DVA3221" ] ; then
if [ "$1" = "DS3615xs" ] || [ "$1" = "DS3617xs" ] || [ "$1" = "DS916+" ] || [ "$1" = "DS918+" ] || [ "$1" = "DS920+" ] || [ "$1" = "DS3622xsp" ] || [ "$1" = "DVA3219" ] || [ "$1" = "DVA3221" ] ; then
echo "Generating a random mac address : " $(generateMacAddress)
echo "Generating a Serial Number for Model $1: " $(generateSerial $1)
else
echo "Error : $1 is not an available model for serial number generation. "
echo "Available Models : DS3615xs DS3617xs DS916+ DS918+ DS920+ DVA3219 DVA3221"
echo "Available Models : DS3615xs DS3617xs DS916+ DS918+ DS920+ DS3622xsp DVA3219 DVA3221"
fi
fi
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion user_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"synoinfo": {

"internalportcfg" : "0xffff",
"maxdisks" : "16"
"maxdisks" : "16",
"support_bde_internal_10g" : "no"

},
"ramdisk_copy": {
Expand Down

0 comments on commit b36b8b0

Please sign in to comment.