Rockbox mail archive
Subject: Re: Rockbox in Flash init code
From: c s (rb_dev_at_yahoo.com)
--- Linus Nielsen Feltzing <linus_at_haxx.se> wrote:
> c s wrote:
> > Shouldn't all the recent code that is being added
> > because it is needed for booting Rockbox from
> flash be
> > ifdef'd out of the standard Rockbox compile? If
> > boot from flash has specific init needs, they
> > shouldn't be in the "regular" executable.
> The "extra" init code isn't a specific need, it is
> just things that the
> original firmware has already done, but it doesn't
> hurt if we do it too.
I didn't mean to imply that it was hurting anything,
but as far as a disk loaded Rockbox image is concerned
it IS extra code that is performing a specific need
that is normally taken care of by the Archos firmware
and only needed when you replace that flash image.
There is no need to execute that init code again when
loading from the disk because the original firmware
has done it before the Rockbox code is executed. That
makes it a specific need that only the Rockbox in
It's likely an insignificant addition to the
executable size and execution time, but it just seems
to be good coding practice to have it ifdef'd as
"Rockbox in flash specific" code so that it is clear
that any future modification or deletion of the code
could have specific ramifications under that special
use of the code that do not exist and would not be
detected under "normal" conditions.
I don't think that there is some big problem with what
was done, it was just an observation.
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
Page was last modified "Jan 10 2012" The Rockbox Crew