diff options
Diffstat (limited to 'meta/recipes-kernel/linux-libc-headers')
7 files changed, 49 insertions, 134 deletions
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc index be215af9b9..3a8d32e785 100644 --- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc @@ -1,6 +1,8 @@ SUMMARY = "Sanitized set of kernel headers for the C library's use" +HOMEPAGE = "https://www.kernel.org/" +DESCRIPTION = "Designed to maintain an Application Programming Interface (API) stable version of the Linux headers" SECTION = "devel" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" ######################################################################### #### PLEASE READ @@ -16,7 +18,7 @@ LICENSE = "GPLv2" # and have a machine specific libc. # # But you have some kernel headers you need for some driver? That is fine -# but get them from STAGING_KERNEL_DIR where the kernel installs itself. +# but get them from STAGING_KERNEL_BUILDDIR where the kernel installs itself. # This will make the package using them machine specific but this is much # better than having a machine specific C library. This does mean your # recipe needs a @@ -30,7 +32,9 @@ LICENSE = "GPLv2" # # -- RP -LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" +LIC_FILES_CHKSUM ?= "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +RECIPE_NO_UPDATE_REASON = "Recipe is updated through a separate process" python __anonymous () { major = d.getVar("PV").split('.')[0] @@ -38,10 +42,17 @@ python __anonymous () { d.setVar("HEADER_FETCH_VER", "3.0") elif major == "4": d.setVar("HEADER_FETCH_VER", "4.x") + elif major == "5": + d.setVar("HEADER_FETCH_VER", "5.x") + elif major == "6": + d.setVar("HEADER_FETCH_VER", "6.x") else: d.setVar("HEADER_FETCH_VER", "2.6") } +MAJ_VER = "${@oe.utils.trim_version("${PV}", 2).split('.')[0]}" +MIN_VER = "${@oe.utils.trim_version("${PV}", 2).split('.')[1]}" + inherit kernel-arch pkgconfig multilib_header KORG_ARCHIVE_COMPRESSION ?= "xz" @@ -66,27 +77,36 @@ do_install() { find ${D}${includedir} -name ..install.cmd | xargs rm -f } -do_install_append_aarch64 () { +do_install:append:aarch64 () { do_install_armmultilib } -do_install_append_arm () { +do_install:append:arm () { do_install_armmultilib } -do_install_append_armeb () { +do_install:append:armeb () { do_install_armmultilib } do_install_armmultilib () { - oe_multilib_header asm/auxvec.h asm/bitsperlong.h asm/byteorder.h asm/fcntl.h asm/hwcap.h asm/ioctls.h asm/kvm.h asm/kvm_para.h asm/mman.h asm/param.h asm/perf_regs.h asm/bpf_perf_event.h + if [ ${MAJ_VER} -gt 5 ]; then + ARM_KVM_HEADER="" + else + if [ ${MAJ_VER} -eq 5 ] && [ ${MIN_VER} -ge 8 ]; then + ARM_KVM_HEADER="" + else + ARM_KVM_HEADER="asm/kvm.h" + fi + fi + oe_multilib_header asm/auxvec.h asm/bitsperlong.h asm/byteorder.h asm/fcntl.h asm/hwcap.h asm/ioctls.h $ARM_KVM_HEADER asm/kvm_para.h asm/mman.h asm/param.h asm/perf_regs.h asm/bpf_perf_event.h oe_multilib_header asm/posix_types.h asm/ptrace.h asm/setup.h asm/sigcontext.h asm/siginfo.h asm/signal.h asm/stat.h asm/statfs.h asm/swab.h asm/types.h asm/unistd.h } BBCLASSEXTEND = "nativesdk" -RDEPENDS_${PN}-dev = "" -RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" +DEV_PKG_DEPENDENCY = "" +RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" INHIBIT_DEFAULT_DEPS = "1" -DEPENDS += "unifdef-native bison-native" +DEPENDS += "unifdef-native bison-native rsync-native" diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch deleted file mode 100644 index 68b244698f..0000000000 --- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 897736166fd709906a5fdf16eb23f8fddff770b5 Mon Sep 17 00:00:00 2001 -From: Bruce Ashfield <bruce.ashfield@windriver.com> -Date: Thu, 1 Mar 2018 18:31:01 -0500 -Subject: [PATCH] if_ether: move muslc ethhdr protection to uapi file - -Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> -Upstream-Status: Pending ---- - include/uapi/linux/if_ether.h | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h -index 153c9c2..7b69b73 100644 ---- a/include/uapi/linux/if_ether.h -+++ b/include/uapi/linux/if_ether.h -@@ -149,6 +149,12 @@ - * This is an Ethernet frame header. - */ - -+#ifdef _NETINET_IF_ETHER_H /* musl */ -+#define __UAPI_DEF_ETHHDR 0 -+#else /* glibc uses __NETINET_IF_ETHER_H, and includes the kernel header. */ -+#define __UAPI_DEF_ETHHDR 1 -+#endif -+ - /* allow libcs like musl to deactivate this, glibc does not implement this. */ - #ifndef __UAPI_DEF_ETHHDR - #define __UAPI_DEF_ETHHDR 1 --- -2.7.4 - diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch deleted file mode 100644 index 9d17daa70f..0000000000 --- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 9708dc74d9f49488d669e070982f6224a888d61a Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 12 Sep 2018 17:08:58 -0700 -Subject: [PATCH] include linux/stddef.h in swab.h uapi header - -swab.h uses __always_inline without including the header where it is -defined, this is exposed by musl based distributions where this macro is -not defined by system C library headers unlike glibc where it is defined -in sys/cdefs.h and that header gets pulled in indirectly via - -features.h -> sys/cdefs.h - -and features.h gets pulled in a lot of headers. Therefore it may work in -cases where features.h is includes but not otherwise. - -Adding linux/stddef.h here ensures that __always_inline is always -defined independent of which C library is used in userspace - -Upstream-Status: Submitted [https://lkml.org/lkml/2018/9/13/78] - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Cc: Philippe Ombredanne <pombredanne@nexb.com> -Cc: Kate Stewart <kstewart@linuxfoundation.org> -Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Cc: Thomas Gleixner <tglx@linutronix.de> ---- - include/uapi/linux/swab.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h -index 23cd84868cc3..acddbe50a20d 100644 ---- a/include/uapi/linux/swab.h -+++ b/include/uapi/linux/swab.h -@@ -3,6 +3,7 @@ - #define _UAPI_LINUX_SWAB_H - - #include <linux/types.h> -+#include <linux/stddef.h> - #include <linux/compiler.h> - #include <asm/swab.h> - --- -2.19.0 - diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch deleted file mode 100644 index fb7e1de17a..0000000000 --- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 75ba4a547282f91d653872a4bba5f5eae234ea6c Mon Sep 17 00:00:00 2001 -From: rofl0r <retnyg@gmx.net> -Date: Wed, 22 Jan 2014 00:57:48 +0100 -Subject: [PATCH 2/3] libc-compat.h: prevent redefinition of struct ethhdr - ---- -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Submitted - - include/uapi/linux/if_ether.h | 4 +++- - include/uapi/linux/libc-compat.h | 6 ++++++ - 2 files changed, 9 insertions(+), 1 deletion(-) - -Index: linux-4.15/include/uapi/linux/libc-compat.h -=================================================================== ---- linux-4.15.orig/include/uapi/linux/libc-compat.h 2018-02-05 17:40:42.338370731 -0500 -+++ linux-4.15/include/uapi/linux/libc-compat.h 2018-02-05 17:40:42.334370603 -0500 -@@ -51,6 +51,12 @@ - - #ifndef __KERNEL__ /* we're used from userspace */ - -+#ifdef _NETINET_IF_ETHER_H /* musl */ -+#define __UAPI_DEF_ETHHDR 0 -+#else /* glibc uses __NETINET_IF_ETHER_H, and includes the kernel header. */ -+#define __UAPI_DEF_ETHHDR 1 -+#endif -+ - /* Coordinate with libc net/if.h header. */ - #if defined(_NET_IF_H) - diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch index b5c4e1750e..b0e7014138 100644 --- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch @@ -13,17 +13,17 @@ Upstream-Status: Submitted include/uapi/linux/kernel.h | 2 ++ 1 file changed, 2 insertions(+) -Index: linux-4.8-rc4/include/uapi/linux/kernel.h +Index: linux-5.12.11/include/uapi/linux/kernel.h =================================================================== ---- linux-4.8-rc4.orig/include/uapi/linux/kernel.h -+++ linux-4.8-rc4/include/uapi/linux/kernel.h -@@ -1,7 +1,9 @@ +--- linux-5.12.11.orig/include/uapi/linux/kernel.h ++++ linux-5.12.11/include/uapi/linux/kernel.h +@@ -2,7 +2,9 @@ #ifndef _UAPI_LINUX_KERNEL_H #define _UAPI_LINUX_KERNEL_H +#ifdef __GLIBC__ #include <linux/sysinfo.h> + #include <linux/const.h> +#endif - /* - * 'kernel.h' contains some often-used function prototypes etc + #endif /* _UAPI_LINUX_KERNEL_H */ diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb deleted file mode 100644 index eb7bee72b0..0000000000 --- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb +++ /dev/null @@ -1,13 +0,0 @@ -require linux-libc-headers.inc - -SRC_URI_append_libc-musl = "\ - file://0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch \ - file://0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch \ - file://0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch \ - file://0001-libc-compat.h-musl-_does_-define-IFF_LOWER_UP-DORMAN.patch \ - file://0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch \ - file://0001-include-linux-stddef.h-in-swab.h-uapi-header.patch \ - " - -SRC_URI[md5sum] = "bee5fe53ee1c3142b8f0c12c0d3348f9" -SRC_URI[sha256sum] = "19d8bcf49ef530cd4e364a45b4a22fa70714b70349c8100e7308488e26f1eaf1" diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_6.10.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_6.10.bb new file mode 100644 index 0000000000..9484083948 --- /dev/null +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_6.10.bb @@ -0,0 +1,13 @@ +require linux-libc-headers.inc + +SRC_URI:append:libc-musl = "\ + file://0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch \ + file://0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch \ + file://0001-libc-compat.h-musl-_does_-define-IFF_LOWER_UP-DORMAN.patch \ + " + +LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" + +SRC_URI[sha256sum] = "774698422ee54c5f1e704456f37c65c06b51b4e9a8b0866f34580d86fef8e226" + + |