mirror of
https://github.com/RROrg/rr.git
synced 2025-12-20 11:10:05 +08:00
Compare commits
3 Commits
4119344e60
...
32f5b16664
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32f5b16664 | ||
|
|
73d20b59f2 | ||
|
|
9c636e8390 |
@ -1,4 +1,4 @@
|
|||||||
RR_VERSION="25.1.0"
|
RR_VERSION="25.1.1"
|
||||||
RR_RELEASE=""
|
RR_RELEASE=""
|
||||||
RR_TITLE="RR v${RR_VERSION}"
|
RR_TITLE="RR v${RR_VERSION}"
|
||||||
|
|
||||||
|
|||||||
@ -145,7 +145,8 @@ def getmodels(platforms=None):
|
|||||||
models.sort(key=lambda k: (k["arch"], k["name"]))
|
models.sort(key=lambda k: (k["arch"], k["name"]))
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
click.echo(f"Error: {e}")
|
# click.echo(f"Error: {e}")
|
||||||
|
pass
|
||||||
|
|
||||||
print(json.dumps(models, indent=4))
|
print(json.dumps(models, indent=4))
|
||||||
|
|
||||||
@ -190,7 +191,8 @@ def getmodelsbykb(platforms=None):
|
|||||||
continue
|
continue
|
||||||
models.append({"name": d[0].split("<br")[0], "arch": d[5].lower()})
|
models.append({"name": d[0].split("<br")[0], "arch": d[5].lower()})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
click.echo(f"Error: {e}")
|
# click.echo(f"Error: {e}")
|
||||||
|
pass
|
||||||
|
|
||||||
models.sort(key=lambda x: (x["arch"], x["name"]))
|
models.sort(key=lambda x: (x["arch"], x["name"]))
|
||||||
print(json.dumps(models, indent=4))
|
print(json.dumps(models, indent=4))
|
||||||
@ -272,7 +274,8 @@ def getpats4mv(model, version):
|
|||||||
'sum': S['files'][0]['checksum']
|
'sum': S['files'][0]['checksum']
|
||||||
}
|
}
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
click.echo(f"Error: {e}")
|
# click.echo(f"Error: {e}")
|
||||||
|
pass
|
||||||
|
|
||||||
pats = {k: pats[k] for k in sorted(pats.keys(), reverse=True)}
|
pats = {k: pats[k] for k in sorted(pats.keys(), reverse=True)}
|
||||||
print(json.dumps(pats, indent=4))
|
print(json.dumps(pats, indent=4))
|
||||||
@ -321,7 +324,8 @@ def getpats(models=None):
|
|||||||
pats[model] = {}
|
pats[model] = {}
|
||||||
pats[model][__fullversion(ver)] = item.attrs['href']
|
pats[model][__fullversion(ver)] = item.attrs['href']
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
click.echo(f"Error: {e}")
|
# click.echo(f"Error: {e}")
|
||||||
|
pass
|
||||||
|
|
||||||
print(json.dumps(pats, indent=4))
|
print(json.dumps(pats, indent=4))
|
||||||
|
|
||||||
|
|||||||
@ -397,7 +397,7 @@ function checkBIOS_VT_d() {
|
|||||||
# Rebooting
|
# Rebooting
|
||||||
# 1 - mode
|
# 1 - mode
|
||||||
function rebootTo() {
|
function rebootTo() {
|
||||||
local MODES="config recovery junior bios memtest"
|
local MODES="config recovery junior uefi memtest"
|
||||||
if [ -z "${1}" ] || ! echo "${MODES}" | grep -wq "${1}"; then exit 1; fi
|
if [ -z "${1}" ] || ! echo "${MODES}" | grep -wq "${1}"; then exit 1; fi
|
||||||
# echo "Rebooting to ${1} mode"
|
# echo "Rebooting to ${1} mode"
|
||||||
GRUBPATH="$(dirname "$(find "${PART1_PATH}/" -name grub.cfg 2>/dev/null | head -1)")"
|
GRUBPATH="$(dirname "$(find "${PART1_PATH}/" -name grub.cfg 2>/dev/null | head -1)")"
|
||||||
|
|||||||
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
@ -126,7 +126,7 @@ function modelMenu() {
|
|||||||
PS="$(readConfigEntriesArray "platforms" "${WORK_PATH}/platforms.yml" | sort)"
|
PS="$(readConfigEntriesArray "platforms" "${WORK_PATH}/platforms.yml" | sort)"
|
||||||
MJ="$(python3 ${WORK_PATH}/include/functions.py getmodels -p "${PS[*]}")"
|
MJ="$(python3 ${WORK_PATH}/include/functions.py getmodels -p "${PS[*]}")"
|
||||||
|
|
||||||
if [ "${MJ:-[]}" = "[]" ]; then
|
if [ "${MJ:-"[]"}" = "[]" ]; then
|
||||||
DIALOG --title "$(TEXT "Model")" \
|
DIALOG --title "$(TEXT "Model")" \
|
||||||
--msgbox "$(TEXT "Unable to connect to Synology website, Please check the network and try again, or use 'Parse Pat'!")" 0 0
|
--msgbox "$(TEXT "Unable to connect to Synology website, Please check the network and try again, or use 'Parse Pat'!")" 0 0
|
||||||
return 1
|
return 1
|
||||||
@ -257,7 +257,7 @@ function productversMenu() {
|
|||||||
--infobox "$(TEXT "Get pat data ...")" 0 0
|
--infobox "$(TEXT "Get pat data ...")" 0 0
|
||||||
fi
|
fi
|
||||||
PJ="$(python3 ${WORK_PATH}/include/functions.py getpats4mv -m "${MODEL}" -v "${selver}")"
|
PJ="$(python3 ${WORK_PATH}/include/functions.py getpats4mv -m "${MODEL}" -v "${selver}")"
|
||||||
if [ "${PJ:-{}}" = "{}" ]; then
|
if [ "${PJ:-"{}"}" = "{}" ]; then
|
||||||
if [ -z "${1}" ]; then
|
if [ -z "${1}" ]; then
|
||||||
MSG="$(TEXT "Unable to connect to Synology website, Please check the network and try again, or use 'Parse Pat'!")"
|
MSG="$(TEXT "Unable to connect to Synology website, Please check the network and try again, or use 'Parse Pat'!")"
|
||||||
DIALOG --title "$(TEXT "Addons")" \
|
DIALOG --title "$(TEXT "Addons")" \
|
||||||
@ -4125,9 +4125,9 @@ else
|
|||||||
echo "x \"$(TEXT "Reboot to RR")\""
|
echo "x \"$(TEXT "Reboot to RR")\""
|
||||||
echo "y \"$(TEXT "Reboot to Recovery")\""
|
echo "y \"$(TEXT "Reboot to Recovery")\""
|
||||||
echo "z \"$(TEXT "Reboot to Junior")\""
|
echo "z \"$(TEXT "Reboot to Junior")\""
|
||||||
#if efibootmgr | grep -q "^Boot0000"; then
|
if [ -d "/sys/firmware/efi" ]; then
|
||||||
echo "b \"$(TEXT "Reboot to BIOS")\""
|
echo "b \"$(TEXT "Reboot to UEFI")\""
|
||||||
#fi
|
fi
|
||||||
echo "s \"$(TEXT "Back to shell")\""
|
echo "s \"$(TEXT "Back to shell")\""
|
||||||
echo "e \"$(TEXT "Exit")\""
|
echo "e \"$(TEXT "Exit")\""
|
||||||
} >"${TMP_PATH}/menu"
|
} >"${TMP_PATH}/menu"
|
||||||
@ -4168,10 +4168,8 @@ else
|
|||||||
;;
|
;;
|
||||||
b)
|
b)
|
||||||
DIALOG --title "$(TEXT "Main menu")" \
|
DIALOG --title "$(TEXT "Main menu")" \
|
||||||
--infobox "$(TEXT "Reboot to BIOS")" 0 0
|
--infobox "$(TEXT "Reboot to UEFI")" 0 0
|
||||||
#efibootmgr -n 0000 >/dev/null 2>&1
|
rebootTo uefi
|
||||||
#reboot
|
|
||||||
rebootTo bios
|
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
s)
|
s)
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
25.1.0
|
25.1.1
|
||||||
|
|||||||
@ -1,57 +1,84 @@
|
|||||||
set default="boot"
|
|
||||||
set timeout="5"
|
set timeout="5"
|
||||||
set timeout_style="menu"
|
set timeout_style="menu"
|
||||||
set pager=1
|
|
||||||
set vesa_mode=1
|
|
||||||
set color_normal=white/black
|
|
||||||
set menu_color_normal=light-cyan/black
|
|
||||||
set menu_color_highlight=black/cyan
|
|
||||||
|
|
||||||
if [ -s ${prefix}/grubenv ]; then
|
if [ -s ${prefix}/grubenv ]; then
|
||||||
load_env --skip-sig
|
load_env --skip-sig
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${next_entry}" ]; then
|
if [ "${next_entry}" ]; then
|
||||||
set default="${next_entry}"
|
set default="${next_entry}"
|
||||||
unset next_entry
|
unset next_entry
|
||||||
save_env next_entry
|
save_env next_entry
|
||||||
fi
|
|
||||||
if [ "${vesa_mode}" ]; then
|
|
||||||
set vesa_mode=${vesa_mode}
|
|
||||||
fi
|
|
||||||
|
|
||||||
terminal_input console
|
|
||||||
terminal_output console
|
|
||||||
|
|
||||||
if [ "${feature_all_video_module}" = "y" ]; then
|
|
||||||
insmod all_video
|
|
||||||
else
|
else
|
||||||
insmod efi_gop
|
set default="boot"
|
||||||
insmod efi_uga
|
|
||||||
insmod vbe
|
|
||||||
insmod vga
|
|
||||||
insmod video_bochs
|
|
||||||
insmod video_cirrus
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if loadfont unicode; then
|
if [ "${linux_gfx_mode}" ]; then
|
||||||
set gfxmode=auto
|
save_env linux_gfx_mode
|
||||||
terminal_output gfxterm
|
else
|
||||||
|
set linux_gfx_mode=keep
|
||||||
|
save_env linux_gfx_mode
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ x"${feature_menuentry_id}" = xy ]; then
|
||||||
|
menuentry_id_option="--id"
|
||||||
|
else
|
||||||
|
menuentry_id_option=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
export menuentry_id_option
|
||||||
|
|
||||||
|
function load_video {
|
||||||
|
if [ x"${feature_all_video_module}" = xy ]; then
|
||||||
|
insmod all_video
|
||||||
|
else
|
||||||
|
insmod efi_gop
|
||||||
|
insmod efi_uga
|
||||||
|
insmod ieee1275_fb
|
||||||
|
insmod vbe
|
||||||
|
insmod vga
|
||||||
|
insmod video_bochs
|
||||||
|
insmod video_cirrus
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ x"${feature_default_font_path}" = xy ]; then
|
||||||
|
font=unicode
|
||||||
|
else
|
||||||
|
font=${prefix}/fonts/unicode.pf2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if loadfont ${font}; then
|
||||||
|
set gfxmode=auto
|
||||||
|
load_video
|
||||||
|
insmod gfxterm
|
||||||
|
set locale_dir=$prefix/locale
|
||||||
|
set lang=en_US
|
||||||
|
insmod gettext
|
||||||
|
fi
|
||||||
|
|
||||||
|
terminal_output gfxterm
|
||||||
|
|
||||||
if serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1; then
|
if serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1; then
|
||||||
terminal_input --append serial
|
terminal_input --append serial
|
||||||
terminal_output --append serial
|
terminal_output --append serial
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set color_normal=white/black
|
||||||
|
set menu_color_normal=light-cyan/black
|
||||||
|
set menu_color_highlight=black/cyan
|
||||||
|
|
||||||
insmod png
|
insmod png
|
||||||
background_image ${prefix}/logo.png
|
background_image ${prefix}/logo.png
|
||||||
|
|
||||||
function set_gfxpayload {
|
function gfxmode {
|
||||||
if [ ${vesa_mode} -eq 1 ]; then
|
set gfxpayload="${linux_gfx_mode}"
|
||||||
set gfxpayload=keep
|
if [ "${linux_gfx_mode}" = "keep" ]; then
|
||||||
else
|
set vt_handoff=vt.handoff=7
|
||||||
set gfxpayload=text
|
else
|
||||||
fi
|
set vt_handoff=
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
set RR_CMDLINE="earlyprintk earlycon=uart8250,io,0x3f8,115200n8 console=ttyS0,115200n8 root=/dev/ram rootwait intremap=off amd_iommu_intr=legacy net.ifnames=0 panic=5 split_lock_detect=off pcie_aspm=off intel_pstate=disable amd_pstate=disable nox2apic nomodeset"
|
set RR_CMDLINE="earlyprintk earlycon=uart8250,io,0x3f8,115200n8 console=ttyS0,115200n8 root=/dev/ram rootwait intremap=off amd_iommu_intr=legacy net.ifnames=0 panic=5 split_lock_detect=off pcie_aspm=off intel_pstate=disable amd_pstate=disable nox2apic nomodeset"
|
||||||
@ -60,9 +87,8 @@ search --set=root --label "RR3"
|
|||||||
if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
|
if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
|
||||||
if [ "${default}" = "direct" ]; then
|
if [ "${default}" = "direct" ]; then
|
||||||
set timeout="1"
|
set timeout="1"
|
||||||
set pager=0
|
menuentry 'Boot DSM kernel directly' ${menuentry_id_option} direct {
|
||||||
menuentry 'Boot DSM kernel directly' --id direct {
|
gfxmode
|
||||||
set_gfxpayload
|
|
||||||
echo "RRVersion: ${rr_version}"
|
echo "RRVersion: ${rr_version}"
|
||||||
echo "${rr_booting}"
|
echo "${rr_booting}"
|
||||||
echo -n "Boot Time: "; date
|
echo -n "Boot Time: "; date
|
||||||
@ -86,8 +112,8 @@ if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
|
|||||||
echo "Access http://find.synology.com/ to connect the DSM via web."
|
echo "Access http://find.synology.com/ to connect the DSM via web."
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
menuentry 'Boot DSM' --id boot {
|
menuentry 'Boot DSM' ${menuentry_id_option} boot {
|
||||||
set_gfxpayload
|
gfxmode
|
||||||
echo "Loading kernel..."
|
echo "Loading kernel..."
|
||||||
linux /bzImage-rr ${RR_CMDLINE} ${rr_cmdline}
|
linux /bzImage-rr ${RR_CMDLINE} ${rr_cmdline}
|
||||||
echo "Loading initramfs..."
|
echo "Loading initramfs..."
|
||||||
@ -98,8 +124,8 @@ if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
|
|||||||
fi
|
fi
|
||||||
echo "Booting..."
|
echo "Booting..."
|
||||||
}
|
}
|
||||||
menuentry 'Boot Recovery' --id recovery {
|
menuentry 'Boot Recovery' ${menuentry_id_option} recovery {
|
||||||
set_gfxpayload
|
gfxmode
|
||||||
echo "Loading kernel..."
|
echo "Loading kernel..."
|
||||||
linux /bzImage-rr ${RR_CMDLINE} ${rr_cmdline} recovery
|
linux /bzImage-rr ${RR_CMDLINE} ${rr_cmdline} recovery
|
||||||
echo "Loading initramfs..."
|
echo "Loading initramfs..."
|
||||||
@ -110,8 +136,8 @@ if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
|
|||||||
fi
|
fi
|
||||||
echo "Booting..."
|
echo "Booting..."
|
||||||
}
|
}
|
||||||
menuentry 'Force re-install DSM' --id junior {
|
menuentry 'Force re-install DSM' ${menuentry_id_option} junior {
|
||||||
set_gfxpayload
|
gfxmode
|
||||||
echo "Loading kernel..."
|
echo "Loading kernel..."
|
||||||
linux /bzImage-rr ${RR_CMDLINE} ${rr_cmdline} force_junior
|
linux /bzImage-rr ${RR_CMDLINE} ${rr_cmdline} force_junior
|
||||||
echo "Loading initramfs..."
|
echo "Loading initramfs..."
|
||||||
@ -124,8 +150,8 @@ if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
menuentry 'Configure loader' --id config {
|
menuentry 'Configure loader' ${menuentry_id_option} config {
|
||||||
set_gfxpayload
|
gfxmode
|
||||||
echo "Loading kernel..."
|
echo "Loading kernel..."
|
||||||
linux /bzImage-rr ${RR_CMDLINE} ${rr_cmdline} IWANTTOCHANGETHECONFIG
|
linux /bzImage-rr ${RR_CMDLINE} ${rr_cmdline} IWANTTOCHANGETHECONFIG
|
||||||
echo "Loading initramfs..."
|
echo "Loading initramfs..."
|
||||||
@ -137,26 +163,33 @@ menuentry 'Configure loader' --id config {
|
|||||||
echo "Booting..."
|
echo "Booting..."
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry 'Enter BIOS Setup' --id bios {
|
if [ "${grub_platform}" = "efi" ]; then
|
||||||
fwsetup
|
insmod bli
|
||||||
}
|
fwsetup --is-supported
|
||||||
|
if [ "$?" = 0 ]; then
|
||||||
|
menuentry 'UEFI Firmware Settings' ${menuentry_id_option} uefi {
|
||||||
|
fwsetup
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
menuentry 'Start Memtest86+' --id memtest {
|
if [ -e ${prefix}/memtest ]; then
|
||||||
echo "Loading memtest86+..."
|
menuentry 'Start Memtest86+' ${menuentry_id_option} memtest {
|
||||||
linux ${prefix}/memtest
|
echo "Loading memtest86+..."
|
||||||
}
|
linux ${prefix}/memtest
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ${vesa_mode} = 1 ]; then
|
if [ "${linux_gfx_mode}" = "keep" ]; then
|
||||||
menuentry 'Change vesa to text video mode' --id videomode {
|
menuentry 'Change vesa to text video mode' ${menuentry_id_option} videomode {
|
||||||
set vesa_mode=0
|
set linux_gfx_mode=text
|
||||||
save_env vesa_mode
|
save_env linux_gfx_mode
|
||||||
configfile ${prefix}/grub.cfg
|
configfile ${prefix}/grub.cfg
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
menuentry 'Change text to vesa video mode' --id videomode {
|
menuentry 'Change text to vesa video mode' ${menuentry_id_option} videomode {
|
||||||
set vesa_mode=1
|
set linux_gfx_mode=keep
|
||||||
save_env vesa_mode
|
save_env linux_gfx_mode
|
||||||
reboot
|
|
||||||
configfile ${prefix}/grub.cfg
|
configfile ${prefix}/grub.cfg
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user