Skip to contentSkip to conversation

ARM mach-types.h (was: Re: [PATCH 1/5] add DOCKSTAR machine type)

U-Boot Reinhard Meyer 4 participants 11 messages Sep 8, 2010 – Sep 13, 2010

lore
Share & tools
lore
#0 lore raw

Dear all,

Quoted 4 lines
Quoted 3 lines

#define MACH_TYPE_WLAN_COMPUTER 2966
+#define MACH_TYPE_DOCKSTAR 2998

Quoted 8 lines

NAK. We don't edit mach-types.h manually.

If you need it updated, please send a request to do so to the acting ARM custodian (ahem).

But also note that we always sync against the current mainline Linux kernel, and this does not have an entry for DOCKSTAR yet (it ends at WLAN_COMPUTER), so a new sync would not change the file yet.

Since it apparently takes roughly two months for additions to the database at http://www.arm.linux.org.uk/developer/machines/ (last entry: 3061 right now) to trickle to the u-boot file, there seems to be a need for an interim solution.

Currently I conditionally add the MACH_TYPE_xxx locally to the <board>.h file, but I am quite sure a patch with that would be rejected...

Of course best would be to get rid of mach-types.h completely. It does not really seem suited to differentiate between board variants...

Reinhard

#1 lore raw

Dear Reinhard Meyer,

Quoted 4 lines · In message <[email protected]> you wrote:

Since it apparently takes roughly two months for additions to the database at http://www.arm.linux.org.uk/developer/machines/ (last entry: 3061 right now) to trickle to the u-boot file, there seems to be a need for an interim solution.

In theory it would be possible to sync against www.arm.linux.org.uk directly, but people with better ARM knowledge than me recommended not to do that, but refer to a more stable reference like the mainline Linux kernel instead.

I'm open to suggestions.

Quoted 2 lines

Currently I conditionally add the MACH_TYPE_xxx locally to the <board>.h file, but I am quite sure a patch with that would be rejected...

Right. This is not a good idea.

Quoted 2 lines

Of course best would be to get rid of mach-types.h completely. It does not really seem suited to differentiate between board variants...

You want to fight this flamewar with RMK, not me :-)

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
Only in our dreams we are free.  The rest of the time we need  wages.
                                    - Terry Pratchett, _Wyrd Sisters_
#2 lore raw

Dear Wolfgang Denk,

Quoted 8 lines

Dear Reinhard Meyer,

Quoted 4 lines · In message<[email protected]> you wrote:

Since it apparently takes roughly two months for additions to the database at http://www.arm.linux.org.uk/developer/machines/ (last entry: 3061 right now) to trickle to the u-boot file, there seems to be a need for an interim solution.

Quoted 6 lines

In theory it would be possible to sync against www.arm.linux.org.uk directly, but people with better ARM knowledge than me recommended not to do that, but refer to a more stable reference like the mainline Linux kernel instead.

I'm open to suggestions.

I'd allow manual adding of a #define MACH_TYPE_xxxx at the end of the list provided its value is higher than the last "official" entry. Once the official list reaches or goes beyond that value the manual line(s) would be removed. Not being a shell script guru, I think that could be easily done.

Another option would be to derive the file directly from above website.

One catch remains, of course: I someone changed their entry at the database, compilation of u-boot for that board could break. I think that entries that have propagated to the mainline Linux kernel cannot be changed anymore.

I'd also think the u-boot mach-type.h could do well without all the function definitions. I have not grepped, however, if someone in u-boot uses them.

Reinhard

#3 lore raw

Dear Reinhard Meyer,

Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 2 lines

I'm open to suggestions.

I'd allow manual adding of a #define MACH_TYPE_xxxx at the end of the list provided its value is higher than the last "official" entry. Once the official list reaches or goes beyond that value the manual line(s) would be removed. Not being a shell script guru, I think that could be easily done.

No. This will quicklly result in a maze of merge conflicts.

We will always only update the file as a whole. THe only option I'm willing to discuss is where to get the file from.

Quoted 3 lines

One catch remains, of course: I someone changed their entry at the database, compilation of u-boot for that board could break. I think that entries that have propagated to the mainline Linux kernel cannot be changed anymore.

Right. Which is exactly the reason for syncing against this version.

Quoted 2 lines

I'd also think the u-boot mach-type.h could do well without all the function definitions. I have not grepped, however, if someone in u-boot uses them.

I don;t think we do. But as mentioned above, we don;t want to mess with this file, we just update it as is.

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
A Perl script is correct if it's halfway readable and  gets  the  job
done before your boss fires you.
                       - L. Wall & R. L. Schwartz, _Programming Perl_
#4 lore raw
Quoted 10 lines · Wolfgang Denk

Dear Reinhard Meyer,

Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 1 line

I'm open to suggestions.

I'd allow manual adding of a #define MACH_TYPE_xxxx at the end of the list provided its value is higher than the last "official" entry. Once the official list reaches or goes beyond that value the manual line(s) would be removed. Not being a shell script guru, I think that could be easily done.

No. This will quicklly result in a maze of merge conflicts.

Not sure about that. I was thinking of a simple script that reads Linux' mach-types.h (or arch/arm/tools/mach-types directly) and generates the u-boot's mach-types.h file on the fly. That way only the #define lines could be generated, producing a less than 100k files instead of > 1MB.

The same script would read the existing mach-types.h file, scanning for something like

/* MANUAL ENTRIES START */
#define MACH_TYPE_XYZ 4711
#define MACH_TYPE_ABC 4712
/* MANUAL ENTRIES END */

and retain lines that are still above the official limit.
A commit should show only "+" for the new official definitions and a "-" for all automagically removed manual definitions.

Otherwise:

It essentially means one can send patches for a new ARM based board only if the MACH_TYPE has trickled through all the instances.

This is, somehow, unpleasing:). We should not "punish" ourselves in u-boot just because someone has invented a method to prolong time-to-market ;)

Reinhard

#5 lore raw

Dear Reinhard Meyer,

Quoted 5 lines · In message <[email protected]> you wrote:

Not sure about that. I was thinking of a simple script that reads Linux' mach-types.h (or arch/arm/tools/mach-types directly) and generates the u-boot's mach-types.h file on the fly. That way only the #define lines could be generated, producing a less than 100k files instead of > 1MB.

I don't think mach-types.h is worth spending so much effort on it, and coming up with another set of tools, incompatible to everything else in the world.

Quoted 7 lines

The same script would read the existing mach-types.h file, scanning for something like

/* MANUAL ENTRIES START */
#define MACH_TYPE_XYZ 4711
#define MACH_TYPE_ABC 4712
/* MANUAL ENTRIES END */

I will not accept this. It willonly result in people adding entries that have not been registered so they cause conflicts sooner or later. We have been there before, and it did not work. I will not go back there.

Quoted 4 lines

Otherwise:

It essentially means one can send patches for a new ARM based board only if the MACH_TYPE has trickled through all the instances.

Right. But this should be no problem, as you can register your MACH_ID as early as you want.

Quoted 2 lines

This is, somehow, unpleasing:). We should not "punish" ourselves in u-boot just because someone has invented a method to prolong time-to-market ;)

Just react in a pro-active way and register your machines as soon as you start working on the hardware design, and everything is well.

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
History is only a confused heap of facts.
                                       -- Philip Earl of Chesterfield
#6 lore raw
In reply to Wolfgang Denk
Quoted 16 lines

No. This will quicklly result in a maze of merge conflicts.

We will always only update the file as a whole. THe only option I'm willing to discuss is where to get the file from.

Quoted 1 line

One catch remains, of course: I someone changed their entry at the

database,

Quoted 1 line

compilation of u-boot for that board could break. I think that entries

that

Quoted 1 line

have propagated to the mainline Linux kernel cannot be changed anymore.

Right. Which is exactly the reason for syncing against this version.

Quoted 1 line

I'd also think the u-boot mach-type.h could do well without all the

function

Quoted 9 lines
Quoted 1 line

definitions. I have not grepped, however, if someone in u-boot uses them.

I don;t think we do. But as mentioned above, we don;t want to mess with this file, we just update it as is.

Best regards,

Wolfgang Denk

We are in sync with the latest in linux kernel

Take a look at

http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=history;f=arch/arm/tools/mach-types;h=48cbdcb6bbd4288929f31bef94da3691b160a489;hb=917977d107c9640dbb29ce85542735ad56e3aa5a

Regards,
Sandeep

#7 lore raw

Dear Paulraj, Sandeep,

Quoted 5 lines

We are in sync with the latest in linux kernel

Take a look at

http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=history;f=arch/arm/tools/mach-types;h=48cbdcb6bbd4288929f31bef94da3691b160a489;hb=917977d107c9640dbb29ce85542735ad56e3aa5a

Please read the whole thread.

The point was that the kernel is about 2 months behind the entries in http://www.arm.linux.org.uk/developer/machines/

Best Regards,
Reinhard

#8 lore raw
In reply to Paulraj

Dear "Paulraj, Sandeep",

Quoted 2 lines · In message <[email protected]> you…

We are in sync with the latest in linux kernel

Yes, I know.

The problem we're discussing is that the version of mach-types.h as included in the mainline LInux kernel tree is relatively old when compared to the current state of the ARM machine registry. The question was if we should risk using something else as reference.

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
Q: Why do PCs have a reset button on the front?
A: Because they are expected to run Microsoft operating systems.
#9 lore raw
Quoted 8 lines

Yes, I know.

The problem we're discussing is that the version of mach-types.h as included in the mainline LInux kernel tree is relatively old when compared to the current state of the ARM machine registry. The question was if we should risk using something else as reference.

There is no need to use something different. Somebody needs to ask Russell King for an ARM sync request.

Regards,
Sandeep

#10 lore raw

Am 08.09.2010 22:05, schrieb Paulraj, Sandeep:

Quoted 17 lines
Quoted 8 lines

Yes, I know.

The problem we're discussing is that the version of mach-types.h as included in the mainline LInux kernel tree is relatively old when compared to the current state of the ARM machine registry. The question was if we should risk using something else as reference.

There is no need to use something different. Somebody needs to ask Russell King for an ARM sync request.

Regards,
Sandeep

Quoted 4 lines

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Hello,

mach-types is updated in linux kernel.

Thomas