mirror of
https://github.com/RROrg/rr.git
synced 2025-08-24 21:47:06 +08:00
Compare commits
5 Commits
7c993227fc
...
7935f2c69a
Author | SHA1 | Date | |
---|---|---|---|
|
7935f2c69a | ||
|
7075467563 | ||
|
eb6e0f28cb | ||
|
1ee6022476 | ||
|
9d15e9baaf |
@ -17,8 +17,7 @@ NVPCI_ADDR=$(lspci -nd 10de: | grep -e 0300 -e 0302 | awk '{print $1}')
|
|||||||
if [ -n "${NVPCI_ADDR}" ]; then
|
if [ -n "${NVPCI_ADDR}" ]; then
|
||||||
modprobe -r nouveau || true
|
modprobe -r nouveau || true
|
||||||
NVDEV_PATH=$(find /sys/devices -name *${NVPCI_ADDR} | grep -v supplier)
|
NVDEV_PATH=$(find /sys/devices -name *${NVPCI_ADDR} | grep -v supplier)
|
||||||
for DEV_PATH in ${NVDEV_PATH}
|
for DEV_PATH in ${NVDEV_PATH}; do
|
||||||
do
|
|
||||||
if [ -e ${DEV_PATH}/reset ]; then
|
if [ -e ${DEV_PATH}/reset ]; then
|
||||||
echo 1 >${DEV_PATH}/reset || true
|
echo 1 >${DEV_PATH}/reset || true
|
||||||
fi
|
fi
|
||||||
@ -184,6 +183,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
|
||||||
@ -332,6 +334,14 @@ 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 modprobe -r --force "$(basename ${D})" 2>/dev/null || true; done
|
||||||
|
|
||||||
|
# Unload all graphics drivers
|
||||||
|
POWEROFFDISPLAY="$(readConfigKey "poweroffdisplay" "${USER_CONFIG_FILE}")"
|
||||||
|
[ "${POWEROFFDISPLAY}" = "true" ] && for D in $(lsmod | grep -E '^(nouveau|amdgpu|radeon|i915)' | awk '{print $1}'); do modprobe -r --force "${D}" 2>/dev/null || true; 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
|
||||||
|
@ -37,6 +37,7 @@ initConfigKey "prerelease" "false" "${USER_CONFIG_FILE}"
|
|||||||
initConfigKey "bootwait" "10" "${USER_CONFIG_FILE}"
|
initConfigKey "bootwait" "10" "${USER_CONFIG_FILE}"
|
||||||
initConfigKey "bootipwait" "10" "${USER_CONFIG_FILE}"
|
initConfigKey "bootipwait" "10" "${USER_CONFIG_FILE}"
|
||||||
initConfigKey "kernelway" "power" "${USER_CONFIG_FILE}"
|
initConfigKey "kernelway" "power" "${USER_CONFIG_FILE}"
|
||||||
|
initConfigKey "poweroffdisplay" "true" "${USER_CONFIG_FILE}"
|
||||||
initConfigKey "kernelpanic" "5" "${USER_CONFIG_FILE}"
|
initConfigKey "kernelpanic" "5" "${USER_CONFIG_FILE}"
|
||||||
initConfigKey "odp" "false" "${USER_CONFIG_FILE}"
|
initConfigKey "odp" "false" "${USER_CONFIG_FILE}"
|
||||||
initConfigKey "hddsort" "false" "${USER_CONFIG_FILE}"
|
initConfigKey "hddsort" "false" "${USER_CONFIG_FILE}"
|
||||||
@ -100,6 +101,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
@ -42,6 +42,7 @@ PRERELEASE="$(readConfigKey "prerelease" "${USER_CONFIG_FILE}")"
|
|||||||
BOOTWAIT="$(readConfigKey "bootwait" "${USER_CONFIG_FILE}")"
|
BOOTWAIT="$(readConfigKey "bootwait" "${USER_CONFIG_FILE}")"
|
||||||
BOOTIPWAIT="$(readConfigKey "bootipwait" "${USER_CONFIG_FILE}")"
|
BOOTIPWAIT="$(readConfigKey "bootipwait" "${USER_CONFIG_FILE}")"
|
||||||
KERNELWAY="$(readConfigKey "kernelway" "${USER_CONFIG_FILE}")"
|
KERNELWAY="$(readConfigKey "kernelway" "${USER_CONFIG_FILE}")"
|
||||||
|
POWEROFFDISPLAY="$(readConfigKey "poweroffdisplay" "${USER_CONFIG_FILE}")"
|
||||||
KERNELPANIC="$(readConfigKey "kernelpanic" "${USER_CONFIG_FILE}")"
|
KERNELPANIC="$(readConfigKey "kernelpanic" "${USER_CONFIG_FILE}")"
|
||||||
ODP="$(readConfigKey "odp" "${USER_CONFIG_FILE}")" # official drivers priorities
|
ODP="$(readConfigKey "odp" "${USER_CONFIG_FILE}")" # official drivers priorities
|
||||||
HDDSORT="$(readConfigKey "hddsort" "${USER_CONFIG_FILE}")"
|
HDDSORT="$(readConfigKey "hddsort" "${USER_CONFIG_FILE}")"
|
||||||
@ -897,10 +898,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 +1043,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 +2023,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"
|
||||||
@ -2348,11 +2346,8 @@ function advancedMenu() {
|
|||||||
echo "i \"$(TEXT "Timeout of get ip in boot:") \Z4${BOOTIPWAIT}\Zn\"" >>"${TMP_PATH}/menu"
|
echo "i \"$(TEXT "Timeout of get ip in boot:") \Z4${BOOTIPWAIT}\Zn\"" >>"${TMP_PATH}/menu"
|
||||||
echo "w \"$(TEXT "Timeout of boot wait:") \Z4${BOOTWAIT}\Zn\"" >>"${TMP_PATH}/menu"
|
echo "w \"$(TEXT "Timeout of boot wait:") \Z4${BOOTWAIT}\Zn\"" >>"${TMP_PATH}/menu"
|
||||||
echo "k \"$(TEXT "kernel switching method:") \Z4${KERNELWAY}\Zn\"" >>"${TMP_PATH}/menu"
|
echo "k \"$(TEXT "kernel switching method:") \Z4${KERNELWAY}\Zn\"" >>"${TMP_PATH}/menu"
|
||||||
if false; then # Some GPU have compatibility issues, so this function is temporarily disabled. RR_CMDLINE= ... nomodeset
|
|
||||||
checkCmdline "rr_cmdline" "nomodeset" && POWEROFFDISPLAY="false" || POWEROFFDISPLAY="true"
|
|
||||||
echo "7 \"$(TEXT "Power off display after boot: ") \Z4${POWEROFFDISPLAY}\Zn\"" >>"${TMP_PATH}/menu"
|
echo "7 \"$(TEXT "Power off display after boot: ") \Z4${POWEROFFDISPLAY}\Zn\"" >>"${TMP_PATH}/menu"
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
echo "n \"$(TEXT "Reboot on kernel panic:") \Z4${KERNELPANIC}\Zn\"" >>"${TMP_PATH}/menu"
|
echo "n \"$(TEXT "Reboot on kernel panic:") \Z4${KERNELPANIC}\Zn\"" >>"${TMP_PATH}/menu"
|
||||||
if [ -n "$(ls /dev/mmcblk* 2>/dev/null)" ]; then
|
if [ -n "$(ls /dev/mmcblk* 2>/dev/null)" ]; then
|
||||||
echo "b \"$(TEXT "Use EMMC as the system disk:") \Z4${EMMCBOOT}\Zn\"" >>"${TMP_PATH}/menu"
|
echo "b \"$(TEXT "Use EMMC as the system disk:") \Z4${EMMCBOOT}\Zn\"" >>"${TMP_PATH}/menu"
|
||||||
@ -2478,15 +2473,8 @@ function advancedMenu() {
|
|||||||
NEXT="k"
|
NEXT="k"
|
||||||
;;
|
;;
|
||||||
7)
|
7)
|
||||||
DIALOG --title "$(TEXT "Advanced")" \
|
[ "${POWEROFFDISPLAY}" = "false" ] && POWEROFFDISPLAY='true' || POWEROFFDISPLAY='false'
|
||||||
--yesno "$(TEXT "Modifying this item requires a reboot, continue?")" 0 0
|
writeConfigKey "poweroffdisplay" "${POWEROFFDISPLAY}" "${USER_CONFIG_FILE}"
|
||||||
RET=$?
|
|
||||||
[ ${RET} -ne 0 ] && continue
|
|
||||||
checkCmdline "rr_cmdline" "nomodeset" && delCmdline "rr_cmdline" "nomodeset" || addCmdline "rr_cmdline" "nomodeset"
|
|
||||||
DIALOG --title "$(TEXT "Advanced")" \
|
|
||||||
--infobox "$(TEXT "Reboot to RR")" 0 0
|
|
||||||
rebootTo config
|
|
||||||
exit 0
|
|
||||||
NEXT="7"
|
NEXT="7"
|
||||||
;;
|
;;
|
||||||
n)
|
n)
|
||||||
|
@ -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 iommu=off 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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user