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 7826 additions and 7805 deletions

View File

@ -12,18 +12,6 @@ loaderIsConfigured || die "$(TEXT "Loader is not configured!")"
# Check if machine has EFI
[ -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}")
# Print text centralized
@ -183,8 +171,8 @@ if [ "${DT}" = "true" ] && ! echo "epyc7002 purley broadwellnkv2" | grep -wq "${
fi
fi
CMDLINE['kvm.ignore_msrs']="1"
CMDLINE['kvm.report_ignored_msrs']="0"
# CMDLINE['kvm.ignore_msrs']="1"
# CMDLINE['kvm.report_ignored_msrs']="0"
if echo "apollolake geminilake" | grep -wq "${PLATFORM}"; then
CMDLINE["intel_iommu"]="igfx_off"
@ -335,11 +323,14 @@ else
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
for D in $(readlink /sys/class/net/*/device/driver); do rmmod -f "$(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
# 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}")"

View File

@ -37,7 +37,6 @@ initConfigKey "prerelease" "false" "${USER_CONFIG_FILE}"
initConfigKey "bootwait" "10" "${USER_CONFIG_FILE}"
initConfigKey "bootipwait" "10" "${USER_CONFIG_FILE}"
initConfigKey "kernelway" "power" "${USER_CONFIG_FILE}"
initConfigKey "poweroffdisplay" "true" "${USER_CONFIG_FILE}"
initConfigKey "kernelpanic" "5" "${USER_CONFIG_FILE}"
initConfigKey "odp" "false" "${USER_CONFIG_FILE}"
initConfigKey "hddsort" "false" "${USER_CONFIG_FILE}"

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

@ -42,7 +42,6 @@ PRERELEASE="$(readConfigKey "prerelease" "${USER_CONFIG_FILE}")"
BOOTWAIT="$(readConfigKey "bootwait" "${USER_CONFIG_FILE}")"
BOOTIPWAIT="$(readConfigKey "bootipwait" "${USER_CONFIG_FILE}")"
KERNELWAY="$(readConfigKey "kernelway" "${USER_CONFIG_FILE}")"
POWEROFFDISPLAY="$(readConfigKey "poweroffdisplay" "${USER_CONFIG_FILE}")"
KERNELPANIC="$(readConfigKey "kernelpanic" "${USER_CONFIG_FILE}")"
ODP="$(readConfigKey "odp" "${USER_CONFIG_FILE}")" # official drivers priorities
HDDSORT="$(readConfigKey "hddsort" "${USER_CONFIG_FILE}")"
@ -2346,7 +2345,10 @@ function advancedMenu() {
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 "k \"$(TEXT "kernel switching method:") \Z4${KERNELWAY}\Zn\"" >>"${TMP_PATH}/menu"
echo "7 \"$(TEXT "Power off display after boot: ") \Z4${POWEROFFDISPLAY}\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"
fi
fi
echo "n \"$(TEXT "Reboot on kernel panic:") \Z4${KERNELPANIC}\Zn\"" >>"${TMP_PATH}/menu"
if [ -n "$(ls /dev/mmcblk* 2>/dev/null)" ]; then
@ -2473,8 +2475,15 @@ function advancedMenu() {
NEXT="k"
;;
7)
[ "${POWEROFFDISPLAY}" = "false" ] && POWEROFFDISPLAY='true' || POWEROFFDISPLAY='false'
writeConfigKey "poweroffdisplay" "${POWEROFFDISPLAY}" "${USER_CONFIG_FILE}"
DIALOG --title "$(TEXT "Advanced")" \
--yesno "$(TEXT "Modifying this item requires a reboot, continue?")" 0 0
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"
;;
n)

View File

@ -70,7 +70,7 @@ function set_gfxpayload {
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 iommu=off intremap=off"
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"
if [ -s /zImage-dsm -a -s /initrd-dsm ]; then