General TC > General TC Talk

loading driver with modeprobe or insmod with parameters

<< < (4/4)

Juanito:
Hmm - I didn't unset that option, which suggests that when it was introduced the default was the opposite to what existed previously...

Juanito:
Maybe you could try tc-13.1rc1 to check if things now work with busybox modprobe?

It seems to work for me:
--- Code: ---sudo modprobe ipv6 disable_ipv6=1
cat /sys/module/ipv6/parameters/disable_ipv6
1

--- End code ---

Rich:
Hi Juanito
It worked under TC4, but not under TC9:

--- Code: ---tc@box:~$ sudo modprobe usblp
tc@box:~$ cat /sys/module/usblp/parameters/proto_bias
-1
tc@box:~$ sudo modprobe -r usblp
tc@box:~$ sudo modprobe usblp proto_bias=1
tc@box:~$ cat /sys/module/usblp/parameters/proto_bias
-1
tc@box:~$
--- End code ---

gharig:
Hi Rich and everyone else....

So today I wanted to verify what Rich suggested by adding options to the /etc/modprobe.conf  And slicker that slick it worked.
I did not load the module_init_tools.tcz.  I'm running Tinycore 13 and I'm only loading compile.tcz

So I added a line to modprobe.conf for my test.ko kernel module which can take two parameters Param1 and Param2, my default values for the test module program are Param1=10 and Param2=20.


--- Code: ---# /etc/modprobe.conf: Modeprobe config file.
#
options test Param1=345 Param2=789

--- End code ---

and when I ran dmesg:
Param1=345
Param2=789

Rich also talked about adding a boot code.
So I commented out the options I added to /etc/modprobe.conf earlier.

Then I modified the file /mnt/sda1/tce/boot/etxlinux/etxlinux.conf


--- Code: ---#orignal
DEFAULT core
LABEL core
KERNEL /tce/boot/vmlinuz
INITRD /tce/boot/coregz
APPEND quiet syslog waitsub=5:UUID="some long guid" tce=UUID="some long guid"

--- End code ---

and changed it to:

--- Code: ---#new
DEFAULT core
LABEL core
KERNEL /tce/boot/vmlinuz
INITRD /tce/boot/coregz
APPEND quiet syslog test.Param1=111 test.Param2=222 waitsub=5:UUID="some long guid" tce=UUID="some long guid"

--- End code ---

 I then rebooted Tinycore13, and reloaded my test module

--- Code: ---#run as root
 modeprobe test

--- End code ---


And the results in dmesg were:
Param1=111
Param2=222

This was success

I then uncommented out the /etc/modprobe.config file and unloaded my test module and made sure everything is clear.
I'm testing to see which has precedence, the boot code vs the modprobe.conf
I reloaded the test module looked at dmesg
And saw
Param1=111
Param2=222

The boot code is the winner it has precedence over modprobe.conf

Now I went to test insmod to see if it to would use the boot code or modprobe.conf

--- Code: ---#run as root
 insmod ./test.ko

--- End code ---
insmod  dose not use the bootcode nor dose it use modprobe.conf, the values in dmesg were the default value for the test module program
Param1=10
Param2=20

So Rich the boot codes work too.

Thanks Everyone
gharig

PS
cant wait to see Tinycore 13.1


Navigation

[0] Message Index

[*] Previous page

Go to full version