[oe-commits] org.oe.dev qemu: added 20070613 version from Poky - this works on 32 and 64 bit machines

hrw commit openembedded-commits at lists.openembedded.org
Wed Aug 22 18:05:51 UTC 2007


qemu: added 20070613 version from Poky - this works on 32 and 64 bit machines

Author: hrw at openembedded.org
Branch: org.openembedded.dev
Revision: 0f10ccfb16b2b88426dd8097246da6a1b94a61eb
ViewMTN: http://monotone.openembedded.org/revision.psp?id=0f10ccfb16b2b88426dd8097246da6a1b94a61eb
Files:
1
packages/qemu/files/02_snapshot_use_tmpdir.patch
packages/qemu/files/03_machines_list_no_error.patch
packages/qemu/files/04_do_not_print_rtc_freq_if_ok.patch
packages/qemu/files/05_non-fatal_if_linux_hd_missing.patch
packages/qemu/files/06_exit_segfault.patch
packages/qemu/files/10_signal_jobs.patch
packages/qemu/files/11_signal_sigaction.patch
packages/qemu/files/12_signal_powerpc_support.patch
packages/qemu/files/22_net_tuntap_stall.patch
packages/qemu/files/30_syscall_ipc.patch
packages/qemu/files/31_syscalls.patch
packages/qemu/files/32_syscall_sysctl.patch
packages/qemu/files/33_syscall_ppc_clone.patch
packages/qemu/files/39_syscall_fadvise64.patch
packages/qemu/files/41_arm_fpa_sigfpe.patch
packages/qemu/files/52_ne2000_return.patch
packages/qemu/files/61_safe_64bit_int.patch
packages/qemu/files/63_sparc_build.patch
packages/qemu/files/64_ppc_asm_constraints.patch
packages/qemu/files/65_kfreebsd.patch
packages/qemu/files/66_tls_ld.patch
packages/qemu/files/91-oh-sdl-cursor.patch
packages/qemu/files/93-oh-pl110-rgb.patch
packages/qemu/files/fix_segfault.patch
packages/qemu/files/qemu-0.9.0-nptl-update.patch
packages/qemu/files/qemu-0.9.0-nptl.patch
packages/qemu/files/qemu-amd64-32b-mapping-0.9.0.patch
packages/qemu/files/workaround_bad_futex_headers.patch
packages/qemu/qemu-native_20070613.bb
packages/qemu/qemu_20070613.bb
Diffs:

#
# mt diff -raacb5caea5e7c67e0d5e3285c506c78a7399f7a4 -r0f10ccfb16b2b88426dd8097246da6a1b94a61eb
#
# 
# 
# add_file "packages/qemu/files/02_snapshot_use_tmpdir.patch"
#  content [8403be60765a8909f9b6a767cbd07ee2f7c09ad1]
# 
# add_file "packages/qemu/files/03_machines_list_no_error.patch"
#  content [cfe9bfca11494597ab693967b837c0b319a1bc80]
# 
# add_file "packages/qemu/files/04_do_not_print_rtc_freq_if_ok.patch"
#  content [7c5f8e844d1a9c9682a0b04f85ac5bb4b8864fcf]
# 
# add_file "packages/qemu/files/05_non-fatal_if_linux_hd_missing.patch"
#  content [6efa673b4a11e4f9bd831fbd3d96ca3366e9f160]
# 
# add_file "packages/qemu/files/06_exit_segfault.patch"
#  content [739b4304e59e7da1f66ce4d8c6a83c0b70bb5c7d]
# 
# add_file "packages/qemu/files/10_signal_jobs.patch"
#  content [3a3afc42ec711934f405e1fc146212be3fa29538]
# 
# add_file "packages/qemu/files/11_signal_sigaction.patch"
#  content [c60b23cbfe3fce4083ce38a9dc8e554243f4dba3]
# 
# add_file "packages/qemu/files/12_signal_powerpc_support.patch"
#  content [0e7147174922e92a337dd93368e994e698684b6f]
# 
# add_file "packages/qemu/files/22_net_tuntap_stall.patch"
#  content [8cec6480e7e4679aec02b86456cd4ed0a1075867]
# 
# add_file "packages/qemu/files/30_syscall_ipc.patch"
#  content [e71354dad4348bd00df2b5f3e0b8658e391b2ecd]
# 
# add_file "packages/qemu/files/31_syscalls.patch"
#  content [9010de83fb53df2c5e3951558492eb241ae3f3b5]
# 
# add_file "packages/qemu/files/32_syscall_sysctl.patch"
#  content [520b3e1116706ffcad15ea2adccc4a42c09ccd0b]
# 
# add_file "packages/qemu/files/33_syscall_ppc_clone.patch"
#  content [b1881fc3198840208c8632ed9d4f60f1ef8cdf90]
# 
# add_file "packages/qemu/files/39_syscall_fadvise64.patch"
#  content [a49ce3f4646e34ea6110a2f392260fd4bd0ca194]
# 
# add_file "packages/qemu/files/41_arm_fpa_sigfpe.patch"
#  content [fbb470318c950562ddc4fbf3df37516ffb815436]
# 
# add_file "packages/qemu/files/52_ne2000_return.patch"
#  content [956a67eece2e7e66380210c2a57ff525403ebe04]
# 
# add_file "packages/qemu/files/61_safe_64bit_int.patch"
#  content [bf3546ceeeaf46c386dc3adb45f10dd26c6103c6]
# 
# add_file "packages/qemu/files/63_sparc_build.patch"
#  content [dbfb5d952d243298df3f084d4fe62652a7ab32dd]
# 
# add_file "packages/qemu/files/64_ppc_asm_constraints.patch"
#  content [1811eca7e62890eaf038db253e8fa5b740f33ac6]
# 
# add_file "packages/qemu/files/65_kfreebsd.patch"
#  content [17542ecd6ba6ccd8cac96a84f521536934436878]
# 
# add_file "packages/qemu/files/66_tls_ld.patch"
#  content [9e2466568d6db535b1b17dc742a79e92d52352a1]
# 
# add_file "packages/qemu/files/91-oh-sdl-cursor.patch"
#  content [811b00dcaa48e6c18625b7a21c1cb27e051f9fed]
# 
# add_file "packages/qemu/files/93-oh-pl110-rgb.patch"
#  content [891f126b53d66622a1bb15f648c73e72c074f1ec]
# 
# add_file "packages/qemu/files/fix_segfault.patch"
#  content [940f95ce3ae9e47540f0cd728c1909b191a35451]
# 
# add_file "packages/qemu/files/qemu-0.9.0-nptl-update.patch"
#  content [fb29fbe8d8f278836b49efc8391d3b42c6463074]
# 
# add_file "packages/qemu/files/qemu-0.9.0-nptl.patch"
#  content [ab4c731b4346cfac131cc0a11ef465bd49b81439]
# 
# add_file "packages/qemu/files/qemu-amd64-32b-mapping-0.9.0.patch"
#  content [8fd26edd3a49f28f746072843d90718b4ab1401a]
# 
# add_file "packages/qemu/files/workaround_bad_futex_headers.patch"
#  content [950b6e78d486a94bcf1599f931f55c59d2ef6001]
# 
# add_file "packages/qemu/qemu-native_20070613.bb"
#  content [70c6b769cb660de1a7f33749cd3338f4a948782e]
# 
# add_file "packages/qemu/qemu_20070613.bb"
#  content [d169cbb6915972578e9e84fa7709e27d7381c6a7]
# 
============================================================
--- packages/qemu/files/02_snapshot_use_tmpdir.patch	8403be60765a8909f9b6a767cbd07ee2f7c09ad1
+++ packages/qemu/files/02_snapshot_use_tmpdir.patch	8403be60765a8909f9b6a767cbd07ee2f7c09ad1
@@ -0,0 +1,23 @@
+#DPATCHLEVEL=0
+---
+# block.c |    6 +++++-
+# 1 file changed, 5 insertions(+), 1 deletion(-)
+#
+Index: block.c
+===================================================================
+--- block.c.orig	2007-06-13 11:51:52.000000000 +0100
++++ block.c	2007-06-13 11:51:53.000000000 +0100
+@@ -188,8 +188,12 @@ void get_tmp_filename(char *filename, in
+ void get_tmp_filename(char *filename, int size)
+ {
+     int fd;
++    char *tmpdir;
+     /* XXX: race condition possible */
+-    pstrcpy(filename, size, "/tmp/vl.XXXXXX");
++    tmpdir = getenv("TMPDIR");
++    if (!tmpdir)
++        tmpdir = "/tmp";
++    snprintf(filename, size, "%s/vl.XXXXXX", tmpdir);
+     fd = mkstemp(filename);
+     close(fd);
+ }
============================================================
--- packages/qemu/files/03_machines_list_no_error.patch	cfe9bfca11494597ab693967b837c0b319a1bc80
+++ packages/qemu/files/03_machines_list_no_error.patch	cfe9bfca11494597ab693967b837c0b319a1bc80
@@ -0,0 +1,18 @@
+#DPATCHLEVEL=0
+---
+# vl.c |    2 +-
+# 1 file changed, 1 insertion(+), 1 deletion(-)
+#
+Index: vl.c
+===================================================================
+--- vl.c.orig	2007-06-13 11:51:52.000000000 +0100
++++ vl.c	2007-06-13 11:52:24.000000000 +0100
+@@ -7242,7 +7242,7 @@ int main(int argc, char **argv)
+                                m->name, m->desc, 
+                                m == first_machine ? " (default)" : "");
+                     }
+-                    exit(1);
++                    exit(strcmp(optarg, "?"));
+                 }
+                 break;
+             case QEMU_OPTION_cpu:
============================================================
--- packages/qemu/files/04_do_not_print_rtc_freq_if_ok.patch	7c5f8e844d1a9c9682a0b04f85ac5bb4b8864fcf
+++ packages/qemu/files/04_do_not_print_rtc_freq_if_ok.patch	7c5f8e844d1a9c9682a0b04f85ac5bb4b8864fcf
@@ -0,0 +1,25 @@
+#DPATCHLEVEL=1
+---
+# vl.c |    6 +++++-
+# 1 file changed, 5 insertions(+), 1 deletion(-)
+#
+Index: qemu/vl.c
+===================================================================
+--- qemu.orig/vl.c	2007-06-13 11:51:53.000000000 +0100
++++ qemu/vl.c	2007-06-13 11:52:19.000000000 +0100
+@@ -1026,10 +1026,14 @@ static int rtc_fd;
+ 
+ static int start_rtc_timer(void)
+ {
++    unsigned long current_rtc_freq = 0;
++
+     rtc_fd = open("/dev/rtc", O_RDONLY);
+     if (rtc_fd < 0)
+         return -1;
+-    if (ioctl(rtc_fd, RTC_IRQP_SET, RTC_FREQ) < 0) {
++    ioctl(rtc_fd, RTC_IRQP_READ, &current_rtc_freq);
++    if (current_rtc_freq != RTC_FREQ &&
++        ioctl(rtc_fd, RTC_IRQP_SET, RTC_FREQ) < 0) {
+         fprintf(stderr, "Could not configure '/dev/rtc' to have a 1024 Hz timer. This is not a fatal\n"
+                 "error, but for better emulation accuracy either use a 2.6 host Linux kernel or\n"
+                 "type 'echo 1024 > /proc/sys/dev/rtc/max-user-freq' as root.\n");
============================================================
--- packages/qemu/files/05_non-fatal_if_linux_hd_missing.patch	6efa673b4a11e4f9bd831fbd3d96ca3366e9f160
+++ packages/qemu/files/05_non-fatal_if_linux_hd_missing.patch	6efa673b4a11e4f9bd831fbd3d96ca3366e9f160
@@ -0,0 +1,17 @@
+#DPATCHLEVEL=1
+---
+# hw/pc.c |    1 -
+# 1 file changed, 1 deletion(-)
+#
+Index: qemu/hw/pc.c
+===================================================================
+--- qemu.orig/hw/pc.c	2007-06-13 11:51:52.000000000 +0100
++++ qemu/hw/pc.c	2007-06-13 11:51:53.000000000 +0100
+@@ -355,7 +355,6 @@ static void generate_bootsect(uint32_t g
+     if (bs_table[0] == NULL) {
+ 	fprintf(stderr, "A disk image must be given for 'hda' when booting "
+ 		"a Linux kernel\n");
+-	exit(1);
+     }
+ 
+     memset(bootsect, 0, sizeof(bootsect));
============================================================
--- packages/qemu/files/06_exit_segfault.patch	739b4304e59e7da1f66ce4d8c6a83c0b70bb5c7d
+++ packages/qemu/files/06_exit_segfault.patch	739b4304e59e7da1f66ce4d8c6a83c0b70bb5c7d
@@ -0,0 +1,45 @@
+#DPATCHLEVEL=0
+---
+# linux-user/main.c |    8 ++++----
+# 1 file changed, 4 insertions(+), 4 deletions(-)
+#
+Index: linux-user/main.c
+===================================================================
+--- linux-user/main.c.orig	2007-06-13 11:51:52.000000000 +0100
++++ linux-user/main.c	2007-06-13 11:52:16.000000000 +0100
+@@ -642,7 +642,7 @@ void cpu_loop (CPUSPARCState *env)
+         default:
+             printf ("Unhandled trap: 0x%x\n", trapnr);
+             cpu_dump_state(env, stderr, fprintf, 0);
+-            exit (1);
++            _exit (1);
+         }
+         process_pending_signals (env);
+     }
+@@ -1471,7 +1471,7 @@ void cpu_loop (CPUState *env)
+         default:
+             printf ("Unhandled trap: 0x%x\n", trapnr);
+             cpu_dump_state(env, stderr, fprintf, 0);
+-            exit (1);
++            _exit (1);
+         }
+         process_pending_signals (env);
+     }
+@@ -1735,7 +1735,7 @@ int main(int argc, char **argv)
+                 for(item = cpu_log_items; item->mask != 0; item++) {
+                     printf("%-10s %s\n", item->name, item->help);
+                 }
+-                exit(1);
++                _exit(1);
+             }
+             cpu_set_log(mask);
+         } else if (!strcmp(r, "s")) {
+@@ -1754,7 +1754,7 @@ int main(int argc, char **argv)
+             if (qemu_host_page_size == 0 ||
+                 (qemu_host_page_size & (qemu_host_page_size - 1)) != 0) {
+                 fprintf(stderr, "page size must be a power of two\n");
+-                exit(1);
++                _exit(1);
+             }
+         } else if (!strcmp(r, "g")) {
+             gdbstub_port = atoi(argv[optind++]);
============================================================
--- packages/qemu/files/10_signal_jobs.patch	3a3afc42ec711934f405e1fc146212be3fa29538
+++ packages/qemu/files/10_signal_jobs.patch	3a3afc42ec711934f405e1fc146212be3fa29538
@@ -0,0 +1,26 @@
+#DPATCHLEVEL=0
+---
+# linux-user/signal.c |    7 ++++++-
+# 1 file changed, 6 insertions(+), 1 deletion(-)
+#
+Index: linux-user/signal.c
+===================================================================
+--- linux-user/signal.c.orig	2007-06-13 11:51:52.000000000 +0100
++++ linux-user/signal.c	2007-06-13 11:52:21.000000000 +0100
+@@ -341,10 +341,15 @@ int queue_signal(int sig, target_siginfo
+     k = &sigact_table[sig - 1];
+     handler = k->sa._sa_handler;
+     if (handler == TARGET_SIG_DFL) {
++        if (sig == TARGET_SIGTSTP || sig == TARGET_SIGTTIN || sig == TARGET_SIGTTOU) {
++            kill(getpid(),SIGSTOP);
++            return 0;
++        } else
+         /* default handler : ignore some signal. The other are fatal */
+         if (sig != TARGET_SIGCHLD && 
+             sig != TARGET_SIGURG && 
+-            sig != TARGET_SIGWINCH) {
++            sig != TARGET_SIGWINCH &&
++            sig != TARGET_SIGCONT) {
+             force_sig(sig);
+         } else {
+             return 0; /* indicate ignored */
============================================================
--- packages/qemu/files/11_signal_sigaction.patch	c60b23cbfe3fce4083ce38a9dc8e554243f4dba3
+++ packages/qemu/files/11_signal_sigaction.patch	c60b23cbfe3fce4083ce38a9dc8e554243f4dba3
@@ -0,0 +1,21 @@
+#DPATCHLEVEL=0
+---
+# linux-user/signal.c |    5 +++++
+# 1 file changed, 5 insertions(+)
+#
+Index: linux-user/signal.c
+===================================================================
+--- linux-user/signal.c.orig	2007-06-13 11:51:54.000000000 +0100
++++ linux-user/signal.c	2007-06-13 11:52:20.000000000 +0100
+@@ -429,6 +429,11 @@ int do_sigaction(int sig, const struct t
+ 
+     if (sig < 1 || sig > TARGET_NSIG || sig == SIGKILL || sig == SIGSTOP)
+         return -EINVAL;
++
++    /* no point doing the stuff as those are not allowed for sigaction */
++    if ((sig == TARGET_SIGKILL) || (sig == TARGET_SIGSTOP))
++        return -EINVAL;
++
+     k = &sigact_table[sig - 1];
+ #if defined(DEBUG_SIGNAL)
+     fprintf(stderr, "sigaction sig=%d act=0x%08x, oact=0x%08x\n", 
============================================================
--- packages/qemu/files/12_signal_powerpc_support.patch	0e7147174922e92a337dd93368e994e698684b6f
+++ packages/qemu/files/12_signal_powerpc_support.patch	0e7147174922e92a337dd93368e994e698684b6f
@@ -0,0 +1,401 @@
+#DPATCHLEVEL=1
+---
+# linux-user/signal.c |  371 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+# 1 file changed, 371 insertions(+)
+#
+Index: qemu/linux-user/signal.c
+===================================================================
+--- qemu.orig/linux-user/signal.c	2007-06-13 11:51:54.000000000 +0100
++++ qemu/linux-user/signal.c	2007-06-13 11:51:54.000000000 +0100
+@@ -2,6 +2,7 @@
+  *  Emulation of Linux signals
+  * 
+  *  Copyright (c) 2003 Fabrice Bellard
++ *  Copyright (c) 2005 Josh Triplett <josh at psas.pdx.edu>
+  *
+  *  This program is free software; you can redistribute it and/or modify
+  *  it under the terms of the GNU General Public License as published by
+@@ -16,6 +17,12 @@
+  *  You should have received a copy of the GNU General Public License
+  *  along with this program; if not, write to the Free Software
+  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ *
++ *  Various portions adapted from the Linux kernel:
++ *  Copyright (C) 1995-1996 Gary Thomas (gdt at linuxppc.org)
++ *    Derived from "arch/i386/kernel/signal.c"
++ *      Copyright (C) 1991, 1992 Linus Torvalds
++ *      1997-11-28  Modified for POSIX.1b signals by Richard Henderson
+  */
+ #include <stdlib.h>
+ #include <stdio.h>
+@@ -1964,6 +1971,370 @@ long do_rt_sigreturn(CPUState *env)
+     return -ENOSYS;
+ }
+ 
++#elif defined(TARGET_PPC)
++/* Adapted from the Linux kernel:
++ * arch/ppc/kernel/signal.c
++ * include/asm-ppc/elf.h
++ * include/asm-ppc/ptrace.h
++ * include/asm-ppc/sigcontext.h
++ * include/asm-ppc/ucontext.h
++ */
++
++/*
++ * When we have signals to deliver, we set up on the
++ * user stack, going down from the original stack pointer:
++ *	a sigregs struct
++ *	a sigcontext struct
++ *	a gap of __SIGNAL_FRAMESIZE bytes
++ *
++ * Each of these things must be a multiple of 16 bytes in size.
++ *
++ */
++
++#define TARGET_ELF_NGREG	48	/* includes nip, msr, lr, etc. */
++#define TARGET_ELF_NFPREG	33	/* includes fpscr */
++#define TARGET_ELF_NVRREG	33	/* includes vscr */
++
++/* General registers */
++typedef unsigned long target_elf_greg_t;
++typedef target_elf_greg_t target_elf_gregset_t[TARGET_ELF_NGREG];
++
++/* Floating point registers */
++typedef double target_elf_fpreg_t;
++typedef target_elf_fpreg_t target_elf_fpregset_t[TARGET_ELF_NFPREG];
++
++/* Altivec registers */
++/* FIXME: Altivec not supported yet. */
++/* typedef __vector128 elf_vrreg_t; */
++typedef uint64_t target_elf_vrreg_t[2];
++typedef target_elf_vrreg_t target_elf_vrregset_t[TARGET_ELF_NVRREG];
++
++struct target_mcontext {
++	target_elf_gregset_t	mc_gregs;
++	target_elf_fpregset_t	mc_fregs;
++	/* The kernel calls this mc_pad, but does #define tramp mc_pad */
++	target_ulong		tramp[2];
++	target_elf_vrregset_t	mc_vregs __attribute__((__aligned__(16)));
++};
++
++struct target_sigregs {
++	struct target_mcontext	mctx;		/* all the register values */
++	/* Programs using the rs6000/xcoff abi can save up to 19 gp regs
++	   and 18 fp regs below sp before decrementing it. */
++	int		abigap[56];
++};
++
++struct target_sigcontext {
++	target_ulong   _unused[4];
++	uint32_t       signal;
++	target_ulong   handler;
++	target_ulong   oldmask;
++	struct target_pt_regs *regs;
++};
++
++#define __SIGNAL_FRAMESIZE	64
++
++static int
++save_user_regs(CPUState *env, struct target_mcontext *frame, int sigret)
++{
++	/* save general and floating-point registers */
++#if 0 /* FIXME: handle floating-point, Altivec, SPE */
++	CHECK_FULL_REGS(regs);
++	preempt_disable();
++	if (regs->msr & MSR_FP)
++		giveup_fpu(current);
++#ifdef CONFIG_ALTIVEC
++	if (current->thread.used_vr && (regs->msr & MSR_VEC))
++		giveup_altivec(current);
++#endif /* CONFIG_ALTIVEC */
++#ifdef CONFIG_SPE
++	if (current->thread.used_spe && (regs->msr & MSR_SPE))
++		giveup_spe(current);
++#endif /* CONFIG_ALTIVEC */
++	preempt_enable();
++#endif /* 0 */
++
++	/* Note: this needs to be in the same order as target_pt_regs */
++	if(!memcpy(&frame->mc_gregs, env->gpr,
++	                  32*sizeof(target_elf_greg_t))
++	   || __put_user(env->nip, &frame->mc_gregs[32])
++	   || __put_user(do_load_msr(env), &frame->mc_gregs[33])
++	   /* FIXME: || __put_user(orig_gpr3, &frame->mc_gregs[34]) */
++	   || __put_user(env->ctr, &frame->mc_gregs[35])
++	   || __put_user(env->lr, &frame->mc_gregs[36])
++	   || __put_user(do_load_xer(env), &fra%s
>>> DIFF TRUNCATED @ 16K






More information about the Openembedded-commits mailing list