Allow boot without a drive on Sparc machines (partly extracted from Xen)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4997 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
		
							parent
							
								
									66de733bdb
								
							
						
					
					
						commit
						f88e4b91be
					
				@ -16,6 +16,7 @@ typedef struct QEMUMachine {
 | 
				
			|||||||
    QEMUMachineInitFunc *init;
 | 
					    QEMUMachineInitFunc *init;
 | 
				
			||||||
#define RAMSIZE_FIXED	(1 << 0)
 | 
					#define RAMSIZE_FIXED	(1 << 0)
 | 
				
			||||||
    ram_addr_t ram_require;
 | 
					    ram_addr_t ram_require;
 | 
				
			||||||
 | 
					    int nodisk_ok;
 | 
				
			||||||
    struct QEMUMachine *next;
 | 
					    struct QEMUMachine *next;
 | 
				
			||||||
} QEMUMachine;
 | 
					} QEMUMachine;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										12
									
								
								hw/sun4m.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								hw/sun4m.c
									
									
									
									
									
								
							@ -1242,6 +1242,7 @@ QEMUMachine ss5_machine = {
 | 
				
			|||||||
    .desc = "Sun4m platform, SPARCstation 5",
 | 
					    .desc = "Sun4m platform, SPARCstation 5",
 | 
				
			||||||
    .init = ss5_init,
 | 
					    .init = ss5_init,
 | 
				
			||||||
    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
					    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
				
			||||||
 | 
					    .nodisk_ok = 1,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QEMUMachine ss10_machine = {
 | 
					QEMUMachine ss10_machine = {
 | 
				
			||||||
@ -1249,6 +1250,7 @@ QEMUMachine ss10_machine = {
 | 
				
			|||||||
    .desc = "Sun4m platform, SPARCstation 10",
 | 
					    .desc = "Sun4m platform, SPARCstation 10",
 | 
				
			||||||
    .init = ss10_init,
 | 
					    .init = ss10_init,
 | 
				
			||||||
    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
					    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
				
			||||||
 | 
					    .nodisk_ok = 1,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QEMUMachine ss600mp_machine = {
 | 
					QEMUMachine ss600mp_machine = {
 | 
				
			||||||
@ -1256,6 +1258,7 @@ QEMUMachine ss600mp_machine = {
 | 
				
			|||||||
    .desc = "Sun4m platform, SPARCserver 600MP",
 | 
					    .desc = "Sun4m platform, SPARCserver 600MP",
 | 
				
			||||||
    .init = ss600mp_init,
 | 
					    .init = ss600mp_init,
 | 
				
			||||||
    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
					    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
				
			||||||
 | 
					    .nodisk_ok = 1,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QEMUMachine ss20_machine = {
 | 
					QEMUMachine ss20_machine = {
 | 
				
			||||||
@ -1263,6 +1266,7 @@ QEMUMachine ss20_machine = {
 | 
				
			|||||||
    .desc = "Sun4m platform, SPARCstation 20",
 | 
					    .desc = "Sun4m platform, SPARCstation 20",
 | 
				
			||||||
    .init = ss20_init,
 | 
					    .init = ss20_init,
 | 
				
			||||||
    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
					    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
				
			||||||
 | 
					    .nodisk_ok = 1,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QEMUMachine ss2_machine = {
 | 
					QEMUMachine ss2_machine = {
 | 
				
			||||||
@ -1270,6 +1274,7 @@ QEMUMachine ss2_machine = {
 | 
				
			|||||||
    .desc = "Sun4c platform, SPARCstation 2",
 | 
					    .desc = "Sun4c platform, SPARCstation 2",
 | 
				
			||||||
    .init = ss2_init,
 | 
					    .init = ss2_init,
 | 
				
			||||||
    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
					    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
				
			||||||
 | 
					    .nodisk_ok = 1,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QEMUMachine voyager_machine = {
 | 
					QEMUMachine voyager_machine = {
 | 
				
			||||||
@ -1277,6 +1282,7 @@ QEMUMachine voyager_machine = {
 | 
				
			|||||||
    .desc = "Sun4m platform, SPARCstation Voyager",
 | 
					    .desc = "Sun4m platform, SPARCstation Voyager",
 | 
				
			||||||
    .init = vger_init,
 | 
					    .init = vger_init,
 | 
				
			||||||
    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
					    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
				
			||||||
 | 
					    .nodisk_ok = 1,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QEMUMachine ss_lx_machine = {
 | 
					QEMUMachine ss_lx_machine = {
 | 
				
			||||||
@ -1284,6 +1290,7 @@ QEMUMachine ss_lx_machine = {
 | 
				
			|||||||
    .desc = "Sun4m platform, SPARCstation LX",
 | 
					    .desc = "Sun4m platform, SPARCstation LX",
 | 
				
			||||||
    .init = ss_lx_init,
 | 
					    .init = ss_lx_init,
 | 
				
			||||||
    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
					    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
				
			||||||
 | 
					    .nodisk_ok = 1,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QEMUMachine ss4_machine = {
 | 
					QEMUMachine ss4_machine = {
 | 
				
			||||||
@ -1291,6 +1298,7 @@ QEMUMachine ss4_machine = {
 | 
				
			|||||||
    .desc = "Sun4m platform, SPARCstation 4",
 | 
					    .desc = "Sun4m platform, SPARCstation 4",
 | 
				
			||||||
    .init = ss4_init,
 | 
					    .init = ss4_init,
 | 
				
			||||||
    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
					    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
				
			||||||
 | 
					    .nodisk_ok = 1,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QEMUMachine scls_machine = {
 | 
					QEMUMachine scls_machine = {
 | 
				
			||||||
@ -1298,6 +1306,7 @@ QEMUMachine scls_machine = {
 | 
				
			|||||||
    .desc = "Sun4m platform, SPARCClassic",
 | 
					    .desc = "Sun4m platform, SPARCClassic",
 | 
				
			||||||
    .init = scls_init,
 | 
					    .init = scls_init,
 | 
				
			||||||
    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
					    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
				
			||||||
 | 
					    .nodisk_ok = 1,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QEMUMachine sbook_machine = {
 | 
					QEMUMachine sbook_machine = {
 | 
				
			||||||
@ -1305,6 +1314,7 @@ QEMUMachine sbook_machine = {
 | 
				
			|||||||
    .desc = "Sun4m platform, SPARCbook",
 | 
					    .desc = "Sun4m platform, SPARCbook",
 | 
				
			||||||
    .init = sbook_init,
 | 
					    .init = sbook_init,
 | 
				
			||||||
    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
					    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
				
			||||||
 | 
					    .nodisk_ok = 1,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static const struct sun4d_hwdef sun4d_hwdefs[] = {
 | 
					static const struct sun4d_hwdef sun4d_hwdefs[] = {
 | 
				
			||||||
@ -1542,6 +1552,7 @@ QEMUMachine ss1000_machine = {
 | 
				
			|||||||
    .desc = "Sun4d platform, SPARCserver 1000",
 | 
					    .desc = "Sun4d platform, SPARCserver 1000",
 | 
				
			||||||
    .init = ss1000_init,
 | 
					    .init = ss1000_init,
 | 
				
			||||||
    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
					    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
				
			||||||
 | 
					    .nodisk_ok = 1,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QEMUMachine ss2000_machine = {
 | 
					QEMUMachine ss2000_machine = {
 | 
				
			||||||
@ -1549,4 +1560,5 @@ QEMUMachine ss2000_machine = {
 | 
				
			|||||||
    .desc = "Sun4d platform, SPARCcenter 2000",
 | 
					    .desc = "Sun4d platform, SPARCcenter 2000",
 | 
				
			||||||
    .init = ss2000_init,
 | 
					    .init = ss2000_init,
 | 
				
			||||||
    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
					    .ram_require = PROM_SIZE_MAX + TCX_SIZE,
 | 
				
			||||||
 | 
					    .nodisk_ok = 1,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -450,6 +450,7 @@ QEMUMachine sun4u_machine = {
 | 
				
			|||||||
    .desc = "Sun4u platform",
 | 
					    .desc = "Sun4u platform",
 | 
				
			||||||
    .init = sun4u_init,
 | 
					    .init = sun4u_init,
 | 
				
			||||||
    .ram_require = PROM_SIZE_MAX + VGA_RAM_SIZE,
 | 
					    .ram_require = PROM_SIZE_MAX + VGA_RAM_SIZE,
 | 
				
			||||||
 | 
					    .nodisk_ok = 1,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QEMUMachine sun4v_machine = {
 | 
					QEMUMachine sun4v_machine = {
 | 
				
			||||||
@ -457,4 +458,5 @@ QEMUMachine sun4v_machine = {
 | 
				
			|||||||
    .desc = "Sun4v platform",
 | 
					    .desc = "Sun4v platform",
 | 
				
			||||||
    .init = sun4v_init,
 | 
					    .init = sun4v_init,
 | 
				
			||||||
    .ram_require = PROM_SIZE_MAX + VGA_RAM_SIZE,
 | 
					    .ram_require = PROM_SIZE_MAX + VGA_RAM_SIZE,
 | 
				
			||||||
 | 
					    .nodisk_ok = 1,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										3
									
								
								vl.c
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								vl.c
									
									
									
									
									
								
							@ -8879,9 +8879,8 @@ int main(int argc, char **argv)
 | 
				
			|||||||
    linux_boot = (kernel_filename != NULL);
 | 
					    linux_boot = (kernel_filename != NULL);
 | 
				
			||||||
    net_boot = (boot_devices_bitmap >> ('n' - 'a')) & 0xF;
 | 
					    net_boot = (boot_devices_bitmap >> ('n' - 'a')) & 0xF;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* XXX: this should not be: some embedded targets just have flash */
 | 
					 | 
				
			||||||
    if (!linux_boot && net_boot == 0 &&
 | 
					    if (!linux_boot && net_boot == 0 &&
 | 
				
			||||||
        nb_drives_opt == 0)
 | 
					        !machine->nodisk_ok && nb_drives_opt == 0)
 | 
				
			||||||
        help(1);
 | 
					        help(1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!linux_boot && *kernel_cmdline != '\0') {
 | 
					    if (!linux_boot && *kernel_cmdline != '\0') {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user