This is needed to make the monitoring/recovery shell on tty2 work,
as the default console is tty0, which will just print to whichever
virtual console is active at the moment, making the shell unusable.
We spawn a shell:
- When Bash is first built, on tty2. This shell uses the old Bash,
so interactive mode needs to be emulated using redirection. Thus,
entering commands needs to be done using Enter followed by Ctrl+D,
and certain redirection features are unavailable.
- After moving the system to disk, on tty2. Old Bash, same limitations.
- After 2nd Bash is built, on tty3. This is a fully functional shell.
This is disabled in chroot-like bootstrap modes, or when -i is not set.
`mke2fs` has a `-d` option that allows to populate the newly created filesystem without needing to temporarily mount it. That allows to use `parted` and `mkfs.ext3` on regular files without needing root access.
Before the simplify refactor, the convention was to name the first
or default build script "<package name>.sh". The refactor changed
this default to "pass1.sh", with "pass2.sh" and so on used for
subsequent passes. This wasn't an issue when building usig scripts
generated by script-generator (which explicitly declares the build
script to use), but broke running "build <package name>" without
an explicit script name from the post-bootstrap bash prompt.
By deriving the script name from the current revision/pass number,
this commit restores that functionality.
An unfortunate blemish is that we number build scripts from 1, but
repo tarballs from 0 - it would be nice to standardize on a single
indexing convention.
When renaming using_bash to bash_build, I accidentally removed the
+ sign from the assignment, causing bash_build > 1 to never match,
resulting in old-style Ctrl+D traps even in the new Bash.
This patch restores the intended += behavior.
Before the simplify refactor, the convention was to name the first
or default build script "<package name>.sh". The refactor changed
this default to "pass1.sh", with "pass2.sh" and so on used for
subsequent passes. This wasn't an issue when building usig scripts
generated by script-generator (which explicitly declares the build
script to use), but broke running "build <package name>" without
an explicit script name from the post-bootstrap bash prompt.
By deriving the script name from the current revision/pass number,
this commit restores that functionality.
An unfortunate blemish is that we number build scripts from 1, but
repo tarballs from 0 - it would be nice to standardize on a single
indexing convention.
This ends the reliance on the precompiled stage1 image in ootstrap-seeds,
and the locally committed copy of the stage2 hex0 code. Instead, both
stages are taken from the new builder-hex0 submodule, with stage1 compiled
by generator.py on the fly. The local copy of stage2 is dropped.
This way, updating to a newer builder-hex0 becomes much easier: just update
the submodule.