Merge from devel fix isapc
This commit is contained in:
parent
d3e65ae167
commit
16e93a00d6
@ -1 +1 @@
|
||||
qemu-0.8.2.tar.gz
|
||||
qemu-0.9.1.tar.gz
|
||||
|
@ -1,15 +0,0 @@
|
||||
--- qemu-0.8.0/ppc.ld~ 2005-12-19 22:51:53.000000000 +0000
|
||||
+++ qemu-0.8.0/ppc.ld 2006-03-21 16:46:58.000000000 +0000
|
||||
@@ -90,7 +90,11 @@ SECTIONS
|
||||
/* We want the small data sections together, so single-instruction offsets
|
||||
can access them all, and initialized data all before uninitialized, so
|
||||
we can shorten the on-disk segment size. */
|
||||
- .sdata : { *(.sdata) }
|
||||
+ .sdata :
|
||||
+ {
|
||||
+ PROVIDE (_SDA_BASE_ = 32768);
|
||||
+ *(.sdata .sdata.* .gnu.linkonce.s.*)
|
||||
+ }
|
||||
_edata = .;
|
||||
PROVIDE (edata = .);
|
||||
__bss_start = .;
|
@ -1,11 +0,0 @@
|
||||
diff -Naupr qemu-0.8.2.orig/usb-linux.c qemu-0.8.2/usb-linux.c
|
||||
--- qemu-0.8.2.orig/usb-linux.c 2006-07-22 19:23:34.000000000 +0200
|
||||
+++ qemu-0.8.2/usb-linux.c 2006-08-23 18:47:16.000000000 +0200
|
||||
@@ -26,7 +26,6 @@
|
||||
#if defined(__linux__)
|
||||
#include <dirent.h>
|
||||
#include <sys/ioctl.h>
|
||||
-#include <linux/compiler.h>
|
||||
#include <linux/usbdevice_fs.h>
|
||||
#include <linux/version.h>
|
||||
|
@ -1,18 +0,0 @@
|
||||
diff -Naupr qemu-0.8.2.orig/target-sparc/op_helper.c qemu-0.8.2/target-sparc/op_helper.c
|
||||
--- qemu-0.8.2.orig/target-sparc/op_helper.c 2006-07-22 19:23:34.000000000 +0200
|
||||
+++ qemu-0.8.2/target-sparc/op_helper.c 2006-08-24 10:58:30.000000000 +0200
|
||||
@@ -12,12 +12,12 @@ void raise_exception(int tt)
|
||||
#ifdef USE_INT_TO_FLOAT_HELPERS
|
||||
void do_fitos(void)
|
||||
{
|
||||
- FT0 = int32_to_float32(*((int32_t *)&FT1));
|
||||
+ FT0 = int32_to_float32(*((int32_t *)&FT1), &env->fp_status);
|
||||
}
|
||||
|
||||
void do_fitod(void)
|
||||
{
|
||||
- DT0 = int32_to_float64(*((int32_t *)&FT1));
|
||||
+ DT0 = int32_to_float64(*((int32_t *)&FT1), &env->fp_status);
|
||||
}
|
||||
#endif
|
||||
|
212
qemu-0.9.1-block-rw-range-check.patch
Normal file
212
qemu-0.9.1-block-rw-range-check.patch
Normal file
@ -0,0 +1,212 @@
|
||||
diff -rup qemu-0.9.1.orig/block.c qemu-0.9.1.new/block.c
|
||||
--- qemu-0.9.1.orig/block.c 2008-02-26 18:03:00.000000000 -0500
|
||||
+++ qemu-0.9.1.new/block.c 2008-02-26 18:05:26.000000000 -0500
|
||||
@@ -123,6 +123,60 @@ void path_combine(char *dest, int dest_s
|
||||
}
|
||||
}
|
||||
|
||||
+static int bdrv_rd_badreq_sectors(BlockDriverState *bs,
|
||||
+ int64_t sector_num, int nb_sectors)
|
||||
+{
|
||||
+ return
|
||||
+ nb_sectors < 0 ||
|
||||
+ sector_num < 0 ||
|
||||
+ nb_sectors > bs->total_sectors ||
|
||||
+ sector_num > bs->total_sectors - nb_sectors;
|
||||
+}
|
||||
+
|
||||
+static int bdrv_rd_badreq_bytes(BlockDriverState *bs,
|
||||
+ int64_t offset, int count)
|
||||
+{
|
||||
+ int64_t size = bs->total_sectors << SECTOR_BITS;
|
||||
+ return
|
||||
+ count < 0 ||
|
||||
+ size < 0 ||
|
||||
+ count > size ||
|
||||
+ offset > size - count;
|
||||
+}
|
||||
+
|
||||
+static int bdrv_wr_badreq_sectors(BlockDriverState *bs,
|
||||
+ int64_t sector_num, int nb_sectors)
|
||||
+{
|
||||
+ if (sector_num < 0 ||
|
||||
+ nb_sectors < 0)
|
||||
+ return 1;
|
||||
+
|
||||
+ if (sector_num > bs->total_sectors - nb_sectors) {
|
||||
+ if (bs->autogrow)
|
||||
+ bs->total_sectors = sector_num + nb_sectors;
|
||||
+ else
|
||||
+ return 1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int bdrv_wr_badreq_bytes(BlockDriverState *bs,
|
||||
+ int64_t offset, int count)
|
||||
+{
|
||||
+ int64_t size = bs->total_sectors << SECTOR_BITS;
|
||||
+ if (count < 0 ||
|
||||
+ offset < 0)
|
||||
+ return 1;
|
||||
+
|
||||
+ if (offset > size - count) {
|
||||
+ if (bs->autogrow)
|
||||
+ bs->total_sectors = (offset + count + SECTOR_SIZE - 1) >> SECTOR_BITS;
|
||||
+ else
|
||||
+ return 1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
|
||||
static void bdrv_register(BlockDriver *bdrv)
|
||||
{
|
||||
@@ -331,6 +385,10 @@ int bdrv_open2(BlockDriverState *bs, con
|
||||
bs->read_only = 0;
|
||||
bs->is_temporary = 0;
|
||||
bs->encrypted = 0;
|
||||
+ bs->autogrow = 0;
|
||||
+
|
||||
+ if (flags & BDRV_O_AUTOGROW)
|
||||
+ bs->autogrow = 1;
|
||||
|
||||
if (flags & BDRV_O_SNAPSHOT) {
|
||||
BlockDriverState *bs1;
|
||||
@@ -375,6 +433,7 @@ int bdrv_open2(BlockDriverState *bs, con
|
||||
}
|
||||
bs->drv = drv;
|
||||
bs->opaque = qemu_mallocz(drv->instance_size);
|
||||
+ bs->total_sectors = 0; /* driver will set if it does not do getlength */
|
||||
if (bs->opaque == NULL && drv->instance_size > 0)
|
||||
return -1;
|
||||
/* Note: for compatibility, we open disk image files as RDWR, and
|
||||
@@ -440,6 +499,7 @@ void bdrv_close(BlockDriverState *bs)
|
||||
bs->drv = NULL;
|
||||
|
||||
/* call the change callback */
|
||||
+ bs->total_sectors = 0;
|
||||
bs->media_changed = 1;
|
||||
if (bs->change_cb)
|
||||
bs->change_cb(bs->change_opaque);
|
||||
@@ -505,6 +565,8 @@ int bdrv_read(BlockDriverState *bs, int6
|
||||
if (!drv)
|
||||
return -ENOMEDIUM;
|
||||
|
||||
+ if (bdrv_rd_badreq_sectors(bs, sector_num, nb_sectors))
|
||||
+ return -EDOM;
|
||||
if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) {
|
||||
memcpy(buf, bs->boot_sector_data, 512);
|
||||
sector_num++;
|
||||
@@ -545,6 +607,8 @@ int bdrv_write(BlockDriverState *bs, int
|
||||
return -ENOMEDIUM;
|
||||
if (bs->read_only)
|
||||
return -EACCES;
|
||||
+ if (bdrv_wr_badreq_sectors(bs, sector_num, nb_sectors))
|
||||
+ return -EDOM;
|
||||
if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) {
|
||||
memcpy(bs->boot_sector_data, buf, 512);
|
||||
}
|
||||
@@ -670,6 +734,8 @@ int bdrv_pread(BlockDriverState *bs, int
|
||||
return -ENOMEDIUM;
|
||||
if (!drv->bdrv_pread)
|
||||
return bdrv_pread_em(bs, offset, buf1, count1);
|
||||
+ if (bdrv_rd_badreq_bytes(bs, offset, count1))
|
||||
+ return -EDOM;
|
||||
return drv->bdrv_pread(bs, offset, buf1, count1);
|
||||
}
|
||||
|
||||
@@ -685,6 +751,8 @@ int bdrv_pwrite(BlockDriverState *bs, in
|
||||
return -ENOMEDIUM;
|
||||
if (!drv->bdrv_pwrite)
|
||||
return bdrv_pwrite_em(bs, offset, buf1, count1);
|
||||
+ if (bdrv_wr_badreq_bytes(bs, offset, count1))
|
||||
+ return -EDOM;
|
||||
return drv->bdrv_pwrite(bs, offset, buf1, count1);
|
||||
}
|
||||
|
||||
@@ -951,6 +1019,8 @@ int bdrv_write_compressed(BlockDriverSta
|
||||
return -ENOMEDIUM;
|
||||
if (!drv->bdrv_write_compressed)
|
||||
return -ENOTSUP;
|
||||
+ if (bdrv_wr_badreq_sectors(bs, sector_num, nb_sectors))
|
||||
+ return -EDOM;
|
||||
return drv->bdrv_write_compressed(bs, sector_num, buf, nb_sectors);
|
||||
}
|
||||
|
||||
@@ -1097,6 +1167,8 @@ BlockDriverAIOCB *bdrv_aio_read(BlockDri
|
||||
|
||||
if (!drv)
|
||||
return NULL;
|
||||
+ if (bdrv_rd_badreq_sectors(bs, sector_num, nb_sectors))
|
||||
+ return NULL;
|
||||
|
||||
/* XXX: we assume that nb_sectors == 0 is suppored by the async read */
|
||||
if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) {
|
||||
@@ -1128,6 +1200,8 @@ BlockDriverAIOCB *bdrv_aio_write(BlockDr
|
||||
return NULL;
|
||||
if (bs->read_only)
|
||||
return NULL;
|
||||
+ if (bdrv_wr_badreq_sectors(bs, sector_num, nb_sectors))
|
||||
+ return NULL;
|
||||
if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) {
|
||||
memcpy(bs->boot_sector_data, buf, 512);
|
||||
}
|
||||
diff -rup qemu-0.9.1.orig/block.h qemu-0.9.1.new/block.h
|
||||
--- qemu-0.9.1.orig/block.h 2008-01-06 14:38:42.000000000 -0500
|
||||
+++ qemu-0.9.1.new/block.h 2008-02-26 17:41:47.000000000 -0500
|
||||
@@ -45,6 +45,7 @@ typedef struct QEMUSnapshotInfo {
|
||||
it (default for
|
||||
bdrv_file_open()) */
|
||||
#define BDRV_O_DIRECT 0x0020
|
||||
+#define BDRV_O_AUTOGROW 0x0040 /* Allow backing file to extend when writing past end of file */
|
||||
|
||||
#ifndef QEMU_IMG
|
||||
void bdrv_info(void);
|
||||
diff -rup qemu-0.9.1.orig/block_int.h qemu-0.9.1.new/block_int.h
|
||||
--- qemu-0.9.1.orig/block_int.h 2008-01-06 14:38:42.000000000 -0500
|
||||
+++ qemu-0.9.1.new/block_int.h 2008-02-26 17:41:47.000000000 -0500
|
||||
@@ -97,6 +97,7 @@ struct BlockDriverState {
|
||||
int locked; /* if true, the media cannot temporarily be ejected */
|
||||
int encrypted; /* if true, the media is encrypted */
|
||||
int sg; /* if true, the device is a /dev/sg* */
|
||||
+ int autogrow; /* if true, the backing store can auto-extend to allocate new extents */
|
||||
/* event callback when inserting/removing */
|
||||
void (*change_cb)(void *opaque);
|
||||
void *change_opaque;
|
||||
diff -rup qemu-0.9.1.orig/block-qcow2.c qemu-0.9.1.new/block-qcow2.c
|
||||
--- qemu-0.9.1.orig/block-qcow2.c 2008-01-06 14:38:42.000000000 -0500
|
||||
+++ qemu-0.9.1.new/block-qcow2.c 2008-02-26 18:01:06.000000000 -0500
|
||||
@@ -191,7 +191,7 @@ static int qcow_open(BlockDriverState *b
|
||||
int len, i, shift, ret;
|
||||
QCowHeader header;
|
||||
|
||||
- ret = bdrv_file_open(&s->hd, filename, flags);
|
||||
+ ret = bdrv_file_open(&s->hd, filename, flags | BDRV_O_AUTOGROW);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
if (bdrv_pread(s->hd, 0, &header, sizeof(header)) != sizeof(header))
|
||||
diff -rup qemu-0.9.1.orig/block-qcow.c qemu-0.9.1.new/block-qcow.c
|
||||
--- qemu-0.9.1.orig/block-qcow.c 2008-01-06 14:38:41.000000000 -0500
|
||||
+++ qemu-0.9.1.new/block-qcow.c 2008-02-26 18:00:53.000000000 -0500
|
||||
@@ -95,7 +95,7 @@ static int qcow_open(BlockDriverState *b
|
||||
int len, i, shift, ret;
|
||||
QCowHeader header;
|
||||
|
||||
- ret = bdrv_file_open(&s->hd, filename, flags);
|
||||
+ ret = bdrv_file_open(&s->hd, filename, flags | BDRV_O_AUTOGROW);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
if (bdrv_pread(s->hd, 0, &header, sizeof(header)) != sizeof(header))
|
||||
diff -rup qemu-0.9.1.orig/block-vmdk.c qemu-0.9.1.new/block-vmdk.c
|
||||
--- qemu-0.9.1.orig/block-vmdk.c 2008-01-06 14:38:42.000000000 -0500
|
||||
+++ qemu-0.9.1.new/block-vmdk.c 2008-02-26 18:02:17.000000000 -0500
|
||||
@@ -376,7 +376,7 @@ static int vmdk_open(BlockDriverState *b
|
||||
flags = BDRV_O_RDONLY;
|
||||
fprintf(stderr, "(VMDK) image open: flags=0x%x filename=%s\n", flags, bs->filename);
|
||||
|
||||
- ret = bdrv_file_open(&s->hd, filename, flags);
|
||||
+ ret = bdrv_file_open(&s->hd, filename, flags | BDRV_O_AUTOGROW);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
if (bdrv_pread(s->hd, 0, &magic, sizeof(magic)) != sizeof(magic))
|
13
qemu-0.9.1-isapcvga.patch
Normal file
13
qemu-0.9.1-isapcvga.patch
Normal file
@ -0,0 +1,13 @@
|
||||
Enable graphic console on isapc (addressed by upstream r5026)
|
||||
Lubomir Rintel <lkundrak@v3.sk>
|
||||
|
||||
--- qemu-0.9.1/hw/cirrus_vga.c.orig 2008-01-06 20:38:42.000000000 +0100
|
||||
+++ qemu-0.9.1/hw/cirrus_vga.c 2008-12-03 11:03:21.000000000 +0100
|
||||
@@ -3197,6 +3197,7 @@ void isa_cirrus_vga_init(DisplayState *d
|
||||
vga_common_init((VGAState *)s,
|
||||
ds, vga_ram_base, vga_ram_offset, vga_ram_size);
|
||||
cirrus_init_common(s, CIRRUS_ID_CLGD5430, 0);
|
||||
+ graphic_console_init(s->ds, s->update, s->invalidate, s->screen_dump, s);
|
||||
/* XXX ISA-LFB support */
|
||||
}
|
||||
|
24
qemu-0.9.1-nic-defaults.patch
Normal file
24
qemu-0.9.1-nic-defaults.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff -rup qemu-0.9.1.orig/hw/pc.c qemu-0.9.1.new/hw/pc.c
|
||||
--- qemu-0.9.1.orig/hw/pc.c 2008-01-06 14:38:42.000000000 -0500
|
||||
+++ qemu-0.9.1.new/hw/pc.c 2008-01-08 17:06:27.000000000 -0500
|
||||
@@ -913,7 +913,7 @@ static void pc_init1(int ram_size, int v
|
||||
nd = &nd_table[i];
|
||||
if (!nd->model) {
|
||||
if (pci_enabled) {
|
||||
- nd->model = "ne2k_pci";
|
||||
+ nd->model = "rtl8139";
|
||||
} else {
|
||||
nd->model = "ne2k_isa";
|
||||
}
|
||||
diff -rup qemu-0.9.1.orig/vl.c qemu-0.9.1.new/vl.c
|
||||
--- qemu-0.9.1.orig/vl.c 2008-01-06 14:38:42.000000000 -0500
|
||||
+++ qemu-0.9.1.new/vl.c 2008-01-08 17:05:40.000000000 -0500
|
||||
@@ -8787,7 +8787,7 @@ int main(int argc, char **argv)
|
||||
char buf[1024];
|
||||
if (net_boot & (1 << i)) {
|
||||
if (model == NULL)
|
||||
- model = "ne2k_pci";
|
||||
+ model = "rtl8139";
|
||||
snprintf(buf, sizeof(buf), "%s/pxe-%s.bin", bios_dir, model);
|
||||
if (get_image_size(buf) > 0) {
|
||||
if (nb_option_roms >= MAX_OPTION_ROMS) {
|
94
qemu-0.9.1-pty-rawmode.patch
Normal file
94
qemu-0.9.1-pty-rawmode.patch
Normal file
@ -0,0 +1,94 @@
|
||||
diff -rup qemu-0.9.1.orig/vl.c qemu-0.9.1.new/vl.c
|
||||
--- qemu-0.9.1.orig/vl.c 2008-05-05 13:32:55.000000000 -0400
|
||||
+++ qemu-0.9.1.new/vl.c 2008-05-05 13:33:17.000000000 -0400
|
||||
@@ -2200,28 +2200,78 @@ static CharDriverState *qemu_chr_open_st
|
||||
return chr;
|
||||
}
|
||||
|
||||
+#ifdef __sun__
|
||||
+/* Once Solaris has openpty(), this is going to be removed. */
|
||||
+int openpty(int *amaster, int *aslave, char *name,
|
||||
+ struct termios *termp, struct winsize *winp)
|
||||
+{
|
||||
+ const char *slave;
|
||||
+ int mfd = -1, sfd = -1;
|
||||
+
|
||||
+ *amaster = *aslave = -1;
|
||||
+
|
||||
+ mfd = open("/dev/ptmx", O_RDWR | O_NOCTTY);
|
||||
+ if (mfd < 0)
|
||||
+ goto err;
|
||||
+
|
||||
+ if (grantpt(mfd) == -1 || unlockpt(mfd) == -1)
|
||||
+ goto err;
|
||||
+
|
||||
+ if ((slave = ptsname(mfd)) == NULL)
|
||||
+ goto err;
|
||||
+
|
||||
+ if ((sfd = open(slave, O_RDONLY | O_NOCTTY)) == -1)
|
||||
+ goto err;
|
||||
+
|
||||
+ if (ioctl(sfd, I_PUSH, "ptem") == -1 ||
|
||||
+ (termp != NULL && tcgetattr(sfd, termp) < 0))
|
||||
+ goto err;
|
||||
+
|
||||
+ if (amaster)
|
||||
+ *amaster = mfd;
|
||||
+ if (aslave)
|
||||
+ *aslave = sfd;
|
||||
+ if (winp)
|
||||
+ ioctl(sfd, TIOCSWINSZ, winp);
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+err:
|
||||
+ if (sfd != -1)
|
||||
+ close(sfd);
|
||||
+ close(mfd);
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+void cfmakeraw (struct termios *termios_p)
|
||||
+{
|
||||
+ termios_p->c_iflag &=
|
||||
+ ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
|
||||
+ termios_p->c_oflag &= ~OPOST;
|
||||
+ termios_p->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
|
||||
+ termios_p->c_cflag &= ~(CSIZE|PARENB);
|
||||
+ termios_p->c_cflag |= CS8;
|
||||
+
|
||||
+ termios_p->c_cc[VMIN] = 0;
|
||||
+ termios_p->c_cc[VTIME] = 0;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#if defined(__linux__) || defined(__sun__)
|
||||
static CharDriverState *qemu_chr_open_pty(void)
|
||||
{
|
||||
struct termios tty;
|
||||
- char slave_name[1024];
|
||||
int master_fd, slave_fd;
|
||||
|
||||
-#if defined(__linux__)
|
||||
- /* Not satisfying */
|
||||
- if (openpty(&master_fd, &slave_fd, slave_name, NULL, NULL) < 0) {
|
||||
+ if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
-#endif
|
||||
|
||||
- /* Disabling local echo and line-buffered output */
|
||||
- tcgetattr (master_fd, &tty);
|
||||
- tty.c_lflag &= ~(ECHO|ICANON|ISIG);
|
||||
- tty.c_cc[VMIN] = 1;
|
||||
- tty.c_cc[VTIME] = 0;
|
||||
- tcsetattr (master_fd, TCSAFLUSH, &tty);
|
||||
+ /* Set raw attributes on the pty. */
|
||||
+ cfmakeraw(&tty);
|
||||
+ tcsetattr(slave_fd, TCSAFLUSH, &tty);
|
||||
|
||||
- fprintf(stderr, "char device redirected to %s\n", slave_name);
|
||||
+ fprintf(stderr, "char device redirected to %s\n", ptsname(master_fd));
|
||||
return qemu_chr_open_fd(master_fd, master_fd);
|
||||
}
|
||||
|
18
qemu.init
18
qemu.init
@ -23,30 +23,36 @@ start() {
|
||||
armv4l|armv5l)
|
||||
cpu="arm"
|
||||
;;
|
||||
sh4)
|
||||
cpu="sh4"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo -n $"Registering binary handler for qemu applications"
|
||||
/sbin/modprobe binfmt_misc &>/dev/null
|
||||
if [ "$cpu" != i386 -a -x $QEMU/qemu-i386 -a -d /usr/qemu-i386 ] ; then
|
||||
echo ":qemu-i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfb\xff\xff\xff:$QEMU/qemu-i386:" > /proc/sys/fs/binfmt_misc/register
|
||||
echo ":qemu-i486:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfb\xff\xff\xff:$QEMU/qemu-i386:" > /proc/sys/fs/binfmt_misc/register
|
||||
echo ":qemu-i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfa\xff\xff\xff:$QEMU/qemu-i386:" > /proc/sys/fs/binfmt_misc/register
|
||||
echo ":qemu-i486:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfa\xff\xff\xff:$QEMU/qemu-i386:" > /proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
if [ "$cpu" != arm -a -x $QEMU/qemu-arm -a -d /usr/qemu-arm ] ; then
|
||||
echo ":qemu-arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfb\xff\xff\xff:$QEMU/qemu-arm:" > /proc/sys/fs/binfmt_misc/register
|
||||
echo ":qemu-arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfa\xff\xff\xff:$QEMU/qemu-arm:" > /proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
if [ "$cpu" != ppc -a -x $QEMU/qemu-ppc -a -d /usr/qemu-ppc ] ; then
|
||||
echo ":ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfb\xff\xff\xff:$QEMU/qemu-ppc:" > /proc/sys/fs/binfmt_misc/register
|
||||
echo ":ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfa\xff\xff\xff:$QEMU/qemu-ppc:" > /proc/sys/fs/binfmt_misc/register
|
||||
echo do ppc
|
||||
fi
|
||||
if [ "$cpu" != sparc -a -x $QEMU/qemu-sparc -a -d /usr/qemu-sparc ] ; then
|
||||
echo ":qemu-sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfb\xff\xff\xff:$QEMU/qemu-sparc:" > /proc/sys/fs/binfmt_misc/register
|
||||
echo ":qemu-sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfa\xff\xff\xff:$QEMU/qemu-sparc:" > /proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
if [ "$cpu" != sh4 -a -x $QEMU/qemu-sh4 -a -d /usr/qemu-sh4 ] ; then
|
||||
echo ":qemu-sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfa\xff\xff\xff:$QEMU/qemu-sh4:" > /proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
echo
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n $"Unregistering binary handler for qemu applications"
|
||||
for a in i386 i486 ppc arm sparc ] ; do
|
||||
for a in i386 i486 ppc arm sparc sh4 ] ; do
|
||||
[ -r /proc/sys/fs/binfmt_misc/qemu-$a ] && echo "-1" >/proc/sys/fs/binfmt_misc/qemu-$a
|
||||
done
|
||||
echo
|
||||
|
143
qemu.spec
143
qemu.spec
@ -7,23 +7,27 @@
|
||||
|
||||
Summary: QEMU is a FAST! processor emulator
|
||||
Name: qemu
|
||||
Version: 0.8.2
|
||||
Release: 4%{?dist}
|
||||
License: GPL/LGPL
|
||||
Version: 0.9.1
|
||||
Release: 11%{?dist}
|
||||
License: GPLv2+ and LGPLv2+
|
||||
Group: Development/Tools
|
||||
URL: http://www.qemu.org/
|
||||
Source0: http://www.qemu.org/%{name}-%{version}.tar.gz
|
||||
Source1: qemu.init
|
||||
Patch0: qemu-0.7.0-build.patch
|
||||
Patch1: qemu-0.8.0-sdata.patch
|
||||
Patch2: qemu-0.8.2-kernheaders.patch
|
||||
Patch3: qemu-0.8.2-target-sparc.patch
|
||||
Patch4: qemu-0.8.2-mb-nops.diff
|
||||
# Change default NIC to rtl8139 to get link-state detection
|
||||
Patch3: qemu-0.9.1-nic-defaults.patch
|
||||
Patch4: qemu-%{version}-block-rw-range-check.patch
|
||||
# Upstream SVN changeset #4338
|
||||
Patch5: qemu-%{version}-pty-rawmode.patch
|
||||
# Similar to upstream changeset #5026
|
||||
Patch6: qemu-0.9.1-isapcvga.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: SDL-devel compat-gcc-%{gccver} zlib-devel which texi2html
|
||||
BuildRequires: SDL-devel compat-gcc-%{gccver} zlib-devel which texi2html gnutls-devel
|
||||
Requires(post): /sbin/chkconfig
|
||||
Requires(preun): /sbin/service /sbin/chkconfig
|
||||
Requires(postun): /sbin/service
|
||||
Requires: %{name}-img = %{version}-%{release}
|
||||
ExclusiveArch: %{ix86} x86_64 ppc alpha sparc armv4l
|
||||
|
||||
%description
|
||||
@ -39,13 +43,23 @@ emulation speed by using dynamic translation. QEMU has two operating modes:
|
||||
|
||||
As QEMU requires no host kernel patches to run, it is safe and easy to use.
|
||||
|
||||
%package img
|
||||
Summary: QEMU is a FAST! processor emulator
|
||||
Group: Development/Tools
|
||||
|
||||
%description img
|
||||
QEMU is a generic and open source processor emulator which achieves a good
|
||||
emulation speed by using dynamic translation.
|
||||
|
||||
This package provides the command line tool for manipulating disk images
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
|
||||
%build
|
||||
./configure \
|
||||
@ -53,7 +67,8 @@ As QEMU requires no host kernel patches to run, it is safe and easy to use.
|
||||
--interp-prefix=%{_prefix}/qemu-%%M \
|
||||
--cc=gcc%{gccver} \
|
||||
--enable-alsa
|
||||
make %{?_smp_mflags}
|
||||
# --extra-ldflags="-Wl,--build-id"
|
||||
make %{?_smp_mflags} #VL_LDFLAGS="-Wl,--build-id"
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
@ -64,6 +79,7 @@ make prefix="${RPM_BUILD_ROOT}%{_prefix}" \
|
||||
mandir="${RPM_BUILD_ROOT}%{_mandir}" \
|
||||
docdir="${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}" \
|
||||
datadir="${RPM_BUILD_ROOT}%{_prefix}/share/qemu" install
|
||||
chmod -x ${RPM_BUILD_ROOT}%{_mandir}/man1/*
|
||||
|
||||
install -D -p -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/qemu
|
||||
|
||||
@ -86,14 +102,111 @@ fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc Changelog README README.distrib TODO
|
||||
%doc Changelog README TODO
|
||||
%doc qemu-doc.html qemu-tech.html
|
||||
%config %{_sysconfdir}/rc.d/init.d/qemu
|
||||
%{_bindir}/qemu*
|
||||
%doc COPYING COPYING.LIB LICENSE
|
||||
%{_sysconfdir}/rc.d/init.d/qemu
|
||||
%{_bindir}/qemu
|
||||
%{_bindir}/qemu-alpha
|
||||
%{_bindir}/qemu-arm
|
||||
%{_bindir}/qemu-armeb
|
||||
%{_bindir}/qemu-cris
|
||||
%{_bindir}/qemu-i386
|
||||
%{_bindir}/qemu-m68k
|
||||
%{_bindir}/qemu-mips
|
||||
%{_bindir}/qemu-mipsel
|
||||
%{_bindir}/qemu-ppc
|
||||
%{_bindir}/qemu-ppc64
|
||||
%{_bindir}/qemu-ppc64abi32
|
||||
%{_bindir}/qemu-sh4
|
||||
%{_bindir}/qemu-sh4eb
|
||||
%{_bindir}/qemu-sparc
|
||||
%{_bindir}/qemu-sparc32plus
|
||||
%{_bindir}/qemu-sparc64
|
||||
%{_bindir}/qemu-system-arm
|
||||
%{_bindir}/qemu-system-mips
|
||||
%{_bindir}/qemu-system-mipsel
|
||||
%{_bindir}/qemu-system-ppc
|
||||
%{_bindir}/qemu-system-sparc
|
||||
%{_bindir}/qemu-system-x86_64
|
||||
%{_bindir}/qemu-system-cris
|
||||
%{_bindir}/qemu-system-m68k
|
||||
%{_bindir}/qemu-system-mips64
|
||||
%{_bindir}/qemu-system-mips64el
|
||||
%{_bindir}/qemu-system-ppc64
|
||||
%{_bindir}/qemu-system-ppcemb
|
||||
%{_bindir}/qemu-system-sh4
|
||||
%{_bindir}/qemu-system-sh4eb
|
||||
%{_bindir}/qemu-x86_64
|
||||
%{_prefix}/share/qemu/
|
||||
%{_mandir}/man1/*
|
||||
%{_mandir}/man1/qemu.1*
|
||||
|
||||
%files img
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/qemu-img
|
||||
%{_mandir}/man1/qemu-img.1*
|
||||
|
||||
%changelog
|
||||
* Wed Dec 3 2008 Lubomir Rintel <lkundrak@v3.sk> - 0.9.1-11
|
||||
- Fix VGA init on isapc machines
|
||||
|
||||
* Wed Jun 25 2008 Daniel P. Berrange <berrange@redhat.com> - 0.9.1-10.fc10
|
||||
- Rebuild for GNU TLS ABI change
|
||||
|
||||
* Wed Jun 11 2008 Daniel P. Berrange <berrange@redhat.com> - 0.9.1-9.fc10
|
||||
- Remove bogus wildcard from files list (rhbz #450701)
|
||||
|
||||
* Sat May 17 2008 Lubomir Rintel <lkundrak@v3.sk> - 0.9.1-8
|
||||
- Register binary handlers also for shared libraries
|
||||
|
||||
* Mon May 5 2008 Daniel P. Berrange <berrange@redhat.com> - 0.9.1-7.fc10
|
||||
- Fix text console PTYs to be in rawmode
|
||||
|
||||
* Sun Apr 27 2008 Lubomir Kundrak <lkundrak@redhat.com> - 0.9.1-6
|
||||
- Register binary handler for SuperH-4 CPU
|
||||
|
||||
* Wed Mar 19 2008 Daniel P. Berrange <berrange@redhat.com> - 0.9.1-5.fc9
|
||||
- Split qemu-img tool into sub-package for smaller footprint installs
|
||||
|
||||
* Wed Feb 27 2008 Daniel P. Berrange <berrange@redhat.com> - 0.9.1-4.fc9
|
||||
- Fix block device checks for extendable disk formats (rhbz #435139)
|
||||
|
||||
* Sat Feb 23 2008 Daniel P. Berrange <berrange@redhat.com> - 0.9.1-3.fc9
|
||||
- Fix block device extents check (rhbz #433560)
|
||||
|
||||
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.9.1-2
|
||||
- Autorebuild for GCC 4.3
|
||||
|
||||
* Tue Jan 8 2008 Daniel P. Berrange <berrange@redhat.com> - 0.9.1-1.fc9
|
||||
- Updated to 0.9.1 release
|
||||
- Fix license tag syntax
|
||||
- Don't mark init script as a config file
|
||||
|
||||
* Wed Sep 26 2007 Daniel P. Berrange <berrange@redhat.com> - 0.9.0-5.fc8
|
||||
- Fix rtl8139 checksum calculation for Vista (rhbz #308201)
|
||||
|
||||
* Tue Aug 28 2007 Daniel P. Berrange <berrange@redhat.com> - 0.9.0-4.fc8
|
||||
- Fix debuginfo by passing -Wl,--build-id to linker
|
||||
|
||||
* Tue Aug 28 2007 David Woodhouse <dwmw2@infradead.org> 0.9.0-4
|
||||
- Update licence
|
||||
- Fix CDROM emulation (#253542)
|
||||
|
||||
* Tue Aug 28 2007 Daniel P. Berrange <berrange@redhat.com> - 0.9.0-3.fc8
|
||||
- Added backport of VNC password auth, and TLS+x509 cert auth
|
||||
- Switch to rtl8139 NIC by default for linkstate reporting
|
||||
- Fix rtl8139 mmio region mappings with multiple NICs
|
||||
|
||||
* Sun Apr 1 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.0-2
|
||||
- Fix direct loading of a linux kernel with -kernel & -initrd (bz 234681)
|
||||
- Remove spurious execute bits from manpages (bz 222573)
|
||||
|
||||
* Tue Feb 6 2007 David Woodhouse <dwmw2@infradead.org> 0.9.0-1
|
||||
- Update to 0.9.0
|
||||
|
||||
* Wed Jan 31 2007 David Woodhouse <dwmw2@infradead.org> 0.8.2-5
|
||||
- Include licences
|
||||
|
||||
* Mon Nov 13 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 0.8.2-4
|
||||
- Backport patch to make FC6 guests work by Kevin Kofler
|
||||
<Kevin@tigcc.ticalc.org> (bz 207843).
|
||||
|
Loading…
Reference in New Issue
Block a user