WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Compiling kernel modules --> extensions  (Read 8364 times)

Offline Theo404

  • Newbie
  • *
  • Posts: 9
Re: Compiling kernel modules --> extensions
« Reply #15 on: October 27, 2009, 09:14:44 AM »
You may read this WIKI article Adding Custom Startup Scripts

Fair... I'l go away and read some more (rtfm?). Thanks for your help guys  ;D

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14787
Re: Compiling kernel modules --> extensions
« Reply #16 on: October 27, 2009, 09:23:09 AM »
If you take the previous example, you would have a number of files under /tmp/pkg/usr/local - in the case of your module only one file, but it could be any number of files in any number of folders.

Originally /usr/local/tce.installed/extension_name was used as a flag to indicate that an extension called "extension_name" is already loaded. If your extension contains a script named  /usr/local/tce.installed/extension_name, then it will run when the extension is loaded.

To create the script, first create the folder:
Code: [Select]
$ sudo mkdir /tmp/pkg/usr/local/tce.installed
$ sudo chmod 775 /tmp/pkg/usr/local/tce.installed
$ sudo chown root:staff /tmp/pkg/usr/local/tce.installed

..then use vi, beaver or similar to write a script and save it as /usr/local/tce.installed/extension_name, then make it executable:
Code: [Select]
$ sudo chmod +x /tmp/pkg/usr/local/tce.installed/extension_name
..and use squashfs to make the tcz as before
« Last Edit: October 27, 2009, 09:25:18 AM by Juanito »

Offline Theo404

  • Newbie
  • *
  • Posts: 9
Re: Compiling kernel modules --> extensions
« Reply #17 on: October 27, 2009, 09:28:52 AM »
If you take the previous example, you would have a number of files under /tmp/pkg/usr/local - in the case of your module only one file, but it could be any number of files in any number of folders.

Originally /usr/local/tce.installed/extension_name was used as a flag to indicate that an extension called "extension_name" is already loaded. If your extension contains a script named  /usr/local/tce.installed/extension_name, then it will run when the extension is loaded.

To create the script, first create the folder:
Code: [Select]
$ sudo mkdir /tmp/pkg/usr/local/tce.installed
$ sudo chmod 775 /tmp/pkg/usr/local/tce.installed
$ sudo chown root:staff /tmp/pkg/usr/local/tce.installed

..then use vi, beaver or similar to write a script and save it as /usr/local/tce.installed/extension_name, then make it executable:
Code: [Select]
$ sudo chmod +x /tmp/pkg/usr/local/tce.installed/extension_name
..and use squashfs to make the tcz as before

This is exactly what I'm saying the wiki needs.... clear concise answers to basic questions about tc...

Many thanks... I'l report back later.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Compiling kernel modules --> extensions
« Reply #18 on: October 27, 2009, 09:40:47 AM »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Compiling kernel modules --> extensions
« Reply #19 on: June 25, 2018, 01:31:04 PM »
Also, you may use "submitqc.tcz" extension to run a build quality check on your new extension for local use and submission