[U-Boot] RFC: auto-generate ARM mach-types.h file from ARM machine database
Albert ARIBAUD
albert.u.boot at aribaud.net
Sat May 7 12:58:16 CEST 2011
Hi Wolfgang,
Le 06/05/2011 12:14, Wolfgang Denk a écrit :
> Dear Michael Schwingen,
>
> In message<20110505214836.GA5313 at discworld.dascon.de> you wrote:
>>
>> to conclude the discussion in the thread "Re: [U-Boot] Update and Cut down
>> mach types", I tried a short patch that demonstrates how to automatically
>> generate the mach-types.h file from a database dump (from
>> http://www.arm.linux.org.uk/developer/machines/?action=new).
>>
>> This has multiple advantages:
>> - pulling in new machine types is easier (drop in a new downloaded database
>> dump), and produces a much smaller diff.
>> - adding new machines is decoupled from the time they appear in Linux.
>> - boards that are not in mainline Linux will not be break due to removal of
>> their mach types from the Linux headers.
>>
>> The AWK and Makefile fragment script is taken verbatim from Linux 2.6.38.3.
>> I think the AWK script is simple enough that it will not require big
>> maintenance efforts (unless the machine database format changes).
>>
>> The patch is edited down - I removed the diff for the deletion of the old
>> mach-types.h file, and shortened the new mach-types file to a few entries
>> just to show the concept - otherwise, the patch would be much too big for
>> the list.
>>
>> Is this an acceptable solution? Should I go on and produce a full-fledged
>> patch?
>
> I agree with the comments alreay made by Mike Frysinger.
>
> In addition, I would like to point out that I consider it mandatory
> thatthe normal build process does NOT involve any network download.
> Instead, it must be run completely based on files checked into the git
> repository only.
>
> That means, that the "update-mach-types" target Mike mentions is
> something that the ARM maintainer can use to update the in-tree copy
> of the mach-types.h file, which then gets commited into the git
> repository. Also users can run this if they want to use the latest
> version, but it MUST NOT be used for a regular build.
Agreed on all points.
> Best regards,
>
> Wolfgang Denk
Amicalement,
--
Albert.
More information about the U-Boot
mailing list