Skip to contentSkip to conversation

add 'license' command to u-boot commandline

PATCH New Harald Welte 9 participants 21 messages Jul 6, 2008 – Jul 10, 2008 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add 'license' command to u-boot commandline

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

common/Makefile +1 -0
index 265cce7..27c3933 100644
@@ -72,6 +72,7 @@ COBJS-$(CONFIG_CMD_IDE) += cmd_ide.o
 COBJS-$(CONFIG_CMD_IMMAP) += cmd_immap.o
 COBJS-$(CONFIG_CMD_ITEST) += cmd_itest.o
 COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o
+COBJS-$(CONFIG_CMD_LICENSE) += cmd_license.o
 COBJS-y += cmd_load.o
 COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o
 COBJS-y += cmd_mem.o
common/cmd_license.c new file +57 -0

57 lines not on this page · raw message

include/config_cmd_all.h +1 -0
index 69276a3..70914bc 100644
@@ -49,6 +49,7 @@
 #define CONFIG_CMD_ITEST	/* Integer (and string) test	*/
 #define CONFIG_CMD_JFFS2	/* JFFS2 Support		*/
 #define CONFIG_CMD_KGDB		/* kgdb				*/
+#define CONFIG_CMD_LICENSE	/* console license display	*/
 #define CONFIG_CMD_LOADB	/* loadb			*/
 #define CONFIG_CMD_LOADS	/* loads			*/
 #define CONFIG_CMD_MEMORY	/* md mm nm mw cp cmp crc base loop mtest */
include/license.h new file +583 -0

583 lines not on this page · raw message

Signature · 11 lines
- Harald Welte <[email protected]>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.denx.de/pipermail/u-boot/attachments/20080706/441e8e41/attachment.pgp 
#1 lore raw

PATCH 1/1 add 'license' command to u-boot commandline

Dear Harald,

Quoted 6 lines · 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.

Quoted 5 lines

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.

...

Quoted 11 lines
include/license.h new file +5 -0
new file mode 100644
index 0000000..7a638eb
@@ -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,

...

include/license.h line 583

Quoted 3 lines
include/license.h new file +3 -0
+	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

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
Anarchy may not be the best form of government, but it's better  than
no government at all.
#2 lore raw

PATCH 1/1 add 'license' command to u-boot commandline

Hi Wolfgang!

Quoted 4 lines · Wolfgang Denk
Quoted 3 lines · in message <[email protected]> you wrote:

[PATCH] add 'license' command to u-boot command line

Quoted 8 lines
Quoted 3 lines

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.

Quoted 2 lines

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.

Quoted 11 lines
Quoted 5 lines

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.

Quoted 3 lines

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

Quoted 2 lines

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.

Quoted 8 lines

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,

Signature · 11 lines
- Harald Welte <[email protected]>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.denx.de/pipermail/u-boot/attachments/20080706/e4c09efd/attachment.pgp 
#3 lore raw

PATCH 1/1 add 'license' command to u-boot commandline

Hi,

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

[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

Signature · 6 lines
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: dzu at denx.de
#4 lore raw

PATCH 1/1 add 'license' command to u-boot commandline

Quoted 9 lines · Detlev Zundel

Hi,

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

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

Ack from me too.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================

#5 lore raw

PATCH 1/1 add 'license' command to u-boot?commandline

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.

Makefile +2 -0
index ac3f98f..29204a8 100644
@@ -457,6 +457,8 @@ CHANGELOG:
 	git log --no-merges U-Boot-1_1_5.. | \
 	unexpand -a | sed -e 's/\s\s*$$//' > $@
 
+include/license.h: tools/bin2header COPYING
+	 cat COPYING | gzip -9 -c | ./tools/bin2header license_gzip > include/license.h
 #########################################################################
 
 unconfig:
common/Makefile +1 -0
index 4287108..1d9f412 100644
@@ -71,6 +71,7 @@ COBJS-$(CONFIG_CMD_IDE) += cmd_ide.o
 COBJS-$(CONFIG_CMD_IMMAP) += cmd_immap.o
 COBJS-$(CONFIG_CMD_ITEST) += cmd_itest.o
 COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o
+COBJS-$(CONFIG_CMD_LICENSE) += cmd_license.o
 COBJS-y += cmd_load.o
 COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o
 COBJS-y += cmd_mem.o
common/cmd_license.c new file +59 -0

59 lines not on this page · raw message

include/config_cmd_all.h +1 -0
index c2bb094..adc2489 100644
@@ -50,6 +50,7 @@
 #define CONFIG_CMD_ITEST	/* Integer (and string) test	*/
 #define CONFIG_CMD_JFFS2	/* JFFS2 Support		*/
 #define CONFIG_CMD_KGDB		/* kgdb				*/
+#define CONFIG_CMD_LICENSE	/* console license display	*/
 #define CONFIG_CMD_LOADB	/* loadb			*/
 #define CONFIG_CMD_LOADS	/* loads			*/
 #define CONFIG_CMD_MEMORY	/* md mm nm mw cp cmp crc base loop mtest */
tools/Makefile +4 -0
index 8533a8e..21ea1c2 100644
@@ -171,6 +171,10 @@ $(obj)mpc86x_clk$(SFX):	$(obj)mpc86x_clk.o
 		$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
 		$(STRIP) $@
 
+$(obj)bin2header$(SFX): $(obj)bin2header.o
+		$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
+		$(STRIP) $@
+
 $(obj)envcrc.o:	$(src)envcrc.c
 		$(CC) -g $(CFLAGS) -c -o $@ $<
 
tools/bin2header.c new file +56 -0

56 lines not on this page · raw message

Signature · 3 lines
- Harald Welte <[email protected]>          	        http://openmoko.org/
============================================================================
Software for the world's first truly open Free Software mobile phone
#6 lore raw

PATCH 1/1 add 'license' command to u-boot?commandline

Quoted 8 lines · Harald Welte

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>

#7 lore raw

PATCH 1/1 add 'license' command to u-boot?commandline

Quoted 8 lines · Jerry Van Baren
Quoted 7 lines · Harald Welte

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.

Quoted 6 lines
Quoted 1 line

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])

I thought having our own little program is actually the best choice, sicne it doesn't add any additional build dependencies.

In fact, my original bin2header implementation was in perl when I first
wrote this code while working for OpenMoko, Inc. However, perl is not
used anywhere by the u-boot build process, so creating a dependency to such a huge eternal program seems overly excessive. This is why I now reimplemented it in C.

The native C compiler has to be present on the system (in addition to the cross compiler) anyway, otherwise mkimage and others would not build. Since bin2header.c only uses stdio/stdlib API, and even only stdin/stdout, it should be extremely portable. No problems to be expected on any architecture/system.

xdd, too, might not be available on every host system. On my system, it's provided by vim-common... not particularly something you can expect everyone to have installed on their systems.

I don't think there is much of a choice. Either you want the include/license.h to be created at compile time (as requested by IIRC Wolfgang) and accept the fact that you need some script/program for that
- or you ship a pre-built license.h in the u-boot source code package.

Cheers,

Signature · 3 lines
- Harald Welte <[email protected]>          	        http://openmoko.org/
============================================================================
Software for the world's first truly open Free Software mobile phone
#8 lore raw

PATCH 1/1 add 'license' command to u-boot?commandline

In reply to Jerry Van Baren
Quoted 7 lines · 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

Signature · 4 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
Any technology distinguishable from magic is insufficiently advanced.
#9 lore raw

PATCH 1/1 add 'license' command to u-boot?commandline

Quoted 6 lines · Wolfgang Denk
Quoted 5 lines · 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])

Quoted 7 lines
Quoted 1 line
$ 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

#10 lore raw

PATCH 1/1 add 'license' command to u-boot?commandline

Hi,

Quoted 21 lines
Quoted 7 lines · Wolfgang Denk
Quoted 6 lines · 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])

Quoted 7 lines
Quoted 1 line
$ 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.

Quoted 6 lines
$ 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

Signature · 7 lines
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: dzu at denx.de
#11 lore raw

PATCH 1/1 add 'license' command to u-boot?commandline

Quoted 8 lines · Detlev Zundel
Quoted 3 lines

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

#12 lore raw

PATCH 1/1 add 'license' command to u-boot?commandline

Quoted 11 lines · Stefan Roese
Quoted 8 lines · Detlev Zundel
Quoted 3 lines

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.

#13 lore raw

PATCH 1/1 add 'license' command to u-boot?commandline

In reply to Detlev Zundel
Quoted 4 lines · Detlev Zundel

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,

Signature · 3 lines
- Harald Welte <[email protected]>          	        http://openmoko.org/
============================================================================
Software for the world's first truly open Free Software mobile phone
#14 lore raw

PATCH 1/1 add 'license' command to u-boot?commandline

Quoted 11 lines · Harald Welte
Quoted 4 lines · Detlev Zundel

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:

Quoted 8 lines

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

#15 lore raw

PATCH 1/1 add 'license' command to u-boot?commandline

In reply to Harald Welte
Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 4 lines · Detlev Zundel

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.

Quoted 8 lines

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

I think we have an agreement. We will use the C program.

Now let's go on and do some real work.

Best regards,

Wolfgang Denk

Signature · 8 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
Repeat after me:
Usenet is not a word processor; it's a medium where aesthetics count.
Mozilla is not a newsreader; it's a web browser.
Windows is not an operating system; it's a GUI on a program loader.
         -- Tom Christiansen in <[email protected]>
#16 lore raw

PATCH 1/1 add 'license' command to u-boot commandline

In reply to Detlev Zundel
Quoted 23 lines · In message <[email protected]> you wrote:
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

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.

Quoted 3 lines

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.

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

Quoted 3 lines

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.

In any case the message must be *short*, something like "U-Boot is licensed under GPLv2" or so.

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
He'd heard her use that sweet, innocent  tone  of  voice  before.  It
meant that, pretty soon, there was going to be trouble.
                                        - Terry Pratchett, _Truckers_
#17 lore raw

PATCH 1/1 add 'license' command to u-boot commandline

Quoted 32 lines · Wolfgang Denk
Quoted 23 lines · In message <[email protected]> you wrote:
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

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.

Quoted 3 lines

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.

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

Quoted 6 lines
Quoted 3 lines

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.

In any case the message must be *short*, something like "U-Boot is licensed under GPLv2" or so.

Ack

And add a notice to not remove this by a vendor.

Best Regards,
J.

#18 lore raw

PATCH 1/1 add 'license' command to u-boot commandline

In reply to Wolfgang Denk
Quoted 3 lines · Wolfgang Denk

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

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.

-Scott

#19 lore raw

PATCH 1/1 add 'license' command to u-boot commandline

Quoted 6 lines · In message <[email protected]> you wrote:
Quoted 3 lines · Wolfgang Denk

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.

Quoted 3 lines

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.

Quoted 3 lines

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

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
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
#20 lore raw

PATCH 1/1 add 'license' command to u-boot commandline

Hi,

Quoted 10 lines
Quoted 6 lines · Wolfgang Denk
Quoted 3 lines

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.

Quoted 8 lines
Quoted 3 lines

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

Quoted 4 lines
Quoted 3 lines

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.

Quoted 9 lines

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

Signature · 8 lines
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: dzu at denx.de