-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new board in future #6274
Add new board in future #6274
Conversation
It's better to add kernel patches to https://github.com/armbian/linux-rockchip. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am forcefully against the new family. We are in the situation where the whole rockchip brand has too many families are we are actively trying to reduce them. Adding another family would go in the opposite direction. I will take a look in detail for suggestions later
These drivers are OK for nomal use. z96a use some chips in a special way, So only z96a need this special driver. |
But is there a way -- Patch kernel and do not Influence the other boards in the family (the other board do not need the patch). |
After quick look at the kernel patch, it's about So it's okay to add this patch to the current rk35xxx family. If in the future someone has a new board whose driver conflicts with this patch, we can try to split it in board devicetree level. I didn't notice this pr is trying to add a new family, which is a bad idea. Although this is a vendor legacy kernel, we are always trying to make an universal kernel. |
We will start compatibility with |
Current and edge are mainline kernel. For rk3568 you can add patches to dir like |
We need a way to do Individual |
If you have time to look at these patches one by one you can see many patches are from kernel mailing list which are not yet merged atm. Some patches are hack to make specific boards work. You can determine whether they will harm your board by reviewing the code. And these patches should have already solved some common issues for your board. You have to solve these issues one by one without these patches. Take a look at kernel.org. Everyday many patches are merged to mainline and some may cause issues. But people still want to merge code upstream. One universal family will let more people get involved in maintenance of code and reduce repeated work of developer. |
If you mean for testing and development purposes, just rename the patch files with In production there is no way to exclude patches for individual boards, nor you can define individual kernel config because it would not be practical: each family (like rockchip64) has a single kernel per branch (branches usually are legacy/vendor, current and edge). Letting each board decide its own patches would create a mayhem of kernels with minimal differences that would be impractical to support, maintain and update via apt repository. @amazingfate suggestions are totally right, I can add also that many (perhaps most?) existing patches just add device trees or do changes and fixes to existing device trees. |
The core problem is: Rk817(for eg) in a special design board need spetial driver patch. |
There is no such problem because your board is the only one using the driver. |
if you see the names of the patches imposed to pinbook-pro |
No,there is. but you do not see it. you choise, as a Contributor. |
Please tell me which board is using the driver you want to patch. I do not see one that armbian is maintaining. |
|
What other boards will get influenced by your patch? |
If I patch rk817 driver, other boards in family will not get the correct battery voltage and capacity. vice versa. |
Perhaps they should not, since grouping them into a single patch file would make maintainance much harder for each developer/maintainer.
As time goes by, usually device trees gets updated or mainlined in the kernel and the armbian maintainer just deletes the "board" patch file.
Ok, it could be that a patch named board-nanopc-t4-add-typec-dp.patch alters a common driver, but it should not be. The original author had not the time or the will to split it in more parts, which was the right way to do it for easier future maintenance. The real question is: why they should be harmful? |
Perhaps @amazingfate is right and there are no other rk817 boards using the driver, but obviously you principle question is correct as well. The right answer to this is: device tree. This kind of mechanism is quite simple and is applied everywhere when neeeded. On the most common place where I see this is the USB3 designware driver, which has several "quirks" specific for each implementor. See, for example, some quirk properties in the device tree, and here in the driver they are read to modify the driver behaviour in case they are present; and here there is also some documentation. If your device is not exactly an rk817 but a variant of it (an hypotethical "rk817a", for example), then you would rather go with slightly different I guess the last one is not your case though. Another possibility is to duplicate the rk817 driver and provide a rk817-z96a driver that does the things in its own way, event thought it is a bit non-standard, but surely won't harm other boards |
Thanks for patience and Careful explain. |
The patch introduces devicetree property |
On my board, rk817 is specially used and only has a little function changed. |
Looks like a bomb is being planted. |
You are the author of this patch, it should be not difficult for you to make the driver work as the original version if devicetree doesn't have these special properties in code level. And at the moment this kernel doesn't have users that use rk817 battery driver. So it is a bomb which won't explode and if you deal with this patch properly, it will also not harm people who is gonna deal with rk817 driver in the future. |
Because of a patch, both subsequent users and previous users will be affected. This is not a major functional upgrade, but an inconspicuous small application, because the application of a small group of people affects the majority of people (without their knowledge), It should not be encouraged. |
I looked into the patch code with little bit more detail and it looks correct to me. Some code style could be fixed (for example, the various I would say that the patch to the driver is already thought to be backwards compatible, even thought the implementation is not perfect. |
Thanks for looking into the code.. |
Over one hundred patches applied to rockchip64 family is inevitable because there are so many boards included in this family and there are issues not solved by upstream mainline kernel that need patches to get fixed. All These patches are not burden, but are the wealth accumulated over the years. Armbian has to maintain a lot of boards with not so many developers, so it is always good to make our code more understandable by new developers. And patches generated by atomic commit will make our development and maintenance easier. |
I want to elaborate on the reasons not to have a different family. While I understand your thoughts on the potential to impact others with your changes, there are a lot of reasons in Armbian we want to limit the number of distinct families. Each family results in a distinct kernel build. There is a lot of infrastructure necessary to maintain distinct kernels (not only build machines, testing environments, but also apt servers and overall disk storage). If every board had it's own kernel that would quickly become unmanageable. (And while we aren't there yet, any mainline based kernel, should be actively tracking upstream releases, which average one patch release a week, so you are quickly talking a lot of distinct kernel builds) But there are also a lot of developer resources necessary to maintain distinct kernels. Every time a patch is included into a soc based kernel, someone needs to decide should that be applied to all of the 'similar' families/kernels? Then how are all those tested when the developer likely only has a very limited set of boards personally, and the test farm is far from complete as well. So Armbian struggles to minimize the number of distinct families/kernels (some have pushed that there should only be one kernel for everything), but also realize that sometimes multiple are needed. So the Armbian infrastructure provides the capability to have as many families as necessary, but it is through reviews of PRs like this that the core team gets to decide if the needs for a distinct family/kernel are worth the extra overhead and maintenance costs long term. |
To me, this explanation is convincing enough, thank you for providing such a real reason. So next, we have to hope how to solve rockchip’s chaotic family and structure. |
After understanding the underlying reasons of armbian, I will follow your suggestion and change the submission to the rk35xx family. Wish to participate in contributing to a more perfect |
Description
Will suport for z96a infuture...
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.
Checklist: