{"id":20131289,"url":"https://github.com/qzed/kernel-pkgscripts","last_synced_at":"2025-08-17T20:10:30.727Z","repository":{"id":100517953,"uuid":"168400237","full_name":"qzed/kernel-pkgscripts","owner":"qzed","description":"Heavily Customized Packaging-Scripts/Helpers for the Linux Surface Kernel (https://github.com/linux-surface/kernel/)","archived":false,"fork":false,"pushed_at":"2025-03-08T23:27:20.000Z","size":80,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-31T13:05:27.771Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qzed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2019-01-30T19:17:55.000Z","updated_at":"2025-03-08T23:27:24.000Z","dependencies_parsed_at":"2024-08-03T19:42:09.580Z","dependency_job_id":"736e6362-f70d-4434-8ff6-989463ca8782","html_url":"https://github.com/qzed/kernel-pkgscripts","commit_stats":null,"previous_names":["qzed/kernel-pkgscripts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/qzed/kernel-pkgscripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qzed%2Fkernel-pkgscripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qzed%2Fkernel-pkgscripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qzed%2Fkernel-pkgscripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qzed%2Fkernel-pkgscripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qzed","download_url":"https://codeload.github.com/qzed/kernel-pkgscripts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qzed%2Fkernel-pkgscripts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270899582,"owners_count":24664720,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-13T20:47:26.415Z","updated_at":"2025-08-17T20:10:30.694Z","avatar_url":"https://github.com/qzed.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linux Kernel Packaging Helpers\n\nBuild distro-specific kernel packages from checked out (potentially dirty) and configured git kernel source tree.\nCustomized for my personal use-cases.\n\n\n## Usage\n\nRun the `\u003cdistro\u003e/kpkg.py` scripts directly from the checked out tree.\n\nFor example, run\n```sh\n../kbuild/fedora/kpkg.py build -j 24 -s my-kernel\n```\nto build a kernel for Fedora with local-version suffix `-my-kernel` (specified by `-s`; the full version would be something like `6.2.1-1-my-kernel`) using 24 threads/processes (specified by `-j`).\nThe architecture will be the same as the host system.\nSimilarly, for Fedora, the distribution target (e.g. Fedora 37) will also be the same as the host system.\n\nNote that invocation of the packaging scripts assumes that a suitable config has been generated for the target architecture and is available at `.config` in the kernel source tree.\n\nUse `kpkg.py --help` to see all available options.\n\n\n### Cross-compiling\n\nMake sure to install the respective cross-compilation toolchain, e.g. `aarch64-linux-gnu-gcc` for `aarch64`.\nYou can specify the target architecture via the parameter `-t`.\nFor example, to compile an AArch64 (ARM64) kernel for Arch Linux, run\n```sh\n../kbuild/arch/kpkg.py build -j 24 -s my-kernel -t aarch64  \n```\nfrom inside the kernel tree.\n\n\n### Building from Different Host-Distributions\n\nYou can use the provided Containerfiles with [toolbox](https://github.com/containers/toolbox) to compile packages for different distributions than the host distribution.\nAll required dependencies should already be included.\n\nTo set up a toolbox, build the container via (for example)\n```sh\npodman build -t archlinux-kernel-toolbox -f arch/toolbox/Containerfile\n```\nand create the toolbox \n```sh\ntoolbox create --image localhost/archlinux-kernel-toolbox kbuild-archlinux\n```\n\nYou can then enter the toolbox via\n```sh\ntoolbox enter kbuild-archlinux\n```\nand run the Arch Linux packaging (`arch/kpkg.py`) script from there.\n\n\n### SecureBoot Signing\n\nFor Fedora and Arch Linux, kernels can be automatically signed for secure boot with a machine owner key (MOK).\nYou can generate such a key pair by running the provided `keys/generate.sh` script.\n\nTo sign kernel images, use `--sbsign-key \u003ckey-file\u003e` and `--sbsign-cert \u003ccrt-file\u003e`.\nFor example, to build a signed kernel for Fedora, run\n```sh\n../kbuild/fedora/kpkg.py build -j 24 -s my-kernel \\\n    --sbsign-key ../kbuild/keys/mok.key \\\n    --sbsign-cert ../kbuild/keys/mok.crt\n```\n\n## Supported Use-Cases\n\nSupported distributions:\n- Arch Linux\n- Fedora\n- Debian (limited)\n\nSupported architectures:\n- `x86_64` (only tested by compiling natively on `x86`)\n- `aarch64` (only tested by cross-compiling from `x86`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqzed%2Fkernel-pkgscripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqzed%2Fkernel-pkgscripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqzed%2Fkernel-pkgscripts/lists"}