[En-Nut-Discussion] Bootloader

Dave ethernut at wormfood.org
Wed Aug 10 23:03:54 CEST 2005


On Tue, 2005-08-09 at 19:13 +0200, Hugo Simon wrote:
> I am looking for a method of upgrading the Ethernut's firmware via network
> and found the network bootloader. But it has some drawbacks for me:
> 
> 1. Ethernut flashes everytime it is resetted, if tftp image is reachable.

It sounds like you programmed the BOOTRST fuse. That is the only way I
know of, where the bootloader is executed before your program. While
there is nothing wrong with this, the current bootloader is not designed
to be used this way. I made a function for my project, that executes the
bootloader, but before it does, it displays a message on the LCD display
of my project, and lights an LED. Obvously that function is specific to
the hardware connected to my ethernut. My project has 3 different ways
that it can execute the bootloader.
1. A specific sequence of keys on the keypad at the right time.
2. A specific response from the server it contacts.
3. Login with telnet and issue a specific command.


> 3. DHCP and TFTP server must reside on the same machine

Not true. I know, because I run dhcpd and tftpd on 2 different machines,
and everything works perfect.


Here are some thoughts on what can be done with a bootloader, that may
give you some ideas for your project. Two of the biggest problems I see
with the current bootloader, is the fact it does not support a local
gateway (at least that is what I've read, I haven't personally tried
it), and it only supports UDP, and not TCP. Because of those
limitations, I've been thinking about the best way to load a flashrom
image from a remote network. I was thinking about writing a bootloader
that would get the flashrom image to program from the banked ram on the
2.x board, or from the serial flash memory on the 2.1 board. What I
would do is have my application download the FlashROM image from http,
or ftp and store it in the banked ram, or serial flash. Then execute the
bootloader, which in turn would read the image out of the external
memory, and program it into the FlashROM. Since the Nut/OS application
would have to help the bootloader by loading the image into external
memory, it could be a lot more complex about the image format, and where
it comes from. For example. the image could be encrypted, or password
protected on a web or ftp server.

-Dave




More information about the En-Nut-Discussion mailing list