Bubble development

From Bubble

This article describes the development architecture and requirements to develop and build the Bubble distribution. If you are interrested in configuring a Bubble node, see the Bubble install guide.

Contents

From DiskLess to Bubble

This section describes the major changes between DiskLess and Bubble

High level milestones:

  • DiskLess: The initial Version
  • Bubble v1.99: Intermediate version -- never released
  • Bubble v2.x: Current version in development

Configuration

  • The Bubble configuration file used to have both build and runtime parameters. Now we have:
    • Build parameters included in the BuildRoot configuration
    • Runtime parameters associated with their respective packages.
      Each package has its own configuration template. A Bubble configuration file is the concatenation of all (filled) templates.
    • We have also added more informational fields, like version, dependencies, ...
  • The current Bubble configuration file is in '.ini' format.
    We had a debate for wether or not introduce XML. It has been decided to stick to the .ini format for the time being:
    • The XML format does not bring additional functionalities and we already do have a .ini parser.
    • Since the parsing is isolated in the code anyway, we can change at a later time without impacting the project
  • Project: Rebuild a Web based configuration tool (We used to have one in DiskLess)
  • Project: Command line configuration tool -- possibly available on the target node.
  • Project: Auto-configuration tool (a generic bootable CD that would build Bubble configuration file suitable for the machine)

Build architecture

Upgraded to the new uClibc BuildRoot (major architecture change!)

High level overview:

  • Core packages are built and installed in the root image (no changes from 1.99)
  • Non-core packages are built and installed in separate package files using additional target in the makefile (less destructive)
  • For the bubble makefile target, instead of building a node image, now we:
    • Just generate the root FS;
    • Save BuildRoot environement in a file;
    • The final packaging is done by script, in a separate area leaving the root directory untouched.
      This way, we can easily generate standard images, and build special ones on the fly.
    • Driver packages are built by a script as well and no more at built-time as before.

Runtime architecture

  • No change foreseen

Functionnalities

Requirements

Bubble is developped in a Debian Sarge environment, but should build on any Linux platform.

The packages used are:

  • Development Packages
    • base system -- Gnu-Linux system with the standard utilities installed
      Not detailed here...
    • gcc
    • make
    • autoconf
    • flex
    • bison
    • perl
    • libncurses5-dev -- To configure buildroot
    • wget -- To get the sources
    • fakeroot -- To generate the packages
    • cvs -- If you just want to build, you do not need CVS, just grep a tarball of the distribution!
  • Build time (to build the images)
  • Web Deployment -- For the web user interface (Not available yet)
    • apache
    • php4
    • php4-curl
  • Runtime -- To run the NetworkBoot images
    • dhcp3-server -- The DHCP server
    • tftpd-hpa -- TFTP server compliant with PXE

Core System

The core system (kernel/initrd/boot scripts) is developed with the BusyBox/uClibc BuildRoot.

(Essentially using what has been done for DiskLess)

Packages

Obviously we want to build the packages using the same environment, but they should not be installed into the same 'root' directory

BubblePackage describes the packages structure

Directory structure

In the development environment the directory structure for DiskLess looks like this:

${BULLES_HOME}/              Contains all the development environment (around 1GB)
       bin/                  Utility scripts
       buildroot/            The uClibc buildroot
                             The filesystem layout from uClibc is preserved
       patches/              Patches for the buildroot (Changes from the original uClibc buildroot)
                             The directory contain one file per file to be patched (<filename>.patch)
                             (We need to review this: there is conflict if we need to patch 2 files
                             having the same name -- e.g. 2 Makefile)
       add-ons/              Add-ons for the buildroot (Additional files for the uClibc buildroot)
                             The directory structure under add-ons is identical to the buildroot one.
       sources/              All the sources dowloaded for the buildroot (used as 'cache')
       rc_web/               PHP User interface to generate custom core packages

The entire ${BULLES_HOME} is under CVS, but obviously buildroot and sources are ignored.

This is working OK, but the use of scripts to maintain the CVS is not error-prone...

Therefore, in Bubble, we import the uClibc BuildRoot as a third party (See the -- Chap. 13).

Advantages:

  • The revision management is now very simple (or at least it should be)
  • Bubble is more stable (changes to the pristine BuildRoot are imported in a controlled way)

Areas of attention:

  • More files in the CVS (But this is not huge)
  • The merge of new versions of the BuildRoot need to be done with care

The Bubble directory structure is now simplified:

${BUBBLE_HOME}/              Contains all the development environment (around 1GB)
       bin/                  Utility scripts
                             (Not imported yet)
       buildroot/            The uClibc buildroot
                             The filesystem layout from uClibc is preserved
       www/                  PHP User interface to generate custom core packages

The entire ${BUBBLE_HOME} is under CVS, including the BuildRoot (See the BuildRoot page for the directory layout).

Utility scripts

With the new CVS approach, all the DiskLess scripts are now obsolete!

To do: Describe the new utilities

CVS

Browse the CVS!

The path in the CVS is ReseauCitoyen/Bubble
Module name: bubble (or Bubble)