The hardcoded boot order method when using seabios with coreboot makes booting from option roms difficult if the number of hard drives installed is not a fixed number. I used this patch to allow choosing the last boot device by setting the nibble to 0xf. This allows me to boot from the gPXE option rom.
diff --git a/src/boot.c b/src/boot.c index 6b4e985..44c1665 100644 --- a/src/boot.c +++ b/src/boot.c @@ -51,7 +51,8 @@ boot_setup() SET_EBDA(boot_sequence, 0xffff); if (CONFIG_COREBOOT) { // XXX - hardcode defaults for coreboot. - IPL.bootorder = 0x00000231; + // use 0xf to choose the last bev device + IPL.bootorder = 0x0000231f; IPL.checkfloppysig = 1; } else { // On emulators, get boot order from nvram. @@ -372,6 +373,10 @@ do_boot(u16 seq_nr) u32 bootdev = IPL.bootorder; bootdev >>= 4 * seq_nr; bootdev &= 0xf; + if(bootdev == 0x0f) { + dprintf(1, "IPL.bevcount = %d)\n", IPL.bevcount); + bootdev = IPL.bevcount; + }
if (bootdev == 0) { printf("No bootable device.\n");
On Wed, Mar 11, 2009 at 09:15:01AM -0700, Joe Julian wrote:
The hardcoded boot order method when using seabios with coreboot makes booting from option roms difficult if the number of hard drives installed is not a fixed number. I used this patch to allow choosing the last boot device by setting the nibble to 0xf. This allows me to boot from the gPXE option rom.
I don't think that is necessary.
IPL.bootorder = 0x00000231;
IPL.bootorder = 0x0000231f;
You want:
IPL.bootorder = 0x00002314;
which will set the default order to option rom (BEV), floppy, cdrom, and then hard drive.
-Kevin
Kevin O'Connor wrote:
On Wed, Mar 11, 2009 at 09:15:01AM -0700, Joe Julian wrote:
The hardcoded boot order method when using seabios with coreboot makes booting from option roms difficult if the number of hard drives installed is not a fixed number. I used this patch to allow choosing the last boot device by setting the nibble to 0xf. This allows me to boot from the gPXE option rom.
I don't think that is necessary.
IPL.bootorder = 0x00000231;
IPL.bootorder = 0x0000231f;
You want:
IPL.bootorder = 0x00002314;
which will set the default order to option rom (BEV), floppy, cdrom, and then hard drive.
-Kevin
Ah yes, I see. It threw me off because the boot menu showed all my hard drives and put gPXE as item 6.
On Thu, Mar 12, 2009 at 08:08:30AM -0700, Joe Julian wrote:
Kevin O'Connor wrote:
On Wed, Mar 11, 2009 at 09:15:01AM -0700, Joe Julian wrote:
IPL.bootorder = 0x00000231;
IPL.bootorder = 0x0000231f;
You want: IPL.bootorder = 0x00002314;
which will set the default order to option rom (BEV), floppy, cdrom, and then hard drive.
Ah yes, I see. It threw me off because the boot menu showed all my hard drives and put gPXE as item 6.
Yeah - the internal BCV/BEV stuff is complicated, but it needs to be done that way for correct operation. The menu is intended to simlify things, so that a casual user doesn't need to know the difference between a BCV/BEV/CDROM/etc.
-Kevin