[U-Boot-Users] [PATCH] add 'license' command to u-boot?commandline
Harald Welte
laforge at openmoko.org
Wed Jul 9 16:56:46 CEST 2008
On Wed, Jul 09, 2008 at 10:42:31AM -0400, Jerry Van Baren wrote:
> 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])
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,
--
- Harald Welte <laforge at openmoko.org> http://openmoko.org/
============================================================================
Software for the world's first truly open Free Software mobile phone
More information about the U-Boot
mailing list