diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2024-07-20 11:18:12 +0200 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2024-07-22 01:24:22 +0900 |
commit | c8578539debaedfbb4671e1954be8ebbd1307c6f (patch) | |
tree | 02f775177c72644294f52281b974fdbb2862003b /scripts/Makefile.package | |
parent | 3554a45297c0f6c5de5dfdba0d218b0eb9274207 (diff) | |
download | linux-c8578539debaedfbb4671e1954be8ebbd1307c6f.tar.gz linux-c8578539debaedfbb4671e1954be8ebbd1307c6f.tar.bz2 linux-c8578539debaedfbb4671e1954be8ebbd1307c6f.zip |
kbuild: add script and target to generate pacman package
pacman is the package manager used by Arch Linux and its derivates.
Creating native packages from the kernel tree has multiple advantages:
* The package triggers the correct hooks for initramfs generation and
bootloader configuration
* Uninstallation is complete and also invokes the relevant hooks
* New UAPI headers can be installed without any manual bookkeeping
The PKGBUILD file is a modified version of the one used for the
downstream Arch Linux "linux" package.
Extra steps that should not be necessary for a development kernel have
been removed and an UAPI header package has been added.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/Makefile.package')
-rw-r--r-- | scripts/Makefile.package | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/Makefile.package b/scripts/Makefile.package index bf016af8bf8a..4a80584ec771 100644 --- a/scripts/Makefile.package +++ b/scripts/Makefile.package @@ -141,6 +141,19 @@ snap-pkg: cd $(objtree)/snap && \ snapcraft --target-arch=$(UTS_MACHINE) +# pacman-pkg +# --------------------------------------------------------------------------- + +PHONY += pacman-pkg +pacman-pkg: + @ln -srf $(srctree)/scripts/package/PKGBUILD $(objtree)/PKGBUILD + +objtree="$(realpath $(objtree))" \ + BUILDDIR="$(realpath $(objtree))/pacman" \ + CARCH="$(UTS_MACHINE)" \ + KBUILD_MAKEFLAGS="$(MAKEFLAGS)" \ + KBUILD_REVISION="$(shell $(srctree)/scripts/build-version)" \ + makepkg $(MAKEPKGOPTS) + # dir-pkg tar*-pkg - tarball targets # --------------------------------------------------------------------------- @@ -221,6 +234,7 @@ help: @echo ' bindeb-pkg - Build only the binary kernel deb package' @echo ' snap-pkg - Build only the binary kernel snap package' @echo ' (will connect to external hosts)' + @echo ' pacman-pkg - Build only the binary kernel pacman package' @echo ' dir-pkg - Build the kernel as a plain directory structure' @echo ' tar-pkg - Build the kernel as an uncompressed tarball' @echo ' targz-pkg - Build the kernel as a gzip compressed tarball' |