mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-24 01:29:53 +07:00
tree: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
89c895c868
commit
3f14098ac3
@ -266,6 +266,7 @@ function cmdlineMenu() {
|
||||
MSG+=" * \Z4pcie_port_pm=off\Zn\n Disable the power management of the PCIe port.\n"
|
||||
MSG+=" * \Z4pci=realloc=off\Zn\n Disable reallocating PCI bridge resources.\n"
|
||||
MSG+=" * \Z4libata.force=noncq\Zn\n Disable NCQ for all SATA ports.\n"
|
||||
MSG+=" * \Z4intel_pstate=disable\Zn\n Switch Intel P-State to ACPI.\n"
|
||||
MSG+=" * \Z4acpi=force\Zn\n Force enables ACPI.\n"
|
||||
MSG+=" * \Z4i915.enable_guc=2\Zn\n Enable the GuC firmware on Intel graphics hardware.(value: 1,2 or 3)\n"
|
||||
MSG+=" * \Z4i915.max_vfs=7\Zn\n Set the maximum number of virtual functions (VFs) that can be created for Intel graphics hardware.\n"
|
||||
@ -1071,6 +1072,18 @@ function sysinfo() {
|
||||
TEXT+="\n CPU: \Zb${CPU}\Zn"
|
||||
TEXT+="\n Memory: \Zb$((${RAMTOTAL}))GB\Zn"
|
||||
TEXT+="\n AES | ACPI: \Zb${AESSYS} | ${ACPISYS}\Zn"
|
||||
if [ $(lspci -d ::300 | wc -l) -gt 0 ]; then
|
||||
for PCI in $(lspci -d ::300 | awk '{print $1}'); do
|
||||
GPUNAME=$(lspci -s "${PCI}" | sed "s/\ .*://")
|
||||
TEXT+="\n iGPU: \Zb${CPUNAME}\Zn\n"
|
||||
done
|
||||
fi
|
||||
if [ $(lspci -d ::380 | wc -l) -gt 0 ]; then
|
||||
for PCI in $(lspci -d ::380 | awk '{print $1}'); do
|
||||
GPUNAME=$(lspci -s "${PCI}" | sed "s/\ .*://")
|
||||
TEXT+="\n GPU: \Zb${CPUNAME}\Zn\n"
|
||||
done
|
||||
fi
|
||||
TEXT+="\n Date: \Zb$(date)\Zn"
|
||||
TEXT+="\n"
|
||||
TEXT+="\n\Z4> Network: ${ETHN} NIC\Zn"
|
||||
@ -2018,7 +2031,7 @@ function governorSelection () {
|
||||
rm -f "${TMP_PATH}/opts" >/dev/null
|
||||
touch "${TMP_PATH}/opts"
|
||||
CPUFREQSUPPORT=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
|
||||
if [ -n "${CPUFREQSUPPORT}" ]; then
|
||||
if [ -n "${CPUFREQSUPPORT}" ] || [ "${ACPISYS}" == "true" ]; then
|
||||
# Selectable CPU governors
|
||||
[ "${PLATFORM}" == "epyc7002" ] && echo -e "schedutil \"use schedutil to scale frequency *\"" >>"${TMP_PATH}/opts"
|
||||
[ "${PLATFORM}" != "epyc7002" ] && echo -e "ondemand \"use ondemand to scale frequency *\"" >>"${TMP_PATH}/opts"
|
||||
|
@ -24,6 +24,12 @@ if grep -q "^flags.*hypervisor.*" /proc/cpuinfo; then
|
||||
else
|
||||
MACHINE=NATIVE
|
||||
fi
|
||||
# Check CPU Manufacturer
|
||||
if [ $(cat /proc/cpuinfo | grep Intel | wc -l) -gt 0 ]; then
|
||||
CPUM="Intel"
|
||||
else
|
||||
CPUM="AMD"
|
||||
fi
|
||||
# Check for AES and ACPI Support
|
||||
if ! grep -q "^flags.*aes.*" /proc/cpuinfo; then
|
||||
AESSYS="false"
|
||||
@ -206,6 +212,7 @@ function arcModel() {
|
||||
[ -n "${ARCCONF}" ] && ARC="x"
|
||||
CPU="Intel"
|
||||
[[ "${A}" == "r1000" || "${A}" == "v1000" || "${A}" == "epyc7002" ]] && CPU="AMD"
|
||||
[ "${CPU}" == "${CPUM}" ] && CPU="\Z2${CPU}\Zn" || CPU="\Z1${CPU}\Zn"
|
||||
IGPUS=""
|
||||
[[ "${A}" == "apollolake" || "${A}" == "geminilake" || "${A}" == "epyc7002" ]] && IGPUS="x"
|
||||
HBAS="x"
|
||||
@ -521,7 +528,7 @@ function arcSettings() {
|
||||
fi
|
||||
# Check for Custom Build
|
||||
if [ "${CUSTOM}" == "false" ]; then
|
||||
if [ "${MACHINE}" == "NATIVE" ]; then
|
||||
if [ "${ACPISYS}" == "true" ]; then
|
||||
# Select Governor for DSM
|
||||
dialog --backtitle "$(backtitle)" --colors --title "DSM Frequency Scaling" \
|
||||
--infobox "Generating Governor Table..." 3 40
|
||||
@ -545,17 +552,17 @@ function arcSettings() {
|
||||
DEVICENIC="$(readConfigKey "device.nic" "${USER_CONFIG_FILE}")"
|
||||
if [ ${DEVICENIC} -gt 8 ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Arc Warning" \
|
||||
--msgbox "WARN: You have more then 8 Ethernet Ports. There are only 8 supported by DSM." 5 90
|
||||
--msgbox "WARN: You have more then 8 Ethernet Ports. Only 8 supported by DSM." 5 80
|
||||
fi
|
||||
# Check for AES
|
||||
if [ "${AESSYS}" == "false" ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Arc Warning" \
|
||||
--msgbox "WARN: Your System doesn't have AES Support for Hardwareencryption in DSM." 5 90
|
||||
--msgbox "WARN: Your System doesn't support Hardwareencryption in DSM. (AES)" 5 80
|
||||
fi
|
||||
# Check for ACPI
|
||||
if [ "${ACPISYS}" == "false" ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Arc Warning" \
|
||||
--msgbox "WARN: Your System doesn't have ACPI Support for CPU Frequency Scaling in DSM." 5 90
|
||||
--msgbox "WARN: Your System doesn't support CPU Frequency Scaling in DSM. (ACPI)" 5 80
|
||||
else
|
||||
if [ "${PLATFORM}" != "epyc7002" ]; then
|
||||
echo "N cpufreq_conservative.ko" >>"${USER_UP_PATH}/modulelist"
|
||||
|
@ -34,6 +34,7 @@ SN="$(readConfigKey "arc.sn" "${USER_CONFIG_FILE}")"
|
||||
LAYOUT="$(readConfigKey "layout" "${USER_CONFIG_FILE}")"
|
||||
KEYMAP="$(readConfigKey "keymap" "${USER_CONFIG_FILE}")"
|
||||
HDDSORT="$(readConfigKey "arc.hddsort" "${USER_CONFIG_FILE}")"
|
||||
CPUGOVERNOR="$(readConfigKey "arc.governor" "${USER_CONFIG_FILE}")"
|
||||
KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
|
||||
RD_COMPRESSED="$(readConfigKey "rd-compressed" "${USER_CONFIG_FILE}")"
|
||||
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
|
||||
@ -162,26 +163,19 @@ echo "export KEYMAP=\"${KEYMAP}\"" >>"${RAMDISK_PATH}/addons/addons.sh"
|
||||
chmod +x "${RAMDISK_PATH}/addons/addons.sh"
|
||||
|
||||
# System Addons
|
||||
for ADDON in "redpill" "revert" "misc" "eudev" "disks" "localrss" "notify" "updatenotify" "wol" "mountloader"; do
|
||||
for ADDON in "redpill" "revert" "misc" "eudev" "disks" "localrss" "notify" "updatenotify" "wol" "mountloader" "cpufreqscaling"; do
|
||||
PARAMS=""
|
||||
if [ "${ADDON}" == "disks" ]; then
|
||||
PARAMS=${HDDSORT}
|
||||
[ -f "${USER_UP_PATH}/${MODEL}.dts" ] && cp -f "${USER_UP_PATH}/${MODEL}.dts" "${RAMDISK_PATH}/addons/model.dts"
|
||||
fi
|
||||
if [ "${ADDON}" == "cpufreqscaling" ]; then
|
||||
PARAMS=${CPUGOVERNOR}
|
||||
fi
|
||||
installAddon "${ADDON}" "${PLATFORM}" || exit 1
|
||||
echo "/addons/${ADDON}.sh \${1} ${PARAMS}" >>"${RAMDISK_PATH}/addons/addons.sh" 2>>"${LOG_FILE}" || exit 1
|
||||
done
|
||||
|
||||
# Check for Hypervisor & add Cpufreqscaling service
|
||||
if grep -q "^flags.*acpi.*" /proc/cpuinfo; then
|
||||
for ADDON in "cpufreqscaling"; do
|
||||
CPUGOVERNOR="$(readConfigKey "arc.governor" "${USER_CONFIG_FILE}")"
|
||||
PARAMS=${CPUGOVERNOR}
|
||||
installAddon "${ADDON}" "${PLATFORM}" || exit 1
|
||||
echo "/addons/${ADDON}.sh \${1} ${PARAMS}" >>"${RAMDISK_PATH}/addons/addons.sh" 2>>"${LOG_FILE}" || exit 1
|
||||
done
|
||||
fi
|
||||
|
||||
# User Addons
|
||||
for ADDON in ${!ADDONS[@]}; do
|
||||
PARAMS=${ADDONS[${ADDON}]}
|
||||
|
Loading…
Reference in New Issue
Block a user