Skip to content

Commit

Permalink
Merge pull request #1532 from AuxXxilium/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
AuxXxilium committed May 16, 2024
2 parents e9ed454 + d4afc25 commit f6bb77b
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 26 deletions.
3 changes: 3 additions & 0 deletions files/initrd/opt/arc/arc-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ function cmdlineMenu() {
MSG+=" * \Z4acpi=force\Zn\n Force enables ACPI.\n"
MSG+=" * \Z4i915.enable_guc=2\Zn\n Enable the GuC firmware on Intel graphics hardware.(value: 1,2 or 3)\n"
MSG+=" * \Z4i915.max_vfs=7\Zn\n Set the maximum number of virtual functions (VFs) that can be created for Intel graphics hardware.\n"
MSG+=" * \Z4i915.modeset=0\Zn\n Disable the kernel mode setting (KMS) feature of the i915 driver.\n"
MSG+=" * \Z4apparmor.mode=complain\Zn\n Set the AppArmor security module to complain mode.\n"
MSG+=" * \Z4pci=nommconf\Zn\n Disable the use of Memory-Mapped Configuration for PCI devices(use this parameter cautiously).\n"
MSG+="\nEnter the Parameter Name and Value you want to add.\n"
LINENUM=$(($(echo -e "${MSG}" | wc -l) + 10))
while true; do
Expand Down
42 changes: 19 additions & 23 deletions files/initrd/opt/arc/arc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ BUS=$(getBus "${LOADER_DISK}")
# Offline Mode check
OFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")"
if [ "${OFFLINE}" = "false" ]; then
if ping -c 1 "github.com" &> /dev/null; then
if ping -c 1 "github.com" 2> /dev/null; then
writeConfigKey "arc.offline" "false" "${USER_CONFIG_FILE}"
else
writeConfigKey "arc.offline" "true" "${USER_CONFIG_FILE}"
Expand Down Expand Up @@ -305,19 +305,10 @@ function arcVersion() {
else
KVERP="${KVER}"
fi
echo "$(lsmod | awk '{print $1}' | sort)" >>"${TMP_PATH}/lsmod"
cp -f "${ARC_PATH}/include/modulelist" "${TMP_PATH}/modulelist.user"
echo -e "\n\n# User Modules" >>"${TMP_PATH}/modulelist.user"
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
while read -r ID DESC; do
writeConfigKey "modules.\"${ID}\"" "" "${USER_CONFIG_FILE}"
if [ -n "$(grep -w "${ID}" "${TMP_PATH}/lsmod")" ] && [ -z "$(grep -w "${ID}" "${TMP_PATH}/modulelist.user")" ]; then
echo "N ${ID}.ko" >>"${TMP_PATH}/modulelist.user"
fi
done <<<$(getAllModules "${PLATFORM}" "${KVERP}")
[ ! -d "${USER_UP_PATH}" ] && mkdir -p "${USER_UP_PATH}"
mv -f "${TMP_PATH}/modulelist.user" "${USER_UP_PATH}/modulelist"
dos2unix "${USER_UP_PATH}/modulelist" 2>/dev/null
# Check for Only Version
if [ "${ONLYVERSION}" = "true" ]; then
# Build isn't done
Expand Down Expand Up @@ -639,32 +630,37 @@ function make() {
--infobox "Get PAT Data from Syno..." 3 30
idx=0
while [ ${idx} -le 5 ]; do # Loop 5 times, if successful, break
PAT_URL="$(curl -m 5 -skL "https://www.synology.com/api/support/findDownloadInfo?lang=en-us&product=${MODELID/+/%2B}&major=${PRODUCTVER%%.*}&minor=${PRODUCTVER##*.}" | jq -r '.info.system.detail[0].items[0].files[0].url')"
PAT_HASH="$(curl -m 5 -skL "https://www.synology.com/api/support/findDownloadInfo?lang=en-us&product=${MODELID/+/%2B}&major=${PRODUCTVER%%.*}&minor=${PRODUCTVER##*.}" | jq -r '.info.system.detail[0].items[0].files[0].checksum')"
PAT_URL=${PAT_URL%%\?*}
if [[ -n "${PAT_URL}" && -n "${PAT_HASH}" ]]; then
break
PAT_DATA=$(curl -skL --connect-timeout 10 "https://www.synology.com/api/support/findDownloadInfo?lang=en-us&product=${MODELID/+/%2B}&major=${PRODUCTVER%%.*}&minor=${PRODUCTVER##*.}")
if [ "$(echo ${PAT_DATA} | jq -r '.success' 2>/dev/null)" = "true" ]; then
if echo ${PAT_DATA} | jq -r '.info.system.detail[0].items[0].files[0].label_ext' 2>/dev/null | grep -q 'pat'; then
PAT_URL=$(echo ${PAT_DATA} | jq -r '.info.system.detail[0].items[0].files[0].url')
PAT_HASH=$(echo ${PAT_DATA} | jq -r '.info.system.detail[0].items[0].files[0].checksum')
PAT_URL=${PAT_URL%%\?*}
if [ -n "${PAT_URL}" ] && [ -n "${PAT_HASH}" ]; then
break
fi
fi
fi
sleep 3
idx=$((${idx} + 1))
done
if [[ -z "${PAT_URL}" || -z "${PAT_HASH}" ]]; then
if [ -z "${PAT_URL}" ] || [ -z "${PAT_HASH}" ] || [ ! echo ${PAT_URL} | grep "https://" ]; then
dialog --backtitle "$(backtitle)" --colors --title "Arc Build" \
--infobox "Syno Connection failed,\ntry to get from Github..." 4 30
idx=0
while [ ${idx} -le 3 ]; do # Loop 3 times, if successful, break
PAT_URL="$(curl -m 5 -skL "https://raw.githubusercontent.com/AuxXxilium/arc-dsm/main/dsm/${MODELID/+/%2B}/${PRODUCTVER%%.*}.${PRODUCTVER##*.}/pat_url")"
PAT_HASH="$(curl -m 5 -skL "https://raw.githubusercontent.com/AuxXxilium/arc-dsm/main/dsm/${MODELID/+/%2B}/${PRODUCTVER%%.*}.${PRODUCTVER##*.}/pat_hash")"
PAT_URL="$(curl -m 5 -skL "https://raw.githubusercontent.com/AuxXxilium/arc-dsm/main/dsm/${MODELID/+/%2B}/${PRODUCTVER}/pat_url")"
PAT_HASH="$(curl -m 5 -skL "https://raw.githubusercontent.com/AuxXxilium/arc-dsm/main/dsm/${MODELID/+/%2B}/${PRODUCTVER}/pat_hash")"
PAT_URL=${PAT_URL%%\?*}
if [[ -n "${PAT_URL}" && -n "${PAT_HASH}" ]]; then
if [ -n "${PAT_URL}" ] && [ -n "${PAT_HASH}" ]; then
break
fi
sleep 3
idx=$((${idx} + 1))
done
fi
if [ "${CUSTOM}" = "false" ]; then
if [[ -z "${PAT_URL}" || -z "${PAT_HASH}" ]]; then
if [ -z "${PAT_URL}" ] || [ -z "${PAT_HASH}" ] || [ ! echo ${PAT_URL} | grep "https://" ]; then
MSG="Failed to get PAT Data.\nPlease manually fill in the URL and Hash of PAT."
PAT_URL=""
PAT_HASH=""
Expand All @@ -680,7 +676,7 @@ function make() {
PAT_URL="$(cat "${TMP_PATH}/resp" | sed -n '1p')"
PAT_HASH="$(cat "${TMP_PATH}/resp" | sed -n '2p')"
else
if [[ -z "${PAT_URL}" || -z "${PAT_HASH}" ]]; then
if [ -z "${PAT_URL}" ] || [ -z "${PAT_HASH}" ] || [ ! echo ${PAT_URL} | grep "https://" ]; then
dialog --backtitle "$(backtitle)" --colors --title "Arc Build" \
--infobox "Could not get PAT Data..." 4 30
sleep 3
Expand All @@ -703,14 +699,14 @@ function make() {
# Get new Files
DSM_URL="https://raw.githubusercontent.com/AuxXxilium/arc-dsm/main/files/${MODELID/+/%2B}/${PRODUCTVER}/${PAT_HASH}.tar"
STATUS=$(curl --insecure -s -w "%{http_code}" -L "${DSM_URL}" -o "${DSM_FILE}")
if [[ $? -ne 0 || ${STATUS} -ne 200 ]]; then
if [ $? -ne 0 ] || [ ${STATUS} -ne 200 ]; then
dialog --backtitle "$(backtitle)" --title "DSM Download" --aspect 18 \
--infobox "No DSM Image found!\nTry Syno Link." 0 0
sleep 3
# Grep PAT_URL
PAT_FILE="${TMP_PATH}/${PAT_HASH}.pat"
STATUS=$(curl -k -w "%{http_code}" -L "${PAT_URL}" -o "${PAT_FILE}" --progress-bar)
if [[ $? -ne 0 || ${STATUS} -ne 200 ]]; then
if [ $? -ne 0 ] || [ ${STATUS} -ne 200 ]; then
dialog --backtitle "$(backtitle)" --title "DSM Download" --aspect 18 \
--infobox "No DSM Image found!\nExit." 0 0
sleep 5
Expand Down
6 changes: 3 additions & 3 deletions files/initrd/opt/arc/include/modulelist
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ N nct6683.ko
N nct6775.ko

# rndis
N mii.ko
N cdc_ether.ko
N rndis_host.ko
F mii.ko
F cdc_ether.ko
F rndis_host.ko

## i915
#N dmabuf.ko
Expand Down
Binary file modified files/p3/custom/bzImage-epyc7002-7.2-5.10.55.gz
Binary file not shown.
Binary file modified files/p3/custom/firmware.tgz
Binary file not shown.
Binary file modified files/p3/custom/modules-epyc7002-7.2-5.10.55.tgz
Binary file not shown.

0 comments on commit f6bb77b

Please sign in to comment.