Revision a735aa31 vl.c
b/vl.c | ||
---|---|---|
53 | 53 |
#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup" |
54 | 54 |
#define BIOS_FILENAME "bios.bin" |
55 | 55 |
#define VGABIOS_FILENAME "vgabios.bin" |
56 |
#define LINUX_BOOT_FILENAME "linux_boot.bin" |
|
56 | 57 |
|
57 | 58 |
//#define DEBUG_UNUSED_IOPORT |
58 | 59 |
|
... | ... | |
3463 | 3464 |
bochs_bios_init(); |
3464 | 3465 |
|
3465 | 3466 |
if (linux_boot) { |
3466 |
extern uint8_t linux_boot_start; |
|
3467 |
extern uint8_t linux_boot_end; |
|
3467 |
uint8_t bootsect[512]; |
|
3468 | 3468 |
|
3469 | 3469 |
if (bs_table[0] == NULL) { |
3470 | 3470 |
fprintf(stderr, "A disk image must be given for 'hda' when booting a Linux kernel\n"); |
3471 | 3471 |
exit(1); |
3472 | 3472 |
} |
3473 |
bdrv_set_boot_sector(bs_table[0], &linux_boot_start, |
|
3474 |
&linux_boot_end - &linux_boot_start); |
|
3473 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, LINUX_BOOT_FILENAME); |
|
3474 |
ret = load_image(buf, bootsect); |
|
3475 |
if (ret != sizeof(bootsect)) { |
|
3476 |
fprintf(stderr, "qemu: could not load linux boot sector '%s'\n", |
|
3477 |
buf); |
|
3478 |
exit(1); |
|
3479 |
} |
|
3480 |
|
|
3481 |
bdrv_set_boot_sector(bs_table[0], bootsect, sizeof(bootsect)); |
|
3475 | 3482 |
|
3476 | 3483 |
/* now we can load the kernel */ |
3477 | 3484 |
ret = load_kernel(kernel_filename, |
Also available in: Unified diff