Skip to contentSkip to conversation

License Problems for standalone application at u-boot

U-Boot Peter Chen 2 participants 10 messages Aug 14, 2009 – Aug 18, 2009

lore
Share & tools
lore

Peter Chen

author
#0 lore raw

Dear u-boot authors,

We have a standalone application, and u-boot will supply jump address and some services to this application.
I wonder are there any license problems (GPL or u-boot) for our standalone application at below condition:

1. Some services which we wrote have included some u-boot header file?
2. All the services we wrote by ourselves, and not using any u-boot source code and header file?

Currently, we are number 1 situation.

Thank you

Best Regards,
Peter Chen

#1 lore raw

Dear Peter,

Quoted 11 lines · in message <1250220295.7144.18.camel@nchen-desktop> you wrote:

We have a standalone application, and u-boot will supply jump address and some services to this application.
I wonder are there any license problems (GPL or u-boot) for our standalone application at below condition:

1. Some services which we wrote have included some u-boot header file?
2. All the services we wrote by ourselves, and not using any u-boot source code and header file?

Currently, we are number 1 situation.

Please see the first paragraphs of the COPYING file that comes with the U-Boot sources; this explains the GPL exception for standalone programs.

Please let me know if you have additional questions.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The philosophy exam was a piece of cake  -  which  was  a  bit  of  a
surprise, actually, because I was expecting some questions on a sheet
of paper.
author
#2 lore raw

Dear Wolfgang,

I have still some puzzled which you wrote below :

1. Does jump table means the function lists which the standalone applications uses?

2. If the functions includes some u-boot header file, it belongs to derived work or not?

Thank you!

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".

The header files "include/image.h" and "include/asm-*/u-boot.h"
define interfaces to U-Boot. Including these (unmodified) header files in another file is considered normal use of U-Boot, and does *not* fall under the heading of "derived work".

Also note that the GPL below is copyrighted by the Free Software
Foundation, but the instance of code that it refers to (the U-Boot source code) is copyrighted by me and others who actually wrote it. -- Wolfgang Denk

Best Regards,
Peter Chen

Quoted 25 lines · Wolfgang Denk

Dear Peter,

Quoted 11 lines · in message <1250220295.7144.18.camel@nchen-desktop> you wrote:

We have a standalone application, and u-boot will supply jump address and some services to this application.
I wonder are there any license problems (GPL or u-boot) for our standalone application at below condition:

1. Some services which we wrote have included some u-boot header file?
2. All the services we wrote by ourselves, and not using any u-boot source code and header file?

Currently, we are number 1 situation.

Please see the first paragraphs of the COPYING file that comes with the U-Boot sources; this explains the GPL exception for standalone programs.

Please let me know if you have additional questions.

Best regards,

Wolfgang Denk

#3 lore raw

Dear Peter Chen,

Quoted 3 lines · In message <1250231900.7144.40.camel@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.

Only these functions are available from standalone programs without linking against any of the U-Boot provided libraries. If your program links and runs fine using only these functions then you are free to license your standalone application whatever you like; if you need to link against any of the U-Boot libraries then you must release your code under GPL.

Quoted 2 lines

2. If the functions includes some u-boot header file, it belongs to derived work or not?

Well, the file "COPYING" explicitly mentions the header files where the situations is clear:

Quoted 4 lines

The header files "include/image.h" and "include/asm-*/u-boot.h"
define interfaces to U-Boot. Including these (unmodified) header files in another file is considered normal use of U-Boot, and does *not* fall under the heading of "derived work".

The fact that these files are explicitly mentioned *not* to make yoru code a Derived Work should make clear that all other header files do, or at least might do, so you better not include these in a standalone application you don't intend to release under GPL. If you do, you better check with your legal department, and rely on what they tell you. Note that I just wouldn't do that.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I have a theory that it's impossible to prove anything, but  I  can't
prove it.
author
#4 lore raw

Thanks, Wolfgang.
I still have same questions want to confirm.

Quoted 11 lines · Wolfgang Denk

Dear Peter Chen,

Quoted 3 lines · In message <1250231900.7144.40.camel@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.

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.

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.

Quoted 7 lines

Only these functions are available from standalone programs without linking against any of the U-Boot provided libraries. If your program links and runs fine using only these functions then you are free to license your standalone application whatever you like; if you need to link against any of the U-Boot libraries then you must release your code under GPL.

We would like to release our u-boot under GPL, but standalone application includes some IP properties code, so
we want to close it.

Quoted 18 lines
Quoted 2 lines

2. If the functions includes some u-boot header file, it belongs to derived work or not?

Well, the file "COPYING" explicitly mentions the header files where the situations is clear:

Quoted 4 lines

The header files "include/image.h" and "include/asm-*/u-boot.h"
define interfaces to U-Boot. Including these (unmodified) header files in another file is considered normal use of U-Boot, and does *not* fall under the heading of "derived work".

The fact that these files are explicitly mentioned *not* to make yoru code a Derived Work should make clear that all other header files do, or at least might do, so you better not include these in a standalone application you don't intend to release under GPL. If you do, you better check with your legal department, and rely on what they tell you. Note that I just wouldn't do that.

Quoted 4 lines

Best regards,

Wolfgang Denk

Best Regards,
Peter Chen

#5 lore raw

Dear Peter Chen,

Quoted 8 lines · In message <1250474437.13885.23.camel@nchen-desktop> you wrote:
Quoted 7 lines
Quoted 3 lines

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.

Quoted 6 lines

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.

Quoted 5 lines

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.

Quoted 4 lines

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.

Quoted 1 line

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.

Quoted 2 lines

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

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If a group of N persons implements a COBOL compiler,  there  will  be
N-1 passes. Someone in the group has to be the manager. - T. Cheatham
author
#6 lore raw

Dear Wolfgang Denk,

Quoted 18 lines · Wolfgang Denk

Dear Peter Chen,

Quoted 8 lines · In message <1250474437.13885.23.camel@nchen-desktop> you wrote:
Quoted 7 lines
Quoted 3 lines

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.

Quoted 6 lines

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.

Quoted 5 lines

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".

Quoted 11 lines
Quoted 5 lines

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.

Quoted 7 lines
Quoted 4 lines

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.

Quoted 8 lines

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

Quoted 9 lines
Quoted 1 line

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.

Quoted 2 lines

application includes some IP properties code, so
we want to close it.

Quoted 8 lines

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

#7 lore raw

Dear Peter Chen,

Quoted 4 lines · In message <1250571462.6548.21.camel@nchen-desktop> you wrote:
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

The "jump table provided by U-Boot exactly for this purpose" is the list of functions exported through the "include/_exports.h" header file.

...

Quoted 6 lines
Quoted 4 lines

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

I'm close to give up. I try to as explicit as possible, and I see no room for interpretation left, yet you still try to argument.

Quoted 4 lines

"include/_exports.h"
there is an EXPORT_FUNC(printf), do the standalone application must under GPL if
it uses printf?

No. As explained several times before, the "jump table [is] provided by U-Boot exactly for this purpose", with "this purpose" being to allow for closed source, proprietary code.

printf() gets exported through the jump table interface, so this is OK to use in proprietary code.

Quoted 1 line

Then, what does "include/_exports.h" use?

It uses a list of functions (resp. function pointers) we consider OK to be used in closed source applications.

Quoted 6 lines

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".

Indeed. And I explained this several times before.

Quoted 14 lines
Quoted 11 lines
Quoted 5 lines

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:

Quoted 12 lines

typedef void (*pfn_t) (void);
pfn_t sc_gps_pfn[] = {
LoadToMemory,
SaveData,
RFPowerCtrl,
MiscConfig,
RegisterDspInterruptHandler,
GetPowerStatus,
IsUserResume,
DebugOutput,
ReturnToBootLoader
};

OK, so you are setting up a table of your own functions. You need this table only if you link the code containing these functions with the U-Boot binary - and you do so most probably because the code calls into other U-Boot provided functions.

Quoted 2 lines

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

You probably have no choice here. If your code that provides the list of functions above is linked with U-Boot, you *must* release it under GPL. No matter if you want or not - if you release your code at all, it is GPLed.

And your list of functions above thus accesses GPLed code which is NOT part of include/_exports.h. So the GPL exception does NOT apply to any code that references functions from this list, i. e. your standalone application must be released under GPL, too.

Quoted 1 line
Quoted 1 line

What you implement is some form of static linking.

...

Quoted 4 lines

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.

That does not matter. Accessing a function by address still means you are linking against the code (in a stupid way, btw). Your standalone application has to be released under GPL.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A quarrel is quickly settled when deserted by one party; there is  no
battle unless there be two.                                  - Seneca
author
#8 lore raw

Dear Wolfgang Denk,

Quoted 84 lines · Wolfgang Denk

Dear Peter Chen,

Quoted 4 lines · In message <1250571462.6548.21.camel@nchen-desktop> you wrote:
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

The "jump table provided by U-Boot exactly for this purpose" is the list of functions exported through the "include/_exports.h" header file.

...

Quoted 6 lines
Quoted 4 lines

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

I'm close to give up. I try to as explicit as possible, and I see no room for interpretation left, yet you still try to argument.

Quoted 4 lines

"include/_exports.h"
there is an EXPORT_FUNC(printf), do the standalone application must under GPL if
it uses printf?

No. As explained several times before, the "jump table [is] provided by U-Boot exactly for this purpose", with "this purpose" being to allow for closed source, proprietary code.

printf() gets exported through the jump table interface, so this is OK to use in proprietary code.

Quoted 1 line

Then, what does "include/_exports.h" use?

It uses a list of functions (resp. function pointers) we consider OK to be used in closed source applications.

Quoted 6 lines

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".

Indeed. And I explained this several times before.

Quoted 14 lines
Quoted 11 lines
Quoted 5 lines

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:

Quoted 12 lines

typedef void (*pfn_t) (void);
pfn_t sc_gps_pfn[] = {
LoadToMemory,
SaveData,
RFPowerCtrl,
MiscConfig,
RegisterDspInterruptHandler,
GetPowerStatus,
IsUserResume,
DebugOutput,
ReturnToBootLoader
};

OK, so you are setting up a table of your own functions. You need this table only if you link the code containing these functions with the U-Boot binary - and you do so most probably because the code calls into other U-Boot provided functions.

Quoted 2 lines

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

You probably have no choice here. If your code that provides the list of functions above is linked with U-Boot, you *must* release it under GPL. No matter if you want or not - if you release your code at all, it is GPLed.

Quoted 5 lines

And your list of functions above thus accesses GPLed code which is NOT part of include/_exports.h. So the GPL exception does NOT apply to any code that references functions from this list, i. e. your standalone application must be released under GPL, too.

The functions which in my function list are written by our own.
and do not call any other functions at original u-boot code. In that case,
can we add our functions to "include/_exports.h" in order to free from GPL for our standalone application?

I checked the functions which exported in "include/_exports.h", and their definitions are also under GPL. then why
they can be called for closed code? If we want to add, how to do?

Quoted 7 lines
Quoted 1 line
Quoted 1 line

What you implement is some form of static linking.

...

Quoted 4 lines

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.

Quoted 15 lines

That does not matter. Accessing a function by address still means you are linking against the code (in a stupid way, btw). Your standalone application has to be released under GPL.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A quarrel is quickly settled when deserted by one party; there is  no
battle unless there be two.                                  - Seneca

Best Regards,
Peter Chen

#9 lore raw

Dear Peter Chen,

Quoted 4 lines · In message <1250589013.6208.40.camel@nchen-desktop> you wrote:

The functions which in my function list are written by our own.
and do not call any other functions at original u-boot code. In that case,

Then just link them against your standalone application, and keep the code outside the U-Boot image.

Quoted 2 lines

can we add our functions to "include/_exports.h" in order to free from GPL for our standalone application?

No.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"He was so narrow minded he could see through  a  keyhole  with  both
eyes ..."