Dear Wolfgang Denk,

On Mon, 2009-08-17 at 10:03 +0200, Wolfgang Denk wrote:

> Dear Peter Chen,
> 
> In message <1250474437.13885.23.ca...@nchen-desktop> you wrote:
> > 
> > > > 1. Does jump table means the function lists which the standalone
> > > > applications uses?
> > > 
> > > The "jump table provided by U-Boot exactly for this purpose" is the
> > > list of functions exported through the "include/_exports.h" header
> > > file.
> > 
> >     At my situation, the standalone program is hardware independent.
> > And the u-boot supplies hardware interfaces according to different
> > platforms.
> > Like at u-boot/board/myboard/myboard.c, there are a function lists
> > struct, and the address
> > of this struct will transfer to standalone program. 
> 
> If you set up your own list of function pointers (in addition or
> instead of the jump table provided by the "include/_exports.h"
> header), then this is a form of linking against the U-Boot code, and
> your application must be released under GPL.
> 

I am sorry, I can't understand your meaning. For example, at
"include/_exports.h"
there is an EXPORT_FUNC(printf), do the standalone application must
under GPL if
it uses printf?
Then, what does "include/_exports.h" use?

In your COPYING, it writes:
  NOTE! This copyright does *not* cover the so-called "standalone"
applications that use U-Boot services by means of the jump table
provided by U-Boot exactly for this purpose - this is merely
considered normal use of U-Boot, and does *not* fall under the 
heading of "derived work".

> > Is it free to license at below situation:
> > The function list which is defined at u-boot/board/myboard/myboard.c,
> > and all functions in this list
> > only uses functions at include/_exports.h and some of user-defined
> > functions.
> 
> Your description is really vague; it would be easier if you could
> give specific code examples or such. If "some of user-defined
> functions" refers to code that is covered by the GPL, then your
> application must be released under GPL, too.
> 

My code like belows:

typedef void (*pfn_t) (void);
pfn_t sc_gps_pfn[] = {
        LoadToMemory,
        SaveData,
        RFPowerCtrl,
        MiscConfig,
        RegisterDspInterruptHandler,
        GetPowerStatus,
        IsUserResume,
        DebugOutput,
        ReturnToBootLoader
};
int LoadToMemory(void *pDestination, unsigned int storeID, unsigned int
size)
{
}
int SaveData(unsigned int storeID, void *pSource, unsigned int size)
{}
int RegisterDspInterruptHandler(unsigned int handler)
{
        gps_intr = (pfn_t) handler;

        return 1;
}

extern void ReturnToBootLoader(unsigned int nextRtcAlarmParam); /* which
is defined at *.S file */
...

int Launch()
{
Launch_apps(sc_gps_pfn, jumpaddr); /* Launch_apps is defined at *.S
file, and it just jumps to VMA of standalone application, sc_gps_pfn is
the address for function list */
}

We want to open this code, but want to close the code which use this
function list in binary pattern.

> > Or Need I to export my functions at include/_exports.h? At my standalone
> > application only uses address of
> > functions at function list, not the name of function, so It doesn't need
> > to include include_exports.h.
> 
> What you implement is some form of static linking.
> 
> ... which technically is a stupid thing to do, as your application
> will only be able to run with a very specific binary image of U-Boot.
> Even rebuilding the same version of U-Boot (jut using a different
> tool chain, for example) will most likely result in a U-Boot image
> that cannot run your application code any more. Even worse, ther
> ewill be not even a clear failure mode, instead you will execute
> random code.
> 

The standalone application is compiled by armcc, and this bin file is
shared by WinCE and Linux bootloader.
The standalone application uses bootloader functions by address not by
name.

> > We would like to release our u-boot under GPL, but standalone
> 
> Actually you have no choice; U-Boot is already covered by the GPL -
> as soon as you distribute the code, you also have to fufil the
> resulting requirements of the GPL.
> 
> > application includes some IP properties code, so 
> > we want to close it.
> 
> This is no problem, as long as you strictly follow the rules. I think
> the exception from the GPL is pretty well defined and leaves not much
> room for interpretation. What you describe sounds fishy to me.
> 
> Best regards,
> 
> Wolfgang Denk
> 


Best Regards,
Peter Chen
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to