Re: [U-Boot-Users] [PATCH] add 'license' command to u-boot?commandline
Dear Harald Welte, In message [EMAIL PROTECTED] you wrote: Hi! Since there has been support by Detlev and Stefan, I have modified the patch in a way to dynamically create the include/license.h file from the COPYING file by the use of a small C program and gzip combined with a Makefile rule. What do you think now? --- [PATCH] add 'license' command to u-boot command line The 'license' command includes the u-boot license (GPLv2) into the actual bootloader binary. The license text can be shown interactively at the u-boot commandline. For products where the commandline can actually be accessed by the end user, this helps to prevent inadvertent GPL violations, since the GPLv2 license text can no longer be 'forgotten' to be included into the product. The 'license' command can be enabled by CONFIG_CMD_LICENSE. Signed-off-by: Harald Welte [EMAIL PROTECTED] Applied, thanks. Note that you got the commit message (above the '---' line) and comments (below it) swapped. 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: [EMAIL PROTECTED] On two occasions I have been asked [by members of Parliament!], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] add 'license' command to u-boot?commandline
Hi, Wolfgang Denk wrote: In message [EMAIL PROTECTED] you wrote: Bleah on the small C program (nothing personal, just hate to add Yet Another Program to the build process). How about using echo for prelim text (if necessary) and xxd to create the struct instead? I like making maintenance Somebody Else's Problem (SEP[1]) $ man xxd How standard is xxd across distributions and operating systems? Best regards, Wolfgang Denk In debian, it is (also) provided by the vim-common package. It looks like vim (the project) is the origin of the command. That was Harald's objection to using xxd. Unfortunately, it appears to be a reasonable objection. $ dpkg -S /usr/bin/xxd vim-common: /usr/bin/xxd IMHO, vim and xxd are essential programs so I'm OK with using xxd. OTOH, I understand some people actually prefer emacs and may have a problem with requiring vim to be installed. ;-/ Even though I'm an enthusiastic Emacs user, I have different reasons for my vote. As far as build dependencies go, I'd like to restrict this to the LSB standard[1]. Xdd is not in there, so thats why I vote for the small C program (unless we can adapt the script and use 'od'). Cheers Detlev [1] http://refspecs.freestandards.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic/toccommand.html -- Perfection (in design) is achieved not when there is nothing more to add, but rather when there is nothing more to take away. -- Antoine de Saint-Exupery -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED] - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] add 'license' command to u-boot?commandline
On Thursday 10 July 2008, Detlev Zundel wrote: IMHO, vim and xxd are essential programs so I'm OK with using xxd. OTOH, I understand some people actually prefer emacs and may have a problem with requiring vim to be installed. ;-/ Even though I'm an enthusiastic Emacs user, I have different reasons for my vote. As far as build dependencies go, I'd like to restrict this to the LSB standard[1]. Xdd is not in there, so thats why I vote for the small C program (unless we can adapt the script and use 'od'). I would prefer this C program solution too. Best regards, Stefan - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] add 'license' command to u-boot?commandline
On Thu, Jul 10, 2008 at 12:51:03PM +0200, Detlev Zundel wrote: Even though I'm an enthusiastic Emacs user, I have different reasons for my vote. As far as build dependencies go, I'd like to restrict this to the LSB standard[1]. Xdd is not in there, so thats why I vote for the small C program (unless we can adapt the script and use 'od'). I think sticking to LSB for build dependencies is a very reasonable choice. I still don't think the small C program is that much of a problem: 1) dependency tracking should ensure it is only built when the license feature is enabled by the board-level config. I think this will be a minority case. 2) compilation of native programs has already to be possible since there are other native tools such as mkimage built during the compilation Cheers, -- - Harald Welte [EMAIL PROTECTED] http://openmoko.org/ Software for the world's first truly open Free Software mobile phone - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] add 'license' command to u-boot?commandline
Harald Welte wrote: On Thu, Jul 10, 2008 at 12:51:03PM +0200, Detlev Zundel wrote: Even though I'm an enthusiastic Emacs user, I have different reasons for my vote. As far as build dependencies go, I'd like to restrict this to the LSB standard[1]. Xdd is not in there, so thats why I vote for the small C program (unless we can adapt the script and use 'od'). I think sticking to LSB for build dependencies is a very reasonable choice. I still don't think the small C program is that much of a problem: 1) dependency tracking should ensure it is only built when the license feature is enabled by the board-level config. I think this will be a minority case. 2) compilation of native programs has already to be possible since there are other native tools such as mkimage built during the compilation Cheers, FWIIW, I agree with Detlev Harald and withdraw my bleah objection. Best regards, gvb - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] add 'license' command to u-boot?commandline
On 13:08 Thu 10 Jul , Stefan Roese wrote: On Thursday 10 July 2008, Detlev Zundel wrote: IMHO, vim and xxd are essential programs so I'm OK with using xxd. OTOH, I understand some people actually prefer emacs and may have a problem with requiring vim to be installed. ;-/ Even though I'm an enthusiastic Emacs user, I have different reasons for my vote. As far as build dependencies go, I'd like to restrict this to the LSB standard[1]. Xdd is not in there, so thats why I vote for the small C program (unless we can adapt the script and use 'od'). I would prefer this C program solution too. I would prefer this C program solution too. Best Regards, J. - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] add 'license' command to u-boot?commandline
Harald Welte wrote: Hi! Since there has been support by Detlev and Stefan, I have modified the patch in a way to dynamically create the include/license.h file from the COPYING file by the use of a small C program and gzip combined with a Makefile rule. What do you think now? Bleah on the small C program (nothing personal, just hate to add Yet Another Program to the build process). How about using echo for prelim text (if necessary) and xxd to create the struct instead? I like making maintenance Somebody Else's Problem (SEP[1]) $ man xxd XXD(1) NAME xxd - make a hexdump or do the reverse. [snip other possibly useful flags like column] -i | -include output in C include file style. A complete static array definition is written (named after the input file), unless xxd reads from stdin. -l len | -len len stop after writing len octets. Best regards, gvb [1] http://en.wikipedia.org/wiki/Somebody_Else%27s_Problem - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] add 'license' command to u-boot?commandline
Wolfgang Denk wrote: In message [EMAIL PROTECTED] you wrote: Bleah on the small C program (nothing personal, just hate to add Yet Another Program to the build process). How about using echo for prelim text (if necessary) and xxd to create the struct instead? I like making maintenance Somebody Else's Problem (SEP[1]) $ man xxd How standard is xxd across distributions and operating systems? Best regards, Wolfgang Denk In debian, it is (also) provided by the vim-common package. It looks like vim (the project) is the origin of the command. That was Harald's objection to using xxd. Unfortunately, it appears to be a reasonable objection. $ dpkg -S /usr/bin/xxd vim-common: /usr/bin/xxd IMHO, vim and xxd are essential programs so I'm OK with using xxd. OTOH, I understand some people actually prefer emacs and may have a problem with requiring vim to be installed. ;-/ Best regards, gvb - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] add 'license' command to u-boot commandline
Hi, On Mon, Jul 07, 2008 at 04:53:14PM +0200, Wolfgang Denk wrote: I support this, but then we should *always* print this message, not only when it starts in an interactive mode (or some guys could try to get away by disabling interactive mode). Such a restriction is (fortunately) not enforcable by the license, which It may not be enforcable by the license, but bu the Copyright holders of the code. only covers interactive interfaces. Otherwise, it would make u-boot useless for environments where interactive mode would interfere with other uses of the serial port (or when no suitable device exists). Of course it must not interfere with such situations. We have standard ways to silence console output, and I did not mean to mess with these. But if there is console output, a GPL message would probably be a Good Thing. Just to confirm, this was also my original intention. If we output an U-Boot ver. x.y.z we can surely also output U-Boot is Free Software licensed under the GPL. Personally, I'd rather stay far away from invoking any clauses of a non-changeable license that dictate technical decisions such as which bytes to include in the final image. The GPL does not dictate anything - you have always the freedom to write anything from scratch or buy the source code for any proprie- tary boot loader that comes under another license. But U-Boot *is* licensed under GPL, and this is what makes it strong. Over the years, and spending more and more time on stupid email discussions with companies who think they can ignore a free license (while being empatic with their own closed source stuff), I came to beliving that a clearly visible label This box runs Free Software is a really, really good idea. Full ack. Cheers Detlev -- A stated design goal of Motif was to give the X Window System the window management capabilities of HP's circa-1988 window manager and the visual elegance of Microsoft Windows. We kid you not. -- The UNIX Haters Handbook -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED] - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] add 'license' command to u-boot commandline
Hi, [PATCH] add 'license' command to u-boot command line The 'license' command includes the u-boot license (GPLv2) into the actual bootloader binary. The license text can be shown interactively at the u-boot commandline. I second such an addition. Actually If I read the GPLv2 I see the following clause: If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. So maybe, we can (or should) introduce such a short This program is GPL message into standard U-Boot, i.e. non-customizable. If I read the terms above, this is already required. If wanted from a board maintainer, we can enable the license command discussed in this thread, also enabling the for details type 'license'. part of the message. Cheers Detlev -- Less talking -- more hacking -- Olin Shivers -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED] - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] add 'license' command to u-boot commandline
In message [EMAIL PROTECTED] you wrote: On Mon, Jul 07, 2008 at 04:53:14PM +0200, Wolfgang Denk wrote: I support this, but then we should *always* print this message, not only when it starts in an interactive mode (or some guys could try to get away by disabling interactive mode). Such a restriction is (fortunately) not enforcable by the license, which It may not be enforcable by the license, but bu the Copyright holders of the code. only covers interactive interfaces. Otherwise, it would make u-boot useless for environments where interactive mode would interfere with other uses of the serial port (or when no suitable device exists). Of course it must not interfere with such situations. We have standard ways to silence console output, and I did not mean to mess with these. But if there is console output, a GPL message would probably be a Good Thing. Personally, I'd rather stay far away from invoking any clauses of a non-changeable license that dictate technical decisions such as which bytes to include in the final image. The GPL does not dictate anything - you have always the freedom to write anything from scratch or buy the source code for any proprie- tary boot loader that comes under another license. But U-Boot *is* licensed under GPL, and this is what makes it strong. Over the years, and spending more and more time on stupid email discussions with companies who think they can ignore a free license (while being empatic with their own closed source stuff), I came to beliving that a clearly visible label This box runs Free Software is a really, really good idea. 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: [EMAIL PROTECTED] As far as the laws of mathematics refer to reality, they are not cer- tain, and as far as they are certain, they do not refer to reality. -- Albert Einstein - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] add 'license' command to u-boot commandline
Dear Harald, in message [EMAIL PROTECTED] you wrote: [PATCH] add 'license' command to u-boot command line The 'license' command includes the u-boot license (GPLv2) into the actual bootloader binary. The license text can be shown interactively at the u-boot commandline. When we started working on this boot loader (by then still under the name 8xxrom or maybe already PPCBoot, I don't remember exactly any more) we decided not to implement such a feature because of (flash) memory footprint reasons. I still feel this is pretty heavy in terms of memory footprint versus benefit ratio. For products where the commandline can actually be accessed by the end user, this helps to prevent inadvertent GPL violations, since the GPLv2 license text can no longer be 'forgotten' to be included into the product. The 'license' command can be enabled by CONFIG_CMD_LICENSE. Well, I bet 9:1 that some vendors (and I guess you and me know a few of them pretty well) may simply forget to enable the CONFIG_CMD_LICENSE option, or they ship U-Boot in a configuration where access to an interactive console interface is difficult or even impossible (completely unintentionally, of course). So the benefit in such cases is really small, especially since the License text cannot be found easily in the binary image (as it's compressed). So I have to admit that I'm realy biased here. Let's see what other's say. ... diff --git a/include/license.h b/include/license.h new file mode 100644 index 000..7a638eb --- /dev/null +++ b/include/license.h @@ -0,0 +1,583 @@ +/* bin2header converting 'gpl.gz' */ +unsigned char gpl_gz[] = { + 0x1f, 0x8b, 0x08, 0x08, 0xb2, 0x10, 0x0d, 0x46, 0x00, 0x03, + 0x67, 0x70, 0x6c, 0x00, 0x9d, 0x5b, 0x5d, 0x77, 0xdb, 0x46, + 0x92, 0x7d, 0x4e, 0xff, 0x8a, 0x3e, 0x7e, 0x89, 0x74, 0x0e, ... + 0xed, 0x4e, 0x3f, 0xa2, 0x44, 0x9f, 0x3f, 0xb3, 0xbd, 0x6f, + 0xfe, 0x17, 0x84, 0xf3, 0x1b, 0xef, 0x12, 0x3b, 0x00, 0x00, +}; But I definitely object against such a binary, i. e. unreadable copy of some license which nobody can check, and which quickly gets out of sync with the COPYING file included with the source code. If we add such a command, I insist that the included (compressed) licenzse text must be generated on the fly from the COPYING file, i. e. I will reject all attempts that cause two (probably different) copies of the license text included with U-Boot. Um... while we are at it - maybe we should clean up / update the license headers a bit... Um... thinking more about this I guess we should create a ToDo page in the U-Boot wiki listing things that need to be done - some of them are pure janitor work and could be picked up by volunteers even with limited experience with U-Boot but with free resources? 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: [EMAIL PROTECTED] Anarchy may not be the best form of government, but it's better than no government at all. - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] add 'license' command to u-boot commandline
Hi Wolfgang! On Sun, Jul 06, 2008 at 12:11:05PM +0200, Wolfgang Denk wrote: in message [EMAIL PROTECTED] you wrote: [PATCH] add 'license' command to u-boot command line The 'license' command includes the u-boot license (GPLv2) into the actual bootloader binary. The license text can be shown interactively at the u-boot commandline. When we started working on this boot loader (by then still under the name 8xxrom or maybe already PPCBoot, I don't remember exactly any more) we decided not to implement such a feature because of (flash) memory footprint reasons. Well, the same argument holds true for many other of u-boot's features. However, they still get implemented, and the compilation/inclusion in the (flash) image therefore is optional. Users who don't want it, get zero additional benefit. I still feel this is pretty heavy in terms of memory footprint versus benefit ratio. that is probably from your point of view. While I was working for OpenMoko, from a vendor perspective of a company that wants to make 100% sure that the GPL is always followed, this kind of feature makes a lot of sense. Even if you just put a u-boot binary on some ftp server (without the GPL text next to it) you still don't risk any GPL infringement. For products where the commandline can actually be accessed by the end user, this helps to prevent inadvertent GPL violations, since the GPLv2 license text can no longer be 'forgotten' to be included into the product. The 'license' command can be enabled by CONFIG_CMD_LICENSE. Well, I bet 9:1 that some vendors (and I guess you and me know a few of them pretty well) may simply forget to enable the CONFIG_CMD_LICENSE option, or they ship U-Boot in a configuration where access to an interactive console interface is difficult or even impossible (completely unintentionally, of course). this is perfectly true. I'm not saying that this patch is a fire-and-forget solution for all device manufacturers. I'm simply saying that this solved a practical problem for OpenMoko. It's a straight-forward patch that doesn't impact any existing code or files, and it comes at zero footprint impact if you don't want it. So the benefit in such cases is really small, especially since the License text cannot be found easily in the binary image (as it's compressed). well, it's supposed to offer the license text at the command line, not in the memory image.. So I have to admit that I'm realy biased here. Let's see what other's say. Ok. I'm also waiting for the feedback of others. Please keep in mind tha this is a zero-maintenance patch that doesn't affect any existing code. So even while you might think the feature is esoteric, it is a very painless feature to add. But I definitely object against such a binary, i. e. unreadable copy of some license which nobody can check, and which quickly gets out of sync with the COPYING file included with the source code. If we add such a command, I insist that the included (compressed) licenzse text must be generated on the fly from the COPYING file, i. e. I will reject all attempts that cause two (probably different) copies of the license text included with U-Boot. Ok, I agree. Let's wait for the further comments on the list. If I have the feeling that such a feature would be accepted, I'll re-work the patch to include a script and makefile hooks to generate the header file with the compressed license text on-the-fly while compiling u-boot. Regards, -- - Harald Welte [EMAIL PROTECTED] http://laforge.gnumonks.org/ Privacy in residential applications is a desirable marketing option. (ETSI EN 300 175-7 Ch. A6) signature.asc Description: Digital signature - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users