Merge pull request #4661 from AuxXxilium/dev

Dev
This commit is contained in:
AuxXxilium
2024-11-13 23:54:00 +01:00
committed by GitHub
9 changed files with 65 additions and 47 deletions

View File

@@ -236,7 +236,8 @@ jobs:
- Development Build
### Information:
- Full Changelog and Arc Patch (Decryption Key) are available in my Discord.
- Full Changelog is available in my Discord
- Discord Account for Arc Patch needed
### Dependencies:
- Addons: ${{ env.ADDONTAG }}

View File

@@ -270,7 +270,8 @@ jobs:
- ${{ inputs.notice }}
### Information:
- Full Changelog and Arc Patch (Decryption Key) are available in my Discord.
- Full Changelog is available in my Discord
- Discord Account for Arc Patch needed
### Versions:
- stable: Stable Image (Full Image, all dependencies are included, less hardware support)

View File

@@ -828,13 +828,14 @@ function backupMenu() {
dialog --backtitle "$(backtitle)" --title "Online Restore" --msgbox "Online Restore successful!" 5 40
else
dialog --backtitle "$(backtitle)" --title "Online Restore" --msgbox "Online Restore failed!" 5 40
mv -f "${USER_CONFIG_FILE}.bak" "${USER_CONFIG_FILE}"
[ -f "${USER_CONFIG_FILE}.bak" ] && mv -f "${USER_CONFIG_FILE}.bak" "${USER_CONFIG_FILE}"
fi
;;
5)
if [ -f "${USER_CONFIG_FILE}" ]; then
HWID="$(genHWID)"
if curl -sk -X POST -F "file=@${USER_CONFIG_FILE}" "https://arc.auxxxilium.tech?cup=${HWID}&userid=${USERID}"; then
curl -sk -X POST -F "file=@${USER_CONFIG_FILE}" "https://arc.auxxxilium.tech?cup=${HWID}&userid=${USERID}" 2>/dev/null
if [ $? -eq 0 ]; then
dialog --backtitle "$(backtitle)" --title "Online Backup" --msgbox "Online Backup successful!" 5 40
else
dialog --backtitle "$(backtitle)" --title "Online Backup" --msgbox "Online Backup failed!" 5 40
@@ -1227,7 +1228,8 @@ function getCMDline () {
function uploadDiag () {
if [ -f "${TMP_PATH}/sysinfo.yml" ]; then
HWID="$(genHWID)"
if curl -sk -X POST -F "file=@${TMP_PATH}/sysinfo.yml" "https://arc.auxxxilium.tech?sysinfo=${HWID}&userid=${USERID}"; then
curl -sk -X POST -F "file=@${TMP_PATH}/sysinfo.yml" "https://arc.auxxxilium.tech?sysinfo=${HWID}&userid=${USERID}" 2>/dev/null
if [ $? -eq 0 ]; then
dialog --backtitle "$(backtitle)" --title "Sysinfo Upload" --msgbox "Your Code: ${HWID}" 5 40
else
dialog --backtitle "$(backtitle)" --title "Sysinfo Upload" --msgbox "Failed to upload diag file!" 0 0
@@ -2221,7 +2223,7 @@ function getpatfiles() {
--infobox "Downloading DSM Boot Files..." 3 40
# Get new Files
DSM_URL="https://raw.githubusercontent.com/AuxXxilium/arc-dsm/main/files/${MODEL/+/%2B}/${PRODUCTVER}/${PAT_HASH}.tar"
if curl -skL "${DSM_URL}" -o "${DSM_FILE}"; then
if curl -skL "${DSM_URL}" -o "${DSM_FILE}" 2>/dev/null; then
VALID="true"
fi
elif [ ! -f "${DSM_FILE}" ] && [ "${ARCOFFLINE}" == "true" ]; then
@@ -2256,28 +2258,31 @@ function getpatfiles() {
# Generate HardwareID
function genHardwareID() {
HWID="$(genHWID)"
if [ -n "${HWID}" ]; then
USERID="$(curl -skL "https://arc.auxxxilium.tech?hwid=${HWID}")"
if echo "${USERID}" | grep -vq "Hardware ID"; then
dialog --backtitle "$(backtitle)" --title "HardwareID" \
--msgbox "HardwareID: ${HWID}\nYour HardwareID is registered to UserID: ${USERID}!" 6 70
writeConfigKey "arc.hwid" "${HWID}" "${USER_CONFIG_FILE}"
writeConfigKey "arc.userid" "${USERID}" "${USER_CONFIG_FILE}"
while true; do
if [ -n "${HWID}" ]; then
USERID="$(curl -skL "https://arc.auxxxilium.tech?hwid=${HWID}" 2>/dev/null)"
if echo "${USERID}" | grep -vq "Hardware ID"; then
dialog --backtitle "$(backtitle)" --title "HardwareID" \
--msgbox "HardwareID: ${HWID}\nYour HardwareID is registered to UserID: ${USERID}!" 6 70
writeConfigKey "arc.hwid" "${HWID}" "${USER_CONFIG_FILE}"
writeConfigKey "arc.userid" "${USERID}" "${USER_CONFIG_FILE}"
break
else
dialog --backtitle "$(backtitle)" --title "HardwareID" \
--yes-label "Retry" --no-label "Cancel" --yesno "HardwareID: ${HWID}\nRegister your HardwareID on\nhttps://arc.auxxxilium.tech (Discord Account needed)." 7 60
[ $? -ne 0 ] && USERID="" && break
writeConfigKey "arc.hwid" "" "${USER_CONFIG_FILE}"
writeConfigKey "arc.userid" "" "${USER_CONFIG_FILE}"
fi
else
dialog --backtitle "$(backtitle)" --title "HardwareID" \
--yes-label "Retry" --no-label "Cancel" --yesno "HardwareID: ${HWID}\nRegister your HardwareID on\nhttps://arc.auxxxilium.tech (Discord Account needed)." 8 60
[ $? -ne 0 ] && USERID="" && return 1
--msgbox "HardwareID: ID Generation failed!" 6 50
USERID=""
writeConfigKey "arc.hwid" "" "${USER_CONFIG_FILE}"
writeConfigKey "arc.userid" "" "${USER_CONFIG_FILE}"
genHardwareID
break
fi
else
dialog --backtitle "$(backtitle)" --title "HardwareID" \
--msgbox "HardwareID: Verification failed!" 6 50
USERID=""
writeConfigKey "arc.hwid" "" "${USER_CONFIG_FILE}"
writeConfigKey "arc.userid" "" "${USER_CONFIG_FILE}"
fi
done
return
}
@@ -2285,22 +2290,29 @@ function genHardwareID() {
# Check HardwareID
function checkHardwareID() {
HWID="$(genHWID)"
USERID="$(curl -skL "https://arc.auxxxilium.tech?hwid=${HWID}")"
USERID="$(curl -skL "https://arc.auxxxilium.tech?hwid=${HWID}" 2>/dev/null)"
if echo "${USERID}" | grep -vq "Hardware ID"; then
writeConfigKey "arc.hwid" "${HWID}" "${USER_CONFIG_FILE}"
writeConfigKey "arc.userid" "${USERID}" "${USER_CONFIG_FILE}"
if [ -n "${USERID}" ] && [ -n "${HWID}" ]; then
cp -f "${S_FILE}" "${S_FILE}.bak"
curl -skL "https://arc.auxxxilium.tech?hwid=${HWID}&userid=${USERID}" > "${S_FILE}"
cp -f "${S_FILE}" "${S_FILE}.bak"
if curl -skL "https://arc.auxxxilium.tech?hwid=${HWID}&userid=${USERID}" -o "${S_FILE}" 2>/dev/null; then
dialog --backtitle "$(backtitle)" --title "HardwareID" \
--infobox "HardwareID: ${HWID}\nYour HardwareID is registered to UserID: ${USERID}!" 4 70
writeConfigKey "arc.hwid" "${HWID}" "${USER_CONFIG_FILE}"
writeConfigKey "arc.userid" "${USERID}" "${USER_CONFIG_FILE}"
else
dialog --backtitle "$(backtitle)" --title "HardwareID" \
--infobox "HardwareID: Your HardwareID couldn't be verified!" 4 50
USERID=""
writeConfigKey "arc.hwid" "" "${USER_CONFIG_FILE}"
writeConfigKey "arc.userid" "" "${USER_CONFIG_FILE}"
fi
else
dialog --backtitle "$(backtitle)" --title "HardwareID" \
--infobox "HardwareID: Your HardwareID isn't registered!" 4 50
USERID=""
writeConfigKey "arc.hwid" "" "${USER_CONFIG_FILE}"
writeConfigKey "arc.userid" "" "${USER_CONFIG_FILE}"
dialog --backtitle "$(backtitle)" --title "HardwareID" \
--infobox "Couldn't verify your HardwareID!\nArc Patch not enabled!" 6 40
cp -f "${S_FILE}.bak" "${S_FILE}"
sleep 3
fi
sleep 3
return
}

View File

@@ -89,11 +89,14 @@ function backtitlep() {
# Model Selection
function arcModel() {
STEP="model"
dialog --backtitle "$(backtitlep)" --title "Model" \
--infobox "Reading Models..." 3 25
if [ ! -f "${S_FILE}" ] || [ ! -f "${P_FILE}" ]; then
updateConfigs
fi
# Check for Hardware ID
checkHardwareID
dialog --backtitle "$(backtitlep)" --title "Model" \
--infobox "Reading Models..." 3 25
ARCCONF="$(readConfigKey "${MODEL:-SA6400}.serial" "${S_FILE}")"
# Loop menu
RESTRICT=1
PS="$(readConfigEntriesArray "platforms" "${P_FILE}" | sort)"
@@ -151,14 +154,15 @@ function arcModel() {
fi
[ -n "$(grep -w "${M}" "${S_FILE}")" ] && BETA="Arc" || BETA="Syno"
[ -z "$(grep -w "${A}" "${P_FILE}")" ] && COMPATIBLE=0
if [ -n "${ARCKEY}" ]; then
if [ -n "${ARCCONF}" ]; then
[ ${COMPATIBLE} -eq 1 ] && echo -e "${M} \"\t$(printf "\Zb%-15s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-12s\Zn \Zb%-5s\Zn \Zb%-10s\Zn \Zb%-12s\Zn \Zb%-10s\Zn \Zb%-10s\Zn" "${A}" "${DTS}" "${ARC}" "${IGPUS}" "${HBAS}" "${M_2_CACHE}" "${M_2_STORAGE}" "${USBS}" "${BETA}")\" ">>"${TMP_PATH}/menu"
else
[ ${COMPATIBLE} -eq 1 ] && echo -e "${M} \"\t$(printf "\Zb%-15s\Zn \Zb%-5s\Zn \Zb%-12s\Zn \Zb%-5s\Zn \Zb%-10s\Zn \Zb%-12s\Zn \Zb%-10s\Zn \Zb%-10s\Zn" "${A}" "${DTS}" "${IGPUS}" "${HBAS}" "${M_2_CACHE}" "${M_2_STORAGE}" "${USBS}" "${BETA}")\" ">>"${TMP_PATH}/menu"
fi
done < <(cat "${TMP_PATH}/modellist")
[ -n "${ARCKEY}" ] && MSG="Supported Models for your Hardware (x = supported / + = need Addons)\n$(printf "\Zb%-16s\Zn \Zb%-15s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-12s\Zn \Zb%-5s\Zn \Zb%-10s\Zn \Zb%-12s\Zn \Zb%-10s\Zn \Zb%-10s\Zn" "Model" "Platform" "DT" "Arc" "Intel iGPU" "HBA" "M.2 Cache" "M.2 Volume" "USB Mount" "Source")" || MSG="Supported Models for your Hardware (x = supported / + = need Addons) | Syno Models can have faulty Values.\n$(printf "\Zb%-16s\Zn \Zb%-15s\Zn \Zb%-5s\Zn \Zb%-12s\Zn \Zb%-5s\Zn \Zb%-10s\Zn \Zb%-12s\Zn \Zb%-10s\Zn \Zb%-10s\Zn" "Model" "Platform" "DT" "Intel iGPU" "HBA" "M.2 Cache" "M.2 Volume" "USB Mount" "Source")"
[ -n "${ARCKEY}" ] && TITLEMSG="Arc Model" || TITLEMSG="Model"
ARCCONF="$(readConfigKey "${MODEL:-SA6400}.serial" "${S_FILE}")"
[ -n "${ARCCONF}" ] && MSG="Supported Models for your Hardware (x = supported / + = need Addons)\n$(printf "\Zb%-16s\Zn \Zb%-15s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-12s\Zn \Zb%-5s\Zn \Zb%-10s\Zn \Zb%-12s\Zn \Zb%-10s\Zn \Zb%-10s\Zn" "Model" "Platform" "DT" "Arc" "Intel iGPU" "HBA" "M.2 Cache" "M.2 Volume" "USB Mount" "Source")" || MSG="Supported Models for your Hardware (x = supported / + = need Addons) | Syno Models can have faulty Values.\n$(printf "\Zb%-16s\Zn \Zb%-15s\Zn \Zb%-5s\Zn \Zb%-12s\Zn \Zb%-5s\Zn \Zb%-10s\Zn \Zb%-12s\Zn \Zb%-10s\Zn \Zb%-10s\Zn" "Model" "Platform" "DT" "Intel iGPU" "HBA" "M.2 Cache" "M.2 Volume" "USB Mount" "Source")"
[ -n "${ARCCONF}" ] && TITLEMSG="Arc Model" || TITLEMSG="Model"
dialog --backtitle "$(backtitlep)" --title "${TITLEMSG}" --colors \
--cancel-label "Show all" --help-button --help-label "Exit" \
--extra-button --extra-label "Info" \
@@ -671,7 +675,7 @@ function make() {
SN="$(readConfigKey "sn" "${USER_CONFIG_FILE}")"
BOOTMODE="$(readConfigKey "arc.mode" "${USER_CONFIG_FILE}")"
if [ "${BOOTMODE}" != "automated" ] && [ "${ARCOFFLINE}" != "true" ] && [[ "${ARCPATCH}" != "true" || -z "${ARCCONF}" ]]; then
if ! curl -skL "https://auxxxilium.tech/check.yml" -o "${TMP_PATH}/check.yml" 2>/dev/null; then
if ! curl -skL "https://arc.auxxxilium.tech/check.yml" -o "${TMP_PATH}/check.yml" 2>/dev/null; then
SN=$(generateSerial "${MODEL}" "false")
else
if grep -q "${SN}" "${TMP_PATH}/check.yml"; then

View File

@@ -326,7 +326,7 @@ elif [ "${DIRECTBOOT}" == "false" ]; then
echo -e "\033[1;37mBooting DSM...\033[0m"
# Boot to DSM
[ "${KERNELLOAD}" == "kexec" ] && kexec -e || poweroff
[ "${KERNELLOAD}" == "kexec" ] && exec kexec -e || exec poweroff
fi
exit 0

View File

@@ -319,8 +319,8 @@ function updateModules() {
###############################################################################
# Update Configs
function updateConfigs() {
local ARCKEY="$(readConfigKey "arc.key" "${USER_CONFIG_FILE}")"
[ -f "${MODEL_CONFIG_PATH}/VERSION" ] && local CONFIGSVERSION="$(cat "${MODEL_CONFIG_PATH}/VERSION")" || CONFIGSVERSION="0.0.0"
local USERID="$(readConfigKey "arc.userid" "${USER_CONFIG_FILE}")"
if [ -z "${1}" ]; then
idx=0
while [ ${idx} -le 5 ]; do # Loop 5 times, if successful, break
@@ -362,6 +362,7 @@ function updateConfigs() {
dialog --backtitle "$(backtitle)" --title "Update Configs" \
--infobox "Update successful!" 3 50
sleep 2
[ -z "${USERID}" ] && checkHardwareID || true
else
return 1
fi

View File

@@ -38,7 +38,6 @@ initConfigKey "arc" "{}" "${USER_CONFIG_FILE}"
initConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
initConfigKey "arc.confdone" "false" "${USER_CONFIG_FILE}"
initConfigKey "arc.dynamic" "false" "${USER_CONFIG_FILE}"
initConfigKey "arc.key" "" "${USER_CONFIG_FILE}"
initConfigKey "arc.offline" "false" "${USER_CONFIG_FILE}"
initConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
initConfigKey "arc.version" "${ARC_VERSION}" "${USER_CONFIG_FILE}"
@@ -156,7 +155,7 @@ elif [ "${ARCMODE}" == "update" ]; then
elif [ "${BUILDDONE}" == "true" ] && [ "${ARCMODE}" == "dsm" ]; then
echo -e "\033[1;34mStarting DSM Mode...\033[0m"
if [ -f "${ARC_PATH}/boot.sh" ]; then
boot.sh && exit 0
exec boot.sh && exit 0
else
echo -e "\033[1;31mError: Can't find Arc System Files...\033[0m"
fi

View File

@@ -37,8 +37,8 @@ sudo mount ${LOOPX}p3 "/tmp/p3"
[[ ! -f "brx/bzImage-arc" || ! -f "brx/initrd-arc" ]] && return 1
ARC_BUILD="`date +'%y%m%d'`-dev"
ARC_VERSION="13.11"
ARC_BUILD="`date +'%y%m%d'`"
ARC_VERSION="13.37.dev"
ARC_BRANCH="next"
echo "${ARC_BUILD}" >files/p1/ARC-BUILD
echo "${ARC_VERSION}" >files/p1/ARC-VERSION

View File

@@ -37,8 +37,8 @@ sudo mount ${LOOPX}p3 "/tmp/p3"
[[ ! -f "brs/bzImage-arc" || ! -f "brs/initrd-arc" ]] && return 1
ARC_BUILD="`date +'%y%m%d'`-dev"
ARC_VERSION="13.11"
ARC_BUILD="`date +'%y%m%d'`"
ARC_VERSION="13.37.dev"
ARC_BRANCH="stable"
echo "${ARC_BUILD}" >files/p1/ARC-BUILD
echo "${ARC_VERSION}" >files/p1/ARC-VERSION