NetBSD-SoC: GPT aware boot loader &mdash TODO list
Update documentation. Man pages:
boot(8), boot.cfg(5), fdisk(8), gpt(8), installboot(8).
The boot(8) have memory leak somewhere, likely at exec_netbsd().
When the boot(8) tries to boot kernel many times it can end up
with memory allocation problem (heap full error). Perhaps it isn't
relevant to my GPT code, but needs checking (and preferably fixing).
The boot2() should accept 64-bit LBA. A 1st stage loader will
patch boot(8) magic (set very high bit) to tell boot(8) that
64-bit LBA is passed. The biosboot.S should handle that (currently
it just ignores high 32 bits of boot partition address so should
working fine with any partition below 2TiB limit).
Implement new boot device naming scheme for boot(8): hd[0-9]gpt[0-9]+.
Thus the boot(8) can access all 128 GUID partitions; hd[0-9][a-z]
should still address first 26 partitions.
Include mbr_gpt into distribution.
Review the code and eliminate all introduced XXX places.
Post it for public review.
Other items (for future)
gpt(8) biosboot command should be expanded to support other
selector options (like -b and -s). Also, it have somewhat fuzzy
logic about boot device selection. Perhaps new -v flag and
output similar to the installboot(8) should solve it.
All other 1st stage loaders (except bootxx_fat16) should be
adjusted to pass 64-bit LBA to boot(8).
Currently only the fatboot.S can be used as primary loader.
Include GPT loader into sysinst.
Known bugs, limitations, and caveats
fatboot.S (bootxx_fat16) can not be used on a partition that
crosses a 2TiB boundary. The higher 32 bits of LBA are not
automatically adjusted on overflows at low 32 bits. Cause
— no space in fatboot.S to implement this.
fatboot.S is passing boot parameters different from
struct x86_boot_params, so some features like serial
console are not available. As workaround it's proposed to pass
all necessary parameters via boot.cfg.