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:
fosslinux 2023-11-07 10:51:23 +11:00
parent 0907cfd073
commit 6ed2e09f3a
546 changed files with 700 additions and 1299 deletions

View file

@ -0,0 +1,134 @@
# SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: BSD-2-Clause
__CTASSERT macro does not work properly on our older GCC.
diff -ru src/arp.c src/arp.c
--- src/arp.c
+++ src/arp.c
@@ -63,9 +63,6 @@
/* ARP debugging can be quite noisy. Enable this for more noise! */
//#define ARP_DEBUG
-/* Assert the correct structure size for on wire */
-__CTASSERT(sizeof(struct arphdr) == 8);
-
static ssize_t
arp_request(const struct arp_state *astate,
const struct in_addr *sip)
diff -ru src/auth.c src/auth.c
--- src/auth.c
+++ src/auth.c
@@ -343,9 +343,6 @@
/* RFC3318, section 5.2 - zero giaddr and hops */
if (mp == 4) {
- /* Assert the bootp structure is correct size. */
- __CTASSERT(sizeof(struct bootp) == 300);
-
*(mm + offsetof(struct bootp, hops)) = '\0';
memset(mm + offsetof(struct bootp, giaddr), 0, 4);
}
diff -ru src/dhcp6.c src/dhcp6.c
--- src/dhcp6.c
+++ src/dhcp6.c
@@ -84,33 +84,28 @@
uint8_t xid[3];
/* followed by options */
};
-__CTASSERT(sizeof(struct dhcp6_message) == 4);
struct dhcp6_option {
uint16_t code;
uint16_t len;
/* followed by data */
};
-__CTASSERT(sizeof(struct dhcp6_option) == 4);
struct dhcp6_ia_na {
uint8_t iaid[4];
uint32_t t1;
uint32_t t2;
};
-__CTASSERT(sizeof(struct dhcp6_ia_na) == 12);
struct dhcp6_ia_ta {
uint8_t iaid[4];
};
-__CTASSERT(sizeof(struct dhcp6_ia_ta) == 4);
struct dhcp6_ia_addr {
struct in6_addr addr;
uint32_t pltime;
uint32_t vltime;
};
-__CTASSERT(sizeof(struct dhcp6_ia_addr) == 16 + 8);
/* XXX FIXME: This is the only packed structure and it does not align.
* Maybe manually decode it? */
@@ -120,7 +115,6 @@
uint8_t prefix_len;
struct in6_addr prefix;
} __packed;
-__CTASSERT(sizeof(struct dhcp6_pd_addr) == 8 + 1 + 16);
struct dhcp6_op {
uint16_t type;
diff -ru src/dhcp.c src/dhcp.c
--- src/dhcp.c
+++ src/dhcp.c
@@ -98,11 +98,6 @@
#define IP_RECVPKTINFO IP_PKTINFO
#endif
-/* Assert the correct structure size for on wire */
-__CTASSERT(sizeof(struct ip) == 20);
-__CTASSERT(sizeof(struct udphdr) == 8);
-__CTASSERT(sizeof(struct bootp) == 300);
-
struct dhcp_op {
uint8_t value;
const char *name;
diff -ru src/if-bsd.c src/if-bsd.c
--- src/if-bsd.c
+++ src/if-bsd.c
@@ -1600,7 +1600,6 @@
#endif
}
-__CTASSERT(offsetof(struct rt_msghdr, rtm_msglen) == 0);
int
if_handlelink(struct dhcpcd_ctx *ctx)
{
diff -ru src/ipv6nd.c src/ipv6nd.c
--- src/ipv6nd.c
+++ src/ipv6nd.c
@@ -80,7 +80,6 @@
uint32_t nd_opt_rdnss_lifetime;
/* followed by list of IP prefixes */
};
-__CTASSERT(sizeof(struct nd_opt_rdnss) == 8);
#endif
#ifndef ND_OPT_DNSSL
@@ -92,7 +91,6 @@
uint32_t nd_opt_dnssl_lifetime;
/* followed by list of DNS servers */
};
-__CTASSERT(sizeof(struct nd_opt_dnssl) == 8);
#endif
/* Impossible options, so we can easily add extras */
diff -ru src/privsep-root.c src/privsep-root.c
--- src/privsep-root.c
+++ src/privsep-root.c
@@ -56,8 +56,6 @@
#include "sa.h"
#include "script.h"
-__CTASSERT(sizeof(ioctl_request_t) <= sizeof(unsigned long));
-
struct psr_error
{
ssize_t psr_result;