Commit Graph

135 Commits

Author SHA1 Message Date
Andrius Štikonas c22e3dac66 Fix a typo in CFLAGS variable name. 2024-04-28 00:38:38 +01:00
Andrius Štikonas 0e6133eed2
Merge pull request #464 from Googulator/grub-reproducibility
Drop non-reproducible manpage from Grub package
2024-04-20 15:19:09 +01:00
Gábor Stefanik 8c67b9ee9c Drop non-reproducible manpage from Grub package
This embeds the type of the building system's firmware at build time,
causing different checksums on UEFI vs BIOS machines.

Fixes #463
2024-04-19 00:19:29 +02:00
Andrius Štikonas 71253f7f8c Remove patch that is no longer needed.
This fixed some issues with weak symbols but now tcc is properly patched.
2024-04-18 21:28:39 +01:00
Gábor Stefanik c73d8c9dc1 Add extension mechanism to execute .sh files dropped in /steps/after
These are executed at the end of the bootstrap, if /steps/after exists.
In interactive mode, they run before the interactive prompt is displayed.
2024-04-16 20:53:52 +02:00
Gábor Stefanik 7f08661b6c Fix a missed amd64 checksum 2024-04-16 10:16:51 +02:00
Gábor Stefanik aa3d36b934 Update checksums for x86, amd64 & riscv64
Also, add missing non-x86 checksums for simple-patch.
2024-04-16 00:24:44 +02:00
Gábor Stefanik e08f655cd6 Rebuild pregenerated files in nyacc 2024-04-15 22:11:44 +02:00
Gábor Stefanik c0494d9af8 Fix build of bash with mes-0.26
Since rename.c is now included in meslibc, we need -DHAVE_RENAME.
2024-04-15 22:11:44 +02:00
Gábor Stefanik 70fdbebd9c Upgrade mes to 0.26
This can successfully build a working tcc-mes, but then fails
creating unified-libc.c for subsequent tcc bootstrapping.
2024-04-15 22:11:39 +02:00
Andrius Štikonas 281f6e44d9
Merge pull request #455 from Googulator/linux-openela
Upgrade kernel to 4.14.341-openela
2024-04-15 19:41:59 +01:00
Googulator a5a689c954
Merge pull request #457 from fosslinux/byacc
Move heirloom lex and flex after musl, replace heirloom yacc with byacc
2024-04-15 10:17:13 +02:00
Gábor Stefanik 0c718aeece Update checksums for heirloom yacc -> byacc change 2024-04-15 02:17:59 +02:00
Gábor Stefanik 25443468ee Add files.bootstrapping.world mirrors for all Savannah snapshots 2024-04-15 02:11:05 +02:00
Gábor Stefanik e2a1df94a5 Add licensing information to byacc's makefile
This makefile was included in the byacc distribution as Makefile.old
It was slightly updated to fit our needs.

Berkeley yacc itself is in the public domain, but SPDX/REUSE provides
no good way to represent this. In keeping with that spirit, I chose
CC0 as the license for my modifications, which SPDX can represent.
2024-04-15 01:43:20 +02:00
Gábor Stefanik 02fb689ce1 Move heirloom lex and flex after musl, replace heirloom yacc with byacc
This way, heirloom-devtools is only linked to a libc with a CDDL-compatible
license, making it fully redistributable. Heirloom yacc doesn't work properly
with musl libc, but luckily byacc can do its job just fine, so we only need
heirloom lex now.

Thanks to the more complete libc, and bash being available, heirloom's
bootstrap is significantly simplified.
2024-04-15 01:22:50 +02:00
Gábor Stefanik 6567973a04 Make byacc actually work when compiled against meslibc
This replaces the previous sed hackery with a proper patch, and removes
a few more libc functions that meslibc is missing.
The binary name is changed to "byacc" so it doesn't get overwritten by
heirloom yacc.

The bsearch() replacement code comes from an earlier version of byacc.
2024-04-14 21:14:04 +02:00
Googulator 5ae504cb67
Merge pull request #453 from Googulator/openssl-upgrade
Upgrade OpenSSL to 3.0.13
2024-04-14 06:46:37 +02:00
Gábor Stefanik 3970ee7d1a Add byacc parser generator
This is meant to replace heirloom yacc for compiling pre-musl parsers.
Unlike heirloom yacc, it's in the public domain, and can be linked with
meslibc without licensing concerns.
2024-04-14 05:51:30 +02:00
Gábor Stefanik c75d609cf7 Upgrade kernel to 4.14.341-openela
This is a continuation of the 4.14 series by the Open Enterprise Linux
Alliance, ostensibly to the same maintenance standards as the now
discontinued kernel.org LTS.

This code is primarily offered as a Git repository, with gz tarballs
also available, but no xz versions. Switching back to a gzipped version
of the kernel source code would introduce too much srcfs growth, so we
use the last kernel.org tar.xz release (4.14.336), and apply OpenELA's
changes using a patch generated from the Git repository.
2024-04-14 05:04:24 +02:00
Gábor Stefanik 89a4d18ff0 Support multiple mirrors for each source file
If multiple URLs are entered in a sources listing for the same file,
each will be tried in turn, until either one succeeds, or we fail
having run out of mirrors.
2024-04-14 00:17:41 +02:00
Gábor Stefanik 6017ae7a9f Add extra source URL for OpenSSL 3.0.13, to account for it being moved in the future
This will only be useful after #454 is merged.
2024-04-14 00:13:20 +02:00
Gábor Stefanik 637fa823f0 Upgrade OpenSSL to 3.0.13
Fixes #451
2024-04-13 23:43:41 +02:00
fosslinux 2261098f98
Merge pull request #445 from fosslinux/check-substitutes
Check "substitutes"
2024-02-24 09:37:32 +00:00
fosslinux 021574d2a9 Change diffutils-2.7 back to upstream gz tarball
The bz2 tarball we were using is a complete repack of the tarball,
including date & permission modifications. It adds an extra file
RPI-Configure too. This is not optimal as it impedes verification
ability.
2024-02-20 09:53:22 +11:00
Gábor Stefanik 60ec9ea80c Update Linux kernel configuration & patches
This updates the Linux kernel configuration, removing irrelevant
networking-related components, and switching framebuffer drivers to
the DRM-based ones. With this, we can finally bootstrap on systems
with newer NVIDIA cards, which would green screen with the nvidiafb
driver.

KVM is still disabled, see #443 - VIRTUALIZATION is also disabled,
as it's useless without KVM or any other suboption being enabled.

Additionally, we can now drop the bad-asm patch, since our newer
binutils has no problem supporting that syntax, and it doesn't look
quite innocuous to me, removing an offset from a memory access.

The kernel is now built in 2 stages: first, we build vmlinux only,
then, after cleaning up any intermediate .o files (except the ones
needed to build efistub), we convert it to a bzImage. This required
some creative use of the -o option to convince Make not to rebuild
all of the .o files we've just deleted as dependencies.
2024-02-18 17:54:25 +01:00
Gábor Stefanik ee3ab501da Add rootwait to grub command line to fix USB boot failures
Without this, one of my boards fails to reboot from USB drive due to
slow USB enumeration. Rootwait is not needed during the Fiwix -> Linux
jump, because we use an initramfs there, and the init scripts already
wait for USB drives to show up. Linux->Linux kexec, used with a custom
early kernel, might need it, so add it there as well to be safe.
2024-02-18 17:52:33 +01:00
Gábor Stefanik 11d3605b08 Upgrade Linux kernel to 4.14.336
This is the last LTS version buildable using GCC 4.0.x. The next one,
version 4.19, requires at least GCC 4.6.

Fortunately, this is also the first version of the Linux kernel
without firmware blobs being included in /firmware, so the FSFLA
deblob scripts aren't needed anymore to ensure a fully auditable
kernel - the 3 remaining drivers that do include blobs masquerading
as source code are removed via a patch, avoiding all the other side
effects of the deblob scripts.
This doesn't compromise the trustworthiness of the bootstrapped
environment, since all the other drivers deblob would remove use
the firmware loader mechanism, which does nothing when the actual
firmware blobs aren't installed on the system separately. Features
dependent on firmware still won't work, but many drivers that load
firmware do so only optionally. This includes r8169, the driver for
the Realtek gigabit NICs found on many x86 motherboards.

This kernel is considerably larger than 4.9.10, and we build more
of it (including drivers that would previously get stripped away by
the deblob script, such as r8169), so to accommodate that, Fiwix
initrd size is increased by 64MiB, while lowering kexec space by
the same amount to ensure enough userspace memory available in Fiwix.
Fiwix's maximum open file count is also bumped from 1.5K to 2.5K.

The Documentation folder is deleted before build, to further save
space in the ramdisk.
2024-02-17 15:37:33 +01:00
Gábor Stefanik 32138d13b9 Clean pre-Bash build artifacts before building the Linux kernel
All of these are archived, in a compressed form, in base.tar.bz2.
2024-02-17 15:32:02 +01:00
Gábor Stefanik 4e0a0f03dd Capture everything built before the repo system in a base tarball
Parts built before bash and the repo system are available aren't
stored in a clean repository tarball, so if any early file is
overwritten, it's lost. Fix this by creating a base.tar.bz2 right
after the repo is set up, to hold reference copies of early files.
This tarball isn't checksummed, since it varies considerably with
bootstrap options, but the binaries inside are protected by their
own checksums.
2024-02-17 15:32:02 +01:00
Gábor Stefanik 7dc9ebc71d Improve hygiene of kaem build scripts 2024-02-17 15:32:02 +01:00
fosslinux 9c1ae45bb8
Merge pull request #436 from Googulator/xz
Support early xz/lzma decompression, and use it wherever possible
2024-02-15 07:51:13 +00:00
Gábor Stefanik 4bc54d83cb Allow grub to autodetect screen resolution
With this, systems without a supported non-vesa FB driver in Linux
(such as Intel integrated graphics) get full resolution after reboot.
2024-02-14 16:02:28 +01:00
Gábor Stefanik 65953732a0 Support early xz/lzma decompression, and use it wherever possible 2024-02-14 14:34:16 +01:00
Gábor Stefanik f2aee4758e Use e820 memory map from BIOS, if available 2024-02-12 13:34:30 +01:00
Gábor Stefanik 9e4c17b68d Pass parameters to make_fiwix_initrd and kexec-fiwix
This extends make_fiwix_initrd and kexec-fiwix to support command
line parameters, instead of hardcoding relevant values within the
C sources. This way, it becomes possible to alter e.g. ramdisk size
without affecting checksums.

While we're at it, also support loading a memory map from file.
2024-02-12 13:34:00 +01:00
fosslinux bbb96a52d6
Merge pull request #432 from Googulator/fiwix-filelist-must-die
Replace Fiwix filelist with parsing builder-hex0's FS structures
2024-02-08 00:48:43 +00:00
fosslinux 54068851d8
Merge pull request #434 from fosslinux/m4
M4 alternative update
2024-02-07 22:11:58 +00:00
fosslinux 61cb7edf91
Merge pull request #435 from Googulator/grub
Fix typo in make_bootable.sh causing failure to reboot
2024-02-07 22:11:47 +00:00
fosslinux 6b4ec19e19 Add m4 1.4.19 2024-02-07 20:35:22 +11:00
fosslinux 068f7d8f40 Fix diffutils manpage reproducibility 2024-02-07 20:22:10 +11:00
Gábor Stefanik 009ec57835 Fix typo in make_bootable.sh causing failure to reboot 2024-02-06 19:22:35 +01:00
Gábor Stefanik 5945bdc1e8 Replace Fiwix filelist with parsing builder-hex0's FS structures
And while we're at it, use a more sustainable way of getting the
address of the next file to be written to.

Since builder-hex0 doesn't distinguish directories from zero-length
files, this has a limitation that it won't copy any zero-length
files or empty directories. Only one such file is important for the
bootstrap process (mes/config.h), which is recreated using an
improve step.
2024-02-06 12:30:24 +01:00
fosslinux ba9d182471 Revert "Update m4 to 1.4.10"
This reverts commit 6d8cf14998.
2024-02-06 18:06:46 +11:00
fosslinux 49f5520143
Merge pull request #429 from fosslinux/gawk
Add gawk 5.3.0
2024-02-06 07:06:16 +00:00
Gábor Stefanik d50ecd58e8 Improve pseudo-interactive prompts using the early bash
By wrapping $(cat) in an eval, redirections and other advanced
syntax can now work in the early prompts.
Also, since "set -E" is broken is the early bash, fall back to
using "set -e" and an EXIT trap, until we can upgrade to a bash
version that already has working "set -E", or perhaps backport
it to 2.05b.
2024-02-05 10:02:34 +01:00
fosslinux ffbdd8bc18 Add gawk 5.3.0 2024-02-05 18:51:49 +11:00
fosslinux 10d2a72d16
Merge pull request #415 from Googulator/grub
Support reboot in non-chroot modes using grub and an init script
2024-02-05 07:50:36 +00:00
Andrius Štikonas 50947ca61e Fix Fiwix file list and diffutils checksum.
Thanks to Googulator for spotting these.
2024-02-04 18:46:05 +00:00
Gábor Stefanik 6d26855dc6 Support reboot in non-chroot modes using grub and an init script
We use grub-2.06 as 2.12 has some packaging issues, and can't be
built in live-bootstrap for now.
2024-02-04 16:54:13 +01:00