logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>
commit: fcaaad81052ec7ce060ace5a0ee5967749469d9d
parent 28461d7890d7bd7794dcdd01dfba2f5108ab90f0
Author: fosslinux <fosslinux@aussies.space>
Date:   Tue, 28 Nov 2023 11:48:44 +1100

Change linux headers to 4.9.10 instead of 5.10.41

Unifies tarball distfiles.

Diffstat:

Asysa/linux-headers-4.9.10/linux-headers-4.9.10.sh63+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asysa/linux-headers-4.9.10/patches/musl.patch160+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rsysa/linux-headers-5.10.41/patches/winsize.patch -> sysa/linux-headers-4.9.10/patches/winsize.patch0
Asysa/linux-headers-4.9.10/sources1+
Dsysa/linux-headers-5.10.41/linux-headers-5.10.41.sh62--------------------------------------------------------------
Dsysa/linux-headers-5.10.41/patches/sed-args.patch18------------------
Dsysa/linux-headers-5.10.41/sources1-
Msysa/run2.sh2+-
8 files changed, 225 insertions(+), 82 deletions(-)

diff --git a/sysa/linux-headers-4.9.10/linux-headers-4.9.10.sh b/sysa/linux-headers-4.9.10/linux-headers-4.9.10.sh @@ -0,0 +1,63 @@ +# SPDX-FileCopyrightText: 2021-23 fosslinux <fosslinux@aussies.space> +# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +extract="linux-4.9.10/scripts linux-4.9.10/include linux-4.9.10/arch/x86/include linux-4.9.10/arch/x86/entry" + +src_prepare() { + default + + # Buggy headers/don't know how to account for + rm include/uapi/linux/pktcdvd.h \ + include/uapi/linux/hw_breakpoint.h \ + include/uapi/linux/eventpoll.h \ + include/uapi/linux/atmdev.h \ + include/uapi/asm-generic/fcntl.h \ + arch/x86/include/uapi/asm/mman.h \ + arch/x86/include/uapi/asm/auxvec.h +} + +src_compile() { + gcc -o scripts/unifdef scripts/unifdef.c +} + +src_install() { + base_dir="${PWD}" + # We "compile" the headers here because it is easier + for d in include/uapi arch/x86/include/uapi; do + cd "${d}" + find . -type d -exec mkdir "${DESTDIR}${PREFIX}/include/{}" -p \; + headers="$(find . -type f -name "*.h")" + cd "${base_dir}" + for h in ${headers}; do + path="$(dirname "${h}")" + scripts/headers_install.sh "${DESTDIR}${PREFIX}/include/${path}" "${d}/${path}" "$(basename "${h}")" + done + done + + # Pick-and-choose asm-generic headers + for i in types ioctl termios termbits ioctls sockios socket param; do + cp "${DESTDIR}${PREFIX}/include/asm-generic/${i}.h" "${DESTDIR}${PREFIX}/include/asm/${i}.h" + done + + # Generate asm/unistd_32.h + bash arch/x86/entry/syscalls/syscallhdr.sh \ + arch/x86/entry/syscalls/syscall_32.tbl \ + "${DESTDIR}${PREFIX}/include/asm/unistd_32.h" i386 + + # Generate linux/version.h + # Rules are from makefile + VERSION=4 + PATCHLEVEL=9 + SUBLEVEL=10 + VERSION_CODE="$((VERSION * 65536 + PATCHLEVEL * 256 + SUBLEVEL))" + echo '#define LINUX_VERSION_CODE '"${VERSION_CODE}" \ + > "${DESTDIR}${PREFIX}/include/linux/version.h" + echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))' \ + >> "${DESTDIR}${PREFIX}/include/linux/version.h" + + # Clear up storage space + cd ../.. + rm -rf build src +} diff --git a/sysa/linux-headers-4.9.10/patches/musl.patch b/sysa/linux-headers-4.9.10/patches/musl.patch @@ -0,0 +1,160 @@ +SPDX-FileCopyrightText: 2018 Felix Janda <felix.janda@posteo.de> + +SPDX-License-Identifier: GPL-2.0-only + +Applies cleanly (backport). + +From c0bace798436bca0fdc221ff61143f1376a9c3de Mon Sep 17 00:00:00 2001 +From: Date: Mon, 1 Jan 2018 19:33:20 +0100 +Subject: uapi libc compat: add fallback for unsupported libcs + +libc-compat.h aims to prevent symbol collisions between uapi and libc +headers for each supported libc. This requires continuous coordination +between them. + +The goal of this commit is to improve the situation for libcs (such as +musl) which are not yet supported and/or do not wish to be explicitly +supported, while not affecting supported libcs. More precisely, with +this commit, unsupported libcs can request the suppression of any +specific uapi definition by defining the correspondings _UAPI_DEF_* +macro as 0. This can fix symbol collisions for them, as long as the +libc headers are included before the uapi headers. Inclusion in the +other order is outside the scope of this commit. + +All infrastructure in order to enable this fallback for unsupported +libcs is already in place, except that libc-compat.h unconditionally +defines all _UAPI_DEF_* macros to 1 for all unsupported libcs so that +any previous definitions are ignored. In order to fix this, this commit +merely makes these definitions conditional. + +This commit together with the musl libc commit + +http://git.musl-libc.org/cgit/musl/commit/?id=04983f2272382af92eb8f8838964ff944fbb8258 + +fixes for example the following compiler errors when <linux/in6.h> is +included after musl's <netinet/in.h>: + +./linux/in6.h:32:8: error: redefinition of 'struct in6_addr' +./linux/in6.h:49:8: error: redefinition of 'struct sockaddr_in6' +./linux/in6.h:59:8: error: redefinition of 'struct ipv6_mreq' + +The comments referencing glibc are still correct, but this file is not +only used for glibc any more. + +Signed-off-by: Felix Janda <felix.janda@posteo.de> +Reviewed-by: Hauke Mehrtens <hauke@hauke-m.de> +Signed-off-by: David S. Miller <davem@davemloft.net> +--- + include/uapi/linux/libc-compat.h | 55 +++++++++++++++++++++++++++++++++++++++- + 1 file changed, 54 insertions(+), 1 deletion(-) + +(limited to 'include/uapi/linux/libc-compat.h') + +diff --git include/uapi/linux/libc-compat.h include/uapi/linux/libc-compat.h +index 282875cf805657..8254c937c9f455 100644 +--- include/uapi/linux/libc-compat.h ++++ include/uapi/linux/libc-compat.h +@@ -168,46 +168,99 @@ + + /* If we did not see any headers from any supported C libraries, + * or we are being included in the kernel, then define everything +- * that we need. */ ++ * that we need. Check for previous __UAPI_* definitions to give ++ * unsupported C libraries a way to opt out of any kernel definition. */ + #else /* !defined(__GLIBC__) */ + + /* Definitions for if.h */ ++#ifndef __UAPI_DEF_IF_IFCONF + #define __UAPI_DEF_IF_IFCONF 1 ++#endif ++#ifndef __UAPI_DEF_IF_IFMAP + #define __UAPI_DEF_IF_IFMAP 1 ++#endif ++#ifndef __UAPI_DEF_IF_IFNAMSIZ + #define __UAPI_DEF_IF_IFNAMSIZ 1 ++#endif ++#ifndef __UAPI_DEF_IF_IFREQ + #define __UAPI_DEF_IF_IFREQ 1 ++#endif + /* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */ ++#ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS + #define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1 ++#endif + /* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */ ++#ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO + #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1 ++#endif + + /* Definitions for in.h */ ++#ifndef __UAPI_DEF_IN_ADDR + #define __UAPI_DEF_IN_ADDR 1 ++#endif ++#ifndef __UAPI_DEF_IN_IPPROTO + #define __UAPI_DEF_IN_IPPROTO 1 ++#endif ++#ifndef __UAPI_DEF_IN_PKTINFO + #define __UAPI_DEF_IN_PKTINFO 1 ++#endif ++#ifndef __UAPI_DEF_IP_MREQ + #define __UAPI_DEF_IP_MREQ 1 ++#endif ++#ifndef __UAPI_DEF_SOCKADDR_IN + #define __UAPI_DEF_SOCKADDR_IN 1 ++#endif ++#ifndef __UAPI_DEF_IN_CLASS + #define __UAPI_DEF_IN_CLASS 1 ++#endif + + /* Definitions for in6.h */ ++#ifndef __UAPI_DEF_IN6_ADDR + #define __UAPI_DEF_IN6_ADDR 1 ++#endif ++#ifndef __UAPI_DEF_IN6_ADDR_ALT + #define __UAPI_DEF_IN6_ADDR_ALT 1 ++#endif ++#ifndef __UAPI_DEF_SOCKADDR_IN6 + #define __UAPI_DEF_SOCKADDR_IN6 1 ++#endif ++#ifndef __UAPI_DEF_IPV6_MREQ + #define __UAPI_DEF_IPV6_MREQ 1 ++#endif ++#ifndef __UAPI_DEF_IPPROTO_V6 + #define __UAPI_DEF_IPPROTO_V6 1 ++#endif ++#ifndef __UAPI_DEF_IPV6_OPTIONS + #define __UAPI_DEF_IPV6_OPTIONS 1 ++#endif ++#ifndef __UAPI_DEF_IN6_PKTINFO + #define __UAPI_DEF_IN6_PKTINFO 1 ++#endif ++#ifndef __UAPI_DEF_IP6_MTUINFO + #define __UAPI_DEF_IP6_MTUINFO 1 ++#endif + + /* Definitions for ipx.h */ ++#ifndef __UAPI_DEF_SOCKADDR_IPX + #define __UAPI_DEF_SOCKADDR_IPX 1 ++#endif ++#ifndef __UAPI_DEF_IPX_ROUTE_DEFINITION + #define __UAPI_DEF_IPX_ROUTE_DEFINITION 1 ++#endif ++#ifndef __UAPI_DEF_IPX_INTERFACE_DEFINITION + #define __UAPI_DEF_IPX_INTERFACE_DEFINITION 1 ++#endif ++#ifndef __UAPI_DEF_IPX_CONFIG_DATA + #define __UAPI_DEF_IPX_CONFIG_DATA 1 ++#endif ++#ifndef __UAPI_DEF_IPX_ROUTE_DEF + #define __UAPI_DEF_IPX_ROUTE_DEF 1 ++#endif + + /* Definitions for xattr.h */ ++#ifndef __UAPI_DEF_XATTR + #define __UAPI_DEF_XATTR 1 ++#endif + + #endif /* __GLIBC__ */ + +-- +cgit + diff --git a/sysa/linux-headers-5.10.41/patches/winsize.patch b/sysa/linux-headers-4.9.10/patches/winsize.patch diff --git a/sysa/linux-headers-4.9.10/sources b/sysa/linux-headers-4.9.10/sources @@ -0,0 +1 @@ +https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.9.10.tar.gz 97ff15f9550c6e85c25173b3cf5c7e89a2d39fb923112f2c8bc2729cf64bf6d8 diff --git a/sysa/linux-headers-5.10.41/linux-headers-5.10.41.sh b/sysa/linux-headers-5.10.41/linux-headers-5.10.41.sh @@ -1,62 +0,0 @@ -# SPDX-FileCopyrightText: 2021-23 fosslinux <fosslinux@aussies.space> -# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu> -# -# SPDX-License-Identifier: GPL-3.0-or-later - -extract="linux-5.10.41/scripts linux-5.10.41/include linux-5.10.41/arch/x86/include linux-5.10.41/arch/x86/entry" - -src_prepare() { - default - - # Buggy headers/don't know how to account for - rm include/uapi/linux/pktcdvd.h \ - include/uapi/linux/hw_breakpoint.h \ - include/uapi/linux/eventpoll.h \ - include/uapi/linux/atmdev.h \ - include/uapi/asm-generic/fcntl.h \ - arch/x86/include/uapi/asm/mman.h \ - arch/x86/include/uapi/asm/auxvec.h -} - -src_compile() { - gcc -o scripts/unifdef scripts/unifdef.c -} - -src_install() { - base_dir="${PWD}" - # We "compile" the headers here because it is easier - for d in include/uapi arch/x86/include/uapi; do - cd "${d}" - find . -type d -exec mkdir "${DESTDIR}${PREFIX}/include/{}" -p \; - headers="$(find . -type f -name "*.h")" - cd "${base_dir}" - for h in ${headers}; do - scripts/headers_install.sh "${d}/${h}" "${DESTDIR}${PREFIX}/include/${h}" - done - done - - # Pick-and-choose asm-generic headers - for i in types ioctl termios termbits ioctls sockios socket param; do - cp "${DESTDIR}${PREFIX}/include/asm-generic/${i}.h" "${DESTDIR}${PREFIX}/include/asm/${i}.h" - done - - # Generate asm/unistd_32.h - bash arch/x86/entry/syscalls/syscallhdr.sh \ - arch/x86/entry/syscalls/syscall_32.tbl \ - "${DESTDIR}${PREFIX}/include/asm/unistd_32.h" i386 - - # Generate linux/version.h - # Rules are from makefile - VERSION=5 - PATCHLEVEL=10 - SUBLEVEL=42 - VERSION_CODE="$((VERSION * 65536 + PATCHLEVEL * 256 + SUBLEVEL))" - echo '#define LINUX_VERSION_CODE '"${VERSION_CODE}" \ - > "${DESTDIR}${PREFIX}/include/linux/version.h" - echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))' \ - >> "${DESTDIR}${PREFIX}/include/linux/version.h" - - # Clear up storage space - cd ../.. - rm -rf build src -} diff --git a/sysa/linux-headers-5.10.41/patches/sed-args.patch b/sysa/linux-headers-5.10.41/patches/sed-args.patch @@ -1,18 +0,0 @@ -SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space> - -SPDX-License-Identifier: GPL-2.0-only - -We do not have the '-E' argument in our version of sed. But it is -functionally equivalent to '-r' (at least for this purpose). - ---- scripts/headers_install.shk 2021-06-01 18:48:44.732934584 +1000 -+++ scripts/headers_install.sh 2021-06-01 18:48:56.954050654 +1000 -@@ -29,7 +29,7 @@ - exit 1 - fi - --sed -E -e ' -+sed -r -e ' - s/([[:space:](])(__user|__force|__iomem)[[:space:]]/\1/g - s/__attribute_const__([[:space:]]|$)/\1/g - s@^#include <linux/compiler(|_types).h>@@ diff --git a/sysa/linux-headers-5.10.41/sources b/sysa/linux-headers-5.10.41/sources @@ -1 +0,0 @@ -https://mirrors.kernel.org/pub/linux/kernel/v5.x/linux-5.10.41.tar.gz 84d2079a20ba32f5e2d5bc79a5dcb1de94d0176c67d75d5a20d533ea6c90d691 linux-5.10.41.tar.gz linux-5.10.41/scripts linux-5.10.41/include linux-5.10.41/arch/x86/include linux-5.10.41/arch/x86/entry diff --git a/sysa/run2.sh b/sysa/run2.sh @@ -65,7 +65,7 @@ build findutils-4.2.33 build musl-1.2.4 -build linux-headers-5.10.41 '' '' linux-5.10.41 +build linux-headers-4.9.10 '' '' linux-4.9.10 build gcc-4.0.4 pass2.sh