mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
新增 usbasinternal 配置项
This commit is contained in:
parent
3ab7cdd3d3
commit
523257ef27
@ -104,6 +104,7 @@ SN="$(readConfigKey "sn" "${USER_CONFIG_FILE}")"
|
|||||||
MAC1="$(readConfigKey "mac1" "${USER_CONFIG_FILE}")"
|
MAC1="$(readConfigKey "mac1" "${USER_CONFIG_FILE}")"
|
||||||
MAC2="$(readConfigKey "mac2" "${USER_CONFIG_FILE}")"
|
MAC2="$(readConfigKey "mac2" "${USER_CONFIG_FILE}")"
|
||||||
KERNELPANIC="$(readConfigKey "kernelpanic" "${USER_CONFIG_FILE}")"
|
KERNELPANIC="$(readConfigKey "kernelpanic" "${USER_CONFIG_FILE}")"
|
||||||
|
USBASINTERNAL="$(readConfigKey "usbasinternal" "${USER_CONFIG_FILE}")"
|
||||||
EMMCBOOT="$(readConfigKey "emmcboot" "${USER_CONFIG_FILE}")"
|
EMMCBOOT="$(readConfigKey "emmcboot" "${USER_CONFIG_FILE}")"
|
||||||
MODBLACKLIST="$(readConfigKey "modblacklist" "${USER_CONFIG_FILE}")"
|
MODBLACKLIST="$(readConfigKey "modblacklist" "${USER_CONFIG_FILE}")"
|
||||||
|
|
||||||
@ -182,6 +183,10 @@ CMDLINE['pcie_aspm']="off"
|
|||||||
CMDLINE['modprobe.blacklist']="${MODBLACKLIST}"
|
CMDLINE['modprobe.blacklist']="${MODBLACKLIST}"
|
||||||
CMDLINE['mev']="${MEV:-physical}"
|
CMDLINE['mev']="${MEV:-physical}"
|
||||||
|
|
||||||
|
if [ "${USBASINTERNAL}" = "true" ]; then
|
||||||
|
CMDLINE['usbasinternal']=""
|
||||||
|
fi
|
||||||
|
|
||||||
if echo "apollolake geminilake purley" | grep -wq "${PLATFORM}"; then
|
if echo "apollolake geminilake purley" | grep -wq "${PLATFORM}"; then
|
||||||
CMDLINE["nox2apic"]=""
|
CMDLINE["nox2apic"]=""
|
||||||
fi
|
fi
|
||||||
|
@ -44,6 +44,7 @@ initConfigKey "kernelway" "power" "${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}"
|
||||||
|
initConfigKey "usbasinternal" "false" "${USER_CONFIG_FILE}"
|
||||||
initConfigKey "emmcboot" "false" "${USER_CONFIG_FILE}"
|
initConfigKey "emmcboot" "false" "${USER_CONFIG_FILE}"
|
||||||
initConfigKey "platform" "" "${USER_CONFIG_FILE}"
|
initConfigKey "platform" "" "${USER_CONFIG_FILE}"
|
||||||
initConfigKey "model" "" "${USER_CONFIG_FILE}"
|
initConfigKey "model" "" "${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
@ -57,6 +57,7 @@ KERNELWAY="$(readConfigKey "kernelway" "${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}")"
|
||||||
|
USBASINTERNAL="$(readConfigKey "usbasinternal" "${USER_CONFIG_FILE}")"
|
||||||
EMMCBOOT="$(readConfigKey "emmcboot" "${USER_CONFIG_FILE}")"
|
EMMCBOOT="$(readConfigKey "emmcboot" "${USER_CONFIG_FILE}")"
|
||||||
SN="$(readConfigKey "sn" "${USER_CONFIG_FILE}")"
|
SN="$(readConfigKey "sn" "${USER_CONFIG_FILE}")"
|
||||||
MAC1="$(readConfigKey "mac1" "${USER_CONFIG_FILE}")"
|
MAC1="$(readConfigKey "mac1" "${USER_CONFIG_FILE}")"
|
||||||
@ -339,6 +340,11 @@ function productversMenu() {
|
|||||||
KERNEL='official'
|
KERNEL='official'
|
||||||
writeConfigKey "kernel" "${KERNEL}" "${USER_CONFIG_FILE}"
|
writeConfigKey "kernel" "${KERNEL}" "${USER_CONFIG_FILE}"
|
||||||
fi
|
fi
|
||||||
|
# Check usbasinternal
|
||||||
|
if [ "true" = "$(readConfigKey "platforms.${PLATFORM}.dt" "${WORK_PATH}/platforms.yml")" ]; then
|
||||||
|
USBASINTERNAL='false'
|
||||||
|
writeConfigKey "usbasinternal" "${USBASINTERNAL}" "${USER_CONFIG_FILE}"
|
||||||
|
fi
|
||||||
# Check addons
|
# Check addons
|
||||||
while IFS=': ' read -r ADDON PARAM; do
|
while IFS=': ' read -r ADDON PARAM; do
|
||||||
[ -z "${ADDON}" ] && continue
|
[ -z "${ADDON}" ] && continue
|
||||||
@ -2894,8 +2900,9 @@ function advancedMenu() {
|
|||||||
echo "p \"$(TEXT "Show/modify the current pat data")\""
|
echo "p \"$(TEXT "Show/modify the current pat data")\""
|
||||||
echo "m \"$(TEXT "Switch SATADOM mode:") \Z4${SATADOM}\Zn\""
|
echo "m \"$(TEXT "Switch SATADOM mode:") \Z4${SATADOM}\Zn\""
|
||||||
fi
|
fi
|
||||||
if [ -n "${PLATFORM}" ] && [ "true" = "$(readConfigKey "platforms.${PLATFORM}.dt" "${WORK_PATH}/platforms.yml")" ]; then
|
if [ -n "${PLATFORM}" ]; then
|
||||||
echo "d \"$(TEXT "Custom DTS")\""
|
echo "d \"$(TEXT "Custom DTS")\""
|
||||||
|
echo "u \"$(TEXT "USB disk as internal disk:") \Z4${USBASINTERNAL}\Zn\""
|
||||||
fi
|
fi
|
||||||
echo "w \"$(TEXT "Timeout of boot wait:") \Z4${BOOTWAIT}\Zn\""
|
echo "w \"$(TEXT "Timeout of boot wait:") \Z4${BOOTWAIT}\Zn\""
|
||||||
if [ "${DIRECTBOOT}" = "false" ]; then
|
if [ "${DIRECTBOOT}" = "false" ]; then
|
||||||
@ -2983,9 +2990,25 @@ function advancedMenu() {
|
|||||||
NEXT="m"
|
NEXT="m"
|
||||||
;;
|
;;
|
||||||
d)
|
d)
|
||||||
|
if [ "true" = "$(readConfigKey "platforms.${PLATFORM}.dt" "${WORK_PATH}/platforms.yml")" ]; then
|
||||||
customDTS
|
customDTS
|
||||||
|
else
|
||||||
|
DIALOG --title "$(TEXT "Advanced")" \
|
||||||
|
--msgbox "$(TEXT "Custom DTS is not supported for current model.")" 0 0
|
||||||
|
fi
|
||||||
NEXT="e"
|
NEXT="e"
|
||||||
;;
|
;;
|
||||||
|
u)
|
||||||
|
if [ "true" = "$(readConfigKey "platforms.${PLATFORM}.dt" "${WORK_PATH}/platforms.yml")" ]; then
|
||||||
|
DIALOG --title "$(TEXT "Advanced")" \
|
||||||
|
--msgbox "$(TEXT "USB disk as internal disk is not supported for current model.")" 0 0
|
||||||
|
NEXT="e"
|
||||||
|
else
|
||||||
|
USBASINTERNAL=$([ "${USBASINTERNAL}" = "true" ] && echo 'false' || echo 'true')
|
||||||
|
writeConfigKey "usbasinternal" "${USBASINTERNAL}" "${USER_CONFIG_FILE}"
|
||||||
|
NEXT="u"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
w)
|
w)
|
||||||
ITEMS="$(echo -e "1 \n5 \n10 \n30 \n60 \n")"
|
ITEMS="$(echo -e "1 \n5 \n10 \n30 \n60 \n")"
|
||||||
DIALOG --title "$(TEXT "Advanced")" \
|
DIALOG --title "$(TEXT "Advanced")" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user