A - A - A

Chapter 6. Tools and Utilities for Booting

 
Search

Blob

The Boot Loader Object (Blob) allows the user to:

  • initialise the hardware (CPU speed, memory, interrupts, RS232);

  • boot a Linux kernel and provide that kernel with a RAMdisk;

  • download a kernel or a RAMdisk to the target device;

  • write a freshly downloaded kernel or RAMdisk to the flash memory (see below for limitations).

Blob was originally written for the LART by Jan-Derk Bakker and Erik Mouw, but has also been modified to work on the Assabet by Jeff Sutherland and Chester and on the Intel Brutus SA-1100 evaluation platform by Erik Mouw, and on the PLEB Linux board by Adam Wiggins. You need to compile the correct version for the hardware you want to use it with as the hardware varies in important ways (processor, memory type and layout, debug serial port).

Using Blob

Assuming that you have already installed Blob then this is how you should use it. If you need to install the boot loader for your device read the chapter on that device or Chapter 2 for details.

  1. connect a terminal (or a terminal emulator like miniterm or Seyon) to the target device's serial port;

  2. use the appropriate settings for your device: usually 9600 8N1 or 115200 8N1; on the LART there is no hardware flow control so you'll need to turn that off too;

  3. use the appropriate terminal emulation, usually VT100;

  4. switch the target device on.

You should then see something like (this example is from a LART):

Consider yourself LARTed!
Running from internal Flash.
Starting the memory tester...
Zeroing memory...0xD0000000
Zeroing done. Testing for aliases...
Loading kernel from flash ....... done
Loading ramdisk from flash ............... done

Note that it always says Loading kernel/ramdisk whether or not a kernel and RAMdisk are actually present. It will just hang if it tries to boot a 'blank' kernel.

Blob version 1.0.8-pre2, 
Copyright (C) 1999 2000 Jan-Derk Bakker and Erik Mouw
Copyright (C) 2000 Johan Pouwelse
Blob comes with ABSOLUTELY NO WARRANTY; read the GNU GPL for details.
This is free software, and you are welcome to redistribute it
under certain conditions; read the GNU GPL for details.

Autoboot in progress, press Enter to stop ...

If you didn't press Enter within 10 seconds, Blob will automatically start the Linux kernel:

Starting kernel ...

Uncompressing Linux...done.
Now booting the kernel
...

However, if you press Enter, you will see the Blob prompt:

Autoboot aborted
Type "help" to get a list of commands
blob>

Blob comes with a selection of useful commands. Type help for a list or refer to Table 6-1.

Compiling Blob

Note that two versions of pre-compiled Blobs are provided on the CD and the LART website so most people will not need to compile Blob until you want to modify it or perhaps get a newer version. Should you need to, here are the details. First you need a suitable GNU toolchain:

  • A native ARM/StrongARM Linux system with gcc 2.95.2, and binutils 2.9.5.0.22 or better

  • Or any UNIX system with cross compiling binutils 2.9.5.0.22 (or better) and gcc 2.95.2 installed

  • GNU make (although some vendor supplied make utilities will do)

Next you need to get the software, then configure and compile it. The lastest version available at the time of writing is blob 1.0.8-pre2.tar.gz which is on the CD in /tools/blob/

This example assumes you will unpack it in /usr/src

cd /usr/src
tar -xzvf /cdrom/tools/blob/blob 1.0.8-pre2.tar.gz
cd blob-1.0.8-pre2

Now you need to specify the board for which you want to compile it, and whether you are cross-compiling or not, i.e. if you are compiling on a PC rather than a native ARM machine. There are currently four valid board names, choose from: 'assabet', 'brutus', 'lart', or 'pleb'. If the board name is omitted, lart will be choosen as a default. If you are modifying Blob itself then you should turn on the --enable-maintainer-mode flag. This will automatically regenerate Makefiles and configure scripts if you change the source files. You need autoconf (>= 2.13) and automake (>= 1.4) installed for this feature.

export CC=/path/to/cross/gcc
export OBJCOPY=/path/to/cross/objcopy
./configure --with-linux-prefix=/path/to/armlinux/source --with-board=boardname

So on our example host machine the correct runes are as follows (this machine needs to be told the host type, otherwise configure complains):

export CC=arm-linux-gcc
export OBJCOPY=arm-linux-objcopy
./configure --with-linux-prefix=/usr/src/arm-linux/linux/ --with-board=lart --host=i386

If things have worked you should get confirmation text like this:

 Target board                 lart
C compiler arm-linux-gcc
C falgs -O2 -I/usr/src/arm-linux/linux/include -Wall -nostdinc -mcpu=strongarm110 -mapcs-32 -fomit-frame-pointer -fPIC
Linker Flags -static -nostdlib
Objcopy tool arm-linux-objcopy
Objcopy flags -O binary -R .note -R .comment -S
run-time debug information no

For a native ARM machine it's much simpler - all you should need is this:

./configure --with-board=lart

So, now you just make Blob with:

make

This will result in a blob-elf32 which is the full executable with headers and a stripped binary blob in the blob-1.0.8-pre2/src/ directory. The much smaller blob is the one you actually upload. blob-elf32 is useful for examining the code produced. The best way to upload Blob to you device is using the appropriate version of JFlash-linux.

Resources

In addition to the Blob-related resources which are available on our CD, you can find: