mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
add mmc
This commit is contained in:
parent
f5ac5ec4ac
commit
0ac83cb309
@ -160,7 +160,7 @@ if [ "${DIRECT}" = "true" ]; then
|
||||
reboot
|
||||
exit 0
|
||||
else
|
||||
ETHX=$(ls /sys/class/net/ | grep -v lo || true)
|
||||
ETHX=$(ls /sys/class/net/ | grep -v lo) || true
|
||||
echo "$(printf "$(TEXT "Detected %s network cards.")" "$(echo ${ETHX} | wc -w)")"
|
||||
echo "$(TEXT "Checking Connect.")"
|
||||
COUNT=0
|
||||
|
@ -283,8 +283,8 @@ function getBus() {
|
||||
[ -z "${BUS}" ] && BUS=$(udevadm info --query property --name "${1}" 2>/dev/null | grep ID_BUS | cut -d= -f2 | sed 's/ata/sata/')
|
||||
# usb/sata(sata/ide)/nvme
|
||||
[ -z "${BUS}" ] && BUS=$(lsblk -dpno KNAME,TRAN 2>/dev/null | grep "${1}" | awk '{print $2}')
|
||||
# usb/scsi(sata/ide)/virtio(scsi/virtio)/nvme
|
||||
[ -z "${BUS}" ] && BUS=$(lsblk -dpno KNAME,SUBSYSTEMS 2>/dev/null | grep "${1}" | awk -F':' '{print $(NF-1)}')
|
||||
# usb/scsi(sata/ide)/virtio(scsi/virtio)/mmc/nvme
|
||||
[ -z "${BUS}" ] && BUS=$(lsblk -dpno KNAME,SUBSYSTEMS 2>/dev/null | grep "${1}" | awk -F':' '{print $(NF-1)}' | sed 's/_host//')
|
||||
echo "${BUS}"
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ printf "\033[1;32m%*s\033[0m\n" $(((${#TITLE} + ${COLUMNS}) / 2)) "${TITLE}"
|
||||
printf "\033[1;44m%*s\033[0m\n" ${COLUMNS} ""
|
||||
|
||||
# Get first MAC address
|
||||
ETHX=$(ls /sys/class/net/ | grep -v lo || true)
|
||||
ETHX=$(ls /sys/class/net/ | grep -v lo) || true
|
||||
# No network devices
|
||||
[ $(echo ${ETHX} | wc -w) -le 0 ] && die "$(TEXT "Network devices not found!")"
|
||||
|
||||
@ -79,8 +79,8 @@ BUS=$(getBus "${LOADER_DISK}")
|
||||
if [ "${BUS}" = "usb" ]; then
|
||||
VID="0x$(udevadm info --query property --name ${LOADER_DISK} | grep ID_VENDOR_ID | cut -d= -f2)"
|
||||
PID="0x$(udevadm info --query property --name ${LOADER_DISK} | grep ID_MODEL_ID | cut -d= -f2)"
|
||||
elif [ "${BUS}" != "sata" -a "${BUS}" != "scsi" -a "${BUS}" != "nvme" ]; then
|
||||
die "$(TEXT "Loader disk neither USB or SATA/SCSI/NVME DoM")"
|
||||
elif [ "${BUS}" != "sata" -a "${BUS}" != "scsi" -a "${BUS}" != "nvme" -a "${BUS}" != "mmc" ]; then
|
||||
die "$(TEXT "Loader disk neither USB or SATA/SCSI/NVME/MMC DoM")"
|
||||
fi
|
||||
|
||||
# Save variables to 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
@ -604,6 +604,8 @@ function cmdlineMenu() {
|
||||
MSG+="$(TEXT " * \Z4intel_idle.max_cstate=1\Zn\n Set the maximum C-state depth allowed by the intel_idle driver.\n")"
|
||||
MSG+="$(TEXT " * \Z4SataPortMap=??\Zn\n Sata Port Map.\n")"
|
||||
MSG+="$(TEXT " * \Z4DiskIdxMap=??\Zn\n Disk Index Map, Modify disk name sequence.\n")"
|
||||
MSG+="$(TEXT " * \Zi915.enable_guc=2\Zn\n Enable the GuC firmware on Intel graphics hardware.(value: 1,2 or 3)\n")"
|
||||
MSG+="$(TEXT " * \Zi915.max_vfs=7\Zn\n Set the maximum number of virtual functions (VFs) that can be created for Intel graphics hardware.\n")"
|
||||
MSG+="$(TEXT "\nEnter the parameter name and value you need to add.\n")"
|
||||
LINENUM=$(($(echo -e "${MSG}" | wc -l) + 8))
|
||||
while true; do
|
||||
@ -1282,6 +1284,14 @@ function advancedMenu() {
|
||||
MSG+="\Zb${NAME}\Zn\nNumber: ${PORTNUM}\n"
|
||||
NUMPORTS=$((${NUMPORTS} + ${PORTNUM}))
|
||||
done
|
||||
[ $(ls -l /sys/class/mmc_host | grep mmc_host | wc -l) -gt 0 ] && MSG+="\nMMC:\n"
|
||||
for PCI in $(lspci -d ::805 | awk '{print $1}'); do
|
||||
NAME=$(lspci -s "${PCI}" | sed "s/\ .*://")
|
||||
PORTNUM=$(ls -l /sys/class/mmc_host | grep "${PCI}" | wc -l)
|
||||
[ ${PORTNUM} -eq 0 ] && continue
|
||||
MSG+="\Zb${NAME}\Zn\nNumber: ${PORTNUM}\n"
|
||||
NUMPORTS=$((${NUMPORTS} + ${PORTNUM}))
|
||||
done
|
||||
[ $(lspci -d ::108 | wc -l) -gt 0 ] && MSG+="\nNVME:\n"
|
||||
for PCI in $(lspci -d ::108 | awk '{print $1}'); do
|
||||
NAME=$(lspci -s "${PCI}" | sed "s/\ .*://")
|
||||
@ -1343,7 +1353,7 @@ function advancedMenu() {
|
||||
[ -z "${POSITION}" -o -z "${NAME}" ] && continue
|
||||
echo "${POSITION}" | grep -q "${LOADER_DISK}" && continue
|
||||
echo "\"${POSITION}\" \"${NAME}\" \"off\"" >>"${TMP_PATH}/opts"
|
||||
done < <(ls -l /dev/disk/by-id/ | sed 's|../..|/dev|g' | grep -E "/dev/sd|/dev/nvme" | awk -F' ' '{print $NF" "$(NF-2)}' | sort -uk 1,1)
|
||||
done < <(ls -l /dev/disk/by-id/ | sed 's|../..|/dev|g' | grep -E "/dev/sd|/dev/mmc|/dev/nvme" | awk -F' ' '{print $NF" "$(NF-2)}' | sort -uk 1,1)
|
||||
DIALOG --title "$(TEXT "Advanced")" \
|
||||
--checklist "$(TEXT "Advanced")" 0 0 0 --file "${TMP_PATH}/opts" \
|
||||
2>${TMP_PATH}/resp
|
||||
|
Loading…
x
Reference in New Issue
Block a user