aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2021-09-23 09:28:11 +0200
committerHelge Deller <deller@gmx.de>2021-09-24 11:10:17 +0200
commitef4ddc625fcb418f99c431cf6ffda5321ef26b1d (patch)
treed4035b45f6304dcfc83f28118776a88ba7a873fb
parent52fd5faf063bd627c5e99a13578356b0a8cc6638 (diff)
downloadseabios-hppa-ef4ddc625fcb418f99c431cf6ffda5321ef26b1d.zip
seabios-hppa-ef4ddc625fcb418f99c431cf6ffda5321ef26b1d.tar.gz
seabios-hppa-ef4ddc625fcb418f99c431cf6ffda5321ef26b1d.tar.bz2
boot: Allow boot order=g-m option to choose boot SCSI ID
Add support to boot from a specific SCSI ID by mapping drives g-m to SCSI IDs 0-7, e.g. -boot order=g for SCSI ID 0, and -boot order=l for SCSI ID 5 Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r--src/boot.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/boot.c b/src/boot.c
index be0d734..f2ded31 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -820,10 +820,19 @@ struct drive_s *select_parisc_boot_drive(char bootdrive)
/* try each boot device */
hlist_for_each_entry(pos, &BootList, node) {
if (((bootdrive == 'd') && (pos->type == IPL_TYPE_CDROM)) ||
- ((bootdrive != 'd') && (pos->type == IPL_TYPE_HARDDISK))) {
+ ((bootdrive == 'c') && (pos->type == IPL_TYPE_HARDDISK))) {
printf("\nBooting from %s\n",pos->description);
return pos->drive;
}
+ /* -boot order=g-m: machine implementation dependent drives */
+ if ((bootdrive >= 'g') && (bootdrive <= 'm')) {
+ int scsi_index = (int)bootdrive - 'g';
+ if (pos->drive->target == scsi_index) {
+ printf("\nBooting from SCSI target %d: %s\n",
+ scsi_index, pos->description);
+ return pos->drive;
+ }
+ }
}
/* if none found, choose first bootable device */
hlist_for_each_entry(pos, &BootList, node) {