Re: Out of tree kernel modules dependencies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 21, 2007 at 04:30:23PM +0530, pradeep singh wrote:
>  did you insmod you foo1 before foo2 is compiled?

No, I think it's a compile time warning only, due to the fact that foo1
is not a part of the kernel tree when compiling foo2.

But I did what you asked and it looks like this:

thomasc@toshiba:~/tests/foo1$ sudo insmod foo1.ko
thomasc@toshiba:~/tests/foo1$ cd ../foo2/
thomasc@toshiba:~/tests/foo2$ make clean
make -C /lib/modules/2.6.18-4-686/build M=/home/thomasc/tests/foo2 clean
make[1]: Entering directory `/usr/src/linux-headers-2.6.18-4-686'
  CLEAN   /home/thomasc/tests/foo2/.tmp_versions
make[1]: Leaving directory `/usr/src/linux-headers-2.6.18-4-686'
thomasc@toshiba:~/tests/foo2$ make
make -C /lib/modules/2.6.18-4-686/build M=/home/thomasc/tests/foo2
modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.18-4-686'
  CC [M]  /home/thomasc/tests/foo2/foo2.o
  Building modules, stage 2.
  MODPOST
WARNING: "foo1_hello" [/home/thomasc/tests/foo2/foo2.ko] undefined!
  CC      /home/thomasc/tests/foo2/foo2.mod.o
  LD [M]  /home/thomasc/tests/foo2/foo2.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.18-4-686'
thomasc@toshiba:~/tests/foo2$ sudo insmod foo2.ko 
thomasc@toshiba:~/tests/foo2$ lsmod | grep foo
foo2                    1216  0 
foo1                    1568  1 foo2
thomasc@toshiba:~/tests/foo2$ dmesg | tail -n1
foo1: hello


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux