Why do you wanna do that?
I think there is another solution for your desired solution.
Why do you wanna do that?
I think there is another solution for your desired solution.
First of all I want to see module parameters with modinfo
, also I want to be able to say modprobe -r
and rmmod -f
. What is the problem to replace ubox with kmod?
Because at least one other very important package, named procd, depends on ubox.
On a running openwrt system you should be able to force install the package kmod without first removing ubox. You should try this...
I don't know if this is possible with the image builder.
I also prefer using the kmod tools. You need to build a busybox package and remove the kmod utility in the busybox configuration in menuconfig.
Shouldn't procd depend on {ubox|kmod}
, instead of strict ubox
dependency?
How this will help?
Because the utilities in busybox conflict with the utilities of the same name in the kmod package as you have already noted in the original post.
So removing kmod in the busybox config builds busybox without the kmod tools and thus lets the kmod package and the busybox package be installed with no conflicts.
This is how I did it on my system
base-files depends on procd that depends on ubox, it's not clear howto removing kmod in the busybox config helps with this dependencies, anyway it's not that I want: kmod is already packaged I'd just like to install it, not rebuild the whole system.
I still have busybox installed. That's the whole point. It's just the kmod tools that are deselected in the busybox package configuration, so all other busybox utilities are there and the procd dependency is satisfied. The kmod piece is satisfied by kmod-tools.
You don't need to rebuild the system. Just build a new busybox package with the SDK.
So I just did exactly this for your platform miwifi-mini. It took all of ten minutes to download the SDK and build a new busybox ipk.
If you want, I can make the binary ipk available to you for download, but I recommend you compile it yourself so you know its provenance. [EDIT: link to it here on my github]
To rebuild busybox is not a problem, but is a workaround, not a solution.
This is just a wrong dependency and it should be corrected.
This isn´t fixable...
As i suggested before, force overwriting contents of other packages do the trick...
opkg --force-overwrite install kmod
This is just another workaround.
This isn´t fixable...
Why so?
Because kmod doesn't provide a equal functionality like ubox and the very important procd relies on ubox.
Therefore it can not be replaced by kmod.
Remember we are on a very resource constrained device and can not install any full blown desktop init system or there like.
Therefore we have procd, ubox and so on...
kmod provides wider functionality than ubox, not equal, so I see no reason why it can not replace ubox.
With equal to ubox i mean, at least all features of ubox!
If you are sure thats true, why not sending a patch or create a pr?
If so, why are you calling it a workaround?
If you want this to be change to be OpenWrt-wide - as @juppin said, you should feel free to make the appropriate request; but I surmise what you're well aware of the development issue that would cause.
Both ubox and kmod need to be extended to be alternatives to each other, similar to how it has been done for wget, ip, etc.
Until this is done, your only choice is to use opkg --force-overwrite install kmod
.
As I see ip
and wget
behave differently: both ip-tiny
and ip-full
provide ip
(on which something else may depend), while wget
updates /usr/bin/wget
symlink.
Exact solutions that I see:
kmod
and ubox
should conflict each other and provide module-tools
, procd
, fstools
and other should depend on module-tools
kmod
and ubox
should conflict each other and kmod
should provide ubox
.
I'd like to make a patch.
The proper solution is registering the kmod applets as alternatives, this way opkg will transparently handle the executable conflicts.
These two patches (untested) should solve the conflict issue:
diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile
index cfa0b594e4..6a515c0f32 100644
--- a/package/system/ubox/Makefile
+++ b/package/system/ubox/Makefile
@@ -25,6 +25,12 @@ define Package/ubox
CATEGORY:=Base system
DEPENDS:=+libubox +ubusd +ubus +libubus +libuci +USE_GLIBC:librt
TITLE:=OpenWrt system helper toolbox
+ ALTERNATIVES:= \
+ 100:/sbin/insmod:/sbin/kmodloader \
+ 100:/sbin/lsmod:/sbin/kmodloader \
+ 100:/sbin/modinfo:/sbin/kmodloader \
+ 100:/sbin/modprobe:/sbin/kmodloader \
+ 100:/sbin/rmmod:/sbin/kmodloader
endef
define Package/getrando
diff --git a/utils/kmod/Makefile b/utils/kmod/Makefile
index b9e7b6068..fae2395dd 100644
--- a/utils/kmod/Makefile
+++ b/utils/kmod/Makefile
@@ -38,6 +38,13 @@ endef
define Package/kmod
$(call Package/kmod/Default)
TITLE+= (tools)
+ ALTERNATIVES:= \
+ 200:/sbin/depmod:/sbin/kmod \
+ 200:/sbin/insmod:/sbin/kmod \
+ 200:/sbin/lsmod:/sbin/kmod \
+ 200:/sbin/modinfo:/sbin/kmod \
+ 200:/sbin/modprobe:/sbin/kmod \
+ 200:/sbin/rmmod:/sbin/kmod
endef
define Package/kmod/description