Re: [uCsimm] Downloading kernel via e-net?

From: D. Jeff Dionne (
Date: Fri Aug 18 2000 - 22:51:00 EDT

Tom Walsh <> said:
> Robert Poor wrote:

> > [2] Is there an easy way to load image.bin via e-net? I have my
> > dev directory NFS mounted on /usr (that\'s wonderful)?
> Theoretically possible, dangerous as you might lose control of the Flash
> programming algorthim and wipe your existing Flash clean, but you

Can never happen, don't worry about that (the bootloader is safely in
protected FLASH sectors, and copies itself to RAM on bootup). All you
need to do (assuming your image.bin is avalable over NFS mounted as
/usr/foobar/image.bin) is...

# flashloader /usr/foobar/image.bin

> *could* malloc() a BIG section of DRAM, load the image into that, then
> launch a Flash programmer code. BUT, you would need to have a Linux to
> burn a Linux, lose a working Linux, you lose the ethernet network layer,
> and then you would have to revert back to your ucsimm loader + minicom.

Taken care of right out of the box, just run 'flashloader <imagefile.bin>'

> Question is, would it be more useful to place smaller code (like RTAI)
> into a dedicated Flash sector, then have the kernel install this code
> (from within crt0_r*m.S) when starting the system, this would make the

The bootloader reserves a small piece of RAM for itself. The kernel
trap handlers know not to mess with traps that don't belong to it, so
the bootloader installs a trap handler to the bootloader system call
entry point in RAM. Once you enter there, the bootloader preserves the
kernel's environment (just like RTAI would) and in this safe environment
executes your bootloader system call. The C interface to the bootloader is
callable from both the uClinux kernel and user space, and will safely
read/erase/write FLASH environment variables as well as raw sectors (there is
a protection map, you have to unprotect a sector before you can erase it if
it's owned by the bootloader).

To play around with the bootloader FLASH read/write/erase functions is
safe, provided you _never_ call flash_chattr_range(). If you do, you
can erase the bootloader if you unprotect the low sectors (Don't do that).

Attached is a complete bootstd.h and booterr.h. These are the full
public interface to the bootloader's resident API and ABI. The copy on
the CD is intentionally limited to what is needed for the flashloader
program, which is _always_ safe to use.

> TomW
> --
> Tom Walsh - WN3L - Embedded Systems Consultant
> \'\', \'\'
> \"Windows? No thanks, I have work to do...\"
> This message resent by the list server

D. Jeff Dionne                              
   -VP Research and Development, Office of the CTO

Lineo - Put Linux Anywhere

-- D. Jeff Dionne -VP Research and Development, Office of the CTO

Lineo - Put Linux Anywhere

This message resent by the list server

This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:37 EST