mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-24 00:19:52 +07:00
tree: full rework for config compatibility
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
bd75ecab30
commit
38f1318b8f
@ -14,7 +14,7 @@ function editUserConfig() {
|
||||
OLDPRODUCTVER="${PRODUCTVER}"
|
||||
MODEL="$(readConfigKey "model" "${USER_CONFIG_FILE}")"
|
||||
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
|
||||
SN="$(readConfigKey "arc.sn" "${USER_CONFIG_FILE}")"
|
||||
SN="$(readConfigKey "sn" "${USER_CONFIG_FILE}")"
|
||||
if [ "${MODEL}" != "${OLDMODEL}" ] || [ "${PRODUCTVER}" != "${OLDPRODUCTVER}" ]; then
|
||||
# Delete old files
|
||||
rm -f "${ORI_ZIMAGE_FILE}" "${ORI_RDGZ_FILE}" "${MOD_ZIMAGE_FILE}" "${MOD_RDGZ_FILE}" >/dev/null
|
||||
@ -93,8 +93,8 @@ function modulesMenu() {
|
||||
5 "Choose Modules" \
|
||||
6 "Add external module" \
|
||||
7 "Edit Modules copied to DSM" \
|
||||
8 "Copy i915 to DSM" \
|
||||
9 "Force-copy loaded Modules to DSM" \
|
||||
8 "Force-copy loaded Modules to DSM" \
|
||||
9 "Blacklist Modules to prevent loading in DSM" \
|
||||
2>"${TMP_PATH}/resp"
|
||||
[ $? -ne 0 ] && break
|
||||
case "$(cat ${TMP_PATH}/resp)" in
|
||||
@ -226,21 +226,6 @@ function modulesMenu() {
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
;;
|
||||
8)
|
||||
if [ -f "${USER_UP_PATH}/modulelist" ]; then
|
||||
cp -f "${USER_UP_PATH}/modulelist" "${TMP_PATH}/modulelist.tmp"
|
||||
else
|
||||
cp -f "${ARC_PATH}/include/modulelist" "${TMP_PATH}/modulelist.tmp"
|
||||
fi
|
||||
sed -i 's/#N /N /g' "${TMP_PATH}/modulelist.tmp"
|
||||
[ ! -d "${USER_UP_PATH}" ] && mkdir -p "${USER_UP_PATH}"
|
||||
mv -f "${TMP_PATH}/modulelist.tmp" "${USER_UP_PATH}/modulelist"
|
||||
dos2unix "${USER_UP_PATH}/modulelist"
|
||||
dialog --backtitle "$(backtitle)" --title "i915 Modules Copy" \
|
||||
--msgbox "i915 Modules will be copied to DSM!" 5 50
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
;;
|
||||
9)
|
||||
if [ -f "${USER_UP_PATH}/modulelist" ]; then
|
||||
cp -f "${USER_UP_PATH}/modulelist" "${TMP_PATH}/modulelist.tmp"
|
||||
else
|
||||
@ -265,6 +250,29 @@ function modulesMenu() {
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
;;
|
||||
9)
|
||||
MSG=""
|
||||
MSG+="The blacklist is used to prevent the kernel from loading specific modules.\n"
|
||||
MSG+="The blacklist is a list of module names separated by ','.\n"
|
||||
MSG+="For example: \Z4evbug,cdc_ether\Zn\n"
|
||||
while true; do
|
||||
modblacklist="$(readConfigKey "modblacklist" "${USER_CONFIG_FILE}")"
|
||||
dialog --backtitle "$(backtitle)" --title "Blacklist Modules" \
|
||||
--inputbox "${MSG}" 12 70 "${modblacklist}" \
|
||||
2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && break
|
||||
VALUE="$(cat "${TMP_PATH}/resp")"
|
||||
if [[ ${VALUE} = *" "* ]]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Blacklist Module" \
|
||||
--yesno "Invalid list, No spaces should appear, retry?" 0 0
|
||||
[ $? -eq 0 ] && continue || break
|
||||
fi
|
||||
writeConfigKey "modblacklist" "${VALUE}" "${USER_CONFIG_FILE}"
|
||||
break
|
||||
done
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
return
|
||||
@ -468,7 +476,7 @@ function cmdlineMenu() {
|
||||
resp=$(cat ${TMP_PATH}/resp)
|
||||
[ -z "${resp}" ] && break
|
||||
KERNELPANIC=${resp}
|
||||
writeConfigKey "arc.kernelpanic" "${KERNELPANIC}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "kernelpanic" "${KERNELPANIC}" "${USER_CONFIG_FILE}"
|
||||
done
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
@ -706,7 +714,7 @@ function backupMenu() {
|
||||
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
|
||||
if [ -n "${MODEL}" ] && [ -n "${PRODUCTVER}" ]; then
|
||||
TEXT="Installation found:\nModel: ${MODELID:-${MODEL}}\nVersion: ${PRODUCTVER}"
|
||||
SN="$(readConfigKey "arc.sn" "${USER_CONFIG_FILE}")"
|
||||
SN="$(readConfigKey "sn" "${USER_CONFIG_FILE}")"
|
||||
TEXT+="\nSerial: ${SN}"
|
||||
ARCPATCH="$(readConfigKey "arc.patch" "${USER_CONFIG_FILE}")"
|
||||
TEXT+="\nArc Patch: ${ARCPATCH}"
|
||||
@ -1059,12 +1067,12 @@ function sysinfo() {
|
||||
PORTMAP="$(readConfigKey "cmdline.ahci_remap" "${USER_CONFIG_FILE}")"
|
||||
fi
|
||||
fi
|
||||
DIRECTBOOT="$(readConfigKey "arc.directboot" "${USER_CONFIG_FILE}")"
|
||||
DIRECTBOOT="$(readConfigKey "directboot" "${USER_CONFIG_FILE}")"
|
||||
LKM="$(readConfigKey "lkm" "${USER_CONFIG_FILE}")"
|
||||
KERNELLOAD="$(readConfigKey "arc.kernelload" "${USER_CONFIG_FILE}")"
|
||||
KERNELLOAD="$(readConfigKey "kernelload" "${USER_CONFIG_FILE}")"
|
||||
OFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")"
|
||||
CONFIGVER="$(readConfigKey "arc.version" "${USER_CONFIG_FILE}")"
|
||||
HDDSORT="$(readConfigKey "arc.hddsort" "${USER_CONFIG_FILE}")"
|
||||
HDDSORT="$(readConfigKey "hddsort" "${USER_CONFIG_FILE}")"
|
||||
EXTERNALCONTROLLER="$(readConfigKey "device.externalcontroller" "${USER_CONFIG_FILE}")"
|
||||
HARDDRIVES="$(readConfigKey "device.harddrives" "${USER_CONFIG_FILE}")"
|
||||
DRIVES="$(readConfigKey "device.drives" "${USER_CONFIG_FILE}")"
|
||||
@ -1601,7 +1609,7 @@ function bootipwaittime() {
|
||||
resp=$(cat ${TMP_PATH}/resp)
|
||||
[ -z "${resp}" ] && return 1
|
||||
BOOTIPWAIT=${resp}
|
||||
writeConfigKey "arc.bootipwait" "${BOOTIPWAIT}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "bootipwait" "${BOOTIPWAIT}" "${USER_CONFIG_FILE}"
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
@ -2074,7 +2082,7 @@ function governorSelection () {
|
||||
[ "${PLATFORM}" == "epyc7002" ] && CPUGOVERNOR="schedutil"
|
||||
[ "${PLATFORM}" != "epyc7002" ] && CPUGOVERNOR="ondemand"
|
||||
fi
|
||||
writeConfigKey "arc.governor" "${CPUGOVERNOR}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "governor" "${CPUGOVERNOR}" "${USER_CONFIG_FILE}"
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
|
@ -21,7 +21,7 @@ systemCheck
|
||||
offlineCheck "false"
|
||||
ARCNIC="$(readConfigKey "arc.nic" "${USER_CONFIG_FILE}")"
|
||||
OFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")"
|
||||
AUTOMATED="$(readConfigKey "arc.automated" "${USER_CONFIG_FILE}")"
|
||||
AUTOMATED="$(readConfigKey "automated" "${USER_CONFIG_FILE}")"
|
||||
|
||||
# Get DSM Data from Config
|
||||
MODEL="$(readConfigKey "model" "${USER_CONFIG_FILE}")"
|
||||
@ -37,16 +37,16 @@ fi
|
||||
# Get Arc Data from Config
|
||||
ARC_KEY="$(readConfigKey "arc.key" "${USER_CONFIG_FILE}")"
|
||||
ARCPATCH="$(readConfigKey "arc.patch" "${USER_CONFIG_FILE}")"
|
||||
BOOTIPWAIT="$(readConfigKey "arc.bootipwait" "${USER_CONFIG_FILE}")"
|
||||
DIRECTBOOT="$(readConfigKey "arc.directboot" "${USER_CONFIG_FILE}")"
|
||||
EMMCBOOT="$(readConfigKey "arc.emmcboot" "${USER_CONFIG_FILE}")"
|
||||
CPUGOVERNOR="$(readConfigKey "arc.governor" "${USER_CONFIG_FILE}")"
|
||||
HDDSORT="$(readConfigKey "arc.hddsort" "${USER_CONFIG_FILE}")"
|
||||
IPV6="$(readConfigKey "arc.ipv6" "${USER_CONFIG_FILE}")"
|
||||
KERNEL="$(readConfigKey "arc.kernel" "${USER_CONFIG_FILE}")"
|
||||
KERNELLOAD="$(readConfigKey "arc.kernelload" "${USER_CONFIG_FILE}")"
|
||||
KERNELPANIC="$(readConfigKey "arc.kernelpanic" "${USER_CONFIG_FILE}")"
|
||||
ODP="$(readConfigKey "arc.odp" "${USER_CONFIG_FILE}")"
|
||||
BOOTIPWAIT="$(readConfigKey "bootipwait" "${USER_CONFIG_FILE}")"
|
||||
DIRECTBOOT="$(readConfigKey "directboot" "${USER_CONFIG_FILE}")"
|
||||
EMMCBOOT="$(readConfigKey "emmcboot" "${USER_CONFIG_FILE}")"
|
||||
CPUGOVERNOR="$(readConfigKey "governor" "${USER_CONFIG_FILE}")"
|
||||
HDDSORT="$(readConfigKey "hddsort" "${USER_CONFIG_FILE}")"
|
||||
IPV6="$(readConfigKey "ipv6" "${USER_CONFIG_FILE}")"
|
||||
KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
|
||||
KERNELLOAD="$(readConfigKey "kernelload" "${USER_CONFIG_FILE}")"
|
||||
KERNELPANIC="$(readConfigKey "kernelpanic" "${USER_CONFIG_FILE}")"
|
||||
ODP="$(readConfigKey "odp" "${USER_CONFIG_FILE}")"
|
||||
OFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")"
|
||||
RD_COMPRESSED="$(readConfigKey "rd-compressed" "${USER_CONFIG_FILE}")"
|
||||
SATADOM="$(readConfigKey "satadom" "${USER_CONFIG_FILE}")"
|
||||
@ -213,8 +213,8 @@ function arcModel() {
|
||||
MODELID=$(echo ${MODEL} | sed 's/d$/D/; s/rp$/RP/; s/rp+/RP+/')
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.confdone" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.paturl" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.pathash" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "paturl" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "pathash" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.remap" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "modelid" "${MODELID}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "platform" "${PLATFORM}" "${USER_CONFIG_FILE}"
|
||||
@ -230,15 +230,15 @@ function arcModel() {
|
||||
writeConfigKey "addons" "{}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.confdone" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.emmcboot" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.hddsort" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.kernel" "official" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.odp" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "emmcboot" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "hddsort" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "kernel" "official" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "odp" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.paturl" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.pathash" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "paturl" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "pathash" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.remap" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.sn" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "sn" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "modelid" "${MODELID}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "platform" "${PLATFORM}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "ramdisk-hash" "" "${USER_CONFIG_FILE}"
|
||||
@ -247,10 +247,10 @@ function arcModel() {
|
||||
ARCPATCH="$(readConfigKey "arc.patch" "${USER_CONFIG_FILE}")"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
CONFDONE="$(readConfigKey "arc.confdone" "${USER_CONFIG_FILE}")"
|
||||
EMMCBOOT="$(readConfigKey "arc.emmcboot" "${USER_CONFIG_FILE}")"
|
||||
HDDSORT="$(readConfigKey "arc.hddsort" "${USER_CONFIG_FILE}")"
|
||||
KERNEL="$(readConfigKey "arc.kernel" "${USER_CONFIG_FILE}")"
|
||||
ODP="$(readConfigKey "arc.odp" "${USER_CONFIG_FILE}")"
|
||||
EMMCBOOT="$(readConfigKey "emmcboot" "${USER_CONFIG_FILE}")"
|
||||
HDDSORT="$(readConfigKey "hddsort" "${USER_CONFIG_FILE}")"
|
||||
KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
|
||||
ODP="$(readConfigKey "odp" "${USER_CONFIG_FILE}")"
|
||||
if [ "${MODEL}" != "${resp}" ] || [ -z "${resp}" ]; then
|
||||
if [ -f "${ORI_ZIMAGE_FILE}" ] || [ -f "${ORI_RDGZ_FILE}" ] || [ -f "${MOD_ZIMAGE_FILE}" ] || [ -f "${MOD_RDGZ_FILE}" ]; then
|
||||
rm -f "${ORI_ZIMAGE_FILE}" "${ORI_RDGZ_FILE}" "${MOD_ZIMAGE_FILE}" "${MOD_RDGZ_FILE}" 2>/dev/null || true
|
||||
@ -267,7 +267,7 @@ function arcVersion() {
|
||||
MODEL="$(readConfigKey "model" "${USER_CONFIG_FILE}")"
|
||||
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
|
||||
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
|
||||
AUTOMATED="$(readConfigKey "arc.automated" "${USER_CONFIG_FILE}")"
|
||||
AUTOMATED="$(readConfigKey "automated" "${USER_CONFIG_FILE}")"
|
||||
# Check for Custom Build
|
||||
if [ "${AUTOMATED}" == "false" ]; then
|
||||
# Select Build for DSM
|
||||
@ -331,10 +331,10 @@ function arcPatch() {
|
||||
# Read Model Values
|
||||
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
|
||||
MODEL="$(readConfigKey "model" "${USER_CONFIG_FILE}")"
|
||||
AUTOMATED="$(readConfigKey "arc.automated" "${USER_CONFIG_FILE}")"
|
||||
AUTOMATED="$(readConfigKey "automated" "${USER_CONFIG_FILE}")"
|
||||
ARCCONF="$(readConfigKey "${MODEL}.serial" "${S_FILE}" 2>/dev/null)"
|
||||
# Check for Custom Build
|
||||
SN="$(readConfigKey "arc.sn" "${USER_CONFIG_FILE}")"
|
||||
SN="$(readConfigKey "sn" "${USER_CONFIG_FILE}")"
|
||||
if [ "${AUTOMATED}" == "true" ] && [ -z "${SN}" ]; then
|
||||
SN=$(generateSerial "${MODEL}" false)
|
||||
writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
|
||||
@ -410,7 +410,7 @@ function arcPatch() {
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
writeConfigKey "arc.sn" "${SN}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "sn" "${SN}" "${USER_CONFIG_FILE}"
|
||||
ARCPATCH="$(readConfigKey "arc.patch" "${USER_CONFIG_FILE}")"
|
||||
arcSettings
|
||||
}
|
||||
@ -420,7 +420,7 @@ function arcPatch() {
|
||||
function arcSettings() {
|
||||
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
|
||||
DT="$(readConfigKey "platforms.${PLATFORM}.dt" "${P_FILE}")"
|
||||
AUTOMATED="$(readConfigKey "arc.automated" "${USER_CONFIG_FILE}")"
|
||||
AUTOMATED="$(readConfigKey "automated" "${USER_CONFIG_FILE}")"
|
||||
# Get Network Config for Loader
|
||||
dialog --backtitle "$(backtitle)" --colors --title "Network Config" \
|
||||
--infobox "Generating Network Config..." 3 40
|
||||
@ -480,7 +480,7 @@ function arcSettings() {
|
||||
--msgbox "WARN: Your System doesn't support CPU Frequency Scaling in DSM." 5 80
|
||||
fi
|
||||
fi
|
||||
EMMCBOOT="$(readConfigKey "arc.emmcboot" "${USER_CONFIG_FILE}")"
|
||||
EMMCBOOT="$(readConfigKey "emmcboot" "${USER_CONFIG_FILE}")"
|
||||
# eMMC Boot Support
|
||||
if [ "${EMMCBOOT}" == "true" ]; then
|
||||
writeConfigKey "modules.mmc_block" "" "${USER_CONFIG_FILE}"
|
||||
@ -534,17 +534,17 @@ function arcSummary() {
|
||||
elif [ "${REMAP}" == "remap" ]; then
|
||||
PORTREMAP="$(readConfigKey "cmdline.sata_remap" "${USER_CONFIG_FILE}")"
|
||||
fi
|
||||
DIRECTBOOT="$(readConfigKey "arc.directboot" "${USER_CONFIG_FILE}")"
|
||||
KERNELLOAD="$(readConfigKey "arc.kernelload" "${USER_CONFIG_FILE}")"
|
||||
DIRECTBOOT="$(readConfigKey "directboot" "${USER_CONFIG_FILE}")"
|
||||
KERNELLOAD="$(readConfigKey "kernelload" "${USER_CONFIG_FILE}")"
|
||||
OFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")"
|
||||
HDDSORT="$(readConfigKey "arc.hddsort" "${USER_CONFIG_FILE}")"
|
||||
HDDSORT="$(readConfigKey "hddsort" "${USER_CONFIG_FILE}")"
|
||||
NIC="$(readConfigKey "device.nic" "${USER_CONFIG_FILE}")"
|
||||
EXTERNALCONTROLLER="$(readConfigKey "device.externalcontroller" "${USER_CONFIG_FILE}")"
|
||||
HARDDRIVES="$(readConfigKey "device.harddrives" "${USER_CONFIG_FILE}")"
|
||||
DRIVES="$(readConfigKey "device.drives" "${USER_CONFIG_FILE}")"
|
||||
EMMCBOOT="$(readConfigKey "arc.emmcboot" "${USER_CONFIG_FILE}")"
|
||||
EMMCBOOT="$(readConfigKey "emmcboot" "${USER_CONFIG_FILE}")"
|
||||
OFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")"
|
||||
KERNEL="$(readConfigKey "arc.kernel" "${USER_CONFIG_FILE}")"
|
||||
KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
|
||||
# Print Summary
|
||||
SUMMARY="\Z4> DSM Information\Zn"
|
||||
SUMMARY+="\n>> DSM Model: \Zb${MODEL}\Zn"
|
||||
@ -599,7 +599,7 @@ function make() {
|
||||
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
|
||||
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
|
||||
DT="$(readConfigKey "platforms.${PLATFORM}.dt" "${P_FILE}")"
|
||||
AUTOMATED="$(readConfigKey "arc.automated" "${USER_CONFIG_FILE}")"
|
||||
AUTOMATED="$(readConfigKey "automated" "${USER_CONFIG_FILE}")"
|
||||
PAT_URL=""
|
||||
PAT_HASH=""
|
||||
VALID="false"
|
||||
@ -676,12 +676,12 @@ function make() {
|
||||
sleep 5
|
||||
elif [ "${VALID}" == "true" ]; then
|
||||
# Get PAT Data from Config
|
||||
PAT_URL_CONF="$(readConfigKey "arc.paturl" "${USER_CONFIG_FILE}")"
|
||||
PAT_HASH_CONF="$(readConfigKey "arc.pathash" "${USER_CONFIG_FILE}")"
|
||||
PAT_URL_CONF="$(readConfigKey "paturl" "${USER_CONFIG_FILE}")"
|
||||
PAT_HASH_CONF="$(readConfigKey "pathash" "${USER_CONFIG_FILE}")"
|
||||
if [ "${PAT_HASH}" != "${PAT_HASH_CONF}" ] || [ ! -f "${ORI_ZIMAGE_FILE}" ] || [ ! -f "${ORI_RDGZ_FILE}" ]; then
|
||||
# Write new PAT Data to Config
|
||||
writeConfigKey "arc.paturl" "${PAT_URL}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.pathash" "${PAT_HASH}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "paturl" "${PAT_URL}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "pathash" "${PAT_HASH}" "${USER_CONFIG_FILE}"
|
||||
# Get new Files
|
||||
DSM_FILE="${UNTAR_PAT_PATH}/${PAT_HASH}.tar"
|
||||
DSM_URL="https://raw.githubusercontent.com/AuxXxilium/arc-dsm/main/files/${MODEL/+/%2B}/${PRODUCTVER}/${PAT_HASH}.tar"
|
||||
@ -742,8 +742,8 @@ function make() {
|
||||
dialog --backtitle "$(backtitle)" --title "DSM Upload" --aspect 18 \
|
||||
--infobox "DSM Image found!" 3 40
|
||||
# Remove PAT Data for Offline
|
||||
writeConfigKey "arc.paturl" "#" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.pathash" "#" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "paturl" "#" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "pathash" "#" "${USER_CONFIG_FILE}"
|
||||
# Extract Files
|
||||
if [ -f "${PAT_FILE}" ]; then
|
||||
extractDSMFiles "${PAT_FILE}" "${UNTAR_PAT_PATH}"
|
||||
@ -808,7 +808,7 @@ function make() {
|
||||
# Finish Building Loader
|
||||
function arcFinish() {
|
||||
# Verify Files exist
|
||||
AUTOMATED="$(readConfigKey "arc.automated" "${USER_CONFIG_FILE}")"
|
||||
AUTOMATED="$(readConfigKey "automated" "${USER_CONFIG_FILE}")"
|
||||
rm -f "${LOG_FILE}" >/dev/null
|
||||
# Check for Automated Mode
|
||||
if grep -q "automated_arc" /proc/cmdline; then
|
||||
@ -1032,7 +1032,7 @@ else
|
||||
p) ONLYPATCH="true" && arcPatch; NEXT="p" ;;
|
||||
D) staticIPMenu; NEXT="D" ;;
|
||||
R) [ "${AUTOMATED}" == "false" ] && AUTOMATED='true' || AUTOMATED='false'
|
||||
writeConfigKey "arc.automated" "${AUTOMATED}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "automated" "${AUTOMATED}" "${USER_CONFIG_FILE}"
|
||||
if [ "${AUTOMATED}" == "true" ]; then
|
||||
[ ! -f "${PART3_PATH}/automated" ] && echo "${ARC_VERSION}-${MODEL}-${PRODUCTVER}-custom" >"${PART3_PATH}/automated"
|
||||
elif [ "${AUTOMATED}" == "false" ]; then
|
||||
@ -1046,13 +1046,13 @@ else
|
||||
NEXT="6"
|
||||
;;
|
||||
m) [ "${KERNELLOAD}" == "kexec" ] && KERNELLOAD='power' || KERNELLOAD='kexec'
|
||||
writeConfigKey "arc.kernelload" "${KERNELLOAD}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "kernelload" "${KERNELLOAD}" "${USER_CONFIG_FILE}"
|
||||
NEXT="m"
|
||||
;;
|
||||
i) bootipwaittime; NEXT="i" ;;
|
||||
q) [ "${DIRECTBOOT}" == "false" ] && DIRECTBOOT='true' || DIRECTBOOT='false'
|
||||
grub-editenv ${USER_GRUBENVFILE} create
|
||||
writeConfigKey "arc.directboot" "${DIRECTBOOT}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "directboot" "${DIRECTBOOT}" "${USER_CONFIG_FILE}"
|
||||
NEXT="q"
|
||||
;;
|
||||
# DSM Section
|
||||
@ -1067,12 +1067,12 @@ else
|
||||
N) addNewDSMUser; NEXT="N" ;;
|
||||
J) resetDSMNetwork; NEXT="J" ;;
|
||||
K) [ "${KERNEL}" == "official" ] && KERNEL='custom' || KERNEL='official'
|
||||
writeConfigKey "arc.kernel" "${KERNEL}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "kernel" "${KERNEL}" "${USER_CONFIG_FILE}"
|
||||
dialog --backtitle "$(backtitle)" --title "DSM Kernel" \
|
||||
--infobox "Switching to Custom Kernel! Stay patient..." 4 50
|
||||
if [ "${ODP}" == "true" ]; then
|
||||
ODP="false"
|
||||
writeConfigKey "arc.odp" "${ODP}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "odp" "${ODP}" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
|
||||
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
|
||||
@ -1093,26 +1093,26 @@ else
|
||||
NEXT="K"
|
||||
;;
|
||||
H) [ "${HDDSORT}" == "true" ] && HDDSORT='false' || HDDSORT='true'
|
||||
writeConfigKey "arc.hddsort" "${HDDSORT}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "hddsort" "${HDDSORT}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
NEXT="H"
|
||||
;;
|
||||
O) [ "${ODP}" == "false" ] && ODP='true' || ODP='false'
|
||||
writeConfigKey "arc.odp" "${ODP}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "odp" "${ODP}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
NEXT="O"
|
||||
;;
|
||||
E) [ "${EMMCBOOT}" == "true" ] && EMMCBOOT='false' || EMMCBOOT='true'
|
||||
if [ "${EMMCBOOT}" == "false" ]; then
|
||||
writeConfigKey "arc.emmcboot" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "emmcboot" "false" "${USER_CONFIG_FILE}"
|
||||
deleteConfigKey "synoinfo.disk_swap" "${USER_CONFIG_FILE}"
|
||||
deleteConfigKey "synoinfo.supportraid" "${USER_CONFIG_FILE}"
|
||||
deleteConfigKey "synoinfo.support_emmc_boot" "${USER_CONFIG_FILE}"
|
||||
deleteConfigKey "synoinfo.support_install_only_dev" "${USER_CONFIG_FILE}"
|
||||
elif [ "${EMMCBOOT}" == "true" ]; then
|
||||
writeConfigKey "arc.emmcboot" "true" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "emmcboot" "true" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "synoinfo.disk_swap" "no" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "synoinfo.supportraid" "no" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "synoinfo.support_emmc_boot" "yes" "${USER_CONFIG_FILE}"
|
||||
|
@ -68,10 +68,12 @@ function bootDSM () {
|
||||
# Read necessary variables
|
||||
VID="$(readConfigKey "vid" "${USER_CONFIG_FILE}")"
|
||||
PID="$(readConfigKey "pid" "${USER_CONFIG_FILE}")"
|
||||
SN="$(readConfigKey "arc.sn" "${USER_CONFIG_FILE}")"
|
||||
KERNELPANIC="$(readConfigKey "arc.kernelpanic" "${USER_CONFIG_FILE}")"
|
||||
SN="$(readConfigKey "sn" "${USER_CONFIG_FILE}")"
|
||||
KERNELPANIC="$(readConfigKey "kernelpanic" "${USER_CONFIG_FILE}")"
|
||||
DT="$(readConfigKey "platforms.${PLATFORM}.dt" "${P_FILE}")"
|
||||
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kver" "${P_FILE}")"
|
||||
EMMCBOOT="$(readConfigKey "emmcboot" "${USER_CONFIG_FILE}")"
|
||||
MODBLACKLIST="$(readConfigKey "modblacklist" "${USER_CONFIG_FILE}")"
|
||||
|
||||
declare -A CMDLINE
|
||||
|
||||
@ -130,15 +132,20 @@ function bootDSM () {
|
||||
CMDLINE['loglevel']="15"
|
||||
CMDLINE['log_buf_len']="32M"
|
||||
CMDLINE['panic']="${KERNELPANIC:-0}"
|
||||
CMDLINE['modprobe.blacklist']="${MODBLACKLIST}"
|
||||
[ $(cat /proc/cpuinfo | grep Intel | wc -l) -gt 0 ] && CMDLINE["intel_pstate"]="disable"
|
||||
|
||||
#if [ -n "$(ls /dev/mmcblk* 2>/dev/null)" ] && [ "${BUS}" != "mmc" ] && [ "${EMMCBOOT}" != "true" ]; then
|
||||
# [ "${CMDLINE['modprobe.blacklist']}" != "" ] && CMDLINE['modprobe.blacklist']+=","
|
||||
# CMDLINE['modprobe.blacklist']+="sdhci,sdhci_pci,sdhci_acpi"
|
||||
#fi
|
||||
# if ! echo "${CMDLINE['modprobe.blacklist']}" | grep -q "sdhci"; then
|
||||
# [ ! "${CMDLINE['modprobe.blacklist']}" = "" ] && CMDLINE['modprobe.blacklist']+=","
|
||||
# CMDLINE['modprobe.blacklist']+="sdhci,sdhci_pci,sdhci_acpi"
|
||||
# fi
|
||||
# fi
|
||||
if [ "${DT}" == "true" ] && ! echo "epyc7002 purley broadwellnkv2" | grep -wq "${PLATFORM}"; then
|
||||
[ "${CMDLINE['modprobe.blacklist']}" != "" ] && CMDLINE['modprobe.blacklist']+=","
|
||||
CMDLINE['modprobe.blacklist']+="mpt3sas"
|
||||
if ! echo "${CMDLINE['modprobe.blacklist']}" | grep -q "mpt3sas"; then
|
||||
[ ! "${CMDLINE['modprobe.blacklist']}" = "" ] && CMDLINE['modprobe.blacklist']+=","
|
||||
CMDLINE['modprobe.blacklist']+="mpt3sas"
|
||||
fi
|
||||
fi
|
||||
if true; then
|
||||
[ "${CMDLINE['modprobe.blacklist']}" != "" ] && CMDLINE['modprobe.blacklist']+=","
|
||||
@ -162,7 +169,7 @@ function bootDSM () {
|
||||
fi
|
||||
NIC=0
|
||||
for ETH in ${ETHX}; do
|
||||
MAC="$(readConfigKey "arc.${ETH}" "${USER_CONFIG_FILE}")"
|
||||
MAC="$(readConfigKey "${ETH}" "${USER_CONFIG_FILE}")"
|
||||
[ -z "${MAC}" ] && MAC="$(cat /sys/class/net/${ETH}/address 2>/dev/null | sed 's/://g' | tr '[:upper:]' '[:lower:]')"
|
||||
NIC=$((${NIC} + 1))
|
||||
[ ${NIC} -le ${ETHN} ] && CMDLINE["mac${NIC}"]="${MAC}"
|
||||
@ -199,7 +206,7 @@ function bootDSM () {
|
||||
checkCmdline "arc_cmdline" "nox2apic" && delCmdline "arc_cmdline" "nox2apic"
|
||||
fi
|
||||
# Boot
|
||||
DIRECTBOOT="$(readConfigKey "arc.directboot" "${USER_CONFIG_FILE}")"
|
||||
DIRECTBOOT="$(readConfigKey "directboot" "${USER_CONFIG_FILE}")"
|
||||
if [ "${DIRECTBOOT}" == "true" ]; then
|
||||
CMDLINE_DIRECT=$(echo ${CMDLINE_LINE} | sed 's/>/\\\\>/g') # Escape special chars
|
||||
grub-editenv ${USER_GRUBENVFILE} set dsm_cmdline="${CMDLINE_DIRECT}"
|
||||
@ -210,7 +217,7 @@ function bootDSM () {
|
||||
elif [ "${DIRECTBOOT}" == "false" ]; then
|
||||
grub-editenv ${USER_GRUBENVFILE} unset dsm_cmdline
|
||||
grub-editenv ${USER_GRUBENVFILE} unset next_entry
|
||||
BOOTIPWAIT="$(readConfigKey "arc.bootipwait" "${USER_CONFIG_FILE}")"
|
||||
BOOTIPWAIT="$(readConfigKey "bootipwait" "${USER_CONFIG_FILE}")"
|
||||
ETHN="$(echo ${ETHX} | wc -w)"
|
||||
[ -z "${BOOTIPWAIT}" ] && BOOTIPWAIT=30
|
||||
IPCON=""
|
||||
@ -268,7 +275,7 @@ function bootDSM () {
|
||||
|
||||
echo -e "\033[1;37mLoading DSM kernel...\033[0m"
|
||||
|
||||
DSMLOGO="$(readConfigKey "arc.dsmlogo" "${USER_CONFIG_FILE}")"
|
||||
DSMLOGO="$(readConfigKey "dsmlogo" "${USER_CONFIG_FILE}")"
|
||||
if [ "${DSMLOGO}" == "true" ] && [ -c "/dev/fb0" ]; then
|
||||
[[ "${IPCON}" =~ ^169\.254\..* ]] && IPCON=""
|
||||
if [ -n "${IPCON}" ]; then
|
||||
@ -298,7 +305,7 @@ function bootDSM () {
|
||||
# Clear logs for dbgutils addons
|
||||
rm -rf "${PART1_PATH}/logs" >/dev/null 2>&1 || true
|
||||
|
||||
KERNELLOAD="$(readConfigKey "arc.kernelload" "${USER_CONFIG_FILE}")"
|
||||
KERNELLOAD="$(readConfigKey "kernelload" "${USER_CONFIG_FILE}")"
|
||||
[ "${KERNELLOAD}" == "kexec" ] && kexec -a -e || poweroff
|
||||
exit 0
|
||||
fi
|
||||
|
@ -6,9 +6,5 @@
|
||||
# Compatibility boot
|
||||
|
||||
function compatboot () {
|
||||
# Remove old Addons
|
||||
if arrayExistItem "codecpatch:" $(readConfigMap "addons" "${USER_CONFIG_FILE}"); then
|
||||
deleteConfigKey "addons.codecpatch" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
return 0
|
||||
}
|
@ -539,7 +539,7 @@ function ntpCheck() {
|
||||
# Offline Check
|
||||
function offlineCheck() {
|
||||
CNT=0
|
||||
AUTOMATED="$(readConfigKey "arc.automated" "${USER_CONFIG_FILE}")"
|
||||
AUTOMATED="$(readConfigKey "automated" "${USER_CONFIG_FILE}")"
|
||||
local ARCNIC=""
|
||||
local OFFLINE="${1}"
|
||||
if [ "${OFFLINE}" == "true" ]; then
|
||||
@ -576,7 +576,7 @@ function offlineCheck() {
|
||||
elif [ -z "${ARCNIC}" ] && [ "${AUTOMATED}" == "true" ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Online Check" \
|
||||
--msgbox "Could not connect to Github.\nSwitch to Offline Mode!\nDisable Automated Mode!" 0 0
|
||||
writeConfigKey "arc.automated" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "automated" "false" "${USER_CONFIG_FILE}"
|
||||
[ -f "${PART3_PATH}/automated" ] && rm -f "${PART3_PATH}/automated" >/dev/null
|
||||
ARCNIC="offline"
|
||||
OFFLINE="true"
|
||||
|
@ -13,7 +13,7 @@ function getAllModules() {
|
||||
# Unzip modules for temporary folder
|
||||
rm -rf "${TMP_PATH}/modules"
|
||||
mkdir -p "${TMP_PATH}/modules"
|
||||
local KERNEL="$(readConfigKey "arc.kernel" "${USER_CONFIG_FILE}")"
|
||||
local KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
|
||||
if [ "${KERNEL}" == "custom" ]; then
|
||||
tar -zxf "${CUSTOM_PATH}/modules-${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules"
|
||||
else
|
||||
@ -48,7 +48,7 @@ function installModules() {
|
||||
# Unzip modules for temporary folder
|
||||
rm -rf "${TMP_PATH}/modules"
|
||||
mkdir -p "${TMP_PATH}/modules"
|
||||
local KERNEL="$(readConfigKey "arc.kernel" "${USER_CONFIG_FILE}")"
|
||||
local KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
|
||||
if [ "${KERNEL}" == "custom" ]; then
|
||||
tar -zxf "${CUSTOM_PATH}/modules-${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules" 2>"${LOG_FILE}"
|
||||
else
|
||||
@ -100,7 +100,7 @@ function addToModules() {
|
||||
# Unzip modules for temporary folder
|
||||
rm -rf "${TMP_PATH}/modules"
|
||||
mkdir -p "${TMP_PATH}/modules"
|
||||
local KERNEL="$(readConfigKey "arc.kernel" "${USER_CONFIG_FILE}")"
|
||||
local KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
|
||||
if [ "${KERNEL}" == "custom" ]; then
|
||||
tar -zxf "${CUSTOM_PATH}/modules-${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules"
|
||||
else
|
||||
@ -131,7 +131,7 @@ function delToModules() {
|
||||
# Unzip modules for temporary folder
|
||||
rm -rf "${TMP_PATH}/modules"
|
||||
mkdir -p "${TMP_PATH}/modules"
|
||||
local KERNEL="$(readConfigKey "arc.kernel" "${USER_CONFIG_FILE}")"
|
||||
local KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
|
||||
if [ "${KERNEL}" == "custom" ]; then
|
||||
tar -zxf "${CUSTOM_PATH}/modules-${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules"
|
||||
else
|
||||
@ -173,7 +173,7 @@ function getdepends() {
|
||||
# Unzip modules for temporary folder
|
||||
rm -rf "${TMP_PATH}/modules"
|
||||
mkdir -p "${TMP_PATH}/modules"
|
||||
local KERNEL="$(readConfigKey "arc.kernel" "${USER_CONFIG_FILE}")"
|
||||
local KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
|
||||
if [ "${KERNEL}" == "custom" ]; then
|
||||
tar -zxf "${CUSTOM_PATH}/modules-${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules"
|
||||
else
|
||||
|
@ -8,13 +8,13 @@ function getnet() {
|
||||
ETHN="$(echo ${ETHX} | wc -w)"
|
||||
MACS=($(generateMacAddress "${MODEL}" ${ETHN} true))
|
||||
for I in $(seq 1 ${ETHN}); do
|
||||
writeConfigKey "arc.eth$((${I} - 1))" "${MACS[$((${I} - 1))]}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "eth$((${I} - 1))" "${MACS[$((${I} - 1))]}" "${USER_CONFIG_FILE}"
|
||||
done
|
||||
elif [ "${ARCPATCH}" == "false" ]; then
|
||||
ETHN="$(echo ${ETHX} | wc -w)"
|
||||
MACS=($(generateMacAddress "${MODEL}" ${ETHN} false))
|
||||
for I in $(seq 1 ${ETHN}); do
|
||||
writeConfigKey "arc.eth$((${I} - 1))" "${MACS[$((${I} - 1))]}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "eth$((${I} - 1))" "${MACS[$((${I} - 1))]}" "${USER_CONFIG_FILE}"
|
||||
done
|
||||
elif [ "${ARCPATCH}" == "user" ]; then
|
||||
# User Mac
|
||||
@ -26,11 +26,11 @@ function getnet() {
|
||||
2>"${TMP_PATH}/resp"
|
||||
[ $? -ne 0 ] && break
|
||||
MAC=$(cat "${TMP_PATH}/resp")
|
||||
[ -z "${MAC}" ] && MAC="$(readConfigKey "arc.${ETH}" "${USER_CONFIG_FILE}")"
|
||||
[ -z "${MAC}" ] && MAC="$(readConfigKey "${ETH}" "${USER_CONFIG_FILE}")"
|
||||
[ -z "${MAC}" ] && MAC="$(cat /sys/class/net/${ETH}/address 2>/dev/null | sed 's/://g' | tr '[:upper:]' '[:lower:]')"
|
||||
MAC="$(echo "${MAC}" | sed "s/:\|-\| //g" | tr '[:upper:]' '[:lower:]')"
|
||||
if [ ${#MAC} -eq 12 ]; then
|
||||
writeConfigKey "arc.${ETH}" "${MAC}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "${ETH}" "${MAC}" "${USER_CONFIG_FILE}"
|
||||
break
|
||||
else
|
||||
dialog --backtitle "$(backtitle)" --title "Mac Setting" --msgbox "Invalid MAC - Try again!" 5 50
|
||||
|
@ -141,7 +141,7 @@ function getmapSelection() {
|
||||
SATAPORTMAP="$(awk '{print $1}' "${TMP_PATH}/drivescon")"
|
||||
SATAREMAP="$(awk '{print $1}' "${TMP_PATH}/remap" | sed 's/.$//')"
|
||||
EXTERNALCONTROLLER="$(readConfigKey "device.externalcontroller" "${USER_CONFIG_FILE}")"
|
||||
AUTOMATED="$(readConfigKey "arc.automated" "${USER_CONFIG_FILE}")"
|
||||
AUTOMATED="$(readConfigKey "automated" "${USER_CONFIG_FILE}")"
|
||||
if [ "${AUTOMATED}" == "false" ]; then
|
||||
# Show recommended Option to user
|
||||
if [ -n "${SATAREMAP}" ] && [ "${EXTERNALCONTROLLER}" == "true" ] && [ "${MACHINE}" == "Native" ]; then
|
||||
|
@ -468,7 +468,7 @@ function updateLKMs() {
|
||||
###############################################################################
|
||||
# Update Failed
|
||||
function updateFailed() {
|
||||
local AUTOMATED="$(readConfigKey "arc.automated" "${USER_CONFIG_FILE}")"
|
||||
local AUTOMATED="$(readConfigKey "automated" "${USER_CONFIG_FILE}")"
|
||||
if [ "${AUTOMATED}" = "true" ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Update Failed" \
|
||||
--infobox "Update failed!" 0 0
|
||||
|
@ -37,33 +37,34 @@ fi
|
||||
# Config Init
|
||||
initConfigKey "addons" "{}" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc" "{}" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.bootipwait" "30" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.confdone" "false" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.directboot" "false" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.dsmlogo" "true" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.emmcboot" "false" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.governor" "performance" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.hddsort" "false" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.ipv6" "false" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.kernel" "official" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.kernelload" "power" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.kernelpanic" "5" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.key" "" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.nic" "" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.odp" "false" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.offline" "false" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.pathash" "" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.paturl" "" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.sn" "" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.version" "${ARC_VERSION}" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "bootipwait" "30" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "directboot" "false" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "dsmlogo" "true" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "emmcboot" "false" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "governor" "performance" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "hddsort" "false" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "kernel" "official" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "kernelload" "power" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "kernelpanic" "5" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "odp" "false" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "pathash" "" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "paturl" "" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "sn" "" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "cmdline" "{}" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "device" "{}" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "device.externalcontroller" "false" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "keymap" "" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "layout" "" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "lkm" "prod" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "modblacklist" "evbug,cdc_ether" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "model" "" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "modelid" "" "${USER_CONFIG_FILE}"
|
||||
@ -77,9 +78,9 @@ initConfigKey "synoinfo" "{}" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "time" "{}" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "zimage-hash" "" "${USER_CONFIG_FILE}"
|
||||
if grep -q "automated_arc" /proc/cmdline; then
|
||||
writeConfigKey "arc.automated" "true" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "automated" "true" "${USER_CONFIG_FILE}"
|
||||
else
|
||||
writeConfigKey "arc.automated" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "automated" "false" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
# Check for compatibility
|
||||
compatboot
|
||||
@ -108,7 +109,7 @@ for ETH in ${ETHX}; do
|
||||
sleep 1
|
||||
fi
|
||||
[ "${ETH::3}" = "eth" ] && ethtool -s ${ETH} wol g 2>/dev/null || true
|
||||
initConfigKey "arc.${ETH}" "${MACR}" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "${ETH}" "${MACR}" "${USER_CONFIG_FILE}"
|
||||
done
|
||||
ETHN="$(echo ${ETHX} | wc -w)"
|
||||
writeConfigKey "device.nic" "${ETHN}" "${USER_CONFIG_FILE}"
|
||||
@ -160,12 +161,13 @@ elif grep -q "update_arc" /proc/cmdline; then
|
||||
elif [ "${BUILDDONE}" == "true" ]; then
|
||||
echo -e "\033[1;34mStarting DSM Mode...\033[0m"
|
||||
bootDSM
|
||||
exit 0
|
||||
else
|
||||
echo -e "\033[1;34mStarting Config Mode...\033[0m"
|
||||
fi
|
||||
echo
|
||||
|
||||
BOOTIPWAIT="$(readConfigKey "arc.bootipwait" "${USER_CONFIG_FILE}")"
|
||||
BOOTIPWAIT="$(readConfigKey "bootipwait" "${USER_CONFIG_FILE}")"
|
||||
[ -z "${BOOTIPWAIT}" ] && BOOTIPWAIT=30
|
||||
echo -e "\033[1;34mDetected ${ETHN} NIC.\033[0m \033[1;37mWaiting for Connection:\033[0m"
|
||||
sleep 3
|
||||
|
@ -30,17 +30,17 @@ PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
|
||||
MODEL="$(readConfigKey "model" "${USER_CONFIG_FILE}")"
|
||||
MODELID="$(readConfigKey "modelid" "${USER_CONFIG_FILE}")"
|
||||
LKM="$(readConfigKey "lkm" "${USER_CONFIG_FILE}")"
|
||||
SN="$(readConfigKey "arc.sn" "${USER_CONFIG_FILE}")"
|
||||
SN="$(readConfigKey "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}")"
|
||||
HDDSORT="$(readConfigKey "hddsort" "${USER_CONFIG_FILE}")"
|
||||
CPUGOVERNOR="$(readConfigKey "governor" "${USER_CONFIG_FILE}")"
|
||||
KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
|
||||
RD_COMPRESSED="$(readConfigKey "rd-compressed" "${USER_CONFIG_FILE}")"
|
||||
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
|
||||
# Read new PAT Info from Config
|
||||
PAT_URL="$(readConfigKey "arc.paturl" "${USER_CONFIG_FILE}")"
|
||||
PAT_HASH="$(readConfigKey "arc.pathash" "${USER_CONFIG_FILE}")"
|
||||
PAT_URL="$(readConfigKey "paturl" "${USER_CONFIG_FILE}")"
|
||||
PAT_HASH="$(readConfigKey "pathash" "${USER_CONFIG_FILE}")"
|
||||
|
||||
[ "${PATURL:0:1}" == "#" ] && PATURL=""
|
||||
[ "${PATSUM:0:1}" == "#" ] && PATSUM=""
|
||||
|
@ -18,7 +18,7 @@ systemCheck
|
||||
offlineCheck "false"
|
||||
ARCNIC="$(readConfigKey "arc.nic" "${USER_CONFIG_FILE}")"
|
||||
OFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")"
|
||||
AUTOMATED="$(readConfigKey "arc.automated" "${USER_CONFIG_FILE}")"
|
||||
AUTOMATED="$(readConfigKey "automated" "${USER_CONFIG_FILE}")"
|
||||
|
||||
# Get DSM Data from Config
|
||||
MODEL="$(readConfigKey "model" "${USER_CONFIG_FILE}")"
|
||||
|
@ -11,7 +11,7 @@ set -o pipefail # Get exit code from process piped
|
||||
|
||||
rm -f "${MOD_ZIMAGE_FILE}"
|
||||
|
||||
KERNEL="$(readConfigKey "arc.kernel" "${USER_CONFIG_FILE}")"
|
||||
KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
|
||||
if [ "${KERNEL}" == "custom" ]; then
|
||||
echo -n " - Using customized Kernel"
|
||||
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
|
||||
|
@ -80,7 +80,7 @@ set menu_color_normal=white/black
|
||||
set menu_color_highlight=white/red
|
||||
set color_normal=white/black
|
||||
|
||||
set ARC_CMDLINE="earlyprintk earlycon=ttyS0,115200 console=ttyS0,115200 root=/dev/ram rootwait pcie_aspm=off net.ifnames=0 mitigations=auto ipv6.disable=1"
|
||||
set ARC_CMDLINE="earlyprintk earlycon=ttyS0,115200 console=ttyS0,115200 root=/dev/ram rootwait pcie_aspm=off net.ifnames=0 ipv6.disable=1"
|
||||
|
||||
search --set=root --label "ARC3"
|
||||
if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user