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: Stand alone ecos kernel boot on armboard running armboot loader


Raja Mallik <raja.mallik@moschip.com> writes:

> Hi All
> 
> I am trying to build a stand alone ecos kernel image for my arm board
> that  has arm926ejs core. This means an image which has ecos kernel and
> application link to the kernel.
> 
> Problem defn:
> 
> ecos is designed as such that:
> 
> When you build eCos you do not end up with a single kernel image.
> Instead you have a library, libtarget.a, which you link with your
> application code. At link-time any functionality that is not required,
> directly or indirectly by your application, is eliminated. For example
> if your application does not need dynamic memory allocation then the
> relevant code will not get linked in to your application. Cygnus has
> enhanced the GNU linker to operate at the grain of individual linkable
> entities such as functions and variables, in order to eliminate
> overheads. 
> 
> Solution approach:
> 
> 'stand-alone application' means it is an image which is build by linking
> the kernel with an application  together ?
> Is it not possible to build a 'stand-alone' kernel running with a shell?

eCos does not have a shell, it is not an interactive operating
system. Most deployments of eCos do not use a command line interface,
and instead use LEDs/LCDs plus front panel switches.

> 
> 
> -- since eCos does not have a shell, link the application against the
> ecos
> library to generate a single self-contained executable that contains
> everything. Interactive use is either via RedBoot, or via GDB.
> 
> -- HOW to use this concept? anybody has any working examples?
> 

Take a look at the examples in the documentation. They show how eCos
should be used to build application system images.

> 
> 
> My approach and work done!
> 
> 1) I have the arm-elf-gcc for ecos-2.0 distribution.
> 2) I am done with BSP patches for my arm board( CDL files, my_board,
> etc) all are patches 
>    to ecos-2.0 directory.
> 3) configtool from ecos-2.0 builds sucessfully and generated libtarget.a
> file for my arm board.
> 
> 
> work that I would like to do further:
> 
> 4) Some how create an image with libtarget.a and all ecos kernel library
> just specific to my arm board.
>    -- HOW do I do that?
> 5) If , step 4 is done, I want to make this image understand to my
> existing boot armboot-1.1.0 loader, if I copy this image to certain
> location in flash( by default we are copying  linux 
>    image at 0x8000..
>    -- How do I proceed? I am kind of stuk with steps 4) and 5)..


Why do you want to do this? Even if you do achieve it, what has it
gained you? You will end up with a lump of code with no application
included. If you add an application, you will have lots of additional
code that is of no use to it. eCos uses the linking process to only
include those parts of the OS that are directly relevant to the
application.

I think you have fundamentally misunderstood how eCos works. It is not
a monolithic operating system like Linux, you do not get a single
system image, and such a thing would be useless. The paragraph you
quote at the start explains exactly how eCos works, I cannot explain
it any better than that.


-- 
Nick Garnett                                     eCos Kernel Architect
http://www.ecoscentric.com                The eCos and RedBoot experts


-- 
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]