-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
cli: Add command "dts-check" to validate dts files and improve board & patch development overall (resubmission) #6739
Conversation
c4373fa
to
7af9d3c
Compare
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.
Nice work, lets merge.
(Keep this in mind though as the PATH change for make might somehow impact some old/crazy/vendor kernels -- lets see)
No new major versions
Validates the dts/dtb file for the selected board and outputs the validation logs to the user. This can be used when adding a new board, developing or improving a dts file. Should lead to higher quality device trees and patches overall, if used. Will show warnings/errors if patches patch in some functionalities to a devicetree file without patching in the dt-bindings .yaml at the same time.
This makes dependencies easier to track and opens up the possibility for Dependabot to update them.
Which Path? Please keep in mind though, last time these changes worked perfectly fine on my machine, but CI had some issues. |
Description
This is a resubmission of #6482 which was reverted in #6524 due to build errors. I don't know what exactly failed last time and my build tests this time run successfully just fine on Ubuntu 24.04. Maybe the error is specific to certain configurations and will return, so please don't merge until CI has done some tests and a build was successful.
I have slightly improved this latest version by moving the function call to
validate_dts
inkernel.sh
slightly further down afterkernel_config
ran sincemake
expects a .config file.Original description
This new command can be used like this:
It validates the dts/dtb file for the selected board against dt bindings and outputs the validation logs to the user.
This can be used when adding a new board, developing or improving a dts file. Should lead to higher quality device trees and patches overall, if used.
Documentation summary for feature
(This was already added to the documentation in armbian/documentation@4cf2ff4)
cli: Add command "dts-check" to validate dts files and improve board & patch development overall
This command validates the dts/dtb file for the selected board against device tree bindings and outputs the validation logs to the user.
It can be used when adding a new board, developing or improving a dts file. Should lead to higher quality device trees and patches overall, if used.
Then wait for the validation to finish and check the output. If there is anything wrong with your board's device tree, you will see errors or warnings in the log. Analyze them carefully and use this information to improve your dts file.
Please note: Errors or warnings can also be introduced by SoC/board patches. When patching in new functions, like crypto for the RK3588, not only add the relevant parts to rk3588s.dtsi, but also try to add the device tree bindings in
linux/Documentation/devicetree/bingings/
for validation.How Has This Been Tested?
./compile.sh BOARD=nanopi-r5c BRANCH=edge dts-check
./compile.sh build BOARD=nanopi-r5c BRANCH=edge BUILD_DESKTOP=no BUILD_MINIMAL=no EXPERT=yes EXTRAWIFI=no KERNEL_CONFIGURE=no RELEASE=trixie
Checklist: