mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-04 10:25:25 +01:00
Remove the notion of "sys*"
- This idea originates from very early in the project and was, at the
time, a very easy way to categorise things.
- Now, it doesn't really make much sense - it is fairly arbitary, often
occuring when there is a change in kernel, but not from builder-hex0
to fiwix, and sysb is in reality completely unnecessary.
- In short, the sys* stuff is a bit of a mess that makes the project
more difficult to understand.
- This puts everything down into one folder and has a manifest file that
is used to generate the build scripts on the fly rather than using
coded scripts.
- This is created in the "seed" stage.
stage0-posix -- (calls) --> seed -- (generates) --> main steps
Alongside this change there are a variety of other smaller fixups to the
general structure of the live-bootstrap rootfs.
- Creating a rootfs has become much simpler and is defined as code in
go.sh. The new structure, for an about-to-be booted system, is
/
-- /steps (direct copy of steps/)
-- /distfiles (direct copy of distfiles/)
-- all files from seed/*
-- all files from seed/stage0-posix/*
- There is no longer such a thing as /usr/include/musl, this didn't
really make any sense, as musl is the final libc used. Rather, to
separate musl and mes, we have /usr/include/mes, which is much easier
to work with.
- This also makes mes easier to blow away later.
- A few things that weren't properly in packages have been changed;
checksum-transcriber, simple-patch, kexec-fiwix have all been given
fully qualified package names.
- Highly breaking change, scripts now exist in their package directory
but NOT WITH THE packagename.sh. Rather, they use pass1.sh, pass2.sh,
etc. This avoids manual definition of passes.
- Ditto with patches; default directory is patches, but then any patch
series specific to a pass are named patches-passX.
This commit is contained in:
parent
0907cfd073
commit
6ed2e09f3a
546 changed files with 700 additions and 1299 deletions
63
steps/linux-headers-4.9.10/pass1.sh
Executable file
63
steps/linux-headers-4.9.10/pass1.sh
Executable file
|
|
@ -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
|
||||
}
|
||||
160
steps/linux-headers-4.9.10/patches/musl.patch
Normal file
160
steps/linux-headers-4.9.10/patches/musl.patch
Normal file
|
|
@ -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
|
||||
|
||||
20
steps/linux-headers-4.9.10/patches/winsize.patch
Normal file
20
steps/linux-headers-4.9.10/patches/winsize.patch
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
--- include/uapi/asm-generic/termios.h.bak 2021-07-23 14:23:51.330460544 +1000
|
||||
+++ include/uapi/asm-generic/termios.h 2021-07-23 19:08:27.112810109 +1000
|
||||
@@ -12,13 +12,6 @@
|
||||
#include <asm/termbits.h>
|
||||
#include <asm/ioctls.h>
|
||||
|
||||
-struct winsize {
|
||||
- unsigned short ws_row;
|
||||
- unsigned short ws_col;
|
||||
- unsigned short ws_xpixel;
|
||||
- unsigned short ws_ypixel;
|
||||
-};
|
||||
-
|
||||
#define NCC 8
|
||||
struct termio {
|
||||
unsigned short c_iflag; /* input mode flags */
|
||||
1
steps/linux-headers-4.9.10/sources
Normal file
1
steps/linux-headers-4.9.10/sources
Normal file
|
|
@ -0,0 +1 @@
|
|||
https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.9.10.tar.gz 97ff15f9550c6e85c25173b3cf5c7e89a2d39fb923112f2c8bc2729cf64bf6d8
|
||||
Loading…
Add table
Add a link
Reference in a new issue