This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: where to put application program?


On Mon, Oct 11, 2004 at 07:23:43PM +0530, Chandrashekhar Padiyar wrote:
> Hi
> 
> We have completed most of the development process with our board now. We
> have executed RedBoot and the application program successfully, initialized
> serial devices and Ethernet from both RedBoot and application, and also
> implemented the JFFS2 filesystem correctly.
> 
> Now, the issue is where to keep the application image. Our team members are
> debating several options, so I thought it would be a nice thing to get the
> experts' view.
> 
> Some opinions are:
> 
> 1. Keep RedBoot and application images in Flash, and keep the JFFS2
> partition in the rest of the Flash area. RedBoot will execute first and
> bring up the board, and then copy the application code to RAM using 'fis
> load' and execute it. This can be automated using boot scripting in RedBoot.
> The application will then mount and make use of the JFFS2 partition as
> required.

Nothing wrong with this setup.

> 
> 2. Keep RedBoot in Flash and keep the application image inside the JFFS2
> partition. Let RedBoot (preferably) or some other code called by RedBoot
> mount the JFFS2 partition and extract the kernel image from it, copy it to
> RAM and execute it.
> 
> For this, we either have to add the extra code (that'll access the
> application image inside JFFS2 and extract it to RAM) to RedBoot or to a
> third image that'll be called by RedBoot. But this seems a bit cumbersome.
 
Redboot can access jffs2 filesystems when you add in the extra
packages needed. So there is no need to develop extra code.

> 3. Get rid of RedBoot altogether. Build the application in ROMRAM startup
> mode and put it at the bootup entry point. Application initializes the board
> and mounts and operates the JFFS2 partition as required by it.

This also works, although its not done to often. You get into problems
when the application image becomes corrupt and won't boot. If you have
redboot you have a way out. Without redboot you need a JTAG
programmer.
 
> Now, the issue is, in case we want to automate some kind of version or
> integrity check for the application (i.e. RedBoot checks if the application
> image has been corrupted or not, or if there is a newer build available on a
> remote host, and if so, downloads it via TFTP), it might be easier to let
> RedBoot check for the application image and replace it if required, than
> have the application check if its newer version is available, and if so,
> download it and overwrite its own Flash image with the newer one.

Redboot can do integrity checking. It can have CRC of the image. Also
jffs2 has CRC so if the application image is corrupt in JFFS2 redboot
will know and will not boot the image. 

Checking for updates on a server is more complex. It might make more
sense for the application to do that when it starts. It could check
the server, safely download the new image and then reboot.....

There is no right and wrong way to do this. You has designer have to
pick what is best for your situation.

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]