Compare commits

...

7 Commits

Author SHA1 Message Date
Ing
7c993227fc enable iommu 2024-07-26 18:00:15 +08:00
Ing
c6d3ac9c19 update lang 2024-07-26 15:32:53 +08:00
Ing
db6c5ec51c rmmod net and drm driver before kexec 2024-07-26 15:32:16 +08:00
Ing
90b1a0bda7 disable iommu, intremap 2024-07-26 15:28:39 +08:00
Ing
721ff4689c disable rx of all nic 2024-07-26 15:27:34 +08:00
Ing
a0fcc81a7d mdoify dialog maxxy 2024-07-26 15:25:20 +08:00
Ing
ae245567b7 fix inetd 2024-07-26 15:24:09 +08:00
20 changed files with 4765 additions and 4766 deletions

View File

@ -12,19 +12,6 @@ loaderIsConfigured || die "$(TEXT "Loader is not configured!")"
# Check if machine has EFI # Check if machine has EFI
[ -d /sys/firmware/efi ] && EFI=1 || EFI=0 [ -d /sys/firmware/efi ] && EFI=1 || EFI=0
# Proc open nvidia driver when booting
NVPCI_ADDR=$(lspci -nd 10de: | grep -e 0300 -e 0302 | awk '{print $1}')
if [ -n "${NVPCI_ADDR}" ]; then
modprobe -r nouveau || true
NVDEV_PATH=$(find /sys/devices -name *${NVPCI_ADDR} | grep -v supplier)
for DEV_PATH in ${NVDEV_PATH}
do
if [ -e ${DEV_PATH}/reset ]; then
echo 1 > ${DEV_PATH}/reset || true
fi
done
fi
BUS=$(getBus "${LOADER_DISK}") BUS=$(getBus "${LOADER_DISK}")
# Print text centralized # Print text centralized
@ -184,6 +171,9 @@ if [ "${DT}" = "true" ] && ! echo "epyc7002 purley broadwellnkv2" | grep -wq "${
fi fi
fi fi
# CMDLINE['kvm.ignore_msrs']="1"
# CMDLINE['kvm.report_ignored_msrs']="0"
if echo "apollolake geminilake" | grep -wq "${PLATFORM}"; then if echo "apollolake geminilake" | grep -wq "${PLATFORM}"; then
CMDLINE["intel_iommu"]="igfx_off" CMDLINE["intel_iommu"]="igfx_off"
fi fi
@ -317,7 +307,7 @@ else
[ -f "${TMP_PATH}/qrcode_qhxg.png" ] && echo | fbv -acufi "${TMP_PATH}/qrcode_qhxg.png" >/dev/null 2>/dev/null || true [ -f "${TMP_PATH}/qrcode_qhxg.png" ] && echo | fbv -acufi "${TMP_PATH}/qrcode_qhxg.png" >/dev/null 2>/dev/null || true
fi fi
# Executes DSM kernel via KEXEC # Executes DSM kernel via KEXEC
KEXECARGS="" KEXECARGS=""
if [ $(echo "${KVER:-4}" | cut -d'.' -f1) -lt 4 ] && [ ${EFI} -eq 1 ]; then if [ $(echo "${KVER:-4}" | cut -d'.' -f1) -lt 4 ] && [ ${EFI} -eq 1 ]; then
echo -e "\033[1;33m$(TEXT "Warning, running kexec with --noefi param, strange things will happen!!")\033[0m" echo -e "\033[1;33m$(TEXT "Warning, running kexec with --noefi param, strange things will happen!!")\033[0m"
@ -332,6 +322,17 @@ else
# Clear logs for dbgutils addons # Clear logs for dbgutils addons
rm -rf "${PART1_PATH}/logs" >/dev/null 2>&1 || true rm -rf "${PART1_PATH}/logs" >/dev/null 2>&1 || true
# Unload all network interfaces
for D in $(readlink /sys/class/net/*/device/driver); do rmmod -f "$(basename ${D})" 2>/dev/null || true; done
# Unload all graphics drivers
# for D in $(readlink /sys/class/drm/*/device/driver); do rmmod -f "$(basename ${D})" 2>/dev/null || true; done
for D in $(lsmod | grep -E '^(nouveau|amdgpu|radeon|i915)' | awk '{print $1}'); do rmmod -f "${D}" 2>/dev/null || true; done
for I in $(find /sys/devices -name uevent -exec bash -c 'cat {} 2>/dev/null | grep -Eq "PCI_CLASS=0?30[0|1|2]00" && dirname {}' \;); do
[ -e ${I}/reset ] && cat ${I}/vendor >/dev/null | grep -iq 0x10de && echo 1 >${I}/reset || true # Proc open nvidia driver when booting
done
# Reboot
KERNELWAY="$(readConfigKey "kernelway" "${USER_CONFIG_FILE}")" KERNELWAY="$(readConfigKey "kernelway" "${USER_CONFIG_FILE}")"
[ "${KERNELWAY}" = "kexec" ] && kexec -a -e || poweroff [ "${KERNELWAY}" = "kexec" ] && kexec -a -e || poweroff
exit 0 exit 0

View File

@ -100,6 +100,7 @@ if [ ! "LOCALBUILD" = "${LOADER_DISK}" ]; then
sleep 1 sleep 1
fi fi
[ "${ETH::3}" = "eth" ] && ethtool -s ${ETH} wol g 2>/dev/null || true [ "${ETH::3}" = "eth" ] && ethtool -s ${ETH} wol g 2>/dev/null || true
[ "${ETH::3}" = "eth" ] && ethtool -K ${ETH} rxhash off 2>/dev/null || true
done done
fi fi

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -897,10 +897,8 @@ function cmdlineMenu() {
while read -r line; do LINENUM=$((LINENUM + 1 + ${#line} / 96)); done <<<"$(printf "${MSG}")" # When the width is 100, each line displays 96 characters. while read -r line; do LINENUM=$((LINENUM + 1 + ${#line} / 96)); done <<<"$(printf "${MSG}")" # When the width is 100, each line displays 96 characters.
LINENUM=$((${LINENUM:-0} + 9)) # When there are 2 parameters, 9 is the minimum value to include 1 line of MSG. LINENUM=$((${LINENUM:-0} + 9)) # When there are 2 parameters, 9 is the minimum value to include 1 line of MSG.
dialog --print-maxsize 2>"${TMP_PATH}/maxsize" DIALOG_MAXX=$(ttysize 2>/dev/null | awk '{print $1}')
DIALOG_MAXX=$(cat "${TMP_PATH}/maxsize" 2>/dev/null | grep "MaxSize" | awk -F: '{print $2}' | cut -d, -f2 | xargs) DIALOG_MAXY=$(ttysize 2>/dev/null | awk '{print $2}')
DIALOG_MAXY=$(cat "${TMP_PATH}/maxsize" 2>/dev/null | grep "MaxSize" | awk -F: '{print $2}' | cut -d, -f1 | xargs)
if [ ${LINENUM:-0} -ge ${DIALOG_MAXY:-0} ]; then if [ ${LINENUM:-0} -ge ${DIALOG_MAXY:-0} ]; then
MSG="$(TEXT "Please enter the parameter key and value you need to add.\n")" MSG="$(TEXT "Please enter the parameter key and value you need to add.\n")"
LINENUM=9 LINENUM=9
@ -1044,10 +1042,8 @@ function synoinfoMenu() {
while read -r line; do LINENUM=$((LINENUM + 1 + ${#line} / 96)); done <<<"$(printf "${MSG}")" # When the width is 100, each line displays 96 characters. while read -r line; do LINENUM=$((LINENUM + 1 + ${#line} / 96)); done <<<"$(printf "${MSG}")" # When the width is 100, each line displays 96 characters.
LINENUM=$((${LINENUM:-0} + 9)) # When there are 2 parameters, 9 is the minimum value to include 1 line of MSG. LINENUM=$((${LINENUM:-0} + 9)) # When there are 2 parameters, 9 is the minimum value to include 1 line of MSG.
dialog --print-maxsize 2>"${TMP_PATH}/maxsize" DIALOG_MAXX=$(ttysize 2>/dev/null | awk '{print $1}')
DIALOG_MAXX=$(cat "${TMP_PATH}/maxsize" 2>/dev/null | grep "MaxSize" | awk -F: '{print $2}' | cut -d, -f2 | xargs) DIALOG_MAXY=$(ttysize 2>/dev/null | awk '{print $2}')
DIALOG_MAXY=$(cat "${TMP_PATH}/maxsize" 2>/dev/null | grep "MaxSize" | awk -F: '{print $2}' | cut -d, -f1 | xargs)
if [ ${LINENUM:-0} -ge ${DIALOG_MAXY:-0} ]; then if [ ${LINENUM:-0} -ge ${DIALOG_MAXY:-0} ]; then
MSG="$(TEXT "Please enter the parameter key and value you need to add.\n")" MSG="$(TEXT "Please enter the parameter key and value you need to add.\n")"
LINENUM=9 LINENUM=9
@ -2026,6 +2022,7 @@ function forceEnableDSMTelnetSSH() {
fi fi
( (
ONBOOTUP="" ONBOOTUP=""
ONBOOTUP="${ONBOOTUP}systemctl restart inetd\n"
ONBOOTUP="${ONBOOTUP}synowebapi --exec api=SYNO.Core.Terminal method=set version=3 enable_telnet=true enable_ssh=true ssh_port=22 forbid_console=false\n" ONBOOTUP="${ONBOOTUP}synowebapi --exec api=SYNO.Core.Terminal method=set version=3 enable_telnet=true enable_ssh=true ssh_port=22 forbid_console=false\n"
ONBOOTUP="${ONBOOTUP}echo \"DELETE FROM task WHERE task_name LIKE ''RRONBOOTUPRR_SSH'';\" | sqlite3 /usr/syno/etc/esynoscheduler/esynoscheduler.db\n" ONBOOTUP="${ONBOOTUP}echo \"DELETE FROM task WHERE task_name LIKE ''RRONBOOTUPRR_SSH'';\" | sqlite3 /usr/syno/etc/esynoscheduler/esynoscheduler.db\n"
mkdir -p "${TMP_PATH}/mdX" mkdir -p "${TMP_PATH}/mdX"

View File

@ -70,7 +70,7 @@ function set_gfxpayload {
fi fi
} }
set RR_CMDLINE="earlyprintk earlycon=uart8250,io,0x3f8,115200n8 console=ttyS0,115200n8 root=/dev/ram rootwait pcie_aspm=off net.ifnames=0 nox2apic nomodeset" set RR_CMDLINE="earlyprintk earlycon=uart8250,io,0x3f8,115200n8 console=ttyS0,115200n8 root=/dev/ram rootwait pcie_aspm=off net.ifnames=0 nox2apic nomodeset intremap=off"
search --set=root --label "RR3" search --set=root --label "RR3"
if [ -s /zImage-dsm -a -s /initrd-dsm ]; then if [ -s /zImage-dsm -a -s /initrd-dsm ]; then