From 139db3449fac08085c2803b5f67159c9618d305a Mon Sep 17 00:00:00 2001 From: bin456789 Date: Tue, 6 May 2025 23:53:52 +0800 Subject: [PATCH] =?UTF-8?q?windows:=2011=20=E4=BB=A3=E9=85=B7=E7=9D=BF=20v?= =?UTF-8?q?md=20=E9=A9=B1=E5=8A=A8=E5=9C=A8=20RST=20v19=20=E9=87=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trans.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/trans.sh b/trans.sh index e62993f..7bc1183 100644 --- a/trans.sh +++ b/trans.sh @@ -6375,16 +6375,31 @@ EOF } add_driver_vmd() { - apk add 7zip - if [ "$build_ver" -ge 19041 ]; then + # RST v20 不支持 11代 PCI\VEN_8086&DEV_9A0B + is_gen11=false + for d in /sys/bus/pci/devices/*; do + vendor=$(cat "$d/vendor" 2>/dev/null) + device=$(cat "$d/device" 2>/dev/null) + if [ "$vendor" = "0x8086" ] && [ "$device" = "0x9a0b" ]; then + is_gen11=true + break + fi + done + + if ! $is_gen11 && [ "$build_ver" -ge 19041 ]; then url=https://downloadmirror.intel.com/849939/SetupRST.exe # RST v20 elif [ "$build_ver" -ge 15063 ]; then url=https://downloadmirror.intel.com/849934/SetupRST.exe # RST v19 + else + error_and_exit "can't find suitable vmd driver" fi + # 注意 intel 禁止了 aria2 下载 download $url $drv/SetupRST.exe + apk add 7zip 7z x $drv/SetupRST.exe -o$drv/SetupRST -i!.text 7z x $drv/SetupRST/.text -o$drv/vmd + apk del 7zip cp_drivers $drv/vmd }