On Tue, 2010-09-28 at 16:21 -0500, Rob Landley wrote: > On Tuesday 28 September 2010 16:15:28 RiCH Busybox wrote: > > On Tue, 2010-09-28 at 09:23 +1000, Stuart Longland wrote: > > > On Mon, Sep 27, 2010 at 09:40:05PM +0100, RiCH Busybox wrote: > > > > On Mon, 2010-09-27 at 07:49 +1000, Stuart Longland wrote: > > > > > Have you perhaps tried 'modprobe'? My understanding is that insmod > > > > > always did require the full path (from memory this has been the case > > > > > since modutils days in kernel 2.0), and that 'modprobe' was the tool > > > > > if you just wanted to recall a module by name rather than by file. > > > > > > > > Hi Stuart, thanks for your reply > > > > > > > > modprobe works fine loading/unloading, using just the module name > > > > modinfo works fine just using module name > > > > rmmod works fine just using module name > > > > insmod doesn't work using the module name (however it does in busybox > > > > <= 1.0.1) > > > > > > > > I admit to knowing very little about it, but seems if rmmod can cope > > > > with module name then insmod should also be able to? > > > > > > > > Unfortunately as it did work, this firmware has been built assuming it > > > > does and as I said its hard coded into a binary (sysinit) ... > > > > Even if technically insmod shouldnt work is there a way it can be > > > > easily patched to be backwards compatible? > > > > > > It did work in official busybox-1.0.1, or it worked in the busybox-1.0.1 > > > sources as supplied with the firmware? > > > > > > In any case, a bit of shell voodoo will probably do what you want: > > > > > > #!/bin/ash > > > > > > if [ -f "$1" ]; then > > > exec busybox insmod "$@" > > > else > > > exec busybox modprobe "$@" > > > fi > > > > > > Call that /sbin/insmod, and set permissions as appropriate. Unless of > > > course the binary expects to call 'busybox insmod' directly instead of > > > via the symlink, that should work. > > > > Hi Stuart, > > Thanks for your reply, > > It worked in busybox-1.1.0.5VT that is bundled with buildable firmware, > > I also tried v1.01 copying config file over (which is presumably v1.0.1, > > the naming convention changed for some reason on this release) and works > > fine also. > > (Some others like 1.1.1 dont seem to function, the router gets stuck > > booting when its handed over from uboot) > > I just tried 1.11.2 (again just copying config file, doing a make > > menuconfig ,save and exit without altering anything, and everything to > > my amazement works! > > > > I can only assume this along with the fact the insmod.c actually > > mentions it should work on 2.4 kernels by using just the module name > > that 1.17.2 does have a bug. > > > > When I get more time I will try newer and newer builds to see where it > > broke. > > The modprobe support for 2.4 kernels is a legacy feature that isn't really > very well tested. > > Considering that the 2.4 kernel maintainer has essentially declared the 2.4 > kernel series dead, busybox is unlikely to suddenly start putting more effort > into regression testing it. > > http://lwn.net/Articles/403649/ > > Rob
Hi Rob, Appreciate 2.4 is ancient but unfortunately that is what Belkin went for and its far beyond my abilities to change it. I have narrowed it down in so much as <= final 1.12.3 [final] build works and >= 1.13.1 doesn't [i didnt try 1.13.0] It looks like insmod.c got altered at this point and something got broken - simple fix for someone in the know?? It is definitely intended to work from comments in new file. BusyBox v1.12.4 (2010-09-29 20:36:18 BST) hush - the humble shell v0.9 Enter 'help' for a list of built-in commands. / # insmod rtl rtl_major = 253 0 smi_init check[0x0105]=0x8366 Gemtek Link status init. BusyBox v1.13.1 (2010-09-29 19:39:37 BST) hush - the humble shell v0.91 Enter 'help' for a list of built-in commands. / # insmod rtl insmod: cannot insert 'rtl': Operation not permitted Thanks to anyone who wants to take a look :) Regards _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox