WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: modules  (Read 4736 times)

Offline ISSALENE

  • Newbie
  • *
  • Posts: 9
modules
« on: March 20, 2011, 11:51:36 AM »
Hi all,
Does someone could guide us explaning how to add new module/drivers within Tiny core before creating a new "initrd"?
All incomes are welcomes
Joss

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: modules
« Reply #1 on: March 20, 2011, 12:04:56 PM »
That depends on the situation:

1. Missing kernel module that's available in the linux kernel but it's just not compiled for tinycore (take a look at all *-2.6.33.3-tinycore.tcz extensions before assuming that!)
1.1. Download kernel sources from http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/3.x/release/src/kernel/ and install compiletc.tcz extension
1.2. Edit the kernel .config e.g. CONFIG_MY_MODULE=m
1.3. Run "make modules"
1.4. Find your module, gzip it: mymodule.ko => mymodule.ko.gz
1.5. Put it in the right place of the filesystem, e.g. /usr/local/lib/modules/2.6.33.3-tinycore/...
1.6. In case you want to have it always available then back it up or create a module extension or recreate initrd tinycore.gz to include it

2. Modules from other sources
2.1. Install compiletc.tcz and linux-headers-2.6.33.3-tinycore.tcz
2.2. configure and make (like every other source code)
2.3. issue make install to see where it belongs or just put it there yourself

3. Drivers
3.1. Compile them like every other source code and put them into an extension (how you can do that is written all over the forum and in the wiki ;)
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline ISSALENE

  • Newbie
  • *
  • Posts: 9
Re: modules
« Reply #2 on: March 21, 2011, 06:02:22 AM »
Hi,
Many thanks for your answer. I will transfer this to my colleague and will try it.
Will let you know the status later on.
Joss

Offline mitoim

  • Newbie
  • *
  • Posts: 9
Re: modules
« Reply #3 on: April 14, 2011, 11:08:48 AM »
Hi

I did what gutmensch said at point 1 to have the module tun.ko.
But when I try to load it I receive "invalid module format"

Any ideea

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: modules
« Reply #4 on: April 14, 2011, 12:00:12 PM »
Tun/tap is compiled in.
The only barriers that can stop you are the ones you create yourself.

Offline mitoim

  • Newbie
  • *
  • Posts: 9
Re: modules
« Reply #5 on: April 15, 2011, 07:29:20 AM »
And what can I do if an application looks for it as a loadable module?

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: modules
« Reply #6 on: April 15, 2011, 07:48:46 AM »
change source code (e.g. comment a call like "modprobe tun.ko") or recompile kernel with CONFIG_TUN=m, add tun.ko.gz to your tinycore.gz and use the bzImage you created yourself (kernel directory arch/x86/).
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: modules
« Reply #7 on: April 15, 2011, 08:18:19 AM »
Yep, just tell the application to STFU. Should be easier than changing the kernel.
The only barriers that can stop you are the ones you create yourself.