From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11956 invoked by alias); 18 Jan 2011 09:19:22 -0000 Received: (qmail 11945 invoked by uid 22791); 18 Jan 2011 09:19:21 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mtaout01-winn.ispmail.ntl.com (HELO mtaout01-winn.ispmail.ntl.com) (81.103.221.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 18 Jan 2011 09:19:13 +0000 Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20110118091907.ELCR26766.mtaout01-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com>; Tue, 18 Jan 2011 09:19:07 +0000 Received: from cog.dallaway.org.uk ([213.106.80.48]) by aamtaout02-winn.ispmail.ntl.com (InterMail vG.3.00.04.00 201-2196-133-20080908) with ESMTP id <20110118091907.HQWL25842.aamtaout02-winn.ispmail.ntl.com@cog.dallaway.org.uk>; Tue, 18 Jan 2011 09:19:07 +0000 Received: from cog.dallaway.org.uk (cog.dallaway.org.uk [127.0.0.1]) by cog.dallaway.org.uk (8.13.8/8.13.8) with ESMTP id p0I9J4qB010813; Tue, 18 Jan 2011 09:19:04 GMT Message-ID: <4D355B08.4040802@dallaway.org.uk> Date: Tue, 18 Jan 2011 09:19:00 -0000 From: John Dallaway User-Agent: Thunderbird 2.0.0.24 (X11/20101213) MIME-Version: 1.0 To: =?ISO-8859-1?Q?Seeberger_Marc-Ren=E9?= CC: "ecos-discuss@sourceware.org" References: <7E221E05103BC14885A11709DAAA4CF4015A1F249C@nyx.bfh.ch> In-Reply-To: <7E221E05103BC14885A11709DAAA4CF4015A1F249C@nyx.bfh.ch> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] Re: Redboot fis load X-SW-Source: 2011-01/txt/msg00063.txt.bz2 Hi Marc-Rene Seeberger Marc-René wrote: > I want to save a stripped ELF file as fis file and later on load and > execute it with "fis load" and "go" commands. I can load an ELF file > raw into ram with "load -r -m xmodem -b 0x80000000" and flash it with > "fis create -b 0x80000000 -l 0x1234 -f 0x60000000 -e 0x80000000 xy.elf" > or so. But when I try to "fis load xy.elf", the loader only copies the > ELF file 1:1 into the ram instead of relocating the different sections > into internal and external ram as defined in the ELF file. > As we have three sections for internal and two external rams, I won't > use "load -m xmodem" and then flash three binary files by specifying > source address, length etc. for each of them and later on do 3 fis load > commands followed by a go. > The "load" command is ELF aware, but how can I make the "fis load" > command ELF aware? We do not have a file system other than the simple > FIS on our embedded system. > Thanks for any hint The ELF parsing code is currently part of the RedBoot "load" command implementation: load.c(load_elf_image) You will need to move the parsing code into a separate function and call it from the RedBoot "fis load" command implementation in response to a new 'option' switch on the RedBoot command line: flash.c(fis_load) For a truly generic implementation, you should not assume that the flash is directly addressable. I hope this helps... John Dallaway eCos maintainer -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss