Looks like I'm too late to the party here, but I just read this and
wanted to also come out in support of what Nico said. I think the
endless copy&pasting that seems to have happened 5-10 years ago in
coreboot left us with pretty awful maintainability consequences and we
should (and I think we mostly are?) definitely move away from that.
It's not just about correctness, it's also a huge obstacle for anyone
trying to refactor some common interface that is used by hundreds of
almost-identical board or chipset versions and actively hindering us
from developing common code forward. Maybe it served a purpose at the
time when the project was smaller and there were less people with time
to review, but these days we are a pretty mature project with a lot of
industry support (i.e. new boards and chipsets mostly get added by
salaried vendor engineers rather than reverse-engineering hobbyists)
and should be able to afford higher code quality and reuseability
standards.

I think most of this is changing and has changed already (like Patrick
said it happened gradually) -- these days most chipset code for both
x86 and Arm is in src/soc/vendor/common, and most new mainboards use
the variant system. Whenever I see a patch of someone copy&pasting a
lot of code I definitely ask them to find a way to factor it out and
make it common instead. But if there is still uncertainty about what
the general right approach for new code is, I think we should decide
(and maybe write it down somewhere) that it should be code reuse and
not copy&paste.
_______________________________________________
coreboot mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to