This is an old revision of the document!


Development

If you are planning on developing for the PirateBox, there are some tools that will help you.

There are multiple flavours piratebox comes in, you can install it on your PC, Raspberry Pi, Android or OpenWRT. This article is focused on the OpenWRT flavour.

The first thing you may want to do is get the build toolchain up and running. With this toolchain you can easily build your own OpenWRT images which allows for developing and quickly building images for testing on a real system.

PirateBox structure

PirateBox is based on OpenWRT and thus is able to use its build helpers. One very powerful feature of the OpenWRT build system are feeds. Feeds basically are collections of packages, they can be local or remote. This allows to easily add new package repositories to be included in the OpenWRT build.

PirateBox has its own feed, which means all you need is the OpenWRT build system and the PirateBox feed and you are good to go.

Helpers

To give you a kickstart, there are some helper scripts that will set up the development environment for you, help building images and remastering them.

Those script can be found on github in the PirateBox dev environment repository. Once you have cloned the repository you may want to start building your toolchain and your first image for testing. Just run:

make auto_build_stable

This make target will fetch the toolchain, build it and then it will build the stable PirateBox release. Depending on your machine, this can take some time(hours). Make sure to check the README if you run into any problems. There is a detailed description on how to run the build manually and what each of the make targets does.

Local Feed

Once you have your toolchain up and running you may want to start on working on some of the packages. This is where the local feed comes in. A local fees is a directory with packages to be added to your image.

Prepare your local feed by running:

make apply_local_feed

This will pull in the repositories of all PirateBox packages into the local_feed folder. You can now switch branches, and start developing. When you are ready to build your images you simply run:

make auto_build_local

This will build your images using your local repositories for the PirateBox packages.

Developing

Once you have run the above steps you are ready to develop. Change to your local_feed folder. If the above steps worked as expected you will find the repositories for all packages that are needed to successfully build your PirateBox image. You can now checkout the branches you want your image to be built with, or add your own branches and start developing/improving PirateBox functionality or even swap one of the PirateBox package repositories with a fork of your own.

Core functionality

Web Interface