From 5ddf7eeb488b676a401f28bbb3d4ce402a3f45a9 Mon Sep 17 00:00:00 2001 From: Ing Date: Thu, 20 Feb 2025 17:25:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20something?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/initrd/opt/rr/boot.sh | 2 +- files/initrd/opt/rr/menu.sh | 3 +-- files/initrd/opt/rr/platforms.yml | 2 +- files/mnt/p1/boot/grub/grub.cfg | 20 ++++++++++++++------ 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/files/initrd/opt/rr/boot.sh b/files/initrd/opt/rr/boot.sh index 91b3ce29..8d137877 100755 --- a/files/initrd/opt/rr/boot.sh +++ b/files/initrd/opt/rr/boot.sh @@ -123,6 +123,7 @@ CMDLINE['netif_num']="0" } # Sanity check [ -n "${MAC1}" ] && CMDLINE['mac1']="${MAC1}" && CMDLINE['netif_num']="1" [ -n "${MAC2}" ] && CMDLINE['mac2']="${MAC2}" && CMDLINE['netif_num']="2" +CMDLINE['skip_vender_mac_interfaces']="$(seq -s, 0 $((${CMDLINE['netif_num']:-1} - 1)))" # set fixed cmdline if grep -q "force_junior" /proc/cmdline; then @@ -163,7 +164,6 @@ fi CMDLINE["HddHotplug"]="1" CMDLINE["vender_format_version"]="2" -CMDLINE['skip_vender_mac_interfaces']="0,1,2,3,4,5,6,7" CMDLINE['earlyprintk']="" CMDLINE['earlycon']="uart8250,io,0x3f8,115200n8" CMDLINE['console']="ttyS0,115200n8" diff --git a/files/initrd/opt/rr/menu.sh b/files/initrd/opt/rr/menu.sh index ee24fad0..553f175b 100755 --- a/files/initrd/opt/rr/menu.sh +++ b/files/initrd/opt/rr/menu.sh @@ -3302,8 +3302,7 @@ function downloadExts() { # TAG="$(curl -skL --connect-timeout 10 "${PROXY}${3}/tags" | pup 'a[class="Link--muted"] attr{href}' | grep ".zip" | head -1)" TAG="$(curl -skL --connect-timeout 10 "${PROXY}${3}/tags" | grep "/refs/tags/.*\.zip" | sed -E 's/.*\/refs\/tags\/(.*)\.zip.*$/\1/' | sort -rV | head -1)" else - LATESTURL="$(curl -skL --connect-timeout 10 -w %{url_effective} -o /dev/null "${PROXY}${3}/releases/latest")" - TAG="${LATESTURL##*/}" + TAG="$(curl -skL --connect-timeout 10 -w %{url_effective} -o /dev/null "${PROXY}${3}/releases/latest" | awk -F'/' '{print $NF}')" fi [ "${TAG:0:1}" = "v" ] && TAG="${TAG:1}" if [ "${TAG:-latest}" = "latest" ]; then diff --git a/files/initrd/opt/rr/platforms.yml b/files/initrd/opt/rr/platforms.yml index 9e820ae0..edb04ebc 100644 --- a/files/initrd/opt/rr/platforms.yml +++ b/files/initrd/opt/rr/platforms.yml @@ -15,7 +15,7 @@ synoinfo: &synoinfo support_fan: "no" supportadt7490: "no" maxlanport: "8" - netif_seq: "0 1 2 3 4 5 6 7" + netif_seq: "" buzzeroffen: "0xffff" productvers4: &productvers4 diff --git a/files/mnt/p1/boot/grub/grub.cfg b/files/mnt/p1/boot/grub/grub.cfg index bd7d102c..40951a9b 100644 --- a/files/mnt/p1/boot/grub/grub.cfg +++ b/files/mnt/p1/boot/grub/grub.cfg @@ -74,11 +74,6 @@ background_image ${prefix}/logo.png function gfxmode { set gfxpayload="${linux_gfx_mode}" - if [ "${linux_gfx_mode}" = "keep" ]; then - set vt_handoff=vt.handoff=7 - else - 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" @@ -153,7 +148,20 @@ fi menuentry 'Configure loader' ${menuentry_id_option} config { gfxmode echo "Loading kernel..." - linux /bzImage-rr ${RR_CMDLINE} ${rr_cmdline} IWANTTOCHANGETHECONFIG + linux /bzImage-rr earlycon=uart8250,io,0x3f8,115200n8 console=ttyS0,115200n8 ${RR_CMDLINE} ${rr_cmdline} IWANTTOCHANGETHECONFIG + echo "Loading initramfs..." + if [ -e /initrd-rru ]; then + initrd /initrd-rr /initrd-rru + else + initrd /initrd-rr + fi + echo "Booting..." +} + +menuentry 'Configure loader (verbose)' ${menuentry_id_option} verbose { + gfxmode + echo "Loading kernel..." + linux /bzImage-rr ${RR_CMDLINE} ${rr_cmdline} earlycon=tty2 console=tty2 IWANTTOCHANGETHECONFIG echo "Loading initramfs..." if [ -e /initrd-rru ]; then initrd /initrd-rr /initrd-rru