Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kkarhan opened this issue Dec 11, 2023 · 15 comments
Assignees
Labels
blocked blocked by another issue enhancement New feature or request help wanted Extra attention is needed question Further information is requested

Comments

@kkarhan
Copy link
Contributor

kkarhan commented Dec 11, 2023

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 kkarhan added enhancement New feature or request help wanted Extra attention is needed question Further information is requested labels Dec 11, 2023
@kkarhan kkarhan added this to the OS/1337 "Core" Edition milestone Dec 11, 2023
@kkarhan kkarhan self-assigned this Dec 11, 2023
@kkarhan kkarhan removed their assignment Dec 11, 2023
@kkarhan kkarhan moved this from Todo to Backlog in OS/1337 "CORE" Edition Dec 12, 2023
@kkarhan kkarhan moved this from Backlog to Todo in OS/1337 "CORE" Edition Dec 12, 2023
@kkarhan
Copy link
Contributor Author

kkarhan commented Dec 12, 2023

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

@kkarhan kkarhan moved this from Todo to blocked in OS/1337 "CORE" Edition Dec 12, 2023
@kkarhan
Copy link
Contributor Author

kkarhan commented Dec 13, 2023

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

@kkarhan kkarhan moved this from blocked to Backlog in OS/1337 "CORE" Edition Dec 13, 2023
@kkarhan kkarhan moved this from Backlog to blocked in OS/1337 "CORE" Edition Dec 13, 2023
@kkarhan kkarhan added the blocked blocked by another issue label Dec 15, 2023
@kkarhan kkarhan changed the title Boot: Alternative to syslinux - saving up to ~200kB of space. Boot: "CORE" Edition: Alternative to syslinux - saving up to ~200kB of space on FDDs. Dec 17, 2023
@kkarhan kkarhan moved this from blocked to Backlog in OS/1337 "CORE" Edition Dec 20, 2023
@kkarhan
Copy link
Contributor Author

kkarhan commented Dec 20, 2023

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
Copy link
Contributor Author

kkarhan commented Dec 21, 2023

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
Copy link
Contributor Author

kkarhan commented Dec 22, 2023

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

@kkarhan kkarhan moved this from Backlog to blocked in OS/1337 "CORE" Edition Dec 22, 2023
@kkarhan kkarhan self-assigned this Dec 22, 2023
@landley
Copy link

landley commented Dec 23, 2023

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
Copy link
Contributor Author

kkarhan commented Dec 27, 2023

@landley thanks for the hint.

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

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

@kkarhan
Copy link
Contributor Author

kkarhan commented Jan 25, 2024

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 added a commit that referenced this issue Jan 25, 2024
…the initramfs.cpio.xz into bzImage [aka. initrd into linux kernel]...

- See [issue #10](#10 (comment)) for details.

Signed-off-by: kkarhan <[email protected]>
@kkarhan kkarhan moved this from blocked to In Progress in OS/1337 "CORE" Edition Mar 12, 2024
@kkarhan
Copy link
Contributor Author

kkarhan commented Mar 12, 2024

I backed up mlb by forking it....

kkarhan added a commit that referenced this issue Mar 12, 2024
…0 (comment)) so that space can be reclaimed necessary to make the "CORE Edition" work.

- See [Issue #10](#10) for details.
@kkarhan
Copy link
Contributor Author

kkarhan commented Mar 12, 2024

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

@sweetaibelle
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor Author

kkarhan commented Mar 30, 2024

yeah, I've to fix that...

kkarhan added a commit that referenced this issue Jul 3, 2024
…``syslinux```] from packages.list.tsv to reflect project changes.

- See [ #10 ]( #10 ) why Syslinux needed to be replaced with something smaller, sleeker and less bloated.
@kkarhan
Copy link
Contributor Author

kkarhan commented Aug 7, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked blocked by another issue enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects
Status: In Progress
Development

No branches or pull requests

3 participants