From: Peter Chen Date: Tue, 18 Aug 2009 17:50:13 +0800 Subject: [U-Boot] License Problems for standalone application at u-boot In-Reply-To: <20090818083553.7A9ED833DBD2@gemini.denx.de> References: <1250220295.7144.18.camel@nchen-desktop> <20090814054204.6B2A6833DBD2@gemini.denx.de> <1250231900.7144.40.camel@nchen-desktop> <20090814093831.6AADA833DBD2@gemini.denx.de> <1250474437.13885.23.camel@nchen-desktop> <20090817080308.88769833DBD2@gemini.denx.de> <1250571462.6548.21.camel@nchen-desktop> <20090818083553.7A9ED833DBD2@gemini.denx.de> Message-ID: <1250589013.6208.40.camel@nchen-desktop> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Wolfgang Denk, On Tue, 2009-08-18 at 10:35 +0200, Wolfgang Denk wrote: > Dear Peter Chen, > > In message <1250571462.6548.21.camel@nchen-desktop> you wrote: > > > > > > > The "jump table provided by U-Boot exactly for this purpose" is the > > > > > list of functions exported through the "include/_exports.h" header > > > > > file. > ... > > > 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. > > > "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. > > > 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. > > > 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. > > > > > 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 > > }; > > 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. > > > 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. > 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? > > > What you implement is some form of static linking. > ... > > 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 > > -- > 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