如果您的目标只是升级路由器的当前固件,保持相同的版本(例如,24.10 或 SNAPSHOT),那么只需使用 upgrade 命令即可。 如果各种预构建检查发现了任何问题,或者在构建过程中检测到错误,则升级将中止,并显示一条指示问题的消息。
请牢记开始的第一步是
备份!
图形化备份:网页(Luci)转到 系统(System) → 备份与升级(Backup/Flash firmware)。 单击 生成备份(Generate archive)。
命令行备份: 复制粘贴后运行该命令 sysupgrade --create-backup /tmp/backup.tar.gz 然后使用 scp 或其他工具将文件复制到安全位置(通常是另一台主机)。
不要问为什么,跟着做!
如果 owut 发现软件包降级, 或者自上次升级以来没有进行任何更改,它会告诉您并停止. 您可以使用 --force 选项重新运行该命令,该选项将继续构建和安装,保留所有配置。如果你需要使用 -force 但你又不确定的时候,请在论坛中提问。
请注意, owut 目前仅在主线 SNAPSHOT(测试版) 或 24.x 之后稳定版上可用。
$ opkg update && opkg install owut # 在 24.10 稳定版。
$ apk -U add owut # 在主线测试版。
$ owut upgrade
owut - OpenWrt Upgrade Tool 2024.12.10~e38844ae-r1 (/usr/bin/owut)
ASU-Server https://sysupgrade.openwrt.org
Upstream https://downloads.openwrt.org
Target x86/64
Profile generic
Package-arch x86_64
Root-FS-type ext4
Sys-type combined-efi
Version-from 24.10-SNAPSHOT r28242-1eff737906 (kernel 6.6.67)
Version-to 24.10-SNAPSHOT r28304-6dacba30a7 (kernel 6.6.69)
Build-FS-type ext4
Build-at 2025-01-04T21:35:37Z (~66 hours ago)
Image-prefix openwrt-24.10-snapshot-r28304-6dacba30a7-x86-64-generic
Image-URL https://downloads.openwrt.org/releases/24.10-SNAPSHOT/targets/x86/64
Image-file openwrt-24.10-snapshot-r28304-6dacba30a7-x86-64-generic-ext4-combined-efi.img.gz
Installed 284 packages
Top-level 83 packages
Default 43 packages
User-installed 51 packages (top-level only)
Package version changes:
kmod-amazon-ena 6.6.67-r1 6.6.69-r1
kmod-amd-xgbe 6.6.67-r1 6.6.69-r1
...
procd-ujail 2024.12.17~fd01fb85-r1 2024.12.22~42d39376-r1
ubus 2024.10.20~252a9b0c-r1 2025.01.02~afa57cce-r1
ubusd 2024.10.20~252a9b0c-r1 2025.01.02~afa57cce-r1
92 packages are out-of-date
Default package analysis:
Default Provided-by
dnsmasq dnsmasq-full
kmod-dwmac-intel not installed
libustream-mbedtls not installed
nftables nftables-json
There are currently package build failures for 24.10-SNAPSHOT x86_64:
Feed: telephony
freeswitch Mon Jan 6 05:37:57 2025 - not installed
freeswitch-mod-bcg729 Mon Jan 6 05:46:38 2025 - not installed
freetdm Mon Jan 6 05:46:40 2025 - not installed
Failures don't affect this device, details at
https://downloads.openwrt.org/releases/faillogs-24.10/x86_64/
WARNING: There are 2 missing default packages, confirm this is expected before proceeding
Request:
Version 24.10-SNAPSHOT r28304-6dacba30a7 (kernel 6.6.69)
Request hash:
fc626783b488e9a7e5a5914495a7ebbbf9fb079cff7abbf2a2165a25d02c8eb6
--
Status: queued - 0 ahead of you
Progress: 0s total = 0s in queue + 0s in build
--
Status: init
Progress: 1s total = 0s in queue + 1s in build
--
Status: container_setup
Progress: 17s total = 0s in queue + 17s in build
--
Status: validate_manifest
Progress: 101s total = 0s in queue + 101s in build
--
Status: building_image
Progress: 185s total = 0s in queue + 185s in build
--
Status: done
Progress: 187s total = 0s in queue + 187s in build
Build succeeded in 187s total = 0s in queue + 187s to build:
version_number = 24.10-SNAPSHOT
version_code = r28304-6dacba30a7 (requested r28304-6dacba30a7)
kernel_version = 6.6.69
rootfs_size_mb = default
init-script = no-init-script
Image source: http://asu-dev.brain.lan:8000/store/fc626783b488e9a7e5a5914495a7ebbbf9fb079cff7abbf2a2165a25d02c8eb6/openwrt-24.10-snapshot-r28304-6dacba30a7-8e0b0deb02c0-x86-64-generic-ext4-combined-efi.img.gz
Image saved : /tmp/firmware.bin
Manifest : /tmp/firmware-manifest.json
Verifying : /tmp/firmware.bin (32751632 bytes) against /tmp/firmware.sha256sums
Saved sha256 matches
Tue Jan 7 07:54:20 PST 2025 upgrade: Image metadata not present
Tue Jan 7 07:54:20 PST 2025 upgrade: Reading partition table from bootdisk...
Tue Jan 7 07:54:20 PST 2025 upgrade: Extract boot sector from the image
Tue Jan 7 07:54:21 PST 2025 upgrade: Reading partition table from image...
Checks complete, image is valid.
Installing /tmp/firmware.bin and rebooting...
... system reboots ...