有些注定了被遗忘的话,也就有的注定了属于沉静的自私.

Opkg 内核不正确

来自森亮号航海见识 {SLboat Insight;}
跳转至: 导航搜索

情况

root@OpenWrt:~# opkg install kmod-usb-storage
Installing kmod-usb-storage (3.3.8-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/kmod-usb-storage_3.3.8-1_ar71xx.ipk.
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-usb-storage:
 *      kernel (= 3.3.8-1-6acd2a17c333f503dc86081b03fe73c0) *   kernel (= 3.3.8-1-6acd2a17c333f503dc86081b03fe73c0) * 
 * opkg_install_cmd: Cannot install package kmod-usb-storage.

反馈者

堂西滴小五

研究

kernel是个匿名的隐藏包

root@OpenWrt:~# opkg install kernel
Package kernel (3.3.8-1-2a0edb5ba0d101ae0bb84a44e4344525) installed in root is up to date.
root@OpenWrt:~# opkg files kernel
Package kernel (3.3.8-1-2a0edb5ba0d101ae0bb84a44e4344525) is installed on root and has the following files:

它无法被更新,它属于内核,需要更新整个内核。

解决

下载Openwrt 官方固件下载,squashfs、jffs2无所谓,下载的是最新编译。

用web的升级固件或者shell 更新固件,更新完毕后检查下kernel的版本是否变了

root@OpenWrt:~# opkg files kernel
Package kernel (3.3.8-1-6acd2a17c333f503dc86081b03fe73c0) is installed on root and has the following files:

这时候所有事情就完成了。

结果

root@OpenWrt:~# opkg update
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz.
Inflating http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz.
Updated list of available packages in /var/opkg-lists/attitude_adjustment.
root@OpenWrt:~# opkg install kmod-usb-storage
Installing kmod-usb-storage (3.3.8-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/kmod-usb-storage_3.3.8-1_ar71xx.ipk.
Installing kmod-scsi-core (3.3.8-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/kmod-scsi-core_3.3.8-1_ar71xx.ipk.
Configuring kmod-scsi-core.
Configuring kmod-usb-storage.

引起原因

官方trunk是随时更新的,而opkg下载的总是最新版的package,所以最新编译的package依赖最新的内核,这时候只有把固件也刷上去。

  • 在这个例子里[kmod-usb-storage]依赖的内核是 kernel (= 3.3.8-1-6acd2a17c333f503dc86081b03fe73c0)
  • 而8.23日编译的openwrt固件内核是 kernel (3.3.8-1-2a0edb5ba0d101ae0bb84a44e4344525)

这里引发了这个问题。