From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerry Van Baren Date: Thu, 10 May 2007 11:10:44 -0400 Subject: [U-Boot-Users] [PATCH] Update to stand alone program feature In-Reply-To: <1628E43D99629C46988BE46087A3FBB997B80E@ep-01.EmbeddedPlanet.local> References: <1628E43D99629C46988BE46087A3FBB997B80E@ep-01.EmbeddedPlanet.local> Message-ID: <464335F4.5010809@smiths-aerospace.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Jeff Mann wrote: >> Technically, you write: "function_no is defined by the enum >> type of _exports.h, so it must be included in the stand >> alone program." >> >> I will reject this patch. As the name "_exports.h" suggests, >> it is intended to contain implementation internals that are >> not supposed to be used by application code. > > Let me clearify (then I can update the doucmentation if we come up with > a better description). As you know, the list of functions in _exports.h > is used to create the enumerated type: XF_get_version 0, XF_getc 1, > XF_tstc 2, ... Etc. So as long as the user has included exports.h or has > uses some other means to identify the function's jump table inxex number > in his/her stand along program, he can know if that function is > available in u-boot. > > This is useful when, for exmaple, a company builds boards both with and > without NAND support. A stand along program will be able to know that > that board was loaded with a u-boot that did not incude NAND support. [snip] > -JM What would be Really Cool[tm] would be to enhance the elf loading capability to resolve unresolved link addresses for the standalone application entry points. Then the standalone program could be loaded by u-boot with the interfaces fixed up by the elf loader. This would eliminate all the problems of jump tables and keeping them synchronized. Possible problems that come to mind... * Code bloat * The coupling between GPL u-boot and potentially proprietary standalone programs arguably is tighter. In practical terms, I don't see this as an issue, but it really isn't my call. I would contend this is similar to linux loadable device drivers and the current standalone programs have license to call back into u-boot - the same functions, simply a different interface mechanism. * My ignorance may be making a molehill out of a mountain of work * So many interesting things to do, so little time :-( Best regards, gvb