public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] tool to prepare flash image for RedBoot
@ 2007-05-04  6:43 Hamish Moffatt
  2007-05-04  6:53 ` Andrew Lunn
  2007-05-04 14:38 ` [ECOS] " Grant Edwards
  0 siblings, 2 replies; 7+ messages in thread
From: Hamish Moffatt @ 2007-05-04  6:43 UTC (permalink / raw)
  To: ecos-discuss

Hi,

I have an embedded system using RedBoot. I would like to prepare an
image to be programmed into the FLASH devices before board assembly.

Is there a tool available to build a complete image containing RedBoot, 
a SysConfig partition with a default boot script, an initialised 
file system and a linux image?



Thanks,
Hamish
-- 
Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au>

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] tool to prepare flash image for RedBoot
  2007-05-04  6:43 [ECOS] tool to prepare flash image for RedBoot Hamish Moffatt
@ 2007-05-04  6:53 ` Andrew Lunn
  2007-05-04  9:59   ` Hamish Moffatt
  2007-05-04 14:38 ` [ECOS] " Grant Edwards
  1 sibling, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2007-05-04  6:53 UTC (permalink / raw)
  To: ecos-discuss

On Fri, May 04, 2007 at 04:43:29PM +1000, Hamish Moffatt wrote:
> Hi,
> 
> I have an embedded system using RedBoot. I would like to prepare an
> image to be programmed into the FLASH devices before board assembly.
> 
> Is there a tool available to build a complete image containing RedBoot, 
> a SysConfig partition with a default boot script, an initialised 
> file system and a linux image?

Probably the easiest way to do this is build a real system, configure
it exactly how you want, and then use JTAG to read out the flash, byte
for byte.
    
    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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] tool to prepare flash image for RedBoot
  2007-05-04  6:53 ` Andrew Lunn
@ 2007-05-04  9:59   ` Hamish Moffatt
  0 siblings, 0 replies; 7+ messages in thread
From: Hamish Moffatt @ 2007-05-04  9:59 UTC (permalink / raw)
  To: ecos-discuss

On Fri, May 04, 2007 at 08:53:27AM +0200, Andrew Lunn wrote:
> On Fri, May 04, 2007 at 04:43:29PM +1000, Hamish Moffatt wrote:
> > I have an embedded system using RedBoot. I would like to prepare an
> > image to be programmed into the FLASH devices before board assembly.
> > 
> > Is there a tool available to build a complete image containing RedBoot, 
> > a SysConfig partition with a default boot script, an initialised 
> > file system and a linux image?
> 
> Probably the easiest way to do this is build a real system, configure
> it exactly how you want, and then use JTAG to read out the flash, byte
> for byte.

Sure. (Or read it all out under linux, etc.) But that's not quite as
nice as "make ...", and not automatable.

It looks like the NSLU2 hacker community has done some work dissecting
Redboot partitions and the like. The 'slugtool' program can unpack an
NSLU2 firmware image into its individual partitions, and repack one. I
don't know if it can create one from scratch. Still it might be a
starting point.

How are others initialising their boards? Programming every board via
JTAG? Even then you need to produce a composite image.


Thanks,
Hamish
-- 
Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au>

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ECOS]  Re: tool to prepare flash image for RedBoot
  2007-05-04  6:43 [ECOS] tool to prepare flash image for RedBoot Hamish Moffatt
  2007-05-04  6:53 ` Andrew Lunn
@ 2007-05-04 14:38 ` Grant Edwards
  2007-05-04 14:48   ` Hamish Moffatt
  1 sibling, 1 reply; 7+ messages in thread
From: Grant Edwards @ 2007-05-04 14:38 UTC (permalink / raw)
  To: ecos-discuss

On 2007-05-04, Hamish Moffatt <hamish@cloud.net.au> wrote:

> I have an embedded system using RedBoot. I would like to prepare an
> image to be programmed into the FLASH devices before board assembly.
>
> Is there a tool available to build a complete image containing
> RedBoot, a SysConfig partition with a default boot script, an
> initialised file system and a linux image?

If you're looking for a tool to combine a bunch of
object/hex/binary files into a single one there are tons of
choicces.

  You can just use objcopy to combine binary chunks.

  You can use something like srec_cat available at
  http://srecord.sourceforge.net/ to combine HEX files.

  You can use objcopy to create an ELF file for each input
  chunk and then link them together.

Personally, I'd probably start by carefully studying the
"objcopy" man page.  It's a _very_ useful program for anybody
doing embedded work.  Then go read the web page for the srecord
project above.  Between the two of them, you should be able to
come up with a pertty straight-forward solution.
  
-- 
Grant Edwards                   grante             Yow! Now we can become
                                  at               alcoholics!
                               visi.com            


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS]  Re: tool to prepare flash image for RedBoot
  2007-05-04 14:38 ` [ECOS] " Grant Edwards
@ 2007-05-04 14:48   ` Hamish Moffatt
  2007-05-04 15:00     ` Hamish Moffatt
  2007-05-04 20:16     ` Chris Zimman
  0 siblings, 2 replies; 7+ messages in thread
From: Hamish Moffatt @ 2007-05-04 14:48 UTC (permalink / raw)
  To: ecos-discuss, ecos-discuss

On Fri, May 04, 2007 at 02:37:31PM +0000, Grant Edwards wrote:
> On 2007-05-04, Hamish Moffatt <hamish@cloud.net.au> wrote:
> 
> > I have an embedded system using RedBoot. I would like to prepare an
> > image to be programmed into the FLASH devices before board assembly.
> >
> > Is there a tool available to build a complete image containing
> > RedBoot, a SysConfig partition with a default boot script, an
> > initialised file system and a linux image?
> 
> If you're looking for a tool to combine a bunch of
> object/hex/binary files into a single one there are tons of
> choicces.
> 
>   You can just use objcopy to combine binary chunks.
> 
>   You can use something like srec_cat available at
>   http://srecord.sourceforge.net/ to combine HEX files.
> 
>   You can use objcopy to create an ELF file for each input
>   chunk and then link them together.
> 
> Personally, I'd probably start by carefully studying the
> "objcopy" man page.  It's a _very_ useful program for anybody
> doing embedded work.  Then go read the web page for the srecord
> project above.  Between the two of them, you should be able to
> come up with a pertty straight-forward solution.

Thanks Grant, I'm aware of srec_cat and objcopy. But I would like to
include a RedBoot FIS partition table and a configuration partition
too... Ideally an unspecified tool would generate those!


Hamish
-- 
Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au>

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS]  Re: tool to prepare flash image for RedBoot
  2007-05-04 14:48   ` Hamish Moffatt
@ 2007-05-04 15:00     ` Hamish Moffatt
  2007-05-04 20:16     ` Chris Zimman
  1 sibling, 0 replies; 7+ messages in thread
From: Hamish Moffatt @ 2007-05-04 15:00 UTC (permalink / raw)
  To: ecos-discuss, ecos-discuss

On Fri, May 04, 2007 at 02:37:31PM +0000, Grant Edwards wrote:
> On 2007-05-04, Hamish Moffatt <hamish@cloud.net.au> wrote:
> 
> > I have an embedded system using RedBoot. I would like to prepare an
> > image to be programmed into the FLASH devices before board assembly.
> >
> > Is there a tool available to build a complete image containing
> > RedBoot, a SysConfig partition with a default boot script, an
> > initialised file system and a linux image?
> 
> If you're looking for a tool to combine a bunch of
> object/hex/binary files into a single one there are tons of
> choicces.
> 
>   You can just use objcopy to combine binary chunks.
> 
>   You can use something like srec_cat available at
>   http://srecord.sourceforge.net/ to combine HEX files.
> 
>   You can use objcopy to create an ELF file for each input
>   chunk and then link them together.
> 
> Personally, I'd probably start by carefully studying the
> "objcopy" man page.  It's a _very_ useful program for anybody
> doing embedded work.  Then go read the web page for the srecord
> project above.  Between the two of them, you should be able to
> come up with a pertty straight-forward solution.

Thanks Grant, I'm aware of srec_cat and objcopy. But I would like to
include a RedBoot FIS partition table and a configuration partition
too... Ideally an unspecified tool would generate those!


Hamish
-- 
Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au>

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [ECOS]  Re: tool to prepare flash image for RedBoot
  2007-05-04 14:48   ` Hamish Moffatt
  2007-05-04 15:00     ` Hamish Moffatt
@ 2007-05-04 20:16     ` Chris Zimman
  1 sibling, 0 replies; 7+ messages in thread
From: Chris Zimman @ 2007-05-04 20:16 UTC (permalink / raw)
  To: Hamish Moffatt, ecos-discuss

Hamish,

As Andrew mentioned earlier -- if what you are looking to do is to
replicate an existing image, dumping it via JTAG (or whatever else you
might feel like) after setup is the easiest way to get this done.

If you want a tool that will actually create an FIS layout from existing
images, you will probably have to write this yourself (if one exists, I
don't know of it).  The code to create this is in packages/redboot/{your
version}/src/flash.c and [...]/src/fconfig.c for the boot script etc.
with the respective headers being found in the redboot include
directory.

In the end, unless you're planning to create lots of different images
sets, it would probably be much quicker to just dump an existing flash
image, but that's up to you.

I modified our Redboot to setup the FIS/boot environment during the
first time our boards boot and then to pull down the application image
via USB, so there is always the possibility of doing something like that
as well.

--Chris

-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Hamish
Moffatt
Sent: 04 May 2007 15:49
To: ecos-discuss@ecos.sourceware.org; ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] Re: tool to prepare flash image for RedBoot

On Fri, May 04, 2007 at 02:37:31PM +0000, Grant Edwards wrote:
> On 2007-05-04, Hamish Moffatt <hamish@cloud.net.au> wrote:
> 
> > I have an embedded system using RedBoot. I would like to prepare an
> > image to be programmed into the FLASH devices before board assembly.
> >
> > Is there a tool available to build a complete image containing
> > RedBoot, a SysConfig partition with a default boot script, an
> > initialised file system and a linux image?
> 
> If you're looking for a tool to combine a bunch of
> object/hex/binary files into a single one there are tons of
> choicces.
> 
>   You can just use objcopy to combine binary chunks.
> 
>   You can use something like srec_cat available at
>   http://srecord.sourceforge.net/ to combine HEX files.
> 
>   You can use objcopy to create an ELF file for each input
>   chunk and then link them together.
> 
> Personally, I'd probably start by carefully studying the
> "objcopy" man page.  It's a _very_ useful program for anybody
> doing embedded work.  Then go read the web page for the srecord
> project above.  Between the two of them, you should be able to
> come up with a pertty straight-forward solution.

Thanks Grant, I'm aware of srec_cat and objcopy. But I would like to
include a RedBoot FIS partition table and a configuration partition
too... Ideally an unspecified tool would generate those!


Hamish
-- 
Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au>

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

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-05-04 15:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-04  6:43 [ECOS] tool to prepare flash image for RedBoot Hamish Moffatt
2007-05-04  6:53 ` Andrew Lunn
2007-05-04  9:59   ` Hamish Moffatt
2007-05-04 14:38 ` [ECOS] " Grant Edwards
2007-05-04 14:48   ` Hamish Moffatt
2007-05-04 15:00     ` Hamish Moffatt
2007-05-04 20:16     ` Chris Zimman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).