enh(tools): add an overlay autopatcher#12
Open
MichaIng wants to merge 3 commits into
Open
Conversation
It follows these concepts: * Works independent and compatible with existing overlay, device tree, and Makefile patches, with a dedicated configurable source dir * Simply appends all needed targets and commands to the existing device tree Makefile, not adding the overlay subdir to kernel sources, for simplicity, and to not collide with existing overlay patches. The resulting files are copied to the overlay subdir at packaging time. * Allows to define one or more optional base dtbs to test the overlay against. Mainline Linux supports an own `-dtbs` Makefile facility for this, but it creates and installs the merged dtb, which we do not want. Defining an own command is overall easier. * Uses per-overlay readme files, for easier processing in extrenal scripts, and less friction when rebasing added overlays * Allows to define per-overlay fixup scripts. Every fixup script Armbian ships, contains steps needed only for particular overlays. There are no scripts for all overlay prefixes, and no script is reasonable to run without the respective overlay(s) enabled. Checking for and running a respective fixup script right after the respective overlay has been successfully merged makes a lot more sense, better sorted U-Boot output, easier maintenance and cleanup of overlays. enh(patch): migrate spidev, spinor, and 1-wire overlays for RK3399 to auto-patcher The generic fixup script is not needed anymore, since the 3 related overlays have their own per-overlay fixup script now. Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: MichaIng <micha@dietpi.com>
Owner
Author
|
@copilot |
… individual .readme files
Done in commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This new overlay autopatcher follows these concepts:
overlaysubdirs and their existing Makefile. Some commands and target patterns are overridden, which however does not break functionality. When mixing old and new overlay patches, individual source dirs should be used to avoid duplicate overlay compilation.-dtbsMakefile facility for this, but it creates and installs the merged dtb, which we do not want. Defining an own command is overall easier.In case of rockchip64, after migrating spidev, spinor, and 1-wire overlays for RK3399, and moving code for their supported parameters from the generic fixup script into individual per-overlay scripts, the generic fixup script can be removed.
After migrating all overlays to the new autopatcher, no separate overlay source dir is needed anymore, and all old patches related to overlays, the README, and the Makefile, can be removed as well. However, leaving the README and Makefile in place does no harm, they are just ignored without an
overlay-directoriespatching config key. TheCONFIG_ARCH_WANT_FLAT_DTB_INSTALLadjustment is not needed, if/as no overlay subdir is used in kernel sources, but only after the kernel build before packaging.rockchip-rockpi4cplus-usb-host.dtsohas been removed, since it duplicates withrockchip-rk3399-dwc3-0-host.dtso, and is not needed on the ROCK 4C Plus in particular: In mainline Linux, the dwc3-0 controller is in host mode by default.