WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Custom kernel and modules from extensions  (Read 3266 times)

Offline helander

  • Full Member
  • ***
  • Posts: 183
Custom kernel and modules from extensions
« on: June 15, 2009, 02:42:55 PM »
I am using TC with a customized kernel (RT-patched). So far I have built all required modules into my root file system (tinycore.gz) and have had no need for loading modules from extensions.

I had noticed in the past that in .tcem files all modules where located under "/usr/local/lib/modules/..." and since I know that for modprobe to work, the modules needs to be found under "/lib/modules/...". My first guess was that during the install procedure the files were copied from "/usr/local/lib/modules" to "/lib/modules" but after having studied the tce-load script I realized that my guess was wrong.  So what if you try to modprobe a module that has been loaded from an extension but you the modprobe as non-root: modprobe then tells you the path of the module file that you are not allowed to access and it was so I found out how the modules in the extensions are made part of the usable modules:

     In "/lib/modules/<<your kernel version>>" there is a file called "kernel.tclocal" that is a link
     to "/usr/local/lib/modules/<<your kernel version>>". This is what seems to be the mechanism
     that tc relies on for making loading modules from extensions possible.

The reason for bringing this up on the forum is that I realized that if I would like to have a custom kernel and use
that with loadable extensions, I need to explicitly create this "kernel.tclocal" link in my "/lib/modules/<<your kernel version>>. So for anyone who sets out to use tc with custom kernels together with module extensions (of course built for that specific kernel) this is important information.

If any of the findings described are incorrect, please share your knowledge.


Thanks for your time

/Lars

PS. I was not sure if this topic should be discussed here as part of TCB or in the TCE part of the forum. I had to pick one and I picked TCB. DS.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Custom kernel and modules from extensions
« Reply #1 on: June 15, 2009, 03:19:34 PM »
Since you're already using a custom kernel, you're free to ignore the guideline for putting modules in /usr/local, and so the symlink. Your remaster, your rules ;)
The only barriers that can stop you are the ones you create yourself.

Offline helander

  • Full Member
  • ***
  • Posts: 183
Re: Custom kernel and modules from extensions
« Reply #2 on: June 15, 2009, 03:26:42 PM »
Since you're already using a custom kernel, you're free to ignore the guideline for putting modules in /usr/local, and so the symlink. Your remaster, your rules ;)

I realize that it is my rules in my remaster ;). I just wanted to share with others that tried to follow the /usr/local guidelines with a custom kernel what you have to do. As for guidelines for using a custom kernel are they to be found somewhere?

/Lars

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Custom kernel and modules from extensions
« Reply #3 on: June 15, 2009, 03:47:11 PM »
Quote
As for guidelines for using a custom kernel are they to be found somewhere?
Hmm, I wonder what those would be?
The only barriers that can stop you are the ones you create yourself.

Offline helander

  • Full Member
  • ***
  • Posts: 183
Re: Custom kernel and modules from extensions
« Reply #4 on: June 15, 2009, 04:19:50 PM »
Quote
As for guidelines for using a custom kernel are they to be found somewhere?
Hmm, I wonder what those would be?

One good thing about TC is that it will work well in most aspects with a standard kernel, i.e. without any patches applied.
As I have found out on the forum (I think it was there I found the info) the current version of TC needs a set of patches for the CRYPTO_HOME option to work. This kind of information is important if you are going to build a custom kernel.

I think it would be good if there was a page on the wiki about custom kernel info. This could the be organized so that for each TC release you could see what patches that were needed in order to fully use TC. Further it could contain the kind of info that I found out regarding the relation between the standard way of loading modules thru extensions and its implications on the root file system.

I would be happy to help out filling such a wiki page with any of the knowledge I have gained thru my work with custom kernels. Important would also be for the TC maintainers to provide info in the area whenever a new TC version is released so that custom kernel builders would know early on what they possibly need to change in their kernels to support new/modified features. Links to the patches, configs, etc for the TC provided kernels would also be neat to have on this wiki page.

/Lars

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Custom kernel and modules from extensions
« Reply #5 on: June 15, 2009, 04:46:05 PM »
Sounds good, feel free to create the wiki page.

One could also just apply the collective patch, and then continue to modify with desired patches; but as separated entities, there are currently only loop-aes, ide warning fix, and the FB logo.

The source, patch, and config live here: ftp://ftp.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/release/src

For 1.x, the only change to the vanilla kernel was the logo.
The only barriers that can stop you are the ones you create yourself.

Offline helander

  • Full Member
  • ***
  • Posts: 183
Re: Custom kernel and modules from extensions
« Reply #6 on: June 15, 2009, 05:05:13 PM »
Sounds good, feel free to create the wiki page.

One could also just apply the collective patch, and then continue to modify with desired patches; but as separated entities, there are currently only loop-aes, ide warning fix, and the FB logo.

The source, patch, and config live here: ftp://ftp.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/release/src

For 1.x, the only change to the vanilla kernel was the logo.

Thanks,

I will start with adding the page today and just describe the purpose of it and that it is under construction.
I will update the page with relevant info as time permits and new info/experiences are gained.

/Lars