This program has been superceded by bbl (BalloonBinaryLoader). This page is now merely here as archival documentation.

This script automates the process of programming the CPLD, boot loader, kernel image and root filesystem into a Balloon board. For more information about the process, see BalloonSoftwareLoading. It is a simple bash scriptalthough it's got quite long as functions get added.

The script is available here.

It takes a whole load of command line options:


This script needs the following bits of supporting software to be on your system:

It also needs these local commands (if the relevant options are used)

It has probably only been tested with bash, rather than more primitive shells.


Fillballoon supports two jtag dongles on different addresses - one for CPLD programming, and one for Jflash programming, because there are separate JTAG chains for the CPLD and the CPU. Thus for production efficiency fitting a second parallel port makes sense. For lower volume you can use a simple printer switch box, and for really low volume (about 2 boards :-) you can plug them in and out.

As you can see from the options you can specify directories for the various files to upload, and for the local commands. If you put the command in 'bin' and the files in 'imagefiles' then the default script will work if you just set $BALLOONBASE near the top of the script.

The script can record the unique ID of each card as they are programmed (useful for production).

It can be run via a web interface as a cgi-script, and has the facility to emit a bit of javascript to scroll the display back down to the bottom, which is handy - turn this off if not using it this way (--noscroll), as it just clutters up the screen.


Here is a typical command line for updating a working 2.05g balloon to updated bootloader, kernel and rootfs, located in the current directory. --noaudiooff --noscroll --nocpld --nojflash --bootloaderfile --bootimagefile zImage --rootimagefile balloon-guralp.yaffs.gz --imagesdirectory .

This uses the same filenames as given on ShippedImages. It assumes hardware without the audio fitted, and the use of just a single parallel port. --usebootimage --erasenand --noscroll --commanddirectory bin --imagesdirectory prodimgs/20040422 --smallbootloaderfile bootldr.small --bootloaderfile --bootimagefile boot-2.4.yaffs.gz --rootimagefile skinny.yaffs.gz --cplddirectory cpld_xcr3128/20040427 --cpldfile 20040427_dual_chip_compatible.xsvf --jflashbaseaddr b800 --cpldbaseaddr 378 --noprompt

Will: --usebootimage --erasenand --noscroll --commanddirectory bin --imagesdirectory prodimgs/20040422 --nocpld --nojflash --bootloaderfile --bootimagefile boot-2.4.yaffs.gz --rootimagefile skinny.yaffs.gz --noprompt


Balloonboard: FillBalloonScript (last edited 2009-02-22 21:00:13 by localhost)