IPK Creation Kit
(c)2006 Jeremy Collake <[email protected]>
!!! ALPHA STAGE OF DEVELOPMENT. USE AT YOUR OWN RISK. !!!
This document attempts to outline the process of creation of IPKG format packages with the IPK Creation Kit, giving specific emphasis on usage for embedded linux platforms such as OpenWrt and DD-WRT. It is a quick draft intended to encourage people to develop IPKs specific to certain firmwares for use with the Firmware Modification Kit, a kit that allows easy modification of firmware images without recompiling the sources.
The structure of an IPK
IPK files are archives containing the following:
Using the IPK template
The IPK template directory contained in the Firmware Modification Kit makes it particularly easy to create IPK files without having to manually create them each time.
Creating your own IPK
Copy or extract the IPK template directory to a new directory named after the package you are creating an IPK for. If you are copying, use "cp -r" to copy the entire directory and all its contents.
In the new directory edit the "control" and "conffiles" text files appropriately. The fields in "control" are probably self-explanatory:
Depends: libpcap libncurses
Description: A minimal and secure package of great sorts.
Maintainer: Junior Jim-Bob <juniorjim.bob.com>
If you want to get fancy, the Source field can indicate a URL to download the data.tar.gz portion of the package. If instead the package files are included inside the PKG, leave "N/A" in this field.
"conffiles" contains a listing of files in the package that are used for configuration storage. This is helpful to preserve the configuration of the package if it is updated, or if the configuration otherwise needs preserving. It might look something like this after editing:
Copy the package files into the folder in the same relative directories to which they will be installed to the file system. Symbolic links are allowed. For example:
./etc/package_config/ ---(symbolic link)---> ../tmp/etc/package_config/
The above makes the /etc/package_config/ directory a symbolic link to /tmp/package_config/. This would be useful for firmwares that have a read-only /etc file system. On these systems, the configuration files could reside on a ram disk and be emitted at boot-time based on input from some other store of configuration variables, like NVRAM.
Build the IPK. You're done, now simply build the IPK file with the script provided. It's parameters are:
MAKE_IPK.SH OUTPUT_PACKAGE_IPK IPK_BASE_DIRECTORY
OUTPUT_PACKAGE_IPK : The IPK file to output. If it already exists it will be over-written.
IPK_BASE_DIRECTORY : The directory you created in step 1 and have been working with up until now.
make_ipk.sh package.ipk ../package_ipk_dir
To support this project:
This document (c)2006 Jeremy Collake.
All Rights reserved. This document may be freely republished in its unaltered and whole form only. Alterations or partial publishing requires approval of Jeremy Collake <[email protected]>.