For further RAM savings, we want to create sysb -without- having linux
tarball extracted at the same time. To accomplish this, we move the
gen_init_cpio + related script out of the tree and create it afterward.
Also use hard links to free up some more space.
- Add parts.rst documentation for Linux kernel.
- Completely fix problems caused by new bootstrap, update checksums for
/usr.
- Globalise populate_device_nodes.
- Enable deblobbing.
- We do not use latest 4.9.x because it relies on a new version of
binutils, while older versions do not. (Note: we should be able to go
a bit newer but I didn't bother testing >50 versions to figure this
out).
- We do not use newer kernel versions because they require one or more
of (new perl, new binutils, new make, new gcc, new bison, new tar).
- sysb and sysc are updated to use the SATA (libata) subsystem (aka sda)
instead of IDE-emulating SATA subsystem (aka hda) which is now
available to us.
- While theoretically according to docs 4.9 should work OOTB with our
version of binutils this is not the case, so we have to do a bit of
(interesting) patching. But this does not break anything.
- Thankfully serial support in 4.9 is not screwed over like it is in 2.6
so we can revert to that.
- 4.9 has the linux-libre project at our disposal, instead of gNewSense.
So we use this. Unfortunatley that takes forever because we have to
use sed because our version of gawk is too old/buggy. :( I plan to
introduce very shortly 1. parallelism 2. 'sysc snapshot' which will
start from sysc to avoid this. I do not want to use linux-libre
tarballs because they make modificiations directly from this script
(aka not easily verifiable, use the source!) and this script allows
for much greater flexibility.
- We compile the initramfs ahead-of-build using the in-tree cpio
generator instead of also building cpio to use less packages. We do
NOT build the initramfs into the kernel like 2.6 (unsupported).
- Oh and fix a kexec-tools checksum.
Now that we have the Linux Kernel built, we move to a full-disk (rather
than initramfs) setup in sysc. However, we cannot assume the seed kernel
has support for mounting hard drives. So, first we need to kexec into
sysb, which is used as a jumping off point to create the hard drive for
sysc.
Additionally, since 2.6.16 does not have support for on-demand initramfs
(initramfs must be built into kernel), we will have to rebuild the linux
kernel within sysb without the initramfs.
All of this process is not performed for chroot mode. Instead, we skip
sysb and jump straight to sysc, copying over appropriate data.
The python scripts have been changed slightly. Each sys* inherits
SysGeneral, which contains various functions which are not specific to
any sys* and simplifies those files. rootfs now also handles sysb and
sysc.
bootstrap.cfg also gives an indication whether we are running in a
chroot to avoid attempting to kexec/mount within a chroot.
This fixes an issue with printf not printing doubles or floats
correctly, and probably other subtle issues.
tcc-musl also uses floats extensively, so rebuild it as well, to fix
some other potential issues.
Update checksums for all resulting binaries which have now changed.
Co-authored-by: fosslinux <fosslinux@aussies.space>
1. Adds sha256sum stage to the bash build harness.
2. Adds a third argument to build(), the checksum file name. This is
used where there is more than one checksum file, most notably
in multi-stage compilations.
3. Adds checksum files to all remaining programs.
4. Adds appropriate 3rd argument where needed (coreutils, tcc-musl,
bison).
Unfortunatley the sha2 project does not have versioned releases so we
use the latest commit.
We have also manually added a frontend to sha-2 to allow us to invoke
it from the command line, thanks bittrof for the help!