Thecus N1200 Module Development

From NAS Website

Jump to: navigation, search

Contents

General

Copied from the N2100 Model Development page. This page gives some outlines on how to develop new modules. It is not yet very comprehensive, so please update it where needed!

Module Contents and Structure

First of all, download a few modules off this site, eg. the SSH module, which is quite simple.

Uncompress the .mod file of the module (they are really tar.gz) using your favourite decompression tool. On Linux it's something like "tar -xvzf SSH.mod"

Investigate the following files to get an idea of the module structure:

  • /Configure/install.rdf
  • /Shell/install.sh
  • /Shell/uninstall.sh
  • /Shell/module.rc
  • /Shell/enable.sh
  • /WWW/index.htm

You can also take a look at this PDF document that describes how to create modules.

Creating the Module

We need to compress the structure into a module. Assuming that the module has the name TESTMOD and is located in /tmp/TESTMOD, do like this (on Linux with GNU tar/gzip):

cd /tmp
tar -cvzf TESTMOD.mod ./TESTMOD

Please pay close attention to the "./" in front of the module directory. This is extremly important as the module will not otherwise install correctly. (Basically I don't know why Thecus made it like this, it doesn't seem too bright. But hey, there might be some explanation I don't know about).

Furthermore it is highly recommended to put the module inside another archive. Assuming the module is verion 1.0.00 and targets the Thecus N1200

tar -cvzf N1200-TESTMOD-1.0.00.tar.gz TESTMOD.mod

It is recommended also to include a README file as well as a CHANGELOG. For more info have a look at the Thecus Module Packaging page.

Testing the module

Please test the module thoroughly. If you are having problems and your module database gets corrupted, have a look at the Thecus N2100 Fixing Module problems page.

Publishing

Upload the module to your website. If you don't have a website you may contact the ThecusWiki Admins and they can place it on this site.

Afterwards publish the new module using the Thecus Module Template and afterwards place a link on the Module List.

Getting binaries for your modules

The current version (1.0.06) of the Thecus N1200 firmware is compatible with the "woody" Debian distributions so you can find packages on http://archive.debian.org/debian-archive/pool/main Make sure you choose the powerpc architecture.