[block] Allow for additional SAN boot parameters alongside filename

The drive specification alone does not necessarily contain enough
information to perform a SAN boot (or local disk boot) under UEFI.  If
the next-stage bootloader is installed in the EFI system partition
under a non-standard name (e.g. "\EFI\debian\grubx64.efi") then this
explicit boot filename must also be specified.

Generalise this concept to use a "SAN boot configuration parameters"
structure (currently containing only the optional explicit boot
filename), to allow for easy expansion to provide other parameters
such as the partition UUID or volume label.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2024-03-05 20:20:10 +00:00
parent b1c13cc43e
commit 636ccb4ca5
8 changed files with 45 additions and 23 deletions

View File

@@ -95,11 +95,11 @@ static void dummy_san_unhook ( unsigned int drive ) {
* Boot from dummy SAN device
*
* @v drive Drive number
* @v filename Filename (or NULL to use default)
* @v config Boot configuration parameters
* @ret rc Return status code
*/
static int dummy_san_boot ( unsigned int drive __unused,
const char *filename __unused ) {
struct san_boot_config *config __unused ) {
return -EOPNOTSUPP;
}

View File

@@ -38,7 +38,7 @@ static void null_san_unhook ( unsigned int drive __unused ) {
}
static int null_san_boot ( unsigned int drive __unused,
const char *filename __unused ) {
struct san_boot_config *config __unused ) {
return -EOPNOTSUPP;
}