Welcome to AVR32 Linux... Users Groups

BuildAVR32iPKGs

Installing ipkg packages

The first step is to install ipkg on your avr32 board. This is as simple as installing ipkg then saving ipkg.conf to /etc, both on your avr32 board.

On your command line, you can then run

ipkg-cl update

and start grabbing packages!

You'll probably want at least the commands

ipkg-cl list
ipkg-cl install <package>
ipkg-cl remove <package>

You can find the full ipkg reference as well as more general information on the ipkg Wiki

* ipkg: ipkg tool

* ipkg.conf: example ipkg configuration file

Building ipkg packages

* ipkg-build: ipkg build script

ipkg mini-HOWTO: (shamelessly stolen from the Familiar mail archive)

1) Create the directory structure and files you want to appear in the AVR32 filesystem.

2) Create a directory named CONTROL at the top-level of this directory structure.

3) Inside CONTROL create a file named "control" with lines of the form

"Field: value"
. Required fields are Package, Version, Architecture, Maintainer, and Description. Optional fields include Priority, Section, and Depends. The meaning of each of the fields will be given later in this document.

4) If your package has any configuration files, then create a file CONTROL/conffiles which lists the absolute path of each configuration file, (as it will appear on the installed system), one per line. This will prevent the package management system from automatically overwriting configuration changes when the user upgrades the package.

5) If needed your package may include some scripts that will be invoked by the package maintenance system. There are four possible times a script will be run: just before your package is installed, just after your package is installed, just before the package is removed, and just after the package is removed. These scripts are named preinst, postinst, prerm, and postrm and should be located in the CONTROL directory. The scripts should return 0 on success, (a non-zero return value from preinst will prevent your package from being installed -- this can be useful in rare situations). The scripts can assume a tty is available so they may prompt the user.

6) Now simply run:

ipkg-build directory [destination_directory]

where directory is the directory you have created. The destination_directory is optional and defaults to the current directory. The ipkg-build script performs several sanity checks on the package directory and should guide you through any problems.

Here is an example control file which you may use as a template:

### Begin CONTROL/control example
Package: foo
Priority: optional
Version: 0.0
Architecture: avr32
Maintainer: AVR32 User <user_at_somehost.net>
Depends: libc6, grep
Description: foo is the ever-present example program -- it does everything
 foo is not a real package. This is simply an example that you
 may modify if you wish.
 .
 When you modify this example, be sure to change the Package, Version,
 Maintainer, Depends, and Description fields.
### End CONTROL/control example

The meaning of the various fields in CONTROL/control is as follows:

Package is the name of the package and should match the regular expression [a-z0-9.+-]\+

Version should have at least one digit and should match [a-zA-Z0-9.+]*. Version may also contain an optional trailing revision matching "-fam[0-9]\+". This revision should be incremented each time the package changes but the version does not, (ie. a packaging tweak). It may be reset, (or simply omitted), each time the version is incremented.

Architecture should specify the architecture for which the package is compiled. Valid values currently include "avr32" and "all".

Maintainer should be the name and email address of the person responsible for maintaining the package, (not necessarily the author of the program).

Description should be a short, (less than 80 characters) description of the program. It may also include a long description on subsequent lines, (each indented by a single space character). Blank lines in the long description may be indicated by a line consisting of a space character followed by a period, ie " ."

Priority should be one of: required, standard, important, optional, or extra. Most programs should use optional.

Section can be one of the following: admin, base, comm, editors, extras, graphics, libs, misc, net, text, web, x11.

Depends indicates packages which must also be installed in order for this package to work. The packages should be listed on a single line, separated by commas.

  File Size Date By Actions
else ipkg-build
ipkg build script
3.0 K 2008-01-02 - 16:18 JohnVoltz props, move
else ipkg.conf
example ipkg configuration file
0.2 K 2008-01-02 - 17:43 JohnVoltz props, move
r4 - 2008-01-05 - 15:04:06 - JohnVoltz
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
Atmel®, AVR® and others are registered trademarks or trademarks of Atmel Corporation or its subsidiaries.
All other trademarks are the property of their respective owners.
Syndicate this site RSSATOM