This was removed as part of the simplify refactor, severely slowing
down qemu and bare-metal builds. Restoring it brings us back to the
same build times that we saw before the refactor.
Perform variable substitution at runtime, rather than at generation
time. This way, if bootstrap.cfg changes after update_env, the new
values there take effect immediately.
This adds a new flag, -i / --interactive, which enables opening a
Bash prompt whenever something goes wrong in the bootstrap. This is
highly useful when developing or debugging live-bootstrap, but it
needs to be off by default, for use in automated processes.
In the future, asking for variables at runtime could (and perhaps
should) also be gated behind this flag.
* Enable additional hardware drivers in Linux for better bare metal
display, network & input device compatibility
* Disable ATA-over-Ethernet support, because it spams the network
with unnecessary packets, is basically useless for bootstrapping,
and may even be a security risk
* Increase Fiwix initrd size to 1280MB to fit a larger Linux build
* Make the Fiwix kexec size configurable the same way as initrd
(and reduce from 280MB to 256MB which is sufficient in my testing)
* Use a more conservative memory map for Fiwix & Linux
* Boot Linux with consoleblank=0 on bare metal, so the build won't
go blind after 5 minutes
* Support kexec-fiwix with interrupts disabled (will be useful later
when builder-hex0 is updated)
* Use -S32 -H64 --force to trick sfdisk into allowing MiB-aligned
partitions on a drive that reports a CHS geometry
* Explicitly create partition at sector 2097152 (=1GiB)
* Force mkfs.ext4 to overwrite any existing filesystem it might find
* Wait up to 2 minutes for the disk to become readable (especially
USB drives often show up with a delay)
With this, finalize_fhs.sh can be rerun as needed, e.g. when rebooting.
Also, the preferred nameserver will persist after DHCP.
Thanks to devtmpfs, we no longer need to manage /dev once Linux is up.
There is nothing temporary about our "tmpdir" - its sole purpose is to
contain the final product of the bootstrap process. Thus, removing it
at the end of bootstrap amounts to doing the entire process for nothing.
To remedy this, --tmpdir is renamed --target, keeping the -t short form,
and defaulting to "target" instead of "tmp" to make its purpose clearer.
The --preserve option is removed, as the target is now always preserved.