OS-1337 / OS1337

OS/1337 Project
https://os1337.com
Other
19 stars 1 forks source link

Boot: "CORE" Edition: Alternative to syslinux - saving up to ~200kB of space on FDDs. #10

Open kkarhan opened 9 months ago

kkarhan commented 9 months ago

As @landley pointed out, syslinux has perl as dependency and as per observation is consuming quite a lot of space.

So far, thanks to @sweetaibelle the following options are on the table:

Options I've disregarded after looking into:


So far mlb and tfl look promising even tho they'll require merging the initramfs.cpio.xz with the kernel into one file, thus complicating things.

kkarhan commented 9 months ago

OFC embedding the initramfs.cpio.xz is perfectly possible and if it should work with mlb and tfb...

kkarhan commented 9 months ago

blocked by:

as dependencies

kkarhan commented 9 months ago

FACT: the CORE version targets i486SX and up booting a 1.440 kB 3,5" FDD via BIOS/MBR, not UEFI/GPT !

kkarhan commented 9 months ago

Will have to see if mlb aka. Minimal Linux Bootloader or tfbaka. Tiny Floppy Bootloader will work and how much of a pain it is to do embed the initramfs.cpio.xz into the bzImage of the Kernel using CONFIG_INITRAMFS_SOURCE...

kkarhan commented 9 months ago

Considering the fact that the core Edition doesn't really do multi-user or multi-boot setups, the lack of multi-boot support is acceptable.

As for that - and support from being booted via USB I think refering to Ventoy as a easy-to-setup syslinux "distribution"...

After all, the big advantage of OS/1337 is that at it's current form it's entirely run from RAM after being loaded, which makes it a really nifty option already.

kkarhan commented 8 months ago

I've asked the maintainer of mlb if they were interested in adding initramfs support to their bootloader...

landley commented 8 months ago

In theory you can point CONFIG_INITRAMFS_SOURCE="/path/to/file.cpio.xz" and it will use it directly. But note that it cares about the name: it has to have .cpio in it, and if it's not .cpio.something it will try to compress it again. See usr/Makefile in the kernel source, line 30 or so.

kkarhan commented 8 months ago

@landley thanks for the hint.

And yes, you are correct down to the line...

I've to take a closer look then...

kkarhan commented 7 months ago

Integrating the initramfs into the Kernel at build time will be required.

Meaning that all the userspace tools including toybox must be built and integrated into the initramfs.cpio.xz before building the kernel...

That will require changing the build order as per Build Scripts...

kkarhan commented 6 months ago

I backed up mlb by forking it....

kkarhan commented 6 months ago

At worst I could just statically pull the release I made tho that would be a an ugly hack.

sweetaibelle commented 5 months ago

A few notes: In build.sh, ./pkgs/make-minimal-filesystem.sh actually creates the working directory that most of the other scripts use, so should be called first. You're also calling ./pkgs/make-mlb.sh in build.sh, but the actual filename is ./pkgs/build-mlb.sh (I also think that I'm calling sudo in a lot of places I shouldn't be, but given the scripts are broken at the moment, couldn't really test...)

sweetaibelle commented 5 months ago

Check the sb-dev branch which I think is most of the way there, with mldinstall actually building, though it's not being called with the right arguments.

kkarhan commented 5 months ago

yeah, I've to fix that...

kkarhan commented 1 month ago

I guess with the switchover to mlb should fix most, tho I did encounter an issue with that so I guess something with the initramfs.cpio.xz file went wrong as it's shown to be 1,6kB, which can't be right...

Bildschirmfoto vom 2024-08-07 15-29-47