Better support kernel patches, out-of-tree defconfig, and defconfig fragments - #173
Open
ts-kris wants to merge 4 commits into
Open
Better support kernel patches, out-of-tree defconfig, and defconfig fragments#173ts-kris wants to merge 4 commits into
ts-kris wants to merge 4 commits into
Conversation
Fixes #164 Assisted-by: gpt-5.6-terra Signed-off-by: Kris Bahnsen <kris@embeddedTS.com>
Fixes #164 Assisted-by: gpt-5.6-terra Signed-off-by: Kris Bahnsen <kris@embeddedTS.com>
Fixes #172 Assisted-by: gpt-5.6-terra Signed-off-by: Kris Bahnsen <kris@embeddedTS.com>
The rest of the script assumes this is updates/ which on newer kernels it is, however, the older version of the driver uses extras/ which breaks the build script. Fixes: 1df160e ("build: install task overlays as local packages") Signed-off-by: Kris Bahnsen <kris@embeddedTS.com>
This was
linked to
issues
Aug 20, 2026
aaron-ets
approved these changes
Aug 21, 2026
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.
Implement support for kernel patches applied from a single folder in lexical order, an out-of-tree defconfig which overrides the in-tree name, and support for defconfig fragments from space separated files.
Most of these were inspired by and take the same form of Buildroot's operations for the same functions.
These features will make customer use of
distro-seeda lot more bearable; they can maintain their own defconfig, fragments for a defconfig, or even kernel patches outside of existing trees. Allowing for better kernel customization without needing a whole maintained fork of linux-lts or distro-seed. Simply tracking their changes outside of this tree and maintaining a simple repository of configs and patches.This will also make the upstreaming process easier long-term. For example, we can better support upstream kernels, and then maintain patches as part of
distro-seed(or some other repo) that allow us or customers to build from upstream kernels while also being able to apply patches for better hardware support that would normally be maintained as part of ourlinux-ltstree.Testing:
Fragments:
Built stock
ts4100_debian_13_headless_defconfigsaving the generated kernel.config, then addedDS_KERNEL_CONFIG_FRAGMENT_FILES=MAX.fragment ADIS.fragmentwith the contentsSaved that, and compared the two after building both:
Modules were correctly enabled and disabled as expected.
Out-of-tree defconfig
From the current config,
tsimx6ul_minimal_defconfigfrom thelinux-ltstree was copied in astsimx6ul_min_defconfigto prevent naming confusion, andDS_KERNEL_DEFCONFIG_FILE=tsimx6ul_min_defconfigwas set and the image was built. The output.configwas compared to a similar.configbuilding the realtsimx6ul_minimal_defconfig. The diff was similar and still had the fragments applied in the correct order.Kernel patches
The full defconfig from
linux-ltswas copied in astsimx6ul_full_defconfig,DS_KERNEL_DEFCONFIG_FILE=tsimx6ul_full_defconfigwas set, andDS_KERNEL_PATCH_DIR=kernel_patcheswas set. In it was a custom patch series of 4 patches generated from git. The patches include a separate devicetree file patched in, and the distro-seed config was updated to also copy this devicetree file to the final output image.The build succeeded. The live .config was compared to the original and showed valid and expected changes. And the output tarball was extracted and the presence of the proper devicetree was verified.