* [U-Boot] Build breakage due to "Standalone Apps: Standalone apps should only need exports.h" @ 2011-12-07 19:31 Moffett, Kyle D 2011-12-07 19:56 ` Mike Partington 0 siblings, 1 reply; 3+ messages in thread From: Moffett, Kyle D @ 2011-12-07 19:31 UTC (permalink / raw) To: u-boot Hi, I was just rebasing and tweaking my board-support patch to send out again and I noticed that the latest U-Boot master branch does not build when the config option "CONFIG_CMD_SPI" is enabled: In file included from exports.c:41 [...]/include/_exports.h: In function 'jumptable_init': [...]/include/_exports.h:27: error: 'spi_init' undeclared (first use in this function) [...]/include/_exports.h:27: error: (Each undeclared identifier is reported only once [...]/include/_exports.h:27: error: for each function it appears in.) [...]/include/_exports.h:28: error: 'spi_setup_slave' undeclared (first use in this function) [...]/include/_exports.h:29: error: 'spi_free_slave' undeclared (first use in this function) [...]/include/_exports.h:30: error: 'spi_claim_bus' undeclared (first use in this function) [...]/include/_exports.h:31: error: 'spi_release_bus' undeclared (first use in this function) [...]/include/_exports.h:32: error: 'spi_xfer' undeclared (first use in this function) ^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] Build breakage due to "Standalone Apps: Standalone apps should only need exports.h" 2011-12-07 19:31 [U-Boot] Build breakage due to "Standalone Apps: Standalone apps should only need exports.h" Moffett, Kyle D @ 2011-12-07 19:56 ` Mike Partington 2011-12-08 0:32 ` Mike Frysinger 0 siblings, 1 reply; 3+ messages in thread From: Mike Partington @ 2011-12-07 19:56 UTC (permalink / raw) To: u-boot As I understand it, one of the main purposes of standalone applications is to enable proprietary code to be run with U-Boot. In order to realize this objective, however, the code cannot be forced to include anything that is GPL-encumbered. Note that spi.h does not meet this criteria. So, either spi.h needs to be changed, or the spi interfaces need to be added to exports.h in a way that does not require any additional typedefs or structures from other files. I'm not sure which path is best, but my preference would be to keep the interface between standalone applications and U-Boot as clean and well-defined as possible. To me this means as few files as possible. Regards, Mike Partington On Wed, Dec 7, 2011 at 2:31 PM, Moffett, Kyle D <Kyle.D.Moffett@boeing.com>wrote: > Hi, > > I was just rebasing and tweaking my board-support patch to send out > again and I noticed that the latest U-Boot master branch does not > build when the config option "CONFIG_CMD_SPI" is enabled: > In file included from exports.c:41 > [...]/include/_exports.h: In function 'jumptable_init': > [...]/include/_exports.h:27: error: 'spi_init' undeclared (first use in > this function) > [...]/include/_exports.h:27: error: (Each undeclared identifier is > reported only once > [...]/include/_exports.h:27: error: for each function it appears in.) > [...]/include/_exports.h:28: error: 'spi_setup_slave' undeclared (first > use in this function) > [...]/include/_exports.h:29: error: 'spi_free_slave' undeclared (first > use in this function) > [...]/include/_exports.h:30: error: 'spi_claim_bus' undeclared (first use > in this function) > [...]/include/_exports.h:31: error: 'spi_release_bus' undeclared (first > use in this function) > [...]/include/_exports.h:32: error: 'spi_xfer' undeclared (first use in > this function) > > From what I can tell, the only way to "fix" the exports.h header would > be to copy-paste much of "include/spi.h" (including the structure and > most of the constants) into "include/exports.h". > > Basically, if those SPI functions should be usable from outside code > then the structure definition and the flags to be passed in all need to > be available to the outside code as well. > > Locally I just reverted the patch, but I'm not sure what the desired > long-term fix should be, since it seems silly to have to duplicate > spi.h in exports.h > > Cheers, > Kyle Moffett > > -- > Kyle Moffett > eXMeritus Software > Integrated Intelligence > The Boeing Company > > (703) 764-0925 > (703) 812-1146 [FAX] > Kyle.D.Moffett at boeing.com > > > ^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] Build breakage due to "Standalone Apps: Standalone apps should only need exports.h" 2011-12-07 19:56 ` Mike Partington @ 2011-12-08 0:32 ` Mike Frysinger 0 siblings, 0 replies; 3+ messages in thread From: Mike Frysinger @ 2011-12-08 0:32 UTC (permalink / raw) To: u-boot On Wednesday 07 December 2011 14:56:30 Mike Partington wrote: > As I understand it, one of the main purposes of standalone applications is > to enable proprietary code to be run with U-Boot. In order to realize this > objective, however, the code cannot be forced to include anything that is > GPL-encumbered. Note that spi.h does not meet this criteria. So, either > spi.h needs to be changed, or the spi interfaces need to be added to > exports.h in a way that does not require any additional typedefs or > structures from other files. I'm not sure which path is best, but my > preference would be to keep the interface between standalone applications > and U-Boot as clean and well-defined as possible. To me this means as few > files as possible. in general, i don't think your statement here is correct. the U-Boot license explicitly provides an exception for using the exported API. also, please don't top post -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111207/47d726ea/attachment.pgp> ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-12-08 0:32 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-12-07 19:31 [U-Boot] Build breakage due to "Standalone Apps: Standalone apps should only need exports.h" Moffett, Kyle D 2011-12-07 19:56 ` Mike Partington 2011-12-08 0:32 ` Mike Frysinger
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox