[U-Boot] [PATCH v2 2/2] MarSBoard: add new board

Fabio Estevam festevam at gmail.com
Thu Mar 27 13:44:02 CET 2014


On Thu, Mar 27, 2014 at 2:36 AM, Wolfgang Denk <wd at denx.de> wrote:
> Dear Fabio Estevam,
>
> In message <CAOMZO5D2N1Zvo5ogEAM1_EwT-0KKamzGvRfPEekh5zymQkLrhw at mail.gmail.com> you wrote:
>>
>> Me too. I also think the ifdefs may easily cause confusion.
>
> So you suggest we remove all conditional code and use duplication
> everywhere?  You must be joking...

Not everywhere. We are just talking about board files here, which are
coming obsolete these days with device tree...

>
>> For example: if someone sends a patch for Riotboard, he/she may break
>> Marsboard without knowing.
>>
>> Usually the developer has only one board and is not able to test on both boards.
>
> Yes, of course.  If someone touches common code he make breake things
> for boards he did not test.  That has always been the case,

So in theory yes, we could have a single board file for all the mx6
boards out there and make it full of ifdefs all over it to handle all
the hardware variations.

Not so good for the users though if they want to make a simple change
and then they are forced to read all the schematics of several
unrelated boards.

> everywehre.  But that has never been a reason to duplicate code,
> or to accept code duplication.   On contrary, we permanently struggle
> to reduce such duplication.
>
> Otherwise we would have to strictly split ARM and PowerPC code, and
> all other architectures.  We would need code copies for each SoC.
> Actually each board would need his own version of the whole U-Boot
> code.  Sorry, but this is just bizarre...

Looks like you are extrapolating too much here. Our discussion is only
about board files, not common driver code or architectural code.

Regards,

Fabio Estevam


More information about the U-Boot mailing list