[LinuxBIOS] [PATCH] Common code base for Advantech PCM-5820, ASI MB_5BLMP, BCOM WinNET100

Peter Stuge peter at stuge.se
Thu Oct 25 05:43:58 CEST 2007


On Wed, Oct 24, 2007 at 12:08:58AM +0200, Uwe Hermann wrote:
> I think it's pretty clear that I totally dislike duplicated code

Me too, but it's not worth the effort to fix that in v2.


> The bigger problem is more recent boards.
..
> worse they contain a _lot_ of duplicated or near-duplicated code.

Yes, likely because of copy-paste development.


> Maybe we don't even have to fully merge the boards in v2, some
> simple cleanups in the current code base would also be helpful,
> I think.

Disagree. Not for v2.


> get_bus_conf.c, irq_tables.c, mptable.c, resourcemap.c etc.
..
> create patches to fix _that_ in v2, but I'd really appreciate it if
> v3 would have that kind of information as a simple config value part
> of the dts.

This is indeed my idea for v3 too.


> > > There are just 2-3 places where you have to add your board in the
> > > #elif.
> > > 
> > > On the long run (in v3 maybe)
> > 
> > How long is "long" ?
> 
> No idea. As short as possible, of course, but just like anyone else
> I have no release date.

Understood. What I was getting at was that it may be quicker to just
forget v2 and work with new shinyness in v3.


> > I would much rather see this effort go into v3 and a bonus is
> > that
> 
> Sure, I'm willing to also provide patches to eliminate any
> uselessly duplicated code from v3.

My point was that there is little if any duplicate code in v3 and
that the v3 design is intended to minimize it - working on v3 is
much more interesting, since it solves many of the problems in v2.


> > many of the boards supported by v2 would be working also with v3.
> 
> Can you elaborate? How does eliminating duplicated code help or not
> help in supporting v2 boards in v3? Those issues are not really
> related IMO.

That's right. But I meant that moving one v2 port to v3 (part of
which is structuring the code a bit better) should make it very
easy to add new boards with similar hardware - just like we want.

And, as Stefan pointed out, putting effort into v2 means v3 becomes
stale.

I still expect people to work on v2 to some degree since it's much
easier to do copy-paste-development there, but I don't think we
should encourage any efforts in v2 except as a testbed now that v3
is starting to run on hardware.


//Peter




More information about the coreboot mailing list