tree: more fixes

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-06-01 23:40:35 +02:00
parent 21bbfb5ff2
commit 08c1100be5
3 changed files with 14 additions and 12 deletions

View File

@ -301,7 +301,8 @@ function arcVersion() {
writeConfigKey "productver" "${PRODUCTVER}" "${USER_CONFIG_FILE}"
if [ -f "${ORI_ZIMAGE_FILE}" ] || [ -f "${ORI_RDGZ_FILE}" ] || [ -f "${MOD_ZIMAGE_FILE}" ] || [ -f "${MOD_RDGZ_FILE}" ]; then
# Delete old files
rm -f "${ORI_ZIMAGE_FILE}" "${ORI_RDGZ_FILE}" "${MOD_ZIMAGE_FILE}" "${MOD_RDGZ_FILE}" >/dev/null
rm -f "${ORI_ZIMAGE_FILE}" "${ORI_RDGZ_FILE}" "${MOD_ZIMAGE_FILE}" "${MOD_RDGZ_FILE}" >/dev/null 2>&1 || true
rm -f "${PART1_PATH}/grub_cksum.syno" "${PART1_PATH}/GRUB_VER" "${PART2_PATH}/"* >/dev/null 2>&1 || true
fi
fi
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
@ -618,14 +619,14 @@ function make() {
PAT_HASH_CONF="$(readConfigKey "arc.pathash" "${USER_CONFIG_FILE}")"
# Get PAT Data
dialog --backtitle "$(backtitle)" --colors --title "Arc Build" \
--infobox "Get PAT Data from Syno..." 4 40
--infobox "Get PAT Data from Syno..." 3 30
idx=0
while [ ${idx} -le 5 ]; do # Loop 3 times, if successful, break
PAT_URL="$(curl --interface ${ARCNIC} -m 10 -skL "https://www.synology.com/api/support/findDownloadInfo?lang=en-us&product=${MODEL/+/%2B}&major=${PRODUCTVER%%.*}&minor=${PRODUCTVER##*.}" | jq -r '.info.system.detail[0].items[0].files[0].url')"
PAT_HASH="$(curl --interface ${ARCNIC} -m 10 -skL "https://www.synology.com/api/support/findDownloadInfo?lang=en-us&product=${MODEL/+/%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
if echo "${PAT_URL}" | grep -q "https://*"; then
if (echo "${PAT_URL}" | grep -q "https://*"); then
VALID=true
break
fi
@ -635,14 +636,14 @@ function make() {
done
if [ "${VALID}" = "false" ]; then
dialog --backtitle "$(backtitle)" --colors --title "Arc Build" \
--infobox "Get PAT Data from Github..." 3 40
--infobox "Get PAT Data from Github..." 3 30
idx=0
while [ ${idx} -le 3 ]; do # Loop 3 times, if successful, break
PAT_URL="$(curl --interface ${ARCNIC} -m 5 -skL "https://raw.githubusercontent.com/AuxXxilium/arc-dsm/main/dsm/${MODEL/+/%2B}/${PRODUCTVER}/pat_url")"
PAT_HASH="$(curl --interface ${ARCNIC} -m 5 -skL "https://raw.githubusercontent.com/AuxXxilium/arc-dsm/main/dsm/${MODEL/+/%2B}/${PRODUCTVER}/pat_hash")"
PAT_URL=${PAT_URL%%\?*}
if [ -n "${PAT_URL}" ] && [ -n "${PAT_HASH}" ]; then
if echo "${PAT_URL}" | grep -q "https://*"; then
if (echo "${PAT_URL}" | grep -q "https://*"); then
VALID=true
break
fi

View File

@ -251,14 +251,14 @@ done
# SA6400 patches
if [ "${PLATFORM}" = "epyc7002" ]; then
echo -e "Apply Epyc7002 Fixes"
echo -n " - Apply Epyc7002 Fixes"
sed -i 's#/dev/console#/var/log/lrc#g' ${RAMDISK_PATH}/usr/bin/busybox
sed -i '/^echo "START/a \\nmknod -m 0666 /dev/console c 1 3' ${RAMDISK_PATH}/linuxrc.syno
fi
# Broadwellntbap patches
if [ "${PLATFORM}" = "broadwellntbap" ]; then
echo -e "Apply Broadwellntbap Fixes"
echo -n " - Apply Broadwellntbap Fixes"
sed -i 's/IsUCOrXA="yes"/XIsUCOrXA="yes"/g; s/IsUCOrXA=yes/XIsUCOrXA=yes/g' ${RAMDISK_PATH}/usr/syno/share/environments.sh
fi

View File

@ -81,6 +81,7 @@ function set_gfxpayload {
}
set ARC_CMDLINE="console=tty2 root=/dev/ram net.ifnames=0"
set ARC_CONFIG_CMDLINE="console=tty2 root=/dev/ram net.ifnames=0 ipv6.disable=1"
search --set=root --label "ARC3"
if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
@ -110,7 +111,7 @@ if [ -s /automated ]; then
menuentry 'Arc Automated Config Mode' --id automated {
set_gfxpayload
echo "Loading Arc Kernel..."
linux /bzImage-arc ${ARC_CMDLINE} automated_arc
linux /bzImage-arc ${ARC_CONFIG_CMDLINE} automated_arc
echo "Loading Arc Initramfs..."
initrd /initrd-arc
echo "Booting..."
@ -120,7 +121,7 @@ fi
menuentry 'Arc Config Mode' --id config {
set_gfxpayload
echo "Loading Arc Kernel..."
linux /bzImage-arc ${ARC_CMDLINE} force_arc
linux /bzImage-arc ${ARC_CONFIG_CMDLINE} force_arc
echo "Loading Arc Initramfs..."
initrd /initrd-arc
echo "Booting..."
@ -129,7 +130,7 @@ menuentry 'Arc Config Mode' --id config {
menuentry 'Arc Update Mode' --id update {
set_gfxpayload
echo "Loading Arc Kernel..."
linux /bzImage-arc ${ARC_CMDLINE} update_arc
linux /bzImage-arc ${ARC_CONFIG_CMDLINE} update_arc
echo "Loading Arc Initramfs..."
initrd /initrd-arc
echo "Booting..."
@ -139,7 +140,7 @@ if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
menuentry 'DSM Recovery Mode' --id recovery {
set_gfxpayload
echo "Loading Arc Kernel..."
linux /bzImage-arc ${ARC_CMDLINE} recovery
linux /bzImage-arc ${ARC_CONFIG_CMDLINE} recovery
echo "Loading Arc Initramfs..."
initrd /initrd-arc
echo "Booting..."
@ -147,7 +148,7 @@ if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
menuentry 'DSM Reinstall Mode' --id junior {
set_gfxpayload
echo "Loading Arc Kernel..."
linux /bzImage-arc ${ARC_CMDLINE} force_junior
linux /bzImage-arc ${ARC_CONFIG_CMDLINE} force_junior
echo "Loading Arc Initramfs..."
initrd /initrd-arc
echo "Booting..."