blob Use

Once the jtag programmer has been used to program blob into the flash the blob program can be used to get a kernel boot loader into flash. You'll need a copy of binary kernel boot program, 'pboot'.

Downloading pboot

I used minicom, so I'll use that as an example. Connect the serial port to the weararm and run minicom, setting the baud rate to 57600, 8N1. Power up the weararm and watch blob check the memory and give a prompt. Be sure to hit a key to stop the autoboot at the right time:


Blob is running.                                                               
Starting the memory tester...                                                  
Testing memory...Testing done...                                               
Zeroing memory...0xC4000000                                                    
Zeroing done. Testing for aliases...                                           
                                                                               
Block at 0xC0000000 with length 0x02000000                                     
                                                                               
Loading kernel from flash .... done                                            
                                                                               
blob version 1.0.8-pre2+weararm2                                               
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.                        
                                                                               
blockBase = 0xC0000000, blockSize = 0x02000000                                 
Autoboot in progress, press any key to stop .                                  
Autoboot aborted                                                               
Type "help" to get a list of commands                                          
blob> 

Now tell blob to accept a kernel image via the serial port. We are going to substitue the 'pboot' program for the kernel as we are loading the kernel from a PCMCIA or CF disk.

blob> download kernel                                                          
Switching to 57600 baud
start downloading                                                              
.

Now hit "^AzS" which tells minicom to download a file. Scroll to "xmodem" and them select the 'pboot' file. The first time you do this it will no doubt take too long and the download will timeout. If so, exit the download with "^C" and try again. The code is somewhat timing sensative, sorry.

Flashing pboot

Once you get the download to work you can start the boot load or program it to flash


blob> flash kernel

or

blob> boot

Once the pboot program is in flash you can reset the cpu and let blob auto boot the kernel.

Some details

The blob boot loader only knows about kernels and ram disks. We are not currently using the ramdisk feature.

Since flash space is limited, we are substituting a kernel boot loader (pboot) for the kernel. The blob loader thinks it's loading a kernel but it's really loading a secondary boot loader which loads the kernel from an IDE disk in the PCMCIA or CF slot.

The blob loader loads the kernel (or the pboot) into DRAM at 0xc0008000. The kernel and pboot are linked to start at 0xc0008000 and assume DRAM starts at 0xc0000000.

The reload command will copy flash from 0x10000 (64k) into DRAM at c0008000. The boot command just jumps to 0xc0008000.

Blob assumes the flash memory is partitioned as follows:

00000000 - 0000ffff	blob boot loader
00010000 - 000dffff	pboot loader (kernel)
000e0000 - 001fffff	ramdisk (unused)