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

Add interactive "configurator" #468

Merged
merged 7 commits into from
May 28, 2024
Merged

Add interactive "configurator" #468

merged 7 commits into from
May 28, 2024

Conversation

fosslinux
Copy link
Owner

@fosslinux fosslinux commented May 12, 2024

This is a more UX-friendly glorified bootstrap.cfg editor. Somewhat inspired by kconfig.

Mostly complete, but WIP still

  • Does NOT run if INTERACTIVE=False. (Should we introduce a different environment variable for this?)
  • No current support for conditional selections of options based upon other options.

Known bugs:

  • validation of string inputs does not currently work
  • ?

Depends on oriansj/M2libc#

@Googulator
Copy link
Collaborator

Did you test if this actually works with kernel bootstrap? At that point, we're still running on builder-hex0, which may not support keyboard input.

@ajherchenroder
Copy link
Contributor

If possible, I would like to see this split out into it's own option. This would allow both an interactive editor and a scripted build that can end in an interactive environment.

@fosslinux fosslinux marked this pull request as ready for review May 26, 2024 11:06
@fosslinux fosslinux changed the title WIP Add interactive "configurator" Add interactive "configurator" May 26, 2024
@fosslinux
Copy link
Owner Author

I'm a fair bit more happy with the state of this now. It works under builder-hex0, at a later stage, and doesn't run if you do use rootfs.py to generate a complete bootstrap.cfg file. There is a separate variable toggling use of configurator.

I believe that perhaps this may have pushed Fiwix over the ramdisk size as far as I can tell, but retesting that now. Planning to do a little bit more testing but would appreciate re-reviews at this point.

Copy link
Collaborator

@Googulator Googulator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good now, thanks.

if (kernel->sysname == NULL) {
no_input(head);
return 0;
} else if (strcmp(kernel->sysname, "Linux") != 0 && strcmp(kernel->sysname, "Fiwix") != 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there's a more future-proof way of detecting builder-hex0, that won't come back to bite us when we try to bootstrap on e.g. Hurd or macOS.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked briefly for any key features of builder-hex0 that make it detectable, but it appears to be fairly silent on its existence - which kind of is a good thing I guess!

Either way, we'll have to modify the checks at some point; either for stage0-uefi, or for other kernels live-bootstrap can be run on.

fosslinux added 6 commits May 28, 2024 21:57
There isn't really any reason to use gzip instead of bzip2 for the Linux
initramfs/kernel, since we have it!

Saves a few MB (~13MB as far as I can tell)
We need just a couple more MB for configurator to be added!
The tolerances are *very* tight now...
This is a more UX-friendly glorified bootstrap.cfg editor.
Somewhat inspired by kconfig.
@fosslinux fosslinux merged commit e1cc519 into master May 28, 2024
7 checks passed
@fosslinux fosslinux deleted the configurator branch May 28, 2024 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants