live-bootstrap/sysa/e2fsprogs-1.45.7/e2fsprogs-1.45.7.sh
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

46 lines
1.1 KiB
Bash
Executable file

# SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: GPL-3.0-or-later
src_prepare() {
default
# Get UTF txt files
cp ../*.txt .
# Rebuild libtool files
rm config/config.guess config/config.sub config/ltmain.sh
libtoolize -i
AUTOMAKE=automake-1.10 ACLOCAL=aclocal-1.10 AUTOCONF=autoconf-2.64 AUTOM4TE=autom4te-2.64 autoreconf-2.64 -fi
# Remove bison parser generated
rm intl/plural.y
# Setup for regeneratation of lib/ext2fs/utf8data.h
rm lib/ext2fs/utf8data.h
# Fix compile_et
sed -r -i "s/ > ?outfile//" lib/et/et_c.awk lib/et/et_h.awk lib/ss/ct_c.awk
# Disable int
sed -i "s/@LIBINTL@//" MCONFIG.in
}
src_configure() {
./configure --prefix="${PREFIX}" \
--sbindir="${PREFIX}/bin" \
--disable-tls \
with_udev_rules_dir=no \
with_systemd_unit_dir=no
}
src_compile() {
# Regen utf8data
make -C util mkutf8data
util/mkutf8data -o lib/ext2fs/utf8data.h
# Why does mkutf8data generate something not usable by build?
sed -i "s/nfkdi/nfdi/g" lib/ext2fs/utf8data.h
default
}