diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-11-07 13:31:53 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-11-07 13:31:53 +0000 |
| commit | 8c22ff0d8b70d9b12f0487ef696a7e915b9e3173 (patch) | |
| tree | efdc32587159d0050a69009bdf2330a531727d95 /meta/recipes-kernel/linux-libc-headers | |
| parent | d412d2747595c1cc4a5e3ca975e3adc31b2f7891 (diff) | |
| download | poky-8c22ff0d8b70d9b12f0487ef696a7e915b9e3173.tar.gz | |
The poky repository master branch is no longer being updated.
You can either:
a) switch to individual clones of bitbake, openembedded-core, meta-yocto and yocto-docs
b) use the new bitbake-setup
You can find information about either approach in our documentation:
https://docs.yoctoproject.org/
Note that "poky" the distro setting is still available in meta-yocto as
before and we continue to use and maintain that.
Long live Poky!
Some further information on the background of this change can be found
in: https://lists.openembedded.org/g/openembedded-architecture/message/2179
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/linux-libc-headers')
5 files changed, 0 insertions, 289 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 deleted file mode 100644 index 1f5c47f453..0000000000 --- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc +++ /dev/null | |||
| @@ -1,112 +0,0 @@ | |||
| 1 | SUMMARY = "Sanitized set of kernel headers for the C library's use" | ||
| 2 | HOMEPAGE = "https://www.kernel.org/" | ||
| 3 | DESCRIPTION = "Designed to maintain an Application Programming Interface (API) stable version of the Linux headers" | ||
| 4 | SECTION = "devel" | ||
| 5 | LICENSE = "GPL-2.0-only" | ||
| 6 | |||
| 7 | ######################################################################### | ||
| 8 | #### PLEASE READ | ||
| 9 | ######################################################################### | ||
| 10 | # | ||
| 11 | # You're probably looking here thinking you need to create some new copy | ||
| 12 | # of linux-libc-headers since you have your own custom kernel. To put | ||
| 13 | # this simply, you DO NOT. | ||
| 14 | # | ||
| 15 | # Why? These headers are used to build the libc. If you customise the | ||
| 16 | # headers you are customising the libc and the libc becomes machine | ||
| 17 | # specific. Most people do not add custom libc extensions to the kernel | ||
| 18 | # and have a machine specific libc. | ||
| 19 | # | ||
| 20 | # But you have some kernel headers you need for some driver? That is fine | ||
| 21 | # but get them from STAGING_KERNEL_BUILDDIR where the kernel installs itself. | ||
| 22 | # This will make the package using them machine specific but this is much | ||
| 23 | # better than having a machine specific C library. This does mean your | ||
| 24 | # recipe needs a | ||
| 25 | # do_configure[depends] += "virtual/kernel:do_shared_workdir" | ||
| 26 | # but again, that is fine and makes total sense. | ||
| 27 | # | ||
| 28 | # There can also be a case where your kernel extremely old and you want | ||
| 29 | # an older libc ABI for that old kernel. The headers installed by this | ||
| 30 | # recipe should still be a standard mainline kernel, not your own custom | ||
| 31 | # one. | ||
| 32 | # | ||
| 33 | # -- RP | ||
| 34 | |||
| 35 | LIC_FILES_CHKSUM ?= "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" | ||
| 36 | |||
| 37 | RECIPE_NO_UPDATE_REASON = "Recipe is updated through a separate process" | ||
| 38 | |||
| 39 | python __anonymous () { | ||
| 40 | major = d.getVar("PV").split('.')[0] | ||
| 41 | if major == "3": | ||
| 42 | d.setVar("HEADER_FETCH_VER", "3.0") | ||
| 43 | elif major == "4": | ||
| 44 | d.setVar("HEADER_FETCH_VER", "4.x") | ||
| 45 | elif major == "5": | ||
| 46 | d.setVar("HEADER_FETCH_VER", "5.x") | ||
| 47 | elif major == "6": | ||
| 48 | d.setVar("HEADER_FETCH_VER", "6.x") | ||
| 49 | else: | ||
| 50 | d.setVar("HEADER_FETCH_VER", "2.6") | ||
| 51 | } | ||
| 52 | |||
| 53 | MAJ_VER = "${@oe.utils.trim_version("${PV}", 2).split('.')[0]}" | ||
| 54 | MIN_VER = "${@oe.utils.trim_version("${PV}", 2).split('.')[1]}" | ||
| 55 | |||
| 56 | inherit kernel-arch pkgconfig multilib_header | ||
| 57 | |||
| 58 | KORG_ARCHIVE_COMPRESSION ?= "xz" | ||
| 59 | |||
| 60 | SRC_URI = "${KERNELORG_MIRROR}/linux/kernel/v${HEADER_FETCH_VER}/linux-${PV}.tar.${KORG_ARCHIVE_COMPRESSION}" | ||
| 61 | UPSTREAM_CHECK_URI = "https://www.kernel.org/" | ||
| 62 | |||
| 63 | S = "${UNPACKDIR}/linux-${PV}" | ||
| 64 | |||
| 65 | EXTRA_OEMAKE = " HOSTCC="${BUILD_CC}" HOSTCPP="${BUILD_CPP}"" | ||
| 66 | |||
| 67 | do_configure[noexec] = "1" | ||
| 68 | |||
| 69 | do_compile[noexec] = "1" | ||
| 70 | |||
| 71 | do_install() { | ||
| 72 | oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix} | ||
| 73 | # Kernel should not be exporting this header | ||
| 74 | rm -f ${D}${exec_prefix}/include/scsi/scsi.h | ||
| 75 | |||
| 76 | # The ..install.cmd conflicts between various configure runs | ||
| 77 | find ${D}${includedir} -name ..install.cmd | xargs rm -f | ||
| 78 | } | ||
| 79 | |||
| 80 | do_install:append:aarch64 () { | ||
| 81 | do_install_armmultilib | ||
| 82 | } | ||
| 83 | |||
| 84 | do_install:append:arm () { | ||
| 85 | do_install_armmultilib | ||
| 86 | } | ||
| 87 | |||
| 88 | do_install:append:armeb () { | ||
| 89 | do_install_armmultilib | ||
| 90 | } | ||
| 91 | |||
| 92 | do_install_armmultilib () { | ||
| 93 | if [ ${MAJ_VER} -gt 5 ]; then | ||
| 94 | ARM_KVM_HEADER="" | ||
| 95 | else | ||
| 96 | if [ ${MAJ_VER} -eq 5 ] && [ ${MIN_VER} -ge 8 ]; then | ||
| 97 | ARM_KVM_HEADER="" | ||
| 98 | else | ||
| 99 | ARM_KVM_HEADER="asm/kvm.h" | ||
| 100 | fi | ||
| 101 | fi | ||
| 102 | 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 | ||
| 103 | 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 | ||
| 104 | } | ||
| 105 | |||
| 106 | BBCLASSEXTEND = "nativesdk" | ||
| 107 | |||
| 108 | DEV_PKG_DEPENDENCY = "" | ||
| 109 | RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" | ||
| 110 | |||
| 111 | INHIBIT_DEFAULT_DEPS = "1" | ||
| 112 | DEPENDS += "unifdef-native bison-native rsync-native" | ||
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch deleted file mode 100644 index 064a39193d..0000000000 --- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch +++ /dev/null | |||
| @@ -1,90 +0,0 @@ | |||
| 1 | From 2872f5d8bcef84e62b15b37ba4ffeccfb6402dad Mon Sep 17 00:00:00 2001 | ||
| 2 | From: rofl0r <retnyg@gmx.net> | ||
| 3 | Date: Wed, 22 Jan 2014 00:48:28 +0100 | ||
| 4 | Subject: [PATCH 1/3] libc-compat.h: fix some issues arising from in6.h | ||
| 5 | |||
| 6 | namely redefinition of some structs provided by netinet/in.h. | ||
| 7 | --- | ||
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 9 | Upstream-Status: Submitted | ||
| 10 | |||
| 11 | include/uapi/linux/libc-compat.h | 25 ++++++++----------------- | ||
| 12 | 1 file changed, 8 insertions(+), 17 deletions(-) | ||
| 13 | |||
| 14 | Index: linux-4.15/include/uapi/linux/libc-compat.h | ||
| 15 | =================================================================== | ||
| 16 | --- linux-4.15.orig/include/uapi/linux/libc-compat.h 2018-02-05 17:37:44.724314379 -0500 | ||
| 17 | +++ linux-4.15/include/uapi/linux/libc-compat.h 2018-02-05 17:38:02.148913820 -0500 | ||
| 18 | @@ -49,13 +49,12 @@ | ||
| 19 | #ifndef _UAPI_LIBC_COMPAT_H | ||
| 20 | #define _UAPI_LIBC_COMPAT_H | ||
| 21 | |||
| 22 | -/* We have included glibc headers... */ | ||
| 23 | -#if defined(__GLIBC__) | ||
| 24 | +#ifndef __KERNEL__ /* we're used from userspace */ | ||
| 25 | |||
| 26 | -/* Coordinate with glibc net/if.h header. */ | ||
| 27 | -#if defined(_NET_IF_H) && defined(__USE_MISC) | ||
| 28 | +/* Coordinate with libc net/if.h header. */ | ||
| 29 | +#if defined(_NET_IF_H) | ||
| 30 | |||
| 31 | -/* GLIBC headers included first so don't define anything | ||
| 32 | +/* LIBC headers included first so don't define anything | ||
| 33 | * that would already be defined. */ | ||
| 34 | |||
| 35 | #define __UAPI_DEF_IF_IFCONF 0 | ||
| 36 | @@ -99,15 +98,7 @@ | ||
| 37 | #define __UAPI_DEF_IN_CLASS 0 | ||
| 38 | |||
| 39 | #define __UAPI_DEF_IN6_ADDR 0 | ||
| 40 | -/* The exception is the in6_addr macros which must be defined | ||
| 41 | - * if the glibc code didn't define them. This guard matches | ||
| 42 | - * the guard in glibc/inet/netinet/in.h which defines the | ||
| 43 | - * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */ | ||
| 44 | -#if defined(__USE_MISC) || defined (__USE_GNU) | ||
| 45 | #define __UAPI_DEF_IN6_ADDR_ALT 0 | ||
| 46 | -#else | ||
| 47 | -#define __UAPI_DEF_IN6_ADDR_ALT 1 | ||
| 48 | -#endif | ||
| 49 | #define __UAPI_DEF_SOCKADDR_IN6 0 | ||
| 50 | #define __UAPI_DEF_IPV6_MREQ 0 | ||
| 51 | #define __UAPI_DEF_IPPROTO_V6 0 | ||
| 52 | @@ -115,10 +106,10 @@ | ||
| 53 | #define __UAPI_DEF_IN6_PKTINFO 0 | ||
| 54 | #define __UAPI_DEF_IP6_MTUINFO 0 | ||
| 55 | |||
| 56 | -#else | ||
| 57 | +#else /* defined(_NETINET_IN_H) */ | ||
| 58 | |||
| 59 | /* Linux headers included first, and we must define everything | ||
| 60 | - * we need. The expectation is that glibc will check the | ||
| 61 | + * we need. The expectation is that libc will check the | ||
| 62 | * __UAPI_DEF_* defines and adjust appropriately. */ | ||
| 63 | #define __UAPI_DEF_IN_ADDR 1 | ||
| 64 | #define __UAPI_DEF_IN_IPPROTO 1 | ||
| 65 | @@ -128,7 +119,7 @@ | ||
| 66 | #define __UAPI_DEF_IN_CLASS 1 | ||
| 67 | |||
| 68 | #define __UAPI_DEF_IN6_ADDR 1 | ||
| 69 | -/* We unconditionally define the in6_addr macros and glibc must | ||
| 70 | +/* We unconditionally define the in6_addr macros and libc must | ||
| 71 | * coordinate. */ | ||
| 72 | #define __UAPI_DEF_IN6_ADDR_ALT 1 | ||
| 73 | #define __UAPI_DEF_SOCKADDR_IN6 1 | ||
| 74 | @@ -170,7 +161,7 @@ | ||
| 75 | * or we are being included in the kernel, then define everything | ||
| 76 | * that we need. Check for previous __UAPI_* definitions to give | ||
| 77 | * unsupported C libraries a way to opt out of any kernel definition. */ | ||
| 78 | -#else /* !defined(__GLIBC__) */ | ||
| 79 | +#else /* __KERNEL__ */ | ||
| 80 | |||
| 81 | /* Definitions for if.h */ | ||
| 82 | #ifndef __UAPI_DEF_IF_IFCONF | ||
| 83 | @@ -262,6 +253,6 @@ | ||
| 84 | #define __UAPI_DEF_XATTR 1 | ||
| 85 | #endif | ||
| 86 | |||
| 87 | -#endif /* __GLIBC__ */ | ||
| 88 | +#endif /* __KERNEL__ */ | ||
| 89 | |||
| 90 | #endif /* _UAPI_LIBC_COMPAT_H */ | ||
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-musl-_does_-define-IFF_LOWER_UP-DORMAN.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-musl-_does_-define-IFF_LOWER_UP-DORMAN.patch deleted file mode 100644 index bde2132ebf..0000000000 --- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-musl-_does_-define-IFF_LOWER_UP-DORMAN.patch +++ /dev/null | |||
| @@ -1,46 +0,0 @@ | |||
| 1 | Content-Type: text/plain; charset="utf-8" | ||
| 2 | MIME-Version: 1.0 | ||
| 3 | Content-Transfer-Encoding: 7bit | ||
| 4 | Subject: [v2,2/3] uapi glibc compat: fix build if libc defines IFF_ECHO | ||
| 5 | From: Hauke Mehrtens <hauke@hauke-m.de> | ||
| 6 | X-Patchwork-Id: 9686293 | ||
| 7 | Message-Id: <20170418210036.26039-3-hauke@hauke-m.de> | ||
| 8 | To: davem@davemloft.net, netdev@vger.kernel.org | ||
| 9 | Cc: linux-kernel@vger.kernel.org, jarod@redhat.com, jogo@openwrt.org, | ||
| 10 | david.heidelberger@ixit.cz, maillist-linux@barfooze.de, | ||
| 11 | mikko.rapeli@iki.fi, dwmw2@infradead.org, Hauke Mehrtens <hauke@hauke-m.de> | ||
| 12 | Date: Tue, 18 Apr 2017 23:00:35 +0200 | ||
| 13 | |||
| 14 | musl 1.1.15 defines IFF_ECHO and the other net_device_flags options. | ||
| 15 | When a user application includes linux/if.h and net/if.h the compile | ||
| 16 | will fail. | ||
| 17 | |||
| 18 | Activate __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO only when | ||
| 19 | it is needed. This should also make this work in case glibc will add | ||
| 20 | these defines. | ||
| 21 | |||
| 22 | Acked-by: Mikko Rapeli <mikko.rapeli@iki.fi> | ||
| 23 | Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> | ||
| 24 | --- | ||
| 25 | Upstream-Status: Submitted [https://patchwork.kernel.org/patch/9686293/] | ||
| 26 | Signed-off-by: André Draszik <adraszik@tycoint.com> | ||
| 27 | Acked-by: Stephane Ayotte <sayotte@tycoint.com> | ||
| 28 | include/uapi/linux/libc-compat.h | 2 ++ | ||
| 29 | 1 file changed, 2 insertions(+) | ||
| 30 | |||
| 31 | diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h | ||
| 32 | index 43a81136ea6e..ce2fa8a4ced6 100644 | ||
| 33 | --- a/include/uapi/linux/libc-compat.h | ||
| 34 | +++ b/include/uapi/linux/libc-compat.h | ||
| 35 | @@ -64,9 +64,11 @@ | ||
| 36 | /* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */ | ||
| 37 | #define __UAPI_DEF_IF_NET_DEVICE_FLAGS 0 | ||
| 38 | /* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */ | ||
| 39 | +#ifndef IFF_ECHO | ||
| 40 | #ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO | ||
| 41 | #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1 | ||
| 42 | #endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ | ||
| 43 | +#endif /* IFF_ECHO */ | ||
| 44 | |||
| 45 | #else /* _NET_IF_H */ | ||
| 46 | |||
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 deleted file mode 100644 index b0e7014138..0000000000 --- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | From 8e69b663d6ddef132041a1186f081fdd74d4a31d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: rofl0r <retnyg@gmx.net> | ||
| 3 | Date: Mon, 20 Jan 2014 21:31:34 +0100 | ||
| 4 | Subject: [PATCH 3/3] remove inclusion of sysinfo.h in kernel.h | ||
| 5 | |||
| 6 | the declaration of struct sysinfo clashes with userspace. | ||
| 7 | it's not quite clear why that header was included from kernel.h, | ||
| 8 | as none of its functionality is needed. | ||
| 9 | --- | ||
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 11 | Upstream-Status: Submitted | ||
| 12 | |||
| 13 | include/uapi/linux/kernel.h | 2 ++ | ||
| 14 | 1 file changed, 2 insertions(+) | ||
| 15 | |||
| 16 | Index: linux-5.12.11/include/uapi/linux/kernel.h | ||
| 17 | =================================================================== | ||
| 18 | --- linux-5.12.11.orig/include/uapi/linux/kernel.h | ||
| 19 | +++ linux-5.12.11/include/uapi/linux/kernel.h | ||
| 20 | @@ -2,7 +2,9 @@ | ||
| 21 | #ifndef _UAPI_LINUX_KERNEL_H | ||
| 22 | #define _UAPI_LINUX_KERNEL_H | ||
| 23 | |||
| 24 | +#ifdef __GLIBC__ | ||
| 25 | #include <linux/sysinfo.h> | ||
| 26 | #include <linux/const.h> | ||
| 27 | +#endif | ||
| 28 | |||
| 29 | #endif /* _UAPI_LINUX_KERNEL_H */ | ||
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_6.17.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_6.17.bb deleted file mode 100644 index b4bf1126ab..0000000000 --- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_6.17.bb +++ /dev/null | |||
| @@ -1,12 +0,0 @@ | |||
| 1 | require linux-libc-headers.inc | ||
| 2 | |||
| 3 | SRC_URI:append:libc-musl = "\ | ||
| 4 | file://0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch \ | ||
| 5 | file://0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch \ | ||
| 6 | file://0001-libc-compat.h-musl-_does_-define-IFF_LOWER_UP-DORMAN.patch \ | ||
| 7 | " | ||
| 8 | |||
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" | ||
| 10 | |||
| 11 | SRC_URI[sha256sum] = "9b607166a1c999d8326098121222feb080a20a3253975fcdfa2de96ba7f757a7" | ||
| 12 | |||
