Signed-off-by: Ian Kelling ian@iankelling.org --- src/boot.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/boot.c b/src/boot.c index ff705fd..ca64595 100644 --- a/src/boot.c +++ b/src/boot.c @@ -91,14 +91,14 @@ glob_prefix(const char *glob, const char *str) } }
-// Search the bootorder list for the given glob pattern. +// Search the bootorder glob list for the given device description static int -find_prio(const char *glob) +find_prio(const char *desc) { - dprintf(1, "Searching bootorder for: %s\n", glob); + dprintf(1, "Searching bootorder for: %s\n", desc); int i; for (i = 0; i < BootorderCount; i++) - if (glob_prefix(glob, Bootorder[i])) + if (glob_prefix(Bootorder[i], desc)) return i+1; return -1; }
Dear Ian,
Am 14.05.2018 um 05:12 schrieb Ian Kelling:
Signed-off-by: Ian Kelling ian@iankelling.org
src/boot.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/boot.c b/src/boot.c index ff705fd..ca64595 100644 --- a/src/boot.c +++ b/src/boot.c @@ -91,14 +91,14 @@ glob_prefix(const char *glob, const char *str) } }
-// Search the bootorder list for the given glob pattern. +// Search the bootorder glob list for the given device description static int -find_prio(const char *glob) +find_prio(const char *desc) {
- dprintf(1, "Searching bootorder for: %s\n", glob);
- dprintf(1, "Searching bootorder for: %s\n", desc); int i; for (i = 0; i < BootorderCount; i++)
if (glob_prefix(glob, Bootorder[i]))
}if (glob_prefix(Bootorder[i], desc)) return i+1; return -1;
Very nice, but please also update the documention.
Kind regards,
Paul
Paul Menzel pmenzel@molgen.mpg.de writes:
Very nice, but please also update the documention.
Thanks. I'm usually good about docs, late Sunday night oversight I guess. I'll submit a new patch version within a day or two.
On Sun, May 13, 2018 at 11:12:07PM -0400, Ian Kelling wrote:
Signed-off-by: Ian Kelling ian@iankelling.org
src/boot.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/boot.c b/src/boot.c index ff705fd..ca64595 100644 --- a/src/boot.c +++ b/src/boot.c @@ -91,14 +91,14 @@ glob_prefix(const char *glob, const char *str) } }
-// Search the bootorder list for the given glob pattern. +// Search the bootorder glob list for the given device description static int -find_prio(const char *glob) +find_prio(const char *desc) {
- dprintf(1, "Searching bootorder for: %s\n", glob);
- dprintf(1, "Searching bootorder for: %s\n", desc); int i; for (i = 0; i < BootorderCount; i++)
if (glob_prefix(glob, Bootorder[i]))
return -1;if (glob_prefix(Bootorder[i], desc)) return i+1;
}
Thanks, but I don't think this is correct. The idea is that the user will pass a bootorder list, and that SeaBIOS will see if the devices it finds match that list. So, the SeaBIOS code generates the globs, and the user generates the actual device names.
This was done that way because QEMU generates and passes a bootorder list to SeaBIOS. QEMU will generate the actual device names, but SeaBIOS generally doesn't have enough information to generate the full device names. So, SeaBIOS globs the QEMU generated device names to find a match.
-Kevin
Kevin O'Connor kevin@koconnor.net writes:
On Sun, May 13, 2018 at 11:12:07PM -0400, Ian Kelling wrote:
Signed-off-by: Ian Kelling ian@iankelling.org
src/boot.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/boot.c b/src/boot.c index ff705fd..ca64595 100644 --- a/src/boot.c +++ b/src/boot.c @@ -91,14 +91,14 @@ glob_prefix(const char *glob, const char *str) } }
-// Search the bootorder list for the given glob pattern. +// Search the bootorder glob list for the given device description static int -find_prio(const char *glob) +find_prio(const char *desc) {
- dprintf(1, "Searching bootorder for: %s\n", glob);
- dprintf(1, "Searching bootorder for: %s\n", desc); int i; for (i = 0; i < BootorderCount; i++)
if (glob_prefix(glob, Bootorder[i]))
return -1;if (glob_prefix(Bootorder[i], desc)) return i+1;
}
Thanks, but I don't think this is correct. The idea is that the user will pass a bootorder list, and that SeaBIOS will see if the devices it finds match that list. So, the SeaBIOS code generates the globs, and the user generates the actual device names.
This was done that way because QEMU generates and passes a bootorder list to SeaBIOS. QEMU will generate the actual device names, but SeaBIOS generally doesn't have enough information to generate the full device names. So, SeaBIOS globs the QEMU generated device names to find a match.
-Kevin
Ahh, now it makes sense. I searched for ways to generate open firmware device names other than looking in seabios logs, but google gave me basically nothing. Do you know how this can be done under gnu/linux for physical (non-virtual) devices?
On Tue, May 15, 2018 at 11:03:16PM -0400, Ian Kelling wrote:
Kevin O'Connor kevin@koconnor.net writes:
Thanks, but I don't think this is correct. The idea is that the user will pass a bootorder list, and that SeaBIOS will see if the devices it finds match that list. So, the SeaBIOS code generates the globs, and the user generates the actual device names.
This was done that way because QEMU generates and passes a bootorder list to SeaBIOS. QEMU will generate the actual device names, but SeaBIOS generally doesn't have enough information to generate the full device names. So, SeaBIOS globs the QEMU generated device names to find a match.
Ahh, now it makes sense. I searched for ways to generate open firmware device names other than looking in seabios logs, but google gave me basically nothing. Do you know how this can be done under gnu/linux for physical (non-virtual) devices?
The easiest way I know of is to look at the seabios logs. I don't know of any concise open firmware naming document.
SeaBIOS is only expecting a handful of devices - you can see what it expects by looking at src/boot.c. The examples there are:
// Find pci device - for example: /pci@i0cf8/ethernet@5 // Find scsi drive - for example: /pci@i0cf8/scsi@5/channel@0/disk@1,0 // Find ata drive - for example: /pci@i0cf8/ide@1,1/drive@1/disk@0 // Find floppy - for example: /pci@i0cf8/isa@1/fdc@03f1/floppy@0 // Find pci rom - for example: /pci@i0cf8/scsi@3:rom2 // Find named rom - for example: /rom@genroms/linuxboot.bin // Find usb - for example: /pci@i0cf8/usb@1,2/storage@1/channel@0/disk@0,0 // Try usb-host/redir - for example: /pci@i0cf8/usb@1,2/usb-host@1
-Kevin