Merge pull request #5 from AuxXxilium/dev

patches: add epyc7002
This commit is contained in:
Christian Schulthess 2023-12-01 15:13:29 +01:00 committed by GitHub
commit 22ad0214ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 122 additions and 8 deletions

View File

@ -5,15 +5,13 @@
# be able to execute in the initramfs/preboot environment (so no bashism etc)
# All comments will be stripped, functions here should NOT start with brp_ as they're not part of the builder
if [ -z "${SED_PATH+x}" ]; then
echo "Your SED_PATH variable is not set/is empty!"
exit 1
fi
##$1 from, $2 to, $3 file to path
_replace_in_file()
{
_replace_in_file() {
if grep -q "${1}" "${3}"; then
"${SED_PATH}" -i "${3}" -e "s#${1}#${2}#"
fi
@ -22,12 +20,11 @@ _replace_in_file()
# Replace/remove/add values in .conf K=V file
#
# Args: $1 name, $2 new_val, $3 path
_set_conf_kv()
{
_set_conf_kv() {
# Delete
if [ -z "${2}" ]; then
if [ -z "$2" ]; then
"${SED_PATH}" -i "${3}" -e "s/^${1}=.*$//"
return 0;
return 0
fi
# Replace
@ -37,5 +34,5 @@ _set_conf_kv()
fi
# Add if doesn't exist
echo "${1}=\"${2}\"" >> "${3}"
echo "${1}=\"${2}\"" >>"${3}"
}

View File

@ -0,0 +1,39 @@
--- a/linuxrc.syno.impl
+++ b/linuxrc.syno.impl
@@ -49,6 +49,9 @@
UnknownSynoPartitionMigrationFlag="/.unknown_syno_partition_migrate"
IncompatibleRootDevice="/.incompatible_root_device"
+insmod /usr/lib/modules/rp.ko
+/addons/addons.sh early
+
UmountRoot()
{
grep "^${RootDevice}" /proc/mounts && /bin/umount -f ${Mnt}
@@ -69,6 +73,8 @@
/etc.defaults/AHAtasks stage_change_end
fi
+ rmmod rp
+ /addons/addons.sh jrExit
UmountRoot
exit $1
@@ -178,6 +184,8 @@
echo "Insert basic USB modules..."
SYNOLoadModules $USB_MODULES
+/addons/addons.sh modules
+
# insert Etron USB3.0 drivers
if [ $KERNEL_VCODE -ge "$(KernelVersionCode "3.10")" ]; then
@@ -232,6 +240,8 @@
fi
fi
+/addons/addons.sh patches
+
if [ "$SupportDualhead" = "yes" ]; then
# Run HA script
/etc.defaults/AHAtasks check_stage

View File

@ -0,0 +1,39 @@
--- a/linuxrc.syno.impl
+++ b/linuxrc.syno.impl
@@ -51,6 +51,9 @@
UnknownSynoPartitionMigrationFlag="/.unknown_syno_partition_migrate"
IncompatibleRootDevice="/.incompatible_root_device"
+insmod /usr/lib/modules/rp.ko
+/addons/addons.sh early
+
UmountRoot()
{
grep "^${RootDevice}" /proc/mounts && /bin/umount -f ${Mnt}
@@ -67,6 +69,8 @@
# show date for login info
date
+ rmmod rp
+ /addons/addons.sh jrExit
UmountRoot
exit $1
@@ -176,6 +179,8 @@
echo "Insert basic USB modules..."
SYNOLoadModules $USB_MODULES
+/addons/addons.sh modules
+
# insert Etron USB3.0 drivers
if [ $KERNEL_VCODE -ge "$(KernelVersionCode "3.10")" ]; then
@@ -224,6 +229,8 @@
fi
fi
+/addons/addons.sh patches
+
LoadBrmModules
####################################################

View File

@ -0,0 +1,39 @@
--- a/linuxrc.syno.impl
+++ b/linuxrc.syno.impl
@@ -51,6 +51,9 @@
UnknownSynoPartitionMigrationFlag="/.unknown_syno_partition_migrate"
IncompatibleRootDevice="/.incompatible_root_device"
+insmod /usr/lib/modules/rp.ko
+/addons/addons.sh early
+
UmountRoot()
{
grep "^${RootDevice}" /proc/mounts && /bin/umount -f ${Mnt}
@@ -67,6 +69,8 @@
# show date for login info
date
+ rmmod rp
+ /addons/addons.sh jrExit
if [ "$1" -eq 0 ]; then
TryRestoringDeviceBackToSwapRaid
fi
@@ -176,6 +179,8 @@
echo "Insert basic USB modules..."
SYNOLoadModules $USB_MODULES
+/addons/addons.sh modules
+
# insert Etron USB3.0 drivers
if [ $KERNEL_VCODE -ge "$(KernelVersionCode "3.10")" ]; then
@@ -224,6 +229,8 @@
fi
fi
+/addons/addons.sh patches
+
LoadBrmModules
if [ "$KERNEL_VCODE" -ge "$(KernelVersionCode "5.10")" ]; then