Update to 0.8.2 (#200065) and various other fixes and enhancements.
This commit is contained in:
parent
1ca92711ab
commit
67348d7a6e
@ -1 +1 @@
|
||||
qemu-0.8.1.tar.gz
|
||||
qemu-0.8.2.tar.gz
|
||||
|
@ -1,189 +0,0 @@
|
||||
--- qemu-0.8.1/linux-user/syscall.c~ 2006-05-03 21:32:58.000000000 +0100
|
||||
+++ qemu-0.8.1/linux-user/syscall.c 2006-06-07 22:11:48.000000000 +0100
|
||||
@@ -79,127 +79,59 @@
|
||||
#define VFAT_IOCTL_READDIR_SHORT _IOR('r', 2, struct dirent [2])
|
||||
|
||||
|
||||
-#if defined(__powerpc__)
|
||||
-#undef __syscall_nr
|
||||
-#undef __sc_loadargs_0
|
||||
-#undef __sc_loadargs_1
|
||||
-#undef __sc_loadargs_2
|
||||
-#undef __sc_loadargs_3
|
||||
-#undef __sc_loadargs_4
|
||||
-#undef __sc_loadargs_5
|
||||
-#undef __sc_asm_input_0
|
||||
-#undef __sc_asm_input_1
|
||||
-#undef __sc_asm_input_2
|
||||
-#undef __sc_asm_input_3
|
||||
-#undef __sc_asm_input_4
|
||||
-#undef __sc_asm_input_5
|
||||
#undef _syscall0
|
||||
#undef _syscall1
|
||||
#undef _syscall2
|
||||
#undef _syscall3
|
||||
#undef _syscall4
|
||||
#undef _syscall5
|
||||
+#undef _syscall6
|
||||
|
||||
-/* need to redefine syscalls as Linux kernel defines are incorrect for
|
||||
- the clobber list */
|
||||
-/* On powerpc a system call basically clobbers the same registers like a
|
||||
- * function call, with the exception of LR (which is needed for the
|
||||
- * "sc; bnslr" sequence) and CR (where only CR0.SO is clobbered to signal
|
||||
- * an error return status).
|
||||
- */
|
||||
-
|
||||
-#define __syscall_nr(nr, type, name, args...) \
|
||||
- unsigned long __sc_ret, __sc_err; \
|
||||
- { \
|
||||
- register unsigned long __sc_0 __asm__ ("r0"); \
|
||||
- register unsigned long __sc_3 __asm__ ("r3"); \
|
||||
- register unsigned long __sc_4 __asm__ ("r4"); \
|
||||
- register unsigned long __sc_5 __asm__ ("r5"); \
|
||||
- register unsigned long __sc_6 __asm__ ("r6"); \
|
||||
- register unsigned long __sc_7 __asm__ ("r7"); \
|
||||
- \
|
||||
- __sc_loadargs_##nr(name, args); \
|
||||
- __asm__ __volatile__ \
|
||||
- ("sc \n\t" \
|
||||
- "mfcr %0 " \
|
||||
- : "=&r" (__sc_0), \
|
||||
- "=&r" (__sc_3), "=&r" (__sc_4), \
|
||||
- "=&r" (__sc_5), "=&r" (__sc_6), \
|
||||
- "=&r" (__sc_7) \
|
||||
- : __sc_asm_input_##nr \
|
||||
- : "cr0", "ctr", "memory", \
|
||||
- "r8", "r9", "r10","r11", "r12"); \
|
||||
- __sc_ret = __sc_3; \
|
||||
- __sc_err = __sc_0; \
|
||||
- } \
|
||||
- if (__sc_err & 0x10000000) \
|
||||
- { \
|
||||
- errno = __sc_ret; \
|
||||
- __sc_ret = -1; \
|
||||
- } \
|
||||
- return (type) __sc_ret
|
||||
-
|
||||
-#define __sc_loadargs_0(name, dummy...) \
|
||||
- __sc_0 = __NR_##name
|
||||
-#define __sc_loadargs_1(name, arg1) \
|
||||
- __sc_loadargs_0(name); \
|
||||
- __sc_3 = (unsigned long) (arg1)
|
||||
-#define __sc_loadargs_2(name, arg1, arg2) \
|
||||
- __sc_loadargs_1(name, arg1); \
|
||||
- __sc_4 = (unsigned long) (arg2)
|
||||
-#define __sc_loadargs_3(name, arg1, arg2, arg3) \
|
||||
- __sc_loadargs_2(name, arg1, arg2); \
|
||||
- __sc_5 = (unsigned long) (arg3)
|
||||
-#define __sc_loadargs_4(name, arg1, arg2, arg3, arg4) \
|
||||
- __sc_loadargs_3(name, arg1, arg2, arg3); \
|
||||
- __sc_6 = (unsigned long) (arg4)
|
||||
-#define __sc_loadargs_5(name, arg1, arg2, arg3, arg4, arg5) \
|
||||
- __sc_loadargs_4(name, arg1, arg2, arg3, arg4); \
|
||||
- __sc_7 = (unsigned long) (arg5)
|
||||
-
|
||||
-#define __sc_asm_input_0 "0" (__sc_0)
|
||||
-#define __sc_asm_input_1 __sc_asm_input_0, "1" (__sc_3)
|
||||
-#define __sc_asm_input_2 __sc_asm_input_1, "2" (__sc_4)
|
||||
-#define __sc_asm_input_3 __sc_asm_input_2, "3" (__sc_5)
|
||||
-#define __sc_asm_input_4 __sc_asm_input_3, "4" (__sc_6)
|
||||
-#define __sc_asm_input_5 __sc_asm_input_4, "5" (__sc_7)
|
||||
-
|
||||
-#define _syscall0(type,name) \
|
||||
-type name(void) \
|
||||
-{ \
|
||||
- __syscall_nr(0, type, name); \
|
||||
-}
|
||||
-
|
||||
-#define _syscall1(type,name,type1,arg1) \
|
||||
-type name(type1 arg1) \
|
||||
-{ \
|
||||
- __syscall_nr(1, type, name, arg1); \
|
||||
-}
|
||||
-
|
||||
-#define _syscall2(type,name,type1,arg1,type2,arg2) \
|
||||
-type name(type1 arg1, type2 arg2) \
|
||||
-{ \
|
||||
- __syscall_nr(2, type, name, arg1, arg2); \
|
||||
-}
|
||||
-
|
||||
-#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
|
||||
-type name(type1 arg1, type2 arg2, type3 arg3) \
|
||||
-{ \
|
||||
- __syscall_nr(3, type, name, arg1, arg2, arg3); \
|
||||
-}
|
||||
-
|
||||
-#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
|
||||
-type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
|
||||
-{ \
|
||||
- __syscall_nr(4, type, name, arg1, arg2, arg3, arg4); \
|
||||
-}
|
||||
-
|
||||
-#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
|
||||
-type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
|
||||
-{ \
|
||||
- __syscall_nr(5, type, name, arg1, arg2, arg3, arg4, arg5); \
|
||||
+#define _syscall0(type,name) \
|
||||
+type name (void) \
|
||||
+{ \
|
||||
+ return syscall(__NR_##name); \
|
||||
}
|
||||
-#endif
|
||||
+
|
||||
+#define _syscall1(type,name,type1,arg1) \
|
||||
+type name (type1 arg1) \
|
||||
+{ \
|
||||
+ return syscall(__NR_##name, arg1); \
|
||||
+}
|
||||
+
|
||||
+#define _syscall2(type,name,type1,arg1,type2,arg2) \
|
||||
+type name (type1 arg1,type2 arg2) \
|
||||
+{ \
|
||||
+ return syscall(__NR_##name, arg1, arg2); \
|
||||
+}
|
||||
+
|
||||
+#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
|
||||
+type name (type1 arg1,type2 arg2,type3 arg3) \
|
||||
+{ \
|
||||
+ return syscall(__NR_##name, arg1, arg2, arg3); \
|
||||
+}
|
||||
+
|
||||
+#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
|
||||
+type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4) \
|
||||
+{ \
|
||||
+ return syscall(__NR_##name, arg1, arg2, arg3, arg4); \
|
||||
+}
|
||||
+
|
||||
+#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
|
||||
+ type5,arg5) \
|
||||
+type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
|
||||
+{ \
|
||||
+ return syscall(__NR_##name, arg1, arg2, arg3, arg4, arg5); \
|
||||
+}
|
||||
+
|
||||
+
|
||||
+#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
|
||||
+ type5,arg5,type6,arg6) \
|
||||
+type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \
|
||||
+{ \
|
||||
+ return syscall(__NR_##name, arg1, arg2, arg3, arg4, arg5, arg6); \
|
||||
+}
|
||||
+
|
||||
|
||||
#define __NR_sys_uname __NR_uname
|
||||
#define __NR_sys_getcwd1 __NR_getcwd
|
||||
--- qemu-0.8.1/target-i386/helper2.c.orig 2006-06-08 11:09:41.000000000 +0100
|
||||
+++ qemu-0.8.1/target-i386/helper2.c 2006-06-08 11:10:30.000000000 +0100
|
||||
@@ -35,7 +35,10 @@
|
||||
#include <linux/unistd.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
-_syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount)
|
||||
+int modify_ldt(int func, void *ptr, unsigned long bytecount)
|
||||
+{
|
||||
+ return syscall(__NR_modify_ldt, func, ptr, bytecount);
|
||||
+}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 66)
|
||||
#define modify_ldt_ldt_s user_desc
|
86
qemu.spec
86
qemu.spec
@ -1,63 +1,58 @@
|
||||
Summary: QEMU is a FAST! processor emulator
|
||||
Name: qemu
|
||||
Version: 0.8.1
|
||||
Release: 3%{?dist}
|
||||
|
||||
Version: 0.8.2
|
||||
Release: 1%{?dist}
|
||||
License: GPL/LGPL
|
||||
Group: Development/Tools
|
||||
URL: http://fabrice.bellard.free.fr/qemu
|
||||
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.1-syscall-macros.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: SDL-devel compat-gcc-32 zlib-devel texi2html
|
||||
PreReq: /sbin/chkconfig
|
||||
PreReq: /sbin/service
|
||||
ExclusiveArch: %{ix86} ppc alpha sparc armv4l x86_64
|
||||
BuildRequires: SDL-devel compat-gcc-32 zlib-devel which texi2html
|
||||
Requires(post): /sbin/chkconfig
|
||||
Requires(preun): /sbin/service /sbin/chkconfig
|
||||
Requires(postun): /sbin/service
|
||||
ExclusiveArch: %{ix86} x86_64 ppc alpha sparc armv4l
|
||||
|
||||
%description
|
||||
By using dynamic translation it achieves a reasonable speed while being easy
|
||||
to port on new host CPUs. QEMU has two operating modes:
|
||||
QEMU is a generic and open source processor emulator which achieves a good
|
||||
emulation speed by using dynamic translation. QEMU has two operating modes:
|
||||
|
||||
* Full system emulation. In this mode, QEMU emulates a full system (for
|
||||
example a PC), including a processor and various peripherials. It can be
|
||||
used to launch different Operating Systems without rebooting the PC or
|
||||
to debug system code.
|
||||
* User mode emulation. In this mode, QEMU can launch Linux processes compiled
|
||||
for one CPU on another CPU. Linux system calls are converted because of
|
||||
endianness and 32/64 bit mismatches. Wine (Windows emulation) and DOSEMU
|
||||
(DOS emulation) are the main targets for QEMU.
|
||||
* Full system emulation. In this mode, QEMU emulates a full system, including
|
||||
a processor and various peripherals. Currently, it is only used to launch
|
||||
an x86 Linux kernel on an x86 Linux system. It enables easier testing and
|
||||
debugging of system code. It can also be used to provide virtual hosting
|
||||
of several virtual PC on a single server.
|
||||
for one CPU on another CPU.
|
||||
|
||||
As QEMU requires no host kernel patches to run, it is very safe and easy to use.
|
||||
As QEMU requires no host kernel patches to run, it is safe and easy to use.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
./configure --prefix=%{_prefix} --interp-prefix=%{_prefix}/qemu-%%M \
|
||||
%ifarch x86_64
|
||||
--target-list="i386-user arm-user armeb-user ppc-user mips-user mipsel-user i386-softmmu ppc-softmmu x86_64-softmmu mips-softmmu arm-softmmu" \
|
||||
--target-list="i386-user arm-user armeb-user ppc-user mips-user mipsel-user i386-softmmu ppc-softmmu x86_64-softmmu mips-softmmu arm-softmmu" \
|
||||
%endif
|
||||
--cc=gcc32 --enable-alsa
|
||||
make
|
||||
--cc=gcc32 --enable-alsa
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
make prefix="${RPM_BUILD_ROOT}%{_prefix}" \
|
||||
bindir="${RPM_BUILD_ROOT}%{_bindir}" \
|
||||
sharedir="${RPM_BUILD_ROOT}%{_prefix}/share/qemu" \
|
||||
mandir="${RPM_BUILD_ROOT}%{_mandir}" \
|
||||
docdir="${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}" \
|
||||
datadir="${RPM_BUILD_ROOT}%{_prefix}/share/qemu" install
|
||||
bindir="${RPM_BUILD_ROOT}%{_bindir}" \
|
||||
sharedir="${RPM_BUILD_ROOT}%{_prefix}/share/qemu" \
|
||||
mandir="${RPM_BUILD_ROOT}%{_mandir}" \
|
||||
docdir="${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}" \
|
||||
datadir="${RPM_BUILD_ROOT}%{_prefix}/share/qemu" install
|
||||
|
||||
install -D $RPM_SOURCE_DIR/qemu.init $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/qemu
|
||||
install -D -p -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/qemu
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
@ -66,22 +61,37 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/sbin/chkconfig --add qemu
|
||||
|
||||
%preun
|
||||
if [ $1 = 0 ]; then
|
||||
/sbin/service qemu stop > /dev/null 2>&1
|
||||
if [ $1 -eq 0 ]; then
|
||||
/sbin/service qemu stop &>/dev/null || :
|
||||
/sbin/chkconfig --del qemu
|
||||
fi
|
||||
|
||||
%postun
|
||||
if [ $1 -ge 1 ]; then
|
||||
/sbin/service qemu condrestart &>/dev/null || :
|
||||
fi
|
||||
/sbin/chkconfig --del qemu
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc Changelog README README.distrib TODO
|
||||
%doc qemu-tech.texi qemu-doc.texi
|
||||
%doc *.html
|
||||
%{_bindir}/qemu*
|
||||
%{_prefix}/share/qemu
|
||||
%{_mandir}/man?/*
|
||||
%doc qemu-doc.html qemu-tech.html
|
||||
%config %{_sysconfdir}/rc.d/init.d/qemu
|
||||
%{_bindir}/qemu*
|
||||
%{_prefix}/share/qemu/
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
* Wed Aug 23 2006 Matthias Saou <http://freshrpms.net/> 0.8.2-1
|
||||
- Update to 0.8.2 (#200065).
|
||||
- Drop upstreamed syscall-macros patch2.
|
||||
- Put correct scriplet dependencies.
|
||||
- Force install mode for the init script to avoid umask problems.
|
||||
- Add %%postun condrestart for changes to the init script to be applied if any.
|
||||
- Update description with the latest "about" from the web page (more current).
|
||||
- Update URL to qemu.org one like the Source.
|
||||
- Add which build requirement.
|
||||
- Don't include texi files in %%doc since we ship them in html.
|
||||
|
||||
* Thu Jun 8 2006 David Woodhouse <dwmw2@infradead.org> 0.8.1-3
|
||||
- More header abuse in modify_ldt(), change BuildRoot:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user