Patch: let qemu work with latest bochsbios
The boot_device is not communicated to the bochsbios through the CMOS. The following patch allows to boot via network on the newest bochsbios.
Bernhard Kauer
Index: vl.c
===================================================================
RCS file: /sources/qemu/qemu/vl.c,v
retrieving revision 1.323
vl.c +1 -1
@@ -7828,7 +7828,7 @@fprintf (stderr,"No valid PXE rom found for network device\n" ); exit(1); } - boot_device ='c' ;/* to prevent confusion by the BIOS */ +//boot_device = 'c'; /* to prevent confusion by the BIOS */ }#endif
Index: hw/pc.c
===================================================================
RCS file: /sources/qemu/qemu/hw/pc.c,v
retrieving revision 1.81
pc.c +3 -0
@@ -197,6 +197,9 @@case 'd' :rtc_set_memory (s,0x3d ,0x03 );/* CD-ROM boot */ break ; +case 'n' : +rtc_set_memory (s,0x3d ,0x04 );/* Network boot */ +break ; }/* floppy type */
Quoted 16 lines · Bernhard Kauer
The
boot_deviceis not communicated to the bochsbios
through the CMOS. The following patch allows to boot via network on the newest bochsbios.Bernhard Kauer
------------------------------------------------------------------------
Index:
vl.c
===================================================================
RCS file: /sources/qemu/qemu/vl.c,v
retrieving revision 1.323
diff -u -r1.323vl.c
vl.c line 7833
Quoted 7 lines
vl.c +1
-1@@ -7828,7 +7828,7 @@fprintf (stderr,"No valid PXE rom found for network device\n" );exit (1 ); } - boot_device ='c' ;/* to prevent confusion by the BIOS */ +//boot_device = 'c'; /* to prevent confusion by the BIOS */ }
Please don't comment out code. Just delete it.
Regards,
Anthony Liguori
Quoted 20 lines
vl.c +0
-0#endif Index:
hw/pc.c
===================================================================
RCS file: /sources/qemu/qemu/hw/pc.c,v
retrieving revision 1.81
diff -u -r1.81pc.cpc.c +3
-0@@ -197,6 +197,9 @@case 'd' :rtc_set_memory (s,0x3d ,0x03 );/* CD-ROM boot */ break ; +case 'n' : +rtc_set_memory (s,0x3d ,0x04 );/* Network boot */ +break ; }/* floppy type */
Quoted 7 lines · Anthony Liguori
Review
Quoted 4 lines · Bernhard Kauer
(quoted diff) +1
-1- boot_device = 'c'; /* to prevent confusion by the BIOS */ + //boot_device = 'c'; /* to prevent confusion by the BIOS */ }Please don't comment out code. Just delete it.
You are right. At the time i changed it I just wondered what the comment means...
Bernhard
Index: vl.c
===================================================================
RCS file: /sources/qemu/qemu/vl.c,v
retrieving revision 1.323
vl.c +0 -1
@@ -7828,7 +7828,6 @@fprintf (stderr,"No valid PXE rom found for network device\n" ); exit(1); } - boot_device ='c' ;/* to prevent confusion by the BIOS */ }#endif
Index: hw/pc.c
===================================================================
RCS file: /sources/qemu/qemu/hw/pc.c,v
retrieving revision 1.81
pc.c +3 -0
@@ -197,6 +197,9 @@case 'd' :rtc_set_memory (s,0x3d ,0x03 );/* CD-ROM boot */ break ; +case 'n' : +rtc_set_memory (s,0x3d ,0x04 );/* Network boot */ +break ; }/* floppy type */
Has somebody besides me tested the patch?
Bernhard Kauer
Quoted 3 lines · Bernhard Kauer
The
boot_deviceis not communicated to the bochsbios through the CMOS. The following patch allows to boot via network on the newest bochsbios.