mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
add Compatibility judgment
This commit is contained in:
parent
33628a27d6
commit
a7c8b43e07
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -194,6 +194,9 @@ msgstr "設定 Cmdline"
|
||||
msgid "Cmdline:\\n"
|
||||
msgstr "Cmdline:\\n"
|
||||
|
||||
msgid "Compatibility judgment"
|
||||
msgstr "相容性判斷"
|
||||
|
||||
msgid "Compressed tar"
|
||||
msgstr "壓縮 tar"
|
||||
|
||||
|
@ -119,6 +119,7 @@ function modelMenu() {
|
||||
done < <(cat "${TMP_PATH}/modellist" | sort -r -n -k 2)
|
||||
[ ${FLGNEX} -eq 1 ] && echo "f \"\Z1$(TEXT "Disable flags restriction")\Zn\"" >>"${TMP_PATH}/menu"
|
||||
[ ${FLGBETA} -eq 0 ] && echo "b \"\Z1$(TEXT "Show all models")\Zn\"" >>"${TMP_PATH}/menu"
|
||||
echo "c \"\Z1$(TEXT "Compatibility judgment")\Zn\"" >>"${TMP_PATH}/menu"
|
||||
dialog --backtitle "$(backtitle)" --colors \
|
||||
--menu "$(TEXT "Choose the model")" 0 0 0 --file "${TMP_PATH}/menu" \
|
||||
2>${TMP_PATH}/resp
|
||||
@ -133,6 +134,47 @@ function modelMenu() {
|
||||
FLGBETA=1
|
||||
continue
|
||||
fi
|
||||
if [ "${resp}" = "c" ]; then
|
||||
models=(DS918+ RS1619xs+ DS419+ DS1019+ DS719+ DS1621xs+)
|
||||
[ $(lspci -d ::300 | grep 8086 | wc -l) -gt 0 ] && iGPU=1 || iGPU=0
|
||||
[ $(lspci -d ::107 | wc -l) -gt 0 ] && LSI=1 || LSI=0
|
||||
[ $(lspci -d ::108 | wc -l) -gt 0 ] && NVME=1 || NVME=0
|
||||
if [ "${NVME}" = "1" ]; then
|
||||
for PCI in $(lspci -d ::108 | awk '{print $1}'); do
|
||||
if [ ! -d "/sys/devices/pci0000:00/0000:${PCI}/nvme" ]; then
|
||||
NVME=2
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
rm -f "${TMP_PATH}/opts"
|
||||
echo "$(printf "%-16s %8s %8s %8s" "model" "iGPU" "HBA" "M.2")" >>"${TMP_PATH}/opts"
|
||||
while read M Y; do
|
||||
PLATFORM=$(readModelKey "${M}" "platform")
|
||||
DT="$(readModelKey "${M}" "dt")"
|
||||
I915=" "
|
||||
HBA=" "
|
||||
M_2=" "
|
||||
if [ "${iGPU}" = "1" ]; then
|
||||
[ "${PLATFORM}" = "apollolake" -o "${PLATFORM}" = "geminilake" ] && I915="*"
|
||||
fi
|
||||
if [ "${LSI}" = "1" ]; then
|
||||
[ ! "${DT}" = "true" ] && HBA="* "
|
||||
fi
|
||||
if [ "${NVME}" = "1" ]; then
|
||||
[ "${DT}" = "true" ] && M_2="* "
|
||||
fi
|
||||
if [ "${NVME}" = "2" ]; then
|
||||
if echo ${models[@]} | grep -q ${M}; then
|
||||
M_2="* "
|
||||
fi
|
||||
fi
|
||||
echo "$(printf "%-16s %8s %8s %8s" "${M}" "${I915}" "${HBA}" "${M_2}")" >>"${TMP_PATH}/opts"
|
||||
done < <(cat "${TMP_PATH}/modellist" | sort -r -n -k 2)
|
||||
dialog --backtitle "$(backtitle)" --colors \
|
||||
--textbox "${TMP_PATH}/opts" 0 0
|
||||
continue
|
||||
fi
|
||||
break
|
||||
done
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user