summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2022-04-20 01:49:59 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2022-05-01 17:05:59 -0500
commita63e2e915a42e2158c2e68e1f091c33e781b8219 (patch)
tree9fddb8f6696f80f8edba530d15a833431047df28
parent573112d4c95387508fb8ae251f1194899c9cd4a9 (diff)
downloadpackages-a63e2e915a42e2158c2e68e1f091c33e781b8219.tar.gz
packages-a63e2e915a42e2158c2e68e1f091c33e781b8219.tar.bz2
packages-a63e2e915a42e2158c2e68e1f091c33e781b8219.tar.xz
packages-a63e2e915a42e2158c2e68e1f091c33e781b8219.zip
system/easy-kernel: add linux-headers subpackage back (and drop package). fixes #535.
-rw-r--r--system/easy-kernel/APKBUILD29
-rw-r--r--system/easy-kernel/kernel.h11
2 files changed, 38 insertions, 2 deletions
diff --git a/system/easy-kernel/APKBUILD b/system/easy-kernel/APKBUILD
index d94205b7e..0558b9177 100644
--- a/system/easy-kernel/APKBUILD
+++ b/system/easy-kernel/APKBUILD
@@ -13,11 +13,12 @@ arch="all"
options="!check !dbg !strip !tracedeps"
license="GPL-2.0-only"
depends="kernel-boot"
-makedepends="bc bison flex gzip kmod lzop openssl-dev rsync xz"
+makedepends="bc bison flex gzip kmod lzop openssl-dev xz"
provides="easy-kernel$_kflavour=$pkgver-r$pkgrel"
replaces="easy-kernel-power8 easy-kernel-power8-64k"
subpackages="$_pkgname-modules-$pkgver-mc$_patchver:modules
- $_pkgname-src-$pkgver-mc$_patchver:src"
+ $_pkgname-src-$pkgver-mc$_patchver:src
+ linux-headers:headers"
_pkgmajver=${pkgver%%.*}
_pkgminver=${pkgver%.*}
source="https://cdn.kernel.org/pub/linux/kernel/v${_pkgmajver}.x/linux-${_pkgminver}.tar.xz
@@ -29,6 +30,7 @@ source="https://cdn.kernel.org/pub/linux/kernel/v${_pkgmajver}.x/linux-${_pkgmin
config-ppc64
config-sparc64
config-x86_64
+ kernel.h
0100-linux-5.15.28.patch
0120-XATTR_USER_PREFIX.patch
@@ -122,6 +124,28 @@ modules() {
"$subpkgdir"/etc/modprobe.d/no-autoload-fb.conf
}
+headers() {
+ pkgdesc="System headers provided by the Linux kernel"
+
+ mkdir -p "$subpkgdir"/usr
+ make -C "$builddir" headers
+ find "$builddir"/usr/include -name '.*' -delete
+ rm "$builddir"/usr/include/Makefile
+ cp -rv "$builddir"/usr/include "$subpkgdir/usr"
+
+ find "$subpkgdir/usr" \( -name .install -o -name ..install.cmd \) -exec \
+ rm -f {} \;
+
+ # provided by libdrm
+ rm -rf "$subpkgdir"/usr/include/drm
+
+ # needed for spl, VMware on x86, etc
+ install -D -m644 "$builddir"/include/generated/utsrelease.h \
+ "$subpkgdir"/usr/include/linux/utsrelease.h
+
+ install -m644 "$srcdir"/kernel.h "$subpkgdir"/usr/include/linux/kernel.h
+}
+
src() {
pkgdesc="Kernel source code used to build the kernel"
provides="easy-kernel$_kflavour-src=$pkgver-r$pkgrel"
@@ -138,6 +162,7 @@ sha512sums="d25ad40b5bcd6a4c6042fd0fd84e196e7a58024734c3e9a484fd0d5d54a0c1d87db8
c6b7f7cb0c6a155465b2db849187a95ff1a31dd157699019a3f3f44e522c62c6e6ec29532b1b1b0c508142e32200a5611e3be3d44d6ea750883808ac6578401c config-ppc64
f43ae12574c81f6e0161c547eff93d70ff4686e6ec1654edbdea10447e424218a33b81c664828f82617e4ef522128f2e0460da0c9523538724048174b53a7313 config-sparc64
d02dad2531c13ccb8dc9b0bdb31943ba12b374f559b6c0ffaac7cf7d3b809e35b83df705758ce1ea223611ffe6f399295a06286e6ad9033ae8b861ad4933f049 config-x86_64
+1ca1bc094a8106b33176ab6cfb55c9514e7d69f1ed30c580eee419a3c422a2e6625d71c4581702e911f36c4bbac175010f46b7123bb81fda3303d4decdc57287 kernel.h
aa22c4a18ae302356010cac4f375feeb9ce1b6a13eeb7a5c98b3c2bebee7249154cfb747aa138440b60bc1b62a4329bd08c151e55cd318c788a267ef51cbb752 0100-linux-5.15.28.patch
3ed100909f9aed72836a3c712e45e0116cd3c4331961a76a27b867a7098d0df9458387b656c9ea01385c3c37585436e48168ac35666b0e46dca7da05e5e38a61 0120-XATTR_USER_PREFIX.patch
c97a3799a2d5e4da9c9dfe129756da629fba8183479b02ca82f9b6d9993f17a165a96bd35ac50eb25fb293785b9b529a95165b1a2eb79c05134bee8ccf22a5d3 0122-link-security-restrictions.patch
diff --git a/system/easy-kernel/kernel.h b/system/easy-kernel/kernel.h
new file mode 100644
index 000000000..cb1007a6e
--- /dev/null
+++ b/system/easy-kernel/kernel.h
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#ifndef _LINUX_KERNEL_H
+#define _LINUX_KERNEL_H
+
+#ifdef __GLIBC__
+#include <linux/sysinfo.h>
+#endif /* __GLIBC__ */
+
+#include <linux/const.h>
+
+#endif /* _LINUX_KERNEL_H */