Since I started to work on the coreboot, I always sense that the much code is duplicated. By duplicated, it doesn't mean the code in different folders is almost same. As a matter of fact, it should be same. For example, the most feature of it871(2,6,8) should be the same. But it8712f_enable_serial doesn't use the first parameter dev, while it8716f_enable_serial does. When the board changes the super io, you can not just change the 2 to 6. You should also change the parameters. That makes me confused.
This also happens on some chips which are close. Is it possible to fix this in future?
Zheng
Bao, Zheng wrote:
Is it possible to fix this in future?
I hope so! I would love to see it improve.
It's possible to start fixing it immediately. Please do!
So far not a lot of time has been spent on improving the state of the codebase, because the typical procedure of major contribution to coreboot is that the contributor sends several hundred kilobytes of (working) source code to the mailing list, with very little if any followup communication.
This way of contributing to an open source project places an unneccessarily heavy burden on the project.
It is a contribution, and all contributions are valuable, but in the long term this procedure leads to unneccessary extra work for everyone who is involved in coreboot, and everyone who wishes to benefit from coreboot.
I understand very much the desire to only send code when it is working, and working well. But it is too late when the code is "finished".
I would like to request that any contributors who work with coreboot code send their lines of code as early as possible!
The ideal way to contribute to an open source project, such as coreboot, is to send small changes very often over a long period of time.
I think it is even OK to add a new, empty, file to the repository - under the condition that code will be added to the file in a following patch which is sent a few days later.
This allows small problems to be fixed in one place before they turn into big problems existing in many places.
It also allows other developers to immediately benefit from the work that has already been done. If someone is using the code that is being developed, they can also help with development.
The key, which I myself struggle with, is to strive for letting as many developers as possible benefit as much as possible as soon as possible from what you develop. You will be thanked.
//Peter