Commit Graph

609 Commits

Author SHA1 Message Date
fosslinux 6ed2e09f3a 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.
2023-12-15 21:43:19 +11:00
fosslinux 0907cfd073 Add script-generator 2023-12-15 21:41:42 +11:00
fosslinux 93682cbb92 Expand kexec fiwix initramfs 2023-12-15 21:38:09 +11:00
fosslinux 08bd0ef495 Support command execution in kexec linux arg
! means execute the argument as a command
2023-12-15 21:37:27 +11:00
fosslinux cef781a9f6
Merge pull request #343 from fosslinux/coreutils-stat
Build stat for coreutils
2023-12-15 10:36:16 +00:00
fosslinux 829f18d604 Rename sysa.ext2 to fiwix.ext2 2023-12-15 21:35:12 +11:00
fosslinux a0d4598028 Move checksum-transcriber to a subdirectory 2023-12-15 21:35:12 +11:00
fosslinux ddd8c8d380 Move simple-patch into a subdirectory
Add a checksum as well.

Closes #323
2023-12-15 21:35:12 +11:00
fosslinux 341a4681f5 Give kexec-fiwix a version number 2023-12-15 21:35:12 +11:00
fosslinux 73c4985aba
Merge pull request #340 from fosslinux/kaem-improv
Kaem-era improvements
2023-12-15 10:34:55 +00:00
fosslinux acddacbe6d
Merge pull request #337 from fosslinux/tarball-unify
Use Linux headers 4.9.10
2023-12-15 10:34:41 +00:00
fosslinux bb6fda569f Build stat for coreutils as well 2023-12-05 15:53:14 +11:00
fosslinux fc5fc39569 Use (/usr/lib/mes, /usr/include/mes), (/usr/lib, /usr/include)
Mes is now self-contained in;
/usr/lib/mes
/usr/include/mes
/usr/lib/x86-mes

musl adheres to FHS
/usr/include
/usr/lib
2023-11-28 16:56:04 +11:00
fosslinux 1b47720cbc Use uppercase variables in kaem-era
lowercase variables are inconsistent, bring them into line with rest of
live-bootstrap
2023-11-28 16:56:04 +11:00
fosslinux f7c028b588 Nit: simple-patch line length 2023-11-28 16:40:13 +11:00
fosslinux fcaaad8105 Change linux headers to 4.9.10 instead of 5.10.41
Unifies tarball distfiles.
2023-11-28 16:35:41 +11:00
fosslinux 28461d7890 Fix handling of extract 2023-11-28 12:02:50 +11:00
fosslinux fee6175504 Nit: add set -ex to kexec-fiwix 2023-11-28 12:02:19 +11:00
Andrius Štikonas ca2ba18b60 Build simple-patch for rather than hardcoded x86. 2023-11-24 00:58:24 +00:00
Andrius Štikonas f98161581c Update to newer bootstrappable tcc snapshot. 2023-11-19 15:49:59 +00:00
Andrius Štikonas 737bf61a26 Add amd64 and riscv64 checksums. 2023-11-15 09:56:22 +00:00
Andrius Štikonas abb46a27b3 Update to mes-0.25. 2023-11-14 00:37:11 +00:00
Andrius Štikonas aae7c4a672 Update stage0-posix to 1.6.0 2023-11-12 20:31:17 +00:00
Seppo Yli-Olli f9ed2d7a42 Fix Python 2.5.6 for parallel pgen invocation
Backported from 9828b56347.patch
2023-11-07 09:08:34 +02:00
Paul Dersey 184535e2df gcc 13.1.0: don't enable default ssp or pie and remove libssp_nonshared.patch 2023-07-24 10:08:26 -04:00
fosslinux 46d80b8605
Merge pull request #313 from stikonas/meslibc+tcc
Build libc+tcc with mes rather than mes-m2.
2023-07-24 06:29:36 +00:00
Andrius Štikonas 10fd92f9c7 Build libc+tcc with mes rather than mes-m2. 2023-07-23 17:03:32 +01:00
Dor Askayo 2227a2053a Mount a few missing device nodes in chroot bootstrap modes
The gap between the chroot and non-chroot bootstrap modes started in,
7ecad37 because BuildStream's sandbox was missing some device nodes.

With the latest version of buildbox-run-bubblewrap, a few of the
missing devices were made available to BuildStream's sandbox and
there is no longer a need to keep this gap. In fact, compatibilty
with newer BuildStream versions now requires these devices to be
present.

This change also partially reverts d0a5221, which had to remove
/dev/ptmx as a consequence of the aforementioned gap.
2023-07-16 01:41:01 +03:00
Dor Askayo 6276da59cd Avoid exporting base_dir in linux-headers-5.10.41
It's not expected to be used by child processes.
2023-07-14 09:57:18 +03:00
rick-masters 5e5f309db7 Update Fiwix to v1.4.0-lb3 to pull in timestamp improvements and other fixes. 2023-07-06 23:29:37 +00:00
Paul Dersey 5b9fd08dc0 Don't use serial console with bare metal option and user provided kernel 2023-06-19 09:24:55 -04:00
Paul Dersey c61b4afd8a Boot Fiwix and Linux without serial console on bare metal 2023-06-15 11:18:51 -04:00
Andrius Štikonas 914b84377a Update to musl 1.2.4. 2023-06-12 19:31:30 +01:00
Andrius Štikonas f531e1cc5f Remove -nostdlib when linking mes. 2023-06-09 23:22:30 +01:00
Paul Dersey 247b2a2a89 gzip: Regenerate crc table in util.c using makecrc 2023-06-05 10:50:57 -04:00
Paul Dersey 87601931b2 Write simple-patch binary to ${bindir} and remove hard coded paths 2023-06-05 10:50:57 -04:00
Emily Trau a8752029f6 Backport `uniq` fopen patch 2023-05-22 21:30:22 +10:00
rick-masters ef08891401 Convert file size to 32-bit type before writing. 2023-05-21 00:11:37 +00:00
rick-masters 1603b81602 Fix printf calls and use puts when possible. 2023-05-20 15:20:01 +00:00
rick-masters 0d4394aa0d Build kexec-linux later as a package for musl lib calls instead of asm. 2023-05-20 15:16:27 +00:00
rick-masters 8604871997 Pull builder-hex0-x86-stage1 from updated stage0-posix and lint fixes. 2023-05-18 10:59:46 +00:00
rick-masters a2fcf1ced9 Complete the kernel bootstrap by adding kexec of Linux from Fiwix.
A tiny bootloader bootstrap has been added to compile the builder-hex0 kernel from hex0 source.
The boot compiler is builder-hex0-x86-stage1.hex0 and builder-hex0-x86-stage1.bin.
The builder-hex0 kernel is now named builder-hex0-x86-stage2.hex0.
The inclusion of a binary seed resolves the problem with the previous strategy which used an
architecture-specific hex0 compiler.

If sysb detects a full disk (i.e. DISK=sda) it now partitions the disk unconditionally because
previously fdisk was reporting existing but empty partitions which resulted in no
parititions being created.

e2fsprogs is now built with --disable-tls because musl was built on Fiwix without full threading
support and mkfs.ext4 was crashing without disabling thread local storage.

kexec-linux writes the linux kernel and initramfs to a RAM drive on Fiwix which ensure
a pre-allocated contiguous memory block. The following is written to the ram drive:
a 32-bit number which is the size of the kernel in bytes, a 32-bit number which is the size
of the initramfs in bytes, followed by the Linux kernel image, followed by the initramfs.

kexec-fiwix invokes a sync syscall to ensure all writes are flushed to
the ram drive and then initiates the kexec by shutting down Fiwix with a reboot syscall.
Fiwix knows whether and how to perform the kexec based on kernel parameters passed to it.
2023-05-10 14:33:42 +00:00
fosslinux 724c6cca13
Merge pull request #293 from fosslinux/gcc-13
GCC 13
2023-05-10 07:30:40 +00:00
fosslinux aa2d6c4137 Update to GCC 13
The latest version of GCC.

Luckily this allows for a bunch of patches to be dropped - apart from
that, no significant change.
2023-05-09 22:41:45 +10:00
Emily Trau 7a13158e79 Enable additional tools in coreutils-5.0 phase 1
These utilities can be enabled with only a small amount of additional
patches. In particular sort, expr, uniq,and hostname are used by some
./configure.sh scripts.
2023-05-02 23:21:46 +10:00
Andrius Štikonas 7d2a3137dd Use relative paths and variables instead of hardcoding absolute path. 2023-05-01 22:01:13 +01:00
fosslinux d918b984ad
Merge pull request #287 from emilytrau/heirloom-devtools-snprintf
Fix segfault in yacc
2023-05-01 11:35:57 +00:00
Emily Trau 2c0a1d39d9 Fix segfault in yacc
The patch to heirloom-devtool's yacc used sprintf instead of snprintf.
This incompatibility causes a segfault when those code paths are hit.
Fixing this allows yacc to compile more grammars, and may allow some
packages to drop dependency on bison in favor of yacc.
2023-05-01 21:33:15 +10:00
Andrius Štikonas 725522b901 Make sure we pass MES_ARCH and not ARCH to mes. 2023-05-01 11:23:22 +01:00
Andrius Štikonas bd7ad7e8ae Update stage0-posix to pull in newer M2-Planet. 2023-04-30 23:58:31 +01:00