{"id":18606996,"url":"https://github.com/gwbres/kernel-diffpatch","last_synced_at":"2026-04-30T13:33:04.503Z","repository":{"id":79864993,"uuid":"481641654","full_name":"gwbres/kernel-diffpatch","owner":"gwbres","description":" :penguin: Scripts to generate diff patch series between two Kernel forks","archived":false,"fork":false,"pushed_at":"2022-04-15T08:27:33.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-16T21:11:22.643Z","etag":null,"topics":["kernel","linux-kernel","patch"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gwbres.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-14T14:46:15.000Z","updated_at":"2022-05-06T08:47:11.000Z","dependencies_parsed_at":"2023-07-11T05:00:24.695Z","dependency_job_id":null,"html_url":"https://github.com/gwbres/kernel-diffpatch","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/gwbres/kernel-diffpatch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gwbres%2Fkernel-diffpatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gwbres%2Fkernel-diffpatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gwbres%2Fkernel-diffpatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gwbres%2Fkernel-diffpatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gwbres","download_url":"https://codeload.github.com/gwbres/kernel-diffpatch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gwbres%2Fkernel-diffpatch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32466333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kernel","linux-kernel","patch"],"created_at":"2024-11-07T02:27:58.141Z","updated_at":"2026-04-30T13:33:04.469Z","avatar_url":"https://github.com/gwbres.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kernel diffpatch\n\nScripts to generate patch series between two Kernel forks.\n\nSometimes you want to retrieve custom features from a given fork\nand apply them to another. This patch generator helps you\nextract custom content and generate a patch serie to export custom features into another kernel.\n\nThe patch serie is then applied `in tree`, meaning we patch a kernel to enhance it.\n\nI personnaly use this script with Analog Devices's fork,\nwhich is usually merged into Xilinx's kernel.\n\nAs an example, the remote repo is set to \nAnalog Devices's kernel, and we generate \na couple of patches to embed some of their custom drivers into another kernel.  \n\nThis assumes you have a local linux kernel to `diff` with.\nList of supported flags:\n\n* `--repo /foo/bar` to specify the local repo we will `diff` the remote with\n* `--url https://foo/bar` to control which remote kernel we `diff` with\n* `--branch custom` if you don't want to download `master` from remote kernel\n* `files.txt` contains the list of custom features we are interested in,\nbecause we don't run a complete `diff` nor `diff` the complete git history\n\n```shell\n# list of custom ADI's work\n# we would like to enhance our local repo with:\n╰─$ cat files.txt \ndrivers/clk/adi/Kconfig\ndrivers/clk/adi/Makefile\ndrivers/clk/adi/clk-ad9545-i2c.c\ndrivers/clk/adi/clk-ad9545-spi.c\ndrivers/clk/adi/clk-ad9545.c\ndrivers/clk/adi/clk-ad9545.h\n\n# let's generate a patch serie for those files\n╰─$ ./kernel.py --repo /tmp/linux-custom\nnew patch : 0001-drivers-clk-adi-Kconfig.patch\nnew patch : 0002-drivers-clk-adi-Makefile.patch\nnew patch : 0003-drivers-clk-adi-clk-ad9545-i2c.patch\nnew patch : 0004-drivers-clk-adi-clk-ad9545-spi.patch\nnew patch : 0005-drivers-clk-adi-clk-ad9545.patch\nnew patch : 0006-drivers-clk-adi-clk-ad9545.patch\n```\n\nNow apply custom features to enhance our local repo:\n```shell\n╰─$ cd /tmp/linux-custom\n╰─$ patch -p1 \u003c $kernel-diffpatch/patches/*.patch\n```\n\nObviously, this package does not garantee the patch serie will apply correctly.\nIt is up to the user to:\n* provide all custom dependencies, needed by all new custom features\n* fix patch that would not apply\n\nYou don't have to `diff` with Analog Devices's fork, \nyou can use any remote linux kernel :\n```shell\n╰─$ ./kernel.py --repo /tmp/linux-custom \\\n    --url https://github.com/xilinx/linux-xlnx\n```\n\nYou can specify a non default branch to work with:  \n```shell\n╰─$ ./kernel.py --repo /tmp/linux-custom \\\n    --url https://github.com/xilinx/linux-xlnx \\\n        --tag 2020.01\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgwbres%2Fkernel-diffpatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgwbres%2Fkernel-diffpatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgwbres%2Fkernel-diffpatch/lists"}