Skip to content

Commit

Permalink
优化 something
Browse files Browse the repository at this point in the history
  • Loading branch information
wjz304 committed Feb 20, 2025
1 parent dbbb5bf commit 5ddf7ee
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion files/initrd/opt/rr/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions files/initrd/opt/rr/menu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion files/initrd/opt/rr/platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 14 additions & 6 deletions files/mnt/p1/boot/grub/grub.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5ddf7ee

Please sign in to comment.