add qemu user
This commit is contained in:
parent
3f307b6882
commit
1986cc7b0f
171
app-emulation/qemu-user/ChangeLog
Normal file
171
app-emulation/qemu-user/ChangeLog
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
# ChangeLog for app-emulation/qemu-user
|
||||||
|
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
|
||||||
|
# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-user/ChangeLog,v 1.40 2010/10/15 14:21:23 flameeyes Exp $
|
||||||
|
|
||||||
|
15 Oct 2010; Diego E. Pettenò <flameeyes@gentoo.org>
|
||||||
|
-qemu-user-0.10.0.ebuild, -qemu-user-0.10.1.ebuild:
|
||||||
|
Spring cleaning of ebuilds.
|
||||||
|
|
||||||
|
*qemu-user-0.12.2 (14 Feb 2010)
|
||||||
|
|
||||||
|
14 Feb 2010; <solar@gentoo.org> +qemu-user-0.12.2.ebuild:
|
||||||
|
-- bump qemu-user to current. Add static use flag for cross arch chroot
|
||||||
|
emulation.
|
||||||
|
|
||||||
|
14 Nov 2009; Tomáš Chvátal <scarabeus@gentoo.org>
|
||||||
|
-qemu-user-0.9.1.ebuild:
|
||||||
|
Drop old masked version.
|
||||||
|
|
||||||
|
*qemu-user-0.10.1 (22 Mar 2009)
|
||||||
|
|
||||||
|
22 Mar 2009; Luca Barbato <lu_zero@gentoo.org> +qemu-user-0.10.1.ebuild:
|
||||||
|
Bugfix release
|
||||||
|
|
||||||
|
12 Mar 2009; Diego E. Pettenò <flameeyes@gentoo.org>
|
||||||
|
qemu-user-0.10.0.ebuild:
|
||||||
|
Remove binchecks restriction (package installs binaries!).
|
||||||
|
|
||||||
|
12 Mar 2009; Luca Barbato <lu_zero@gentoo.org> qemu-user-0.10.0.ebuild:
|
||||||
|
Simplify hardened support
|
||||||
|
|
||||||
|
10 Mar 2009; Luca Barbato <lu_zero@gentoo.org> qemu-user-0.10.0.ebuild:
|
||||||
|
Fix leftover from kvm ebuild import
|
||||||
|
|
||||||
|
*qemu-user-0.10.0 (07 Mar 2009)
|
||||||
|
|
||||||
|
07 Mar 2009; Luca Barbato <lu_zero@gentoo.org> +qemu-user-0.10.0.ebuild:
|
||||||
|
New version
|
||||||
|
|
||||||
|
01 Feb 2008; Luca Barbato <lu_zero@gentoo.org>
|
||||||
|
-files/qemu-user-0.7.0-errno.patch, -files/qemu-0.8.0-gcc4-hacks.patch,
|
||||||
|
-files/qemu-0.8.0-stwbrx.patch, -files/qemu-ppc-dirty-hack.patch,
|
||||||
|
-qemu-user-0.8.0.ebuild, -qemu-user-0.8.0.20060329.ebuild,
|
||||||
|
-qemu-user-0.8.1.ebuild, -qemu-user-0.8.2.ebuild:
|
||||||
|
Remove qemu-0.8 series
|
||||||
|
|
||||||
|
*qemu-user-0.9.1 (27 Jan 2008)
|
||||||
|
|
||||||
|
27 Jan 2008; Luca Barbato <lu_zero@gentoo.org> +qemu-user-0.9.1.ebuild:
|
||||||
|
Version bump
|
||||||
|
|
||||||
|
02 Jul 2007; Piotr Jaroszyński <peper@gentoo.org> qemu-user-0.8.0.ebuild,
|
||||||
|
qemu-user-0.8.0.20060329.ebuild, qemu-user-0.8.1.ebuild,
|
||||||
|
qemu-user-0.8.2.ebuild, qemu-user-0.9.0.ebuild:
|
||||||
|
(QA) RESTRICT clean up.
|
||||||
|
|
||||||
|
20 May 2007; Christian Faulhammer <opfer@gentoo.org>
|
||||||
|
qemu-user-0.9.0.ebuild:
|
||||||
|
stable amd64, security bug 176674
|
||||||
|
|
||||||
|
16 May 2007; Luca Barbato <lu_zero@gentoo.org> qemu-user-0.9.0.ebuild:
|
||||||
|
Marked ppc
|
||||||
|
|
||||||
|
08 May 2007; Markus Ullmann <jokey@gentoo.org> qemu-user-0.9.0.ebuild:
|
||||||
|
Stable on x86 wrt security bug #176674
|
||||||
|
|
||||||
|
21 Feb 2007; Piotr Jaroszyński <peper@gentoo.org> ChangeLog:
|
||||||
|
Transition to Manifest2.
|
||||||
|
|
||||||
|
10 Feb 2007; Luca Barbato <lu_zero@gentoo.org> qemu-user-0.9.0.ebuild:
|
||||||
|
Fix bug #164491
|
||||||
|
|
||||||
|
*qemu-user-0.9.0 (10 Feb 2007)
|
||||||
|
|
||||||
|
10 Feb 2007; Luca Barbato <lu_zero@gentoo.org> +qemu-user-0.9.0.ebuild:
|
||||||
|
New version
|
||||||
|
|
||||||
|
06 Feb 2007; Simon Stelling <blubb@gentoo.org> qemu-user-0.8.2.ebuild:
|
||||||
|
stable on amd64; bug 159522
|
||||||
|
|
||||||
|
02 Jan 2007; Christian Faulhammer <opfer@gentoo.org>
|
||||||
|
qemu-user-0.8.2.ebuild:
|
||||||
|
stable x86, bug #159522
|
||||||
|
|
||||||
|
31 Dec 2006; Luca Barbato <lu_zero@gentoo.org> qemu-user-0.8.2.ebuild:
|
||||||
|
Marked ppc
|
||||||
|
|
||||||
|
22 Nov 2006; Kevin F. Quinn <kevquinn@gentoo.org> qemu-user-0.8.2.ebuild:
|
||||||
|
Add QA variable indicating which files contain textrels; these are a feature
|
||||||
|
of how qemu works.
|
||||||
|
|
||||||
|
*qemu-user-0.8.2 (16 Aug 2006)
|
||||||
|
|
||||||
|
16 Aug 2006; Luca Barbato <lu_zero@gentoo.org>
|
||||||
|
+files/qemu-0.7.0-ppc-linker.patch, +qemu-user-0.8.2.ebuild:
|
||||||
|
New version, I gave up about the sparc module (broken upstream)
|
||||||
|
Patch took from the debian patchset as pointed by David Gurvich
|
||||||
|
<david.gurvich@verizon.net> in bug #138655
|
||||||
|
|
||||||
|
09 Jun 2006; Michael Sterrett <mr_bones_@gentoo.org>
|
||||||
|
-qemu-user-0.7.0-r1.ebuild, -qemu-user-0.7.1.ebuild,
|
||||||
|
-qemu-user-0.7.2.ebuild:
|
||||||
|
clean out old versions
|
||||||
|
|
||||||
|
07 May 2006; Luca Barbato <lu_zero@gentoo.org> qemu-user-0.8.1.ebuild:
|
||||||
|
Fix errno again for x86, thanks to lothalev@gmail.com
|
||||||
|
|
||||||
|
*qemu-user-0.8.1 (06 May 2006)
|
||||||
|
|
||||||
|
06 May 2006; Luca Barbato <lu_zero@gentoo.org>
|
||||||
|
+files/qemu-0.8.0-gcc4-hacks.patch, qemu-user-0.8.0.ebuild,
|
||||||
|
qemu-user-0.8.0.20060329.ebuild, +qemu-user-0.8.1.ebuild:
|
||||||
|
New version and added Mandrake patch for gcc4 on x86
|
||||||
|
|
||||||
|
27 Apr 2006; Luca Barbato <lu_zero@gentoo.org> qemu-user-0.8.0.ebuild,
|
||||||
|
qemu-user-0.8.0.20060329.ebuild:
|
||||||
|
New target added: mips
|
||||||
|
|
||||||
|
23 Apr 2006; Luca Barbato <lu_zero@gentoo.org>
|
||||||
|
+files/qemu-0.8.0-stwbrx.patch, qemu-user-0.8.0.ebuild,
|
||||||
|
qemu-user-0.8.0.20060329.ebuild:
|
||||||
|
PPC fix, thanks to dimitrij wagner <qwertyfive@gmx.net> for providing it
|
||||||
|
|
||||||
|
19 Apr 2006; Daniel Gryniewicz <dang@gentoo.org> qemu-user-0.8.0.ebuild:
|
||||||
|
Marked stable on amd64 per bug# 123972
|
||||||
|
|
||||||
|
16 Apr 2006; Michael Hanselmann <hansmi@gentoo.org>
|
||||||
|
qemu-user-0.8.0.ebuild:
|
||||||
|
Stable on ppc.
|
||||||
|
|
||||||
|
01 Apr 2006; Luca Barbato <lu_zero@gentoo.org> qemu-user-0.8.0.ebuild:
|
||||||
|
Restricted test feature
|
||||||
|
|
||||||
|
*qemu-user-0.8.0.20060329 (29 Mar 2006)
|
||||||
|
|
||||||
|
29 Mar 2006; Luca Barbato <lu_zero@gentoo.org>
|
||||||
|
+qemu-user-0.8.0.20060329.ebuild:
|
||||||
|
New version
|
||||||
|
|
||||||
|
29 Mar 2006; Chris White <chriswhite@gentoo.org> qemu-user-0.8.0.ebuild:
|
||||||
|
x88 stable for qemu-user-0.8.0 bug #123972.
|
||||||
|
|
||||||
|
09 Jan 2006; Luca Barbato <lu_zero@gentoo.org> qemu-user-0.8.0.ebuild:
|
||||||
|
Disable gcc checks, thanks to Robert Führicht <the_master_of_disaster@gmx.at>
|
||||||
|
|
||||||
|
*qemu-user-0.8.0 (23 Dec 2005)
|
||||||
|
|
||||||
|
23 Dec 2005; Luca Barbato <lu_zero@gentoo.org> +qemu-user-0.8.0.ebuild:
|
||||||
|
New version
|
||||||
|
|
||||||
|
*qemu-user-0.7.2 (11 Sep 2005)
|
||||||
|
|
||||||
|
11 Sep 2005; Luca Barbato <lu_zero@gentoo.org> +qemu-user-0.7.2.ebuild:
|
||||||
|
New release
|
||||||
|
|
||||||
|
06 Aug 2005; Luca Barbato <lu_zero@gentoo.org>
|
||||||
|
+files/qemu-ppc-dirty-hack.patch, qemu-user-0.7.1.ebuild:
|
||||||
|
Workaround to make it build with newer binutils, thanks to Andrew de Quincey
|
||||||
|
<adq_dvb@lidskialf.net>
|
||||||
|
|
||||||
|
*qemu-user-0.7.1 (25 Jul 2005)
|
||||||
|
|
||||||
|
25 Jul 2005; Luca Barbato <lu_zero@gentoo.org> +qemu-user-0.7.1.ebuild:
|
||||||
|
New version
|
||||||
|
|
||||||
|
*qemu-user-0.7.0-r1 (18 Jun 2005)
|
||||||
|
|
||||||
|
18 Jun 2005; Luca Barbato <lu_zero@gentoo.org>
|
||||||
|
+files/qemu-user-0.7.0-errno.patch, +metadata.xml,
|
||||||
|
+qemu-user-0.7.0-r1.ebuild:
|
||||||
|
qemu split ebuild, abi wrappers
|
||||||
|
|
29
app-emulation/qemu-user/Manifest
Normal file
29
app-emulation/qemu-user/Manifest
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
AUX 0.14.1/0001-qemu-0.7.0-amd64.patch 1475 RMD160 a1997077c9463e209b6717ec0e305f171282697d SHA1 befe5ae85f37e4ceaa15b8b701e26628685db7cc SHA256 25bda27f693ebb127d442205f46233318c1ea0c25e83494b3be077ceb01be509
|
||||||
|
AUX 0.14.1/0002-qemu-0.9.0.cvs-binfmt.patch 8802 RMD160 d46805c0b265554e5073fffa50b807efe810aa6a SHA1 5e46438cd3d98e9c7da7da317b8a59d8092721c3 SHA256 ea60680268c2fa9ff1df3bb2ed823a27967193874750b29d35e417e2a639b2dc
|
||||||
|
AUX 0.14.1/0003-qemu-cvs-alsa_bitfield.patch 2461 RMD160 fbd6ca8650925404fb7031cc248e687e1f785650 SHA1 6599dda02adf122c0553e167d08d347f9105d8bf SHA256 5742477cb0aaf129fd120dee2adae795fe3ba4e6377b5e384159028faf42f625
|
||||||
|
AUX 0.14.1/0004-qemu-cvs-alsa_ioctl.patch 134017 RMD160 bb5370db468a32695ef0f3d95c2324ff9642cee7 SHA1 fed07226b62ab12ee896f0e1d8f5dfa87804f721 SHA256 e710e46e56e340978d1ff9bff2c41dc8a6cdb6b1a27ad24aecf955cdc636b1f7
|
||||||
|
AUX 0.14.1/0005-qemu-cvs-alsa_mmap.patch 1542 RMD160 c0b59c8585be031a4311944abf39458094783734 SHA1 7d3eac48e1ee92b5f01ec15fe89ec96357e2f5af SHA256 063c61a3cbd3d1fab92b340973754c7a3ee16653bfe7c603b5ff3f8b5f81a692
|
||||||
|
AUX 0.14.1/0006-qemu-cvs-gettimeofday.patch 823 RMD160 16b15186f494c5b494f573d4304be6b3afe05213 SHA1 ce9932091b1192abbe6bbf5f4fb820c0d84a53f4 SHA256 0cbf3f7ef72e70633f1e10b453a8a5beafba5864a3c04ab89c211be5333685c8
|
||||||
|
AUX 0.14.1/0007-qemu-cvs-ioctl_debug.patch 1432 RMD160 60e8a34301c7901ec6cc0c658243ad3f0e7d54e0 SHA1 46639e9baec2f6478941787aeab969123541d050 SHA256 fb6eeef6d5011fddb781da97dd05437ea46ac71a98c1d98a2a7567c79e8bcbe8
|
||||||
|
AUX 0.14.1/0008-qemu-cvs-ioctl_nodirection.patch 1601 RMD160 d526d6ef7388870f3397c99878cc16367ead6c4d SHA1 6c233ea2d992fd11d4e3e6cf647a533d20e18a2e SHA256 05f7a3c3f041adbf1161291ba5df330863910b0fc2eb998d66a9ae461c023f44
|
||||||
|
AUX 0.14.1/0009-qemu-cvs-sched_getaffinity.patch 1930 RMD160 f35786262802559ee3b74c7973ace7729ab86a9a SHA1 65e42415dc3fd078469ccf7e8cd03f484a3c6270 SHA256 0c7e4ed35b0b448cab3021a9903d5fbb7fa78e4aafd7df034baeeaf151827cc4
|
||||||
|
AUX 0.14.1/0010-qemu-cvs-mmap-amd64.patch 3054 RMD160 63da0f1fc63c8a20c30a653a98c36157cff64c39 SHA1 796316da61db32ba75a26581256d9b4d5bfe1993 SHA256 e40ecfef55a57446936c76aa3a9c677c5e0e76bebf07faeaf50b2bab7450f424
|
||||||
|
AUX 0.14.1/0011-qemu-img-vmdk-scsi.patch 4202 RMD160 0c9b9e6a166655414f9d43ae5483fc71166057c2 SHA1 8bb2bc3da9db327ba56e48542bf07feffca19384 SHA256 bef274ebc2ee4221ba3e7ee4ba226e7e6205050d9a5fb2e4dbb84b71671a2494
|
||||||
|
AUX 0.14.1/0012-qemu-nonvoid_return.patch 1123 RMD160 5d77c2943d6e8e6e34b65e22566310a7d1cfa80e SHA1 319268438cd6ab68d35ff5bd4ef9ec279f488910 SHA256 0e4ac0b693052be9a358e66d36a9eb18f447c7309cfe57e602d13ae643f1ea3a
|
||||||
|
AUX 0.14.1/0013-i386-linux-user-NPTL-support.patch 2095 RMD160 db559b9b6540e21ef421a7187421687ce4bc4a92 SHA1 e072aac495c5df51f08efcd8b6073f1a62f37b14 SHA256 c4d367c3f564d4b51de2bb1960871caa4c05f783787df24d97cbd975539b166c
|
||||||
|
AUX 0.14.1/0015-S-390-support.patch 218653 RMD160 a6c71703b596b5dcb89a85e3666e4fde45b6bb69 SHA1 da575d8118e8190e524e4c38c56ca9d8670ba85f SHA256 1d89403a6cffa8a92f96c0b6a17214a618acd7cde5abf51ed10c11c659de5b64
|
||||||
|
AUX 0.14.1/0016-fix-mipsn32-linux-user-builds.patch 1919 RMD160 45b3251fd74a078ea7f85d4253cd8f2577d152d3 SHA1 7ac33b6cd89283cec9357bdf34d7ff730a6e3537 SHA256 1b75963bfe30ffa6525ef4e14b635ac2997813e86027f4e7abd999be417af3f1
|
||||||
|
AUX 0.14.1/0017-S-390-build-fix.patch 5784 RMD160 33604e52784141eefc1ee6c77e544b8e64edfcc6 SHA1 1bb2fd027c740cc0475289476bab0f9daa9158e8 SHA256 e90790afa0711b153ab3e0fd5a68052d4016499d8a6c6110eb25f7e0701fc9de
|
||||||
|
AUX 0.14.1/0018-qemu-0.14.1-mcast-udp.patch 10214 RMD160 1f8e767837a312d5ce912dad9551214d73b5e45b SHA1 c1fff0c9b7e60fd611973ddf9acb717e8edfa202 SHA256 182c72d1c2056ac7c5dafbb469dce58844e964949b2c9cbdb7d33edd1aca7567
|
||||||
|
AUX 0.14.1/0019-linux-user-fix-openat.patch 1675 RMD160 6b28cb0e0b0e27e992e830994a0ed3f7e4a55497 SHA1 da19a1f0586850bc6655195a5c5e14366aac882c SHA256 8c753f00bd09594fb92625f029a6b2b04b6134b8132b8fdd753a4f835cd41582
|
||||||
|
AUX 0.14.1/0020-linux-user-implement-reboot-syscall.patch 1403 RMD160 456a111c9681cb0d9c512c2865a3c213166533c7 SHA1 9c996094f1abbb5aae709eece617b3bfc86ca6d1 SHA256 7696d2ce0d3e311716aed420e11323d2ef83b93d7e82fac992361c3ca7d8e32b
|
||||||
|
AUX 0.14.1/0021-implement-prlimit64-syscall.patch 4175 RMD160 c31cd2e670c0fe3a8b2df462b1fb4b1e7c55cb9b SHA1 1bf72cfe09bb4bfb5101cd96fdade15bfe538926 SHA256 79d7e395b46430775f8f82b19890d2f73681d9fdfac46b807b3d148e83facf91
|
||||||
|
AUX 0.14.1/0022-fixing-smp-races.patch 1224 RMD160 bcb627e31d677dd787c252d40da3faf45742e4bf SHA1 0b92b6b92eb8ebe92b465e0c5266ef74cf52e917 SHA256 cbb12a0cee1a123fc209b563968ee0c8b2111727adbf8b00644a24f23fbbce15
|
||||||
|
AUX 0.14.1/0023-linux-user-add-binfmt-wrapper-for-argv-0-handling.patch 11904 RMD160 0165cdaf6a7307838993285f95c228d005ade149 SHA1 04d8c700314decb3759d530c27b5ba72d8c1c4d9 SHA256 cc2340c63ec2a216bc5d460d7419bf84f3869015fcfd73096530b43ce357ab45
|
||||||
|
AUX 0.14.1/0025-add-syscall-numbers-from-2.6.39.2.patch 18328 RMD160 61a90462ad0109f2951d4ebb540c716861905220 SHA1 99834573cdc443c4118b6280c5e26433caa95624 SHA256 5aed07e1b71643d880eaa7432dfb99cc08958d275985d23b779cb796f1a73b18
|
||||||
|
AUX qemu-chroot.patch 1708 RMD160 63d3b7eef95e42e31b2cce9ccd8d563836c4f822 SHA1 24e0de057661c1503f26cac9c959b8f153f1b097 SHA256 8f9de20aaf3c9e83c0aefe15c7a1d9c361540e78f874ffcf980b236276a8abf2
|
||||||
|
AUX qemu-user.initd 7197 RMD160 7aa68863594277158abbf0b0002de738282e24cd SHA1 3e06b7857aab8876424f8ec16ca13f5aa0427c54 SHA256 9d3bc323ee5cfccf6a48e1f4f6a1ed0c9a1295e66318d790870e49cd8fdc37e1
|
||||||
|
DIST qemu-0.14.1.tar.gz 5439697 RMD160 0601ff4e613fea0a6ce80907e2bfa11704048b36 SHA1 1a5003a03004b62b52562d1cbb8f50c5f135e0b8 SHA256 33ceae3fbe516f2cbb151dc98d16c8ccfec74b1056674ad715e75a2f7fed45c3
|
||||||
|
EBUILD qemu-user-0.14.1.ebuild 1930 RMD160 de0949b7ef35c4b93481b2ff070f51d5c7ee235f SHA1 2c8416c1f54467b8db5f5b03a9bc9bdc73967d40 SHA256 fed2256426a6717f12d44ba7072a5e8b40ccec7c5fdb5eb4cdf5c74a112c0be8
|
||||||
|
MISC ChangeLog 5771 RMD160 f5d5966e4739f7dfc1d7aa3bba9e5f29b29d8838 SHA1 7587a626c600a244b7004fe06413ac6b4643a2c3 SHA256 4166da87858c400f3774b676c0a58de35015c8dcca8a5a62a4edb810248b7714
|
||||||
|
MISC metadata.xml 202 RMD160 1a73e85a81ce1045569a8b488999c0823756a0d9 SHA1 de56e79375b449ed9bdf49abd86aa9d28acd54ef SHA256 eda78eb836e5f76704299683d68168157f552076da6446e1a246b345aaa5811f
|
@ -0,0 +1,34 @@
|
|||||||
|
From 4af9300d36f0975213b0fb967131629ad6b4c550 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ulrich Hecht <uli@suse.de>
|
||||||
|
Date: Tue, 14 Apr 2009 16:17:39 +0200
|
||||||
|
Subject: [PATCH 01/17] qemu-0.7.0-amd64
|
||||||
|
|
||||||
|
No clue why this is necessary or useful, nothing found in any changelogs.
|
||||||
|
---
|
||||||
|
x86_64.ld | 6 ++----
|
||||||
|
1 files changed, 2 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
Index: qemu-0.14.1/x86_64.ld
|
||||||
|
===================================================================
|
||||||
|
--- qemu-0.14.1.orig/x86_64.ld
|
||||||
|
+++ qemu-0.14.1/x86_64.ld
|
||||||
|
@@ -70,8 +70,6 @@ SECTIONS
|
||||||
|
.rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
|
||||||
|
.rodata1 : { *(.rodata1) }
|
||||||
|
.eh_frame_hdr : { *(.eh_frame_hdr) }
|
||||||
|
- .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
|
||||||
|
- .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table) }
|
||||||
|
/* Adjust the address for the data segment. We want to adjust up to
|
||||||
|
the same address within the page on the next page up. */
|
||||||
|
. = ALIGN (0x100000) - ((0x100000 - .) & (0x100000 - 1)); . = DATA_SEGMENT_ALIGN (0x100000, 0x1000);
|
||||||
|
@@ -97,8 +95,8 @@ SECTIONS
|
||||||
|
.data1 : { *(.data1) }
|
||||||
|
.tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
|
||||||
|
.tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
|
||||||
|
- .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
|
||||||
|
- .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table) }
|
||||||
|
+ .eh_frame : { KEEP (*(.eh_frame)) }
|
||||||
|
+ .gcc_except_table : { *(.gcc_except_table) }
|
||||||
|
.dynamic : { *(.dynamic) }
|
||||||
|
.ctors :
|
||||||
|
{
|
@ -0,0 +1,82 @@
|
|||||||
|
From 8f16efecc00d3ee4615dcd2d5381b23df4465698 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ulrich Hecht <uli@suse.de>
|
||||||
|
Date: Tue, 14 Apr 2009 16:18:44 +0200
|
||||||
|
Subject: [PATCH 02/17] qemu-0.9.0.cvs-binfmt
|
||||||
|
|
||||||
|
Fixes binfmt_misc setup script:
|
||||||
|
- x86_64 is i386-compatible
|
||||||
|
- m68k signature fixed
|
||||||
|
- path to QEMU
|
||||||
|
|
||||||
|
Signed-off-by: Ulrich Hecht <uli@suse.de>
|
||||||
|
---
|
||||||
|
scripts/qemu-binfmt-conf.sh | 35 +++++++++++++++++++----------------
|
||||||
|
1 files changed, 19 insertions(+), 16 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
|
||||||
|
index c50beb7..335ab05 100644
|
||||||
|
--- a/scripts/qemu-binfmt-conf.sh
|
||||||
|
+++ b/scripts/qemu-binfmt-conf.sh
|
||||||
|
@@ -27,40 +27,43 @@ case "$cpu" in
|
||||||
|
armv[4-9]*)
|
||||||
|
cpu="arm"
|
||||||
|
;;
|
||||||
|
+ sparc*)
|
||||||
|
+ cpu="sparc"
|
||||||
|
+ ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# register the interpreter for each cpu except for the native one
|
||||||
|
if [ $cpu != "i386" ] ; then
|
||||||
|
- echo ':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\xfe\xff\xff\xff:/usr/local/bin/qemu-i386:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
- echo ':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\xfe\xff\xff\xff:/usr/local/bin/qemu-i386:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':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\xfe\xff\xff\xff:/usr/bin/qemu-i386:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':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\xfe\xff\xff\xff:/usr/bin/qemu-i386:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "alpha" ] ; then
|
||||||
|
- echo ':alpha:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-alpha:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':alpha:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-alpha:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "arm" ] ; then
|
||||||
|
- echo ':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\xfe\xff\xff\xff:/usr/local/bin/qemu-arm:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
- echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-armeb:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':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\xfe\xff\xff\xff:/usr/bin/qemu-arm:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "sparc" ] ; then
|
||||||
|
- echo ':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\xff\xfe\xff\xff:/usr/local/bin/qemu-sparc:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':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\xff\xfe\xff\xff:/usr/bin/qemu-sparc:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "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\xff\xfe\xff\xff:/usr/local/bin/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\xff\xfe\xff\xff:/usr/bin/qemu-ppc:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "m68k" ] ; then
|
||||||
|
echo 'Please check cpu value and header information for m68k!'
|
||||||
|
- echo ':m68k:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x04:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-m68k:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':m68k:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-m68k:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "mips" ] ; then
|
||||||
|
# FIXME: We could use the other endianness on a MIPS host.
|
||||||
|
- echo ':mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-mips:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
- echo ':mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-mipsel:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
- echo ':mipsn32:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-mipsn32:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
- echo ':mipsn32el:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-mipsn32el:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
- echo ':mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-mips64:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
- echo ':mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-mips64el:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsel:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':mipsn32:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mipsn32:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':mipsn32el:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsn32el:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips64:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mips64el:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "sh" ] ; then
|
||||||
|
- echo ':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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-sh4:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
- echo ':sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-sh4eb:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-sh4:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sh4eb:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
--
|
||||||
|
1.7.1
|
||||||
|
|
@ -0,0 +1,83 @@
|
|||||||
|
From 8a88b86cc9a3ad0bb6da52fb0f938fe5a085c027 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ulrich Hecht <uli@suse.de>
|
||||||
|
Date: Tue, 14 Apr 2009 16:20:50 +0200
|
||||||
|
Subject: [PATCH 03/17] qemu-cvs-alsa_bitfield
|
||||||
|
|
||||||
|
Implements TYPE_INTBITFIELD partially. (required for ALSA support)
|
||||||
|
|
||||||
|
Signed-off-by: Ulrich Hecht <uli@suse.de>
|
||||||
|
---
|
||||||
|
thunk.c | 21 +++++++++++++++++++++
|
||||||
|
thunk.h | 3 +++
|
||||||
|
2 files changed, 24 insertions(+), 0 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/thunk.c b/thunk.c
|
||||||
|
index 0657188..5638b2c 100644
|
||||||
|
--- a/thunk.c
|
||||||
|
+++ b/thunk.c
|
||||||
|
@@ -41,6 +41,7 @@ static inline const argtype *thunk_type_next(const argtype *type_ptr)
|
||||||
|
case TYPE_CHAR:
|
||||||
|
case TYPE_SHORT:
|
||||||
|
case TYPE_INT:
|
||||||
|
+ case TYPE_INTBITFIELD:
|
||||||
|
case TYPE_LONGLONG:
|
||||||
|
case TYPE_ULONGLONG:
|
||||||
|
case TYPE_LONG:
|
||||||
|
@@ -139,6 +140,26 @@ const argtype *thunk_convert(void *dst, const void *src,
|
||||||
|
case TYPE_INT:
|
||||||
|
*(uint32_t *)dst = tswap32(*(uint32_t *)src);
|
||||||
|
break;
|
||||||
|
+ case TYPE_INTBITFIELD:
|
||||||
|
+#if defined(TARGET_I386) && defined(__powerpc__)
|
||||||
|
+ /* powerpc uses the MSB, whereas i386 uses the LSB
|
||||||
|
+ * to store the first bit in a field */
|
||||||
|
+ {
|
||||||
|
+ unsigned char byte = *(uint8_t *)src;
|
||||||
|
+ *(uint8_t *)dst = ((byte >> 7) & 1)
|
||||||
|
+ | ((byte >> 5) & 2)
|
||||||
|
+ | ((byte >> 3) & 4)
|
||||||
|
+ | ((byte >> 1) & 8)
|
||||||
|
+ | ((byte << 1) & 16)
|
||||||
|
+ | ((byte << 3) & 32)
|
||||||
|
+ | ((byte << 5) & 64)
|
||||||
|
+ | ((byte << 7) & 128);
|
||||||
|
+ /* FIXME: implement for bitfields > 1 byte and other archs */
|
||||||
|
+ }
|
||||||
|
+#else
|
||||||
|
+ *(uint32_t *)dst = tswap32(*(uint32_t *)src);
|
||||||
|
+#endif
|
||||||
|
+ break;
|
||||||
|
case TYPE_LONGLONG:
|
||||||
|
case TYPE_ULONGLONG:
|
||||||
|
*(uint64_t *)dst = tswap64(*(uint64_t *)src);
|
||||||
|
diff --git a/thunk.h b/thunk.h
|
||||||
|
index 109c541..55890f3 100644
|
||||||
|
--- a/thunk.h
|
||||||
|
+++ b/thunk.h
|
||||||
|
@@ -37,6 +37,7 @@ typedef enum argtype {
|
||||||
|
TYPE_PTR,
|
||||||
|
TYPE_ARRAY,
|
||||||
|
TYPE_STRUCT,
|
||||||
|
+ TYPE_INTBITFIELD,
|
||||||
|
} argtype;
|
||||||
|
|
||||||
|
#define MK_PTR(type) TYPE_PTR, type
|
||||||
|
@@ -90,6 +91,7 @@ static inline int thunk_type_size(const argtype *type_ptr, int is_host)
|
||||||
|
case TYPE_SHORT:
|
||||||
|
return 2;
|
||||||
|
case TYPE_INT:
|
||||||
|
+ case TYPE_INTBITFIELD:
|
||||||
|
return 4;
|
||||||
|
case TYPE_LONGLONG:
|
||||||
|
case TYPE_ULONGLONG:
|
||||||
|
@@ -127,6 +129,7 @@ static inline int thunk_type_align(const argtype *type_ptr, int is_host)
|
||||||
|
case TYPE_SHORT:
|
||||||
|
return 2;
|
||||||
|
case TYPE_INT:
|
||||||
|
+ case TYPE_INTBITFIELD:
|
||||||
|
return 4;
|
||||||
|
case TYPE_LONGLONG:
|
||||||
|
case TYPE_ULONGLONG:
|
||||||
|
--
|
||||||
|
1.7.1
|
||||||
|
|
3626
app-emulation/qemu-user/files/0.14.1/0004-qemu-cvs-alsa_ioctl.patch
Normal file
3626
app-emulation/qemu-user/files/0.14.1/0004-qemu-cvs-alsa_ioctl.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,47 @@
|
|||||||
|
From 3848cba4ed22ebef70e59cbb542e71a37fe74d1d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ulrich Hecht <uli@suse.de>
|
||||||
|
Date: Tue, 14 Apr 2009 16:24:15 +0200
|
||||||
|
Subject: [PATCH 05/17] qemu-cvs-alsa_mmap
|
||||||
|
|
||||||
|
Hack to prevent ALSA from using mmap() interface to simplify emulation.
|
||||||
|
|
||||||
|
Signed-off-by: Ulrich Hecht <uli@suse.de>
|
||||||
|
---
|
||||||
|
linux-user/mmap.c | 14 ++++++++++++++
|
||||||
|
1 files changed, 14 insertions(+), 0 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
|
||||||
|
index abf21f6..e18c228 100644
|
||||||
|
--- a/linux-user/mmap.c
|
||||||
|
+++ b/linux-user/mmap.c
|
||||||
|
@@ -360,6 +360,9 @@ abi_ulong mmap_find_vma(abi_ulong start, abi_ulong size)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+#define SNDRV_PCM_MMAP_OFFSET_STATUS 0x80000000
|
||||||
|
+#define SNDRV_PCM_MMAP_OFFSET_CONTROL 0x81000000
|
||||||
|
+
|
||||||
|
/* NOTE: all the constants are the HOST ones */
|
||||||
|
abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
|
||||||
|
int flags, int fd, abi_ulong offset)
|
||||||
|
@@ -395,6 +398,17 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+ /* Alsa tries to communcate with the kernel via mmap. This usually
|
||||||
|
+ * is a good idea when user- and kernelspace are running on the
|
||||||
|
+ * same architecture but does not work out when not. To make alsa
|
||||||
|
+ * not to use mmap, we can just have it fail on the mmap calls that
|
||||||
|
+ * would initiate this.
|
||||||
|
+ */
|
||||||
|
+ if(offset == SNDRV_PCM_MMAP_OFFSET_STATUS || offset == SNDRV_PCM_MMAP_OFFSET_CONTROL) {
|
||||||
|
+ errno = EINVAL;
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (offset & ~TARGET_PAGE_MASK) {
|
||||||
|
errno = EINVAL;
|
||||||
|
goto fail;
|
||||||
|
--
|
||||||
|
1.7.1
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
From da6cdca6cdbfccb4936f5df5e297a87fe1e4baa8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ulrich Hecht <uli@suse.de>
|
||||||
|
Date: Tue, 14 Apr 2009 16:25:41 +0200
|
||||||
|
Subject: [PATCH 06/17] qemu-cvs-gettimeofday
|
||||||
|
|
||||||
|
No clue what this is for.
|
||||||
|
---
|
||||||
|
linux-user/syscall.c | 2 ++
|
||||||
|
1 files changed, 2 insertions(+), 0 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
|
||||||
|
index 499c4d7..92f2aa6 100644
|
||||||
|
--- a/linux-user/syscall.c
|
||||||
|
+++ b/linux-user/syscall.c
|
||||||
|
@@ -5399,6 +5399,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
|
||||||
|
case TARGET_NR_gettimeofday:
|
||||||
|
{
|
||||||
|
struct timeval tv;
|
||||||
|
+ if(copy_from_user_timeval(&tv, arg1))
|
||||||
|
+ goto efault;
|
||||||
|
ret = get_errno(gettimeofday(&tv, NULL));
|
||||||
|
if (!is_error(ret)) {
|
||||||
|
if (copy_to_user_timeval(arg1, &tv))
|
||||||
|
--
|
||||||
|
1.7.1
|
||||||
|
|
@ -0,0 +1,33 @@
|
|||||||
|
From 1a883714ac7e953bab2bbdeba651d0696f49dd81 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ulrich Hecht <uli@suse.de>
|
||||||
|
Date: Tue, 14 Apr 2009 16:26:33 +0200
|
||||||
|
Subject: [PATCH 07/17] qemu-cvs-ioctl_debug
|
||||||
|
|
||||||
|
Extends unsupported ioctl debug output.
|
||||||
|
|
||||||
|
Signed-off-by: Ulrich Hecht <uli@suse.de>
|
||||||
|
---
|
||||||
|
linux-user/syscall.c | 7 ++++++-
|
||||||
|
1 files changed, 6 insertions(+), 1 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
|
||||||
|
index 92f2aa6..04f77ef 100644
|
||||||
|
--- a/linux-user/syscall.c
|
||||||
|
+++ b/linux-user/syscall.c
|
||||||
|
@@ -3100,7 +3100,12 @@ static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg)
|
||||||
|
ie = ioctl_entries;
|
||||||
|
for(;;) {
|
||||||
|
if (ie->target_cmd == 0) {
|
||||||
|
- gemu_log("Unsupported ioctl: cmd=0x%04lx\n", (long)cmd);
|
||||||
|
+ int i;
|
||||||
|
+ gemu_log("Unsupported ioctl: cmd=0x%04lx (%x)\n", (unsigned long)cmd, (unsigned int)(cmd & (TARGET_IOC_SIZEMASK << TARGET_IOC_SIZESHIFT)) >> TARGET_IOC_SIZESHIFT);
|
||||||
|
+ for(i=0;ioctl_entries[i].target_cmd;i++) {
|
||||||
|
+ if((ioctl_entries[i].target_cmd & ~(TARGET_IOC_SIZEMASK << TARGET_IOC_SIZESHIFT)) == (cmd & ~(TARGET_IOC_SIZEMASK << TARGET_IOC_SIZESHIFT)))
|
||||||
|
+ gemu_log("%p\t->\t%s (%x)\n", (void *)(unsigned long)ioctl_entries[i].host_cmd, ioctl_entries[i].name, (ioctl_entries[i].target_cmd & (TARGET_IOC_SIZEMASK << TARGET_IOC_SIZESHIFT)) >> TARGET_IOC_SIZESHIFT);
|
||||||
|
+ }
|
||||||
|
return -TARGET_ENOSYS;
|
||||||
|
}
|
||||||
|
if (ie->target_cmd == cmd)
|
||||||
|
--
|
||||||
|
1.7.1
|
||||||
|
|
@ -0,0 +1,42 @@
|
|||||||
|
From d03d586aabc9000cabc56de7e327c5b5640f3179 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ulrich Hecht <uli@suse.de>
|
||||||
|
Date: Tue, 14 Apr 2009 16:27:36 +0200
|
||||||
|
Subject: [PATCH 08/17] qemu-cvs-ioctl_nodirection
|
||||||
|
|
||||||
|
the direction given in the ioctl should be correct so we can assume the
|
||||||
|
communication is uni-directional. The alsa developers did not like this
|
||||||
|
concept though and declared ioctls IOC_R and IOC_W even though they were
|
||||||
|
IOC_RW.
|
||||||
|
|
||||||
|
Signed-off-by: Ulrich Hecht <uli@suse.de>
|
||||||
|
---
|
||||||
|
linux-user/syscall.c | 6 ++++++
|
||||||
|
1 files changed, 6 insertions(+), 0 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
|
||||||
|
index 04f77ef..b51634b 100644
|
||||||
|
--- a/linux-user/syscall.c
|
||||||
|
+++ b/linux-user/syscall.c
|
||||||
|
@@ -3134,6 +3134,11 @@ static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg)
|
||||||
|
arg_type++;
|
||||||
|
target_size = thunk_type_size(arg_type, 0);
|
||||||
|
switch(ie->access) {
|
||||||
|
+ /* FIXME: actually the direction given in the ioctl should be
|
||||||
|
+ * correct so we can assume the communication is uni-directional.
|
||||||
|
+ * The alsa developers did not like this concept though and
|
||||||
|
+ * declared ioctls IOC_R and IOC_W even though they were IOC_RW.*/
|
||||||
|
+/*
|
||||||
|
case IOC_R:
|
||||||
|
ret = get_errno(ioctl(fd, ie->host_cmd, buf_temp));
|
||||||
|
if (!is_error(ret)) {
|
||||||
|
@@ -3152,6 +3157,7 @@ static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg)
|
||||||
|
unlock_user(argptr, arg, 0);
|
||||||
|
ret = get_errno(ioctl(fd, ie->host_cmd, buf_temp));
|
||||||
|
break;
|
||||||
|
+*/
|
||||||
|
default:
|
||||||
|
case IOC_RW:
|
||||||
|
argptr = lock_user(VERIFY_READ, arg, target_size, 1);
|
||||||
|
--
|
||||||
|
1.7.1
|
||||||
|
|
@ -0,0 +1,56 @@
|
|||||||
|
From 026ee1029cfeb6c802ee715372992fb3c847bd27 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ulrich Hecht <uli@suse.de>
|
||||||
|
Date: Tue, 14 Apr 2009 16:30:16 +0200
|
||||||
|
Subject: [PATCH 09/17] qemu-cvs-sched_getaffinity
|
||||||
|
|
||||||
|
Implements sched_getaffinity syscall.
|
||||||
|
|
||||||
|
Signed-off-by: Ulrich Hecht <uli@suse.de>
|
||||||
|
---
|
||||||
|
linux-user/syscall.c | 16 ++++++++++++++++
|
||||||
|
1 files changed, 16 insertions(+), 0 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
|
||||||
|
index b51634b..81bf1f0 100644
|
||||||
|
--- a/linux-user/syscall.c
|
||||||
|
+++ b/linux-user/syscall.c
|
||||||
|
@@ -164,6 +164,7 @@ static type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5, \
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
+#define __NR_sys_sched_getaffinity __NR_sched_getaffinity
|
||||||
|
#define __NR_sys_uname __NR_uname
|
||||||
|
#define __NR_sys_faccessat __NR_faccessat
|
||||||
|
#define __NR_sys_fchmodat __NR_fchmodat
|
||||||
|
@@ -223,6 +224,9 @@ _syscall3(int,sys_tgkill,int,tgid,int,pid,int,sig)
|
||||||
|
#if defined(TARGET_NR_tkill) && defined(__NR_tkill)
|
||||||
|
_syscall2(int,sys_tkill,int,tid,int,sig)
|
||||||
|
#endif
|
||||||
|
+#ifdef __NR_sys_sched_getaffinity
|
||||||
|
+_syscall3(int,sys_sched_getaffinity,pid_t,pid,unsigned int,cpusetsize,void*,mask)
|
||||||
|
+#endif
|
||||||
|
#ifdef __NR_exit_group
|
||||||
|
_syscall1(int,exit_group,int,error_code)
|
||||||
|
#endif
|
||||||
|
@@ -7505,6 +7509,18 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
+
|
||||||
|
+#ifdef TARGET_NR_sched_getaffinity
|
||||||
|
+ case TARGET_NR_sched_getaffinity:
|
||||||
|
+ {
|
||||||
|
+ cpu_set_t *mask;
|
||||||
|
+ lock_user_struct(VERIFY_READ, mask, arg3, 1);
|
||||||
|
+ ret = get_errno(sys_sched_getaffinity((pid_t)arg1, (unsigned int)arg2, mask));
|
||||||
|
+ unlock_user_struct(mask, arg3, 0);
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
default:
|
||||||
|
unimplemented:
|
||||||
|
gemu_log("qemu: Unsupported syscall: %d\n", num);
|
||||||
|
--
|
||||||
|
1.7.1
|
||||||
|
|
@ -0,0 +1,74 @@
|
|||||||
|
From: Alexander Graf <agraf@suse.de>
|
||||||
|
|
||||||
|
When executing 32-bit guest binaries on 64-bit hosts, mmap() can return
|
||||||
|
a 64-bit pointer. Tell mmap() to always map in 32-bit address space, so
|
||||||
|
we make 32-bit guest applications happy.
|
||||||
|
|
||||||
|
This is a hack and should not go upstream in its current form!
|
||||||
|
|
||||||
|
Signed-off-by: Alexander Graf <agraf@suse.de>
|
||||||
|
---
|
||||||
|
linux-user/mmap.c | 12 ++++++------
|
||||||
|
1 files changed, 6 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
|
||||||
|
index 994c02b..e24b63a 100644
|
||||||
|
--- a/linux-user/mmap.c
|
||||||
|
+++ b/linux-user/mmap.c
|
||||||
|
@@ -169,7 +169,7 @@ static int mmap_frag(abi_ulong real_start,
|
||||||
|
if (prot1 == 0) {
|
||||||
|
/* no page was there, so we allocate one */
|
||||||
|
void *p = mmap(host_start, qemu_host_page_size, prot,
|
||||||
|
- flags | MAP_ANONYMOUS, -1, 0);
|
||||||
|
+ flags | MAP_ANONYMOUS | MAP_32BIT, -1, 0);
|
||||||
|
if (p == MAP_FAILED)
|
||||||
|
return -1;
|
||||||
|
prot1 = prot;
|
||||||
|
@@ -292,7 +292,7 @@ abi_ulong mmap_find_vma(abi_ulong start, abi_ulong size)
|
||||||
|
* - shmat() with SHM_REMAP flag
|
||||||
|
*/
|
||||||
|
ptr = mmap(g2h(addr), size, PROT_NONE,
|
||||||
|
- MAP_ANONYMOUS|MAP_PRIVATE|MAP_NORESERVE, -1, 0);
|
||||||
|
+ MAP_ANONYMOUS|MAP_PRIVATE|MAP_NORESERVE|MAP_32BIT, -1, 0);
|
||||||
|
|
||||||
|
/* ENOMEM, if host address space has no memory */
|
||||||
|
if (ptr == MAP_FAILED) {
|
||||||
|
@@ -454,14 +454,14 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
|
||||||
|
especially important if qemu_host_page_size >
|
||||||
|
qemu_real_host_page_size */
|
||||||
|
p = mmap(g2h(mmap_start),
|
||||||
|
- host_len, prot, flags | MAP_FIXED | MAP_ANONYMOUS, -1, 0);
|
||||||
|
+ host_len, prot, flags | MAP_FIXED | MAP_ANONYMOUS | MAP_32BIT, -1, 0);
|
||||||
|
if (p == MAP_FAILED)
|
||||||
|
goto fail;
|
||||||
|
/* update start so that it points to the file position at 'offset' */
|
||||||
|
host_start = (unsigned long)p;
|
||||||
|
if (!(flags & MAP_ANONYMOUS)) {
|
||||||
|
p = mmap(g2h(mmap_start), len, prot,
|
||||||
|
- flags | MAP_FIXED, fd, host_offset);
|
||||||
|
+ flags | MAP_FIXED | MAP_32BIT, fd, host_offset);
|
||||||
|
host_start += offset - host_offset;
|
||||||
|
}
|
||||||
|
start = h2g(host_start);
|
||||||
|
@@ -547,7 +547,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
|
||||||
|
else
|
||||||
|
offset1 = offset + real_start - start;
|
||||||
|
p = mmap(g2h(real_start), real_end - real_start,
|
||||||
|
- prot, flags, fd, offset1);
|
||||||
|
+ prot, flags | MAP_32BIT, fd, offset1);
|
||||||
|
if (p == MAP_FAILED)
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
@@ -603,7 +603,7 @@ static void mmap_reserve(abi_ulong start, abi_ulong size)
|
||||||
|
}
|
||||||
|
if (real_start != real_end) {
|
||||||
|
mmap(g2h(real_start), real_end - real_start, PROT_NONE,
|
||||||
|
- MAP_FIXED | MAP_ANONYMOUS | MAP_PRIVATE | MAP_NORESERVE,
|
||||||
|
+ MAP_FIXED | MAP_ANONYMOUS | MAP_PRIVATE | MAP_NORESERVE | MAP_32BIT,
|
||||||
|
-1, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
1.6.0.2
|
||||||
|
|
||||||
|
|
@ -0,0 +1,116 @@
|
|||||||
|
From 09686f619707ec98e073bf671b0334a2f65934ad Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ulrich Hecht <uli@suse.de>
|
||||||
|
Date: Tue, 14 Apr 2009 16:37:42 +0200
|
||||||
|
Subject: [PATCH 11/17] qemu-img-vmdk-scsi
|
||||||
|
|
||||||
|
Support creation of SCSI VMDK images in qemu-img.
|
||||||
|
|
||||||
|
Signed-off-by: Ulrich Hecht <uli@suse.de>
|
||||||
|
---
|
||||||
|
block.c | 5 ++++-
|
||||||
|
block/vmdk.c | 7 +++++--
|
||||||
|
block_int.h | 2 ++
|
||||||
|
qemu-img.c | 8 +++++++-
|
||||||
|
4 files changed, 18 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/block.c b/block.c
|
||||||
|
index b476479..b77f09b 100644
|
||||||
|
--- a/block.c
|
||||||
|
+++ b/block.c
|
||||||
|
@@ -2792,7 +2792,7 @@ int bdrv_img_create(const char *filename, const char *fmt,
|
||||||
|
char *options, uint64_t img_size, int flags)
|
||||||
|
{
|
||||||
|
QEMUOptionParameter *param = NULL, *create_options = NULL;
|
||||||
|
- QEMUOptionParameter *backing_fmt, *backing_file;
|
||||||
|
+ QEMUOptionParameter *backing_fmt, *backing_file, *scsi;
|
||||||
|
BlockDriverState *bs = NULL;
|
||||||
|
BlockDriver *drv, *proto_drv;
|
||||||
|
BlockDriver *backing_drv = NULL;
|
||||||
|
@@ -2901,6 +2901,9 @@ int bdrv_img_create(const char *filename, const char *fmt,
|
||||||
|
|
||||||
|
printf("Formatting '%s', fmt=%s ", filename, fmt);
|
||||||
|
print_option_parameters(param);
|
||||||
|
+ scsi = get_option_parameter(param, BLOCK_OPT_SCSI);
|
||||||
|
+ if (scsi && scsi->value.n)
|
||||||
|
+ printf(", SCSI");
|
||||||
|
puts("");
|
||||||
|
|
||||||
|
ret = bdrv_create(drv, filename, param);
|
||||||
|
diff --git a/block/vmdk.c b/block/vmdk.c
|
||||||
|
index 8fc9d67..8944173 100644
|
||||||
|
--- a/block/vmdk.c
|
||||||
|
+++ b/block/vmdk.c
|
||||||
|
@@ -685,7 +685,7 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
|
||||||
|
"ddb.geometry.cylinders = \"%" PRId64 "\"\n"
|
||||||
|
"ddb.geometry.heads = \"16\"\n"
|
||||||
|
"ddb.geometry.sectors = \"63\"\n"
|
||||||
|
- "ddb.adapterType = \"ide\"\n";
|
||||||
|
+ "ddb.adapterType = \"%s\"\n";
|
||||||
|
char desc[1024];
|
||||||
|
const char *real_filename, *temp_str;
|
||||||
|
int64_t total_size = 0;
|
||||||
|
@@ -701,6 +701,8 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
|
||||||
|
backing_file = options->value.s;
|
||||||
|
} else if (!strcmp(options->name, BLOCK_OPT_COMPAT6)) {
|
||||||
|
flags |= options->value.n ? BLOCK_FLAG_COMPAT6: 0;
|
||||||
|
+ } else if (!strcmp(options->name, BLOCK_OPT_SCSI)) {
|
||||||
|
+ flags |= options->value.n ? BLOCK_FLAG_SCSI: 0;
|
||||||
|
}
|
||||||
|
options++;
|
||||||
|
}
|
||||||
|
@@ -798,7 +800,8 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
|
||||||
|
snprintf(desc, sizeof(desc), desc_template, (unsigned int)time(NULL),
|
||||||
|
total_size, real_filename,
|
||||||
|
(flags & BLOCK_FLAG_COMPAT6 ? 6 : 4),
|
||||||
|
- total_size / (int64_t)(63 * 16));
|
||||||
|
+ total_size / (int64_t)(63 * 16),
|
||||||
|
+ flags & BLOCK_FLAG_SCSI ? "lsilogic" : "ide");
|
||||||
|
|
||||||
|
/* write the descriptor */
|
||||||
|
lseek(fd, le64_to_cpu(header.desc_offset) << 9, SEEK_SET);
|
||||||
|
diff --git a/block_int.h b/block_int.h
|
||||||
|
index 545ad11..771fd91 100644
|
||||||
|
--- a/block_int.h
|
||||||
|
+++ b/block_int.h
|
||||||
|
@@ -30,10 +30,12 @@
|
||||||
|
|
||||||
|
#define BLOCK_FLAG_ENCRYPT 1
|
||||||
|
#define BLOCK_FLAG_COMPAT6 4
|
||||||
|
+#define BLOCK_FLAG_SCSI 8
|
||||||
|
|
||||||
|
#define BLOCK_OPT_SIZE "size"
|
||||||
|
#define BLOCK_OPT_ENCRYPT "encryption"
|
||||||
|
#define BLOCK_OPT_COMPAT6 "compat6"
|
||||||
|
+#define BLOCK_OPT_SCSI "scsi"
|
||||||
|
#define BLOCK_OPT_BACKING_FILE "backing_file"
|
||||||
|
#define BLOCK_OPT_BACKING_FMT "backing_fmt"
|
||||||
|
#define BLOCK_OPT_CLUSTER_SIZE "cluster_size"
|
||||||
|
diff --git a/qemu-img.c b/qemu-img.c
|
||||||
|
index 4a37358..ed8cc08 100644
|
||||||
|
--- a/qemu-img.c
|
||||||
|
+++ b/qemu-img.c
|
||||||
|
@@ -572,7 +572,7 @@ static int img_convert(int argc, char **argv)
|
||||||
|
const uint8_t *buf1;
|
||||||
|
BlockDriverInfo bdi;
|
||||||
|
QEMUOptionParameter *param = NULL, *create_options = NULL;
|
||||||
|
- QEMUOptionParameter *out_baseimg_param;
|
||||||
|
+ QEMUOptionParameter *out_baseimg_param, *scsi;
|
||||||
|
char *options = NULL;
|
||||||
|
const char *snapshot_name = NULL;
|
||||||
|
|
||||||
|
@@ -727,6 +727,12 @@ static int img_convert(int argc, char **argv)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if ((scsi = get_option_parameter(param, BLOCK_OPT_SCSI)) && scsi->value.n && strcmp(drv->format_name, "vmdk")) {
|
||||||
|
+ error_report("SCSI devices not supported for this file format");
|
||||||
|
+ ret = -1;
|
||||||
|
+ goto out;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/* Create the new image */
|
||||||
|
ret = bdrv_create(drv, out_filename, param);
|
||||||
|
if (ret < 0) {
|
||||||
|
--
|
||||||
|
1.7.1
|
||||||
|
|
@ -0,0 +1,40 @@
|
|||||||
|
From 75c51f45c127ebe4f549041aae98f510480429ae Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ulrich Hecht <uli@suse.de>
|
||||||
|
Date: Tue, 14 Apr 2009 16:38:20 +0200
|
||||||
|
Subject: [PATCH 12/17] qemu-nonvoid_return
|
||||||
|
|
||||||
|
Squelches GCC warnings about undefined return values.
|
||||||
|
|
||||||
|
Signed-off-by: Ulrich Hecht <uli@suse.de>
|
||||||
|
---
|
||||||
|
hw/mpcore.c | 1 +
|
||||||
|
target-m68k/translate.c | 1 +
|
||||||
|
2 files changed, 2 insertions(+), 0 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/hw/mpcore.c b/hw/mpcore.c
|
||||||
|
index fc05215..7bdb495 100644
|
||||||
|
--- a/hw/mpcore.c
|
||||||
|
+++ b/hw/mpcore.c
|
||||||
|
@@ -104,6 +104,7 @@ static uint32_t mpcore_timer_read(mpcore_timer_state *s, int offset)
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void mpcore_timer_write(mpcore_timer_state *s, int offset,
|
||||||
|
diff --git a/target-m68k/translate.c b/target-m68k/translate.c
|
||||||
|
index 6f72a2b..7d9492b 100644
|
||||||
|
--- a/target-m68k/translate.c
|
||||||
|
+++ b/target-m68k/translate.c
|
||||||
|
@@ -440,6 +440,7 @@ static inline int opsize_bytes(int opsize)
|
||||||
|
qemu_assert(0, "bad operand size");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Assign value to a register. If the width is less than the register width
|
||||||
|
--
|
||||||
|
1.7.1
|
||||||
|
|
@ -0,0 +1,64 @@
|
|||||||
|
From f44ecd4fcdb8e02e6bd58201a81f047d1e109508 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ulrich Hecht <uli@suse.de>
|
||||||
|
Date: Thu, 16 Apr 2009 15:14:12 +0200
|
||||||
|
Subject: [PATCH 13/17] i386-linux-user NPTL support
|
||||||
|
|
||||||
|
Makes NPTL binaries run by implementing TLS.
|
||||||
|
|
||||||
|
Signed-off-by: Ulrich Hecht <uli@suse.de>
|
||||||
|
---
|
||||||
|
configure | 1 +
|
||||||
|
linux-user/syscall.c | 16 ++++++++++++++--
|
||||||
|
2 files changed, 15 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/configure b/configure
|
||||||
|
index 598e8e1..95de763 100755
|
||||||
|
--- a/configure
|
||||||
|
+++ b/configure
|
||||||
|
@@ -2910,6 +2910,7 @@ TARGET_ABI_DIR=""
|
||||||
|
case "$target_arch2" in
|
||||||
|
i386)
|
||||||
|
target_phys_bits=32
|
||||||
|
+ target_nptl="yes"
|
||||||
|
;;
|
||||||
|
x86_64)
|
||||||
|
TARGET_BASE_ARCH=i386
|
||||||
|
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
|
||||||
|
index 81bf1f0..1a98433 100644
|
||||||
|
--- a/linux-user/syscall.c
|
||||||
|
+++ b/linux-user/syscall.c
|
||||||
|
@@ -3792,8 +3792,14 @@ static int do_fork(CPUState *env, unsigned int flags, abi_ulong newsp,
|
||||||
|
ts->child_tidptr = child_tidptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (nptl_flags & CLONE_SETTLS)
|
||||||
|
+ if (nptl_flags & CLONE_SETTLS) {
|
||||||
|
+#if defined(TARGET_I386) && defined(TARGET_ABI32)
|
||||||
|
+ do_set_thread_area(new_env, newtls);
|
||||||
|
+ cpu_x86_load_seg(new_env, R_GS, new_env->segs[R_GS].selector);
|
||||||
|
+#else
|
||||||
|
cpu_set_tls (new_env, newtls);
|
||||||
|
+#endif
|
||||||
|
+ }
|
||||||
|
|
||||||
|
/* Grab a mutex so that thread setup appears atomic. */
|
||||||
|
pthread_mutex_lock(&clone_lock);
|
||||||
|
@@ -3867,8 +3873,14 @@ static int do_fork(CPUState *env, unsigned int flags, abi_ulong newsp,
|
||||||
|
if (flags & CLONE_PARENT_SETTID)
|
||||||
|
put_user_u32(gettid(), parent_tidptr);
|
||||||
|
ts = (TaskState *)env->opaque;
|
||||||
|
- if (flags & CLONE_SETTLS)
|
||||||
|
+ if (flags & CLONE_SETTLS) {
|
||||||
|
+#if defined(TARGET_I386) && defined(TARGET_ABI32)
|
||||||
|
+ do_set_thread_area(env, newtls);
|
||||||
|
+ cpu_x86_load_seg(env, R_GS, env->segs[R_GS].selector);
|
||||||
|
+#else
|
||||||
|
cpu_set_tls (env, newtls);
|
||||||
|
+#endif
|
||||||
|
+ }
|
||||||
|
if (flags & CLONE_CHILD_CLEARTID)
|
||||||
|
ts->child_tidptr = child_tidptr;
|
||||||
|
#endif
|
||||||
|
--
|
||||||
|
1.7.1
|
||||||
|
|
6757
app-emulation/qemu-user/files/0.14.1/0015-S-390-support.patch
Normal file
6757
app-emulation/qemu-user/files/0.14.1/0015-S-390-support.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,58 @@
|
|||||||
|
From 4569b209989e09bdebcb6cce809b3fed0f94142c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ulrich Hecht <uli@suse.de>
|
||||||
|
Date: Wed, 25 Aug 2010 14:23:43 +0200
|
||||||
|
Subject: [PATCH 16/17] fix mipsn32*-linux-user builds
|
||||||
|
|
||||||
|
Signed-off-by: Ulrich Hecht <uli@suse.de>
|
||||||
|
---
|
||||||
|
configure | 2 ++
|
||||||
|
default-configs/mipsn32-linux-user.mak | 1 +
|
||||||
|
default-configs/mipsn32el-linux-user.mak | 1 +
|
||||||
|
linux-user/mipsn32/syscall.h | 3 ++-
|
||||||
|
4 files changed, 6 insertions(+), 1 deletions(-)
|
||||||
|
create mode 100644 default-configs/mipsn32-linux-user.mak
|
||||||
|
create mode 100644 default-configs/mipsn32el-linux-user.mak
|
||||||
|
|
||||||
|
diff --git a/configure b/configure
|
||||||
|
index bd1484b..6513d91 100755
|
||||||
|
--- a/configure
|
||||||
|
+++ b/configure
|
||||||
|
@@ -1010,6 +1010,8 @@ m68k-linux-user \
|
||||||
|
microblaze-linux-user \
|
||||||
|
mips-linux-user \
|
||||||
|
mipsel-linux-user \
|
||||||
|
+mipsn32-linux-user \
|
||||||
|
+mipsn32el-linux-user \
|
||||||
|
ppc-linux-user \
|
||||||
|
ppc64-linux-user \
|
||||||
|
ppc64abi32-linux-user \
|
||||||
|
diff --git a/default-configs/mipsn32-linux-user.mak b/default-configs/mipsn32-linux-user.mak
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..31df570
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/default-configs/mipsn32-linux-user.mak
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+# Default configuration for mips-linux-user
|
||||||
|
diff --git a/default-configs/mipsn32el-linux-user.mak b/default-configs/mipsn32el-linux-user.mak
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..4d0e4af
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/default-configs/mipsn32el-linux-user.mak
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+# Default configuration for mipsel-linux-user
|
||||||
|
diff --git a/linux-user/mipsn32/syscall.h b/linux-user/mipsn32/syscall.h
|
||||||
|
index 4ec506c..beeeb3c 100644
|
||||||
|
--- a/linux-user/mipsn32/syscall.h
|
||||||
|
+++ b/linux-user/mipsn32/syscall.h
|
||||||
|
@@ -216,6 +216,7 @@ struct target_pt_regs {
|
||||||
|
#undef TARGET_ENOTRECOVERABLE
|
||||||
|
#define TARGET_ENOTRECOVERABLE 166 /* State not recoverable */
|
||||||
|
|
||||||
|
-
|
||||||
|
+/* Nasty hack: define a fake errno value for use by sigreturn. */
|
||||||
|
+#define TARGET_QEMU_ESIGRETURN 255
|
||||||
|
|
||||||
|
#define UNAME_MACHINE "mips64"
|
||||||
|
--
|
||||||
|
1.7.1
|
||||||
|
|
129
app-emulation/qemu-user/files/0.14.1/0017-S-390-build-fix.patch
Normal file
129
app-emulation/qemu-user/files/0.14.1/0017-S-390-build-fix.patch
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
From 024f781ab4af31ba5e14882b5661d4586ae26988 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ulrich Hecht <uli@suse.de>
|
||||||
|
Date: Wed, 9 Feb 2011 18:35:21 +0100
|
||||||
|
Subject: [PATCH 17/17] S/390 build fix
|
||||||
|
|
||||||
|
---
|
||||||
|
target-s390x/op_helper.c | 22 +++++++++++-----------
|
||||||
|
target-s390x/translate.c | 2 +-
|
||||||
|
2 files changed, 12 insertions(+), 12 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/target-s390x/op_helper.c b/target-s390x/op_helper.c
|
||||||
|
index 20c83c5..46b71fc 100644
|
||||||
|
--- a/target-s390x/op_helper.c
|
||||||
|
+++ b/target-s390x/op_helper.c
|
||||||
|
@@ -738,7 +738,7 @@ uint32_t HELPER(tmxx)(uint64_t val, uint32_t mask)
|
||||||
|
uint32_t HELPER(abs_i32)(uint32_t reg, int32_t val)
|
||||||
|
{
|
||||||
|
uint32_t cc;
|
||||||
|
- if (val == 0x80000000UL) cc = 3;
|
||||||
|
+ if ((uint32_t)val == 0x80000000UL) cc = 3;
|
||||||
|
else if (val) cc = 1;
|
||||||
|
else cc = 0;
|
||||||
|
|
||||||
|
@@ -996,7 +996,7 @@ uint32_t HELPER(slbg)(uint32_t cc, uint32_t r1, uint64_t v1, uint64_t v2)
|
||||||
|
/* condition codes for binary FP ops */
|
||||||
|
static uint32_t set_cc_f32(float32 v1, float32 v2)
|
||||||
|
{
|
||||||
|
- if (float32_is_nan(v1) || float32_is_nan(v2)) return 3;
|
||||||
|
+ if (float32_is_any_nan(v1) || float32_is_any_nan(v2)) return 3;
|
||||||
|
else if (float32_eq(v1, v2, &env->fpu_status)) return 0;
|
||||||
|
else if (float32_lt(v1, v2, &env->fpu_status)) return 1;
|
||||||
|
else return 2;
|
||||||
|
@@ -1004,7 +1004,7 @@ static uint32_t set_cc_f32(float32 v1, float32 v2)
|
||||||
|
|
||||||
|
static uint32_t set_cc_f64(float64 v1, float64 v2)
|
||||||
|
{
|
||||||
|
- if (float64_is_nan(v1) || float64_is_nan(v2)) return 3;
|
||||||
|
+ if (float64_is_any_nan(v1) || float64_is_any_nan(v2)) return 3;
|
||||||
|
else if (float64_eq(v1, v2, &env->fpu_status)) return 0;
|
||||||
|
else if (float64_lt(v1, v2, &env->fpu_status)) return 1;
|
||||||
|
else return 2;
|
||||||
|
@@ -1013,7 +1013,7 @@ static uint32_t set_cc_f64(float64 v1, float64 v2)
|
||||||
|
/* condition codes for unary FP ops */
|
||||||
|
static uint32_t set_cc_nz_f32(float32 v)
|
||||||
|
{
|
||||||
|
- if (float32_is_nan(v)) return 3;
|
||||||
|
+ if (float32_is_any_nan(v)) return 3;
|
||||||
|
else if (float32_is_zero(v)) return 0;
|
||||||
|
else if (float32_is_neg(v)) return 1;
|
||||||
|
else return 2;
|
||||||
|
@@ -1021,7 +1021,7 @@ static uint32_t set_cc_nz_f32(float32 v)
|
||||||
|
|
||||||
|
static uint32_t set_cc_nz_f64(float64 v)
|
||||||
|
{
|
||||||
|
- if (float64_is_nan(v)) return 3;
|
||||||
|
+ if (float64_is_any_nan(v)) return 3;
|
||||||
|
else if (float64_is_zero(v)) return 0;
|
||||||
|
else if (float64_is_neg(v)) return 1;
|
||||||
|
else return 2;
|
||||||
|
@@ -1029,7 +1029,7 @@ static uint32_t set_cc_nz_f64(float64 v)
|
||||||
|
|
||||||
|
static uint32_t set_cc_nz_f128(float128 v)
|
||||||
|
{
|
||||||
|
- if (float128_is_nan(v)) return 3;
|
||||||
|
+ if (float128_is_any_nan(v)) return 3;
|
||||||
|
else if (float128_is_zero(v)) return 0;
|
||||||
|
else if (float128_is_neg(v)) return 1;
|
||||||
|
else return 2;
|
||||||
|
@@ -1350,7 +1350,7 @@ uint32_t HELPER(cxbr)(uint32_t f1, uint32_t f2)
|
||||||
|
CPU_QuadU v2;
|
||||||
|
v2.ll.upper = env->fregs[f2].ll;
|
||||||
|
v2.ll.lower = env->fregs[f2 + 2].ll;
|
||||||
|
- if (float128_is_nan(v1.q) || float128_is_nan(v2.q)) return 3;
|
||||||
|
+ if (float128_is_any_nan(v1.q) || float128_is_any_nan(v2.q)) return 3;
|
||||||
|
else if (float128_eq(v1.q, v2.q, &env->fpu_status)) return 0;
|
||||||
|
else if (float128_lt(v1.q, v2.q, &env->fpu_status)) return 1;
|
||||||
|
else return 2;
|
||||||
|
@@ -1463,7 +1463,7 @@ uint32_t HELPER(cgxbr)(uint32_t r1, uint32_t f2, uint32_t m3)
|
||||||
|
v2.ll.lower = env->fregs[f2 + 2].ll;
|
||||||
|
set_round_mode(m3);
|
||||||
|
env->regs[r1] = float128_to_int64(v2.q, &env->fpu_status);
|
||||||
|
- if (float128_is_nan(v2.q)) return 3;
|
||||||
|
+ if (float128_is_any_nan(v2.q)) return 3;
|
||||||
|
else if (float128_is_zero(v2.q)) return 0;
|
||||||
|
else if (float128_is_neg(v2.q)) return 1;
|
||||||
|
else return 2;
|
||||||
|
@@ -1611,7 +1611,7 @@ uint32_t HELPER(tceb)(uint32_t f1, uint64_t m2)
|
||||||
|
HELPER_LOG("%s: v1 0x%lx m2 0x%lx neg %d\n", __FUNCTION__, v1, m2, neg);
|
||||||
|
if (float32_is_zero(v1) && (m2 & (1 << (11-neg)))) cc = 1;
|
||||||
|
else if (float32_is_infinity(v1) && (m2 & (1 << (5-neg)))) cc = 1;
|
||||||
|
- else if (float32_is_nan(v1) && (m2 & (1 << (3-neg)))) cc = 1;
|
||||||
|
+ else if (float32_is_quiet_nan(v1) && (m2 & (1 << (3-neg)))) cc = 1;
|
||||||
|
else if (float32_is_signaling_nan(v1) && (m2 & (1 << (1-neg)))) cc = 1;
|
||||||
|
else /* assume normalized number */ if (m2 & (1 << (9-neg))) cc = 1;
|
||||||
|
/* FIXME: denormalized? */
|
||||||
|
@@ -1627,7 +1627,7 @@ uint32_t HELPER(tcdb)(uint32_t f1, uint64_t m2)
|
||||||
|
HELPER_LOG("%s: v1 0x%lx m2 0x%lx neg %d\n", __FUNCTION__, v1, m2, neg);
|
||||||
|
if (float64_is_zero(v1) && (m2 & (1 << (11-neg)))) cc = 1;
|
||||||
|
else if (float64_is_infinity(v1) && (m2 & (1 << (5-neg)))) cc = 1;
|
||||||
|
- else if (float64_is_nan(v1) && (m2 & (1 << (3-neg)))) cc = 1;
|
||||||
|
+ else if (float64_is_quiet_nan(v1) && (m2 & (1 << (3-neg)))) cc = 1;
|
||||||
|
else if (float64_is_signaling_nan(v1) && (m2 & (1 << (1-neg)))) cc = 1;
|
||||||
|
else /* assume normalized number */ if (m2 & (1 << (9-neg))) cc = 1;
|
||||||
|
/* FIXME: denormalized? */
|
||||||
|
@@ -1645,7 +1645,7 @@ uint32_t HELPER(tcxb)(uint32_t f1, uint64_t m2)
|
||||||
|
int neg = float128_is_neg(v1.q);
|
||||||
|
if (float128_is_zero(v1.q) && (m2 & (1 << (11-neg)))) cc = 1;
|
||||||
|
else if (float128_is_infinity(v1.q) && (m2 & (1 << (5-neg)))) cc = 1;
|
||||||
|
- else if (float128_is_nan(v1.q) && (m2 & (1 << (3-neg)))) cc = 1;
|
||||||
|
+ else if (float128_is_quiet_nan(v1.q) && (m2 & (1 << (3-neg)))) cc = 1;
|
||||||
|
else if (float128_is_signaling_nan(v1.q) && (m2 & (1 << (1-neg)))) cc = 1;
|
||||||
|
else /* assume normalized number */ if (m2 & (1 << (9-neg))) cc = 1;
|
||||||
|
/* FIXME: denormalized? */
|
||||||
|
diff --git a/target-s390x/translate.c b/target-s390x/translate.c
|
||||||
|
index e08dcf4..189a60b 100644
|
||||||
|
--- a/target-s390x/translate.c
|
||||||
|
+++ b/target-s390x/translate.c
|
||||||
|
@@ -67,7 +67,7 @@ void cpu_dump_state(CPUState *env, FILE *f, fprintf_function cpu_fprintf,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (i = 0; i < 16; i++) {
|
||||||
|
- cpu_fprintf(f, "F%02d=%016lx", i, (long)env->fregs[i].i);
|
||||||
|
+ cpu_fprintf(f, "F%02d=%016lx", i, (long)env->fregs[i].ll);
|
||||||
|
if ((i % 4) == 3) {
|
||||||
|
cpu_fprintf(f, "\n");
|
||||||
|
} else {
|
||||||
|
--
|
||||||
|
1.7.1
|
||||||
|
|
@ -0,0 +1,289 @@
|
|||||||
|
diff -uNr old-qemu-0.14.1//block/raw-win32.c qemu-0.14.1/block/raw-win32.c
|
||||||
|
--- old-qemu-0.14.1//block/raw-win32.c 2011-05-06 21:01:43.000000000 +0200
|
||||||
|
+++ qemu-0.14.1/block/raw-win32.c 2011-05-11 15:41:45.744749392 +0200
|
||||||
|
@@ -93,7 +93,7 @@
|
||||||
|
else if (!(flags & BDRV_O_CACHE_WB))
|
||||||
|
overlapped |= FILE_FLAG_WRITE_THROUGH;
|
||||||
|
s->hfile = CreateFile(filename, access_flags,
|
||||||
|
- FILE_SHARE_READ, NULL,
|
||||||
|
+ FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
|
||||||
|
OPEN_EXISTING, overlapped, NULL);
|
||||||
|
if (s->hfile == INVALID_HANDLE_VALUE) {
|
||||||
|
int err = GetLastError();
|
||||||
|
@@ -354,7 +354,7 @@
|
||||||
|
else if (!(flags & BDRV_O_CACHE_WB))
|
||||||
|
overlapped |= FILE_FLAG_WRITE_THROUGH;
|
||||||
|
s->hfile = CreateFile(filename, access_flags,
|
||||||
|
- FILE_SHARE_READ, NULL,
|
||||||
|
+ FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
|
||||||
|
create_flags, overlapped, NULL);
|
||||||
|
if (s->hfile == INVALID_HANDLE_VALUE) {
|
||||||
|
int err = GetLastError();
|
||||||
|
diff -uNr old-qemu-0.14.1//hw/e1000.c qemu-0.14.1/hw/e1000.c
|
||||||
|
--- old-qemu-0.14.1//hw/e1000.c 2011-05-06 21:01:43.000000000 +0200
|
||||||
|
+++ qemu-0.14.1/hw/e1000.c 2011-05-11 15:41:45.744749392 +0200
|
||||||
|
@@ -573,7 +573,7 @@
|
||||||
|
if (rctl & E1000_RCTL_UPE) // promiscuous
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
- if ((buf[0] & 1) && (rctl & E1000_RCTL_MPE)) // promiscuous mcast
|
||||||
|
+ if ((buf[0] & 1)) //&& (rctl & E1000_RCTL_MPE)) // promiscuous mcast
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
if ((rctl & E1000_RCTL_BAM) && !memcmp(buf, bcast, sizeof bcast))
|
||||||
|
diff -uNr old-qemu-0.14.1//Makefile.objs qemu-0.14.1/Makefile.objs
|
||||||
|
--- old-qemu-0.14.1//Makefile.objs 2011-05-06 21:01:43.000000000 +0200
|
||||||
|
+++ qemu-0.14.1/Makefile.objs 2011-05-11 15:41:45.751749392 +0200
|
||||||
|
@@ -34,6 +34,7 @@
|
||||||
|
net-nested-y = queue.o checksum.o util.o
|
||||||
|
net-nested-y += socket.o
|
||||||
|
net-nested-y += dump.o
|
||||||
|
+net-nested-y += udp.o
|
||||||
|
net-nested-$(CONFIG_POSIX) += tap.o
|
||||||
|
net-nested-$(CONFIG_LINUX) += tap-linux.o
|
||||||
|
net-nested-$(CONFIG_WIN32) += tap-win32.o
|
||||||
|
diff -uNr old-qemu-0.14.1//net/udp.c qemu-0.14.1/net/udp.c
|
||||||
|
--- old-qemu-0.14.1//net/udp.c 1970-01-01 01:00:00.000000000 +0100
|
||||||
|
+++ qemu-0.14.1/net/udp.c 2011-05-11 15:41:45.752749392 +0200
|
||||||
|
@@ -0,0 +1,138 @@
|
||||||
|
+/*
|
||||||
|
+ * QEMU System Emulator
|
||||||
|
+ *
|
||||||
|
+ * Copyright (c) 2003-2008 Fabrice Bellard
|
||||||
|
+ *
|
||||||
|
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
+ * of this software and associated documentation files (the "Software"), to deal
|
||||||
|
+ * in the Software without restriction, including without limitation the rights
|
||||||
|
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
+ * copies of the Software, and to permit persons to whom the Software is
|
||||||
|
+ * furnished to do so, subject to the following conditions:
|
||||||
|
+ *
|
||||||
|
+ * The above copyright notice and this permission notice shall be included in
|
||||||
|
+ * all copies or substantial portions of the Software.
|
||||||
|
+ *
|
||||||
|
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
+ * THE SOFTWARE.
|
||||||
|
+ */
|
||||||
|
+#include "net/udp.h"
|
||||||
|
+
|
||||||
|
+#include "config-host.h"
|
||||||
|
+
|
||||||
|
+#ifndef _WIN32
|
||||||
|
+#include <arpa/inet.h>
|
||||||
|
+#include <netinet/in.h>
|
||||||
|
+#include <netinet/udp.h>
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#include "net.h"
|
||||||
|
+#include "qemu-char.h"
|
||||||
|
+#include "qemu-common.h"
|
||||||
|
+#include "qemu-option.h"
|
||||||
|
+#include "qemu_socket.h"
|
||||||
|
+#include "sysemu.h"
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+typedef struct UDPState {
|
||||||
|
+ VLANClientState nc;
|
||||||
|
+ int rfd;
|
||||||
|
+ struct sockaddr_in sender;
|
||||||
|
+} UDPState;
|
||||||
|
+
|
||||||
|
+static void udp_to_qemu(void *opaque)
|
||||||
|
+{
|
||||||
|
+ UDPState *s = opaque;
|
||||||
|
+ uint8_t buf[4096];
|
||||||
|
+ int size;
|
||||||
|
+
|
||||||
|
+ size = recvfrom(s->rfd, (char *)buf, sizeof(buf), 0, NULL, NULL);
|
||||||
|
+ if (size > 0) {
|
||||||
|
+ qemu_send_packet(&s->nc, buf, size);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static ssize_t udp_receive(VLANClientState *nc, const uint8_t *buf, size_t size)
|
||||||
|
+{
|
||||||
|
+ UDPState *s = DO_UPCAST(UDPState, nc, nc);
|
||||||
|
+ int ret;
|
||||||
|
+
|
||||||
|
+ do {
|
||||||
|
+ ret = sendto(s->rfd, (const char *)buf, size, 0, (struct sockaddr *)&s->sender, sizeof (s->sender));
|
||||||
|
+ } while (ret < 0 && errno == EINTR);
|
||||||
|
+
|
||||||
|
+ return ret;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void udp_cleanup(VLANClientState *nc)
|
||||||
|
+{
|
||||||
|
+ UDPState *s = DO_UPCAST(UDPState, nc, nc);
|
||||||
|
+ qemu_set_fd_handler(s->rfd, NULL, NULL, NULL);
|
||||||
|
+ close(s->rfd);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static NetClientInfo net_udp_info = {
|
||||||
|
+ .type = NET_CLIENT_TYPE_UDP,
|
||||||
|
+ .size = sizeof(UDPState),
|
||||||
|
+ .receive = udp_receive,
|
||||||
|
+ .cleanup = udp_cleanup,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static int net_udp_init(VLANState *vlan, const char *model,
|
||||||
|
+ const char *name, int sport,
|
||||||
|
+ const char *daddr, int dport)
|
||||||
|
+{
|
||||||
|
+ VLANClientState *nc;
|
||||||
|
+ UDPState *s;
|
||||||
|
+ struct sockaddr_in receiver;
|
||||||
|
+ int ret;
|
||||||
|
+
|
||||||
|
+ nc = qemu_new_net_client(&net_udp_info, vlan, NULL, model, name);
|
||||||
|
+
|
||||||
|
+ snprintf(nc->info_str, sizeof(nc->info_str),"udp: %i->%s:%i",
|
||||||
|
+ sport, daddr, dport);
|
||||||
|
+
|
||||||
|
+ s = DO_UPCAST(UDPState, nc, nc);
|
||||||
|
+
|
||||||
|
+ s->rfd = socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP);
|
||||||
|
+ receiver.sin_family = AF_INET;
|
||||||
|
+ receiver.sin_addr.s_addr = INADDR_ANY;
|
||||||
|
+ receiver.sin_port = htons(sport);
|
||||||
|
+ ret = bind(s->rfd, (struct sockaddr *)&receiver, sizeof(receiver));
|
||||||
|
+
|
||||||
|
+ if (ret == -1) {
|
||||||
|
+ fprintf (stderr, "bind error:%s\n", strerror(errno));
|
||||||
|
+ return ret;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ memset((char*)&s->sender, 0,sizeof(s->sender));
|
||||||
|
+ s->sender.sin_family = AF_INET;
|
||||||
|
+ s->sender.sin_port = htons(dport);
|
||||||
|
+ inet_aton(daddr, &s->sender.sin_addr);
|
||||||
|
+
|
||||||
|
+ qemu_set_fd_handler(s->rfd, udp_to_qemu, NULL, s);
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+int net_init_udp(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan)
|
||||||
|
+{
|
||||||
|
+ const char *daddr;
|
||||||
|
+ int sport, dport;
|
||||||
|
+
|
||||||
|
+ daddr = qemu_opt_get(opts, "daddr");
|
||||||
|
+
|
||||||
|
+ sport = qemu_opt_get_number(opts, "sport", 0);
|
||||||
|
+ dport = qemu_opt_get_number(opts, "dport", 0);
|
||||||
|
+
|
||||||
|
+ if (net_udp_init(vlan, "udp", name, sport, daddr, dport) == -1) {
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
diff -uNr old-qemu-0.14.1//net/udp.h qemu-0.14.1/net/udp.h
|
||||||
|
--- old-qemu-0.14.1//net/udp.h 1970-01-01 01:00:00.000000000 +0100
|
||||||
|
+++ qemu-0.14.1/net/udp.h 2011-05-11 15:41:45.752749392 +0200
|
||||||
|
@@ -0,0 +1,32 @@
|
||||||
|
+/*
|
||||||
|
+ * QEMU System Emulator
|
||||||
|
+ *
|
||||||
|
+ * Copyright (c) 2003-2008 Fabrice Bellard
|
||||||
|
+ *
|
||||||
|
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
+ * of this software and associated documentation files (the "Software"), to deal
|
||||||
|
+ * in the Software without restriction, including without limitation the rights
|
||||||
|
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
+ * copies of the Software, and to permit persons to whom the Software is
|
||||||
|
+ * furnished to do so, subject to the following conditions:
|
||||||
|
+ *
|
||||||
|
+ * The above copyright notice and this permission notice shall be included in
|
||||||
|
+ * all copies or substantial portions of the Software.
|
||||||
|
+ *
|
||||||
|
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
+ * THE SOFTWARE.
|
||||||
|
+ */
|
||||||
|
+#ifndef QEMU_NET_UDP_H
|
||||||
|
+#define QEMU_NET_UDP_H
|
||||||
|
+
|
||||||
|
+#include "qemu-common.h"
|
||||||
|
+#include "qemu-option.h"
|
||||||
|
+
|
||||||
|
+int net_init_udp(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan);
|
||||||
|
+
|
||||||
|
+#endif /* QEMU_NET_UDP_H */
|
||||||
|
diff -uNr old-qemu-0.14.1//net.c qemu-0.14.1/net.c
|
||||||
|
--- old-qemu-0.14.1//net.c 2011-05-06 21:01:44.000000000 +0200
|
||||||
|
+++ qemu-0.14.1/net.c 2011-05-11 15:42:53.145749408 +0200
|
||||||
|
@@ -30,6 +30,7 @@
|
||||||
|
#include "net/dump.h"
|
||||||
|
#include "net/slirp.h"
|
||||||
|
#include "net/vde.h"
|
||||||
|
+#include "net/udp.h"
|
||||||
|
#include "net/util.h"
|
||||||
|
#include "monitor.h"
|
||||||
|
#include "sysemu.h"
|
||||||
|
@@ -1085,9 +1086,31 @@
|
||||||
|
.help = "permissions for socket",
|
||||||
|
},
|
||||||
|
{ /* end of list */ }
|
||||||
|
- },
|
||||||
|
+ },
|
||||||
|
#endif
|
||||||
|
}, {
|
||||||
|
+
|
||||||
|
+ .type = "udp",
|
||||||
|
+ .init = net_init_udp,
|
||||||
|
+ .desc = {
|
||||||
|
+ NET_COMMON_PARAMS_DESC,
|
||||||
|
+ {
|
||||||
|
+ .name = "sport",
|
||||||
|
+ .type = QEMU_OPT_NUMBER,
|
||||||
|
+
|
||||||
|
+ .help = "source port number",
|
||||||
|
+ }, {
|
||||||
|
+ .name = "daddr",
|
||||||
|
+ .type = QEMU_OPT_STRING,
|
||||||
|
+ .help = "destination IP address",
|
||||||
|
+ }, {
|
||||||
|
+ .name = "dport",
|
||||||
|
+ .type = QEMU_OPT_NUMBER,
|
||||||
|
+ .help = "destination port number",
|
||||||
|
+ },
|
||||||
|
+ { /* end of list */ }
|
||||||
|
+ },
|
||||||
|
+ }, {
|
||||||
|
.type = "dump",
|
||||||
|
.init = net_init_dump,
|
||||||
|
.desc = {
|
||||||
|
diff -uNr old-qemu-0.14.1//net.h qemu-0.14.1/net.h
|
||||||
|
--- old-qemu-0.14.1//net.h 2011-05-06 21:01:44.000000000 +0200
|
||||||
|
+++ qemu-0.14.1/net.h 2011-05-11 15:41:45.754749392 +0200
|
||||||
|
@@ -35,6 +35,7 @@
|
||||||
|
NET_CLIENT_TYPE_TAP,
|
||||||
|
NET_CLIENT_TYPE_SOCKET,
|
||||||
|
NET_CLIENT_TYPE_VDE,
|
||||||
|
+ NET_CLIENT_TYPE_UDP,
|
||||||
|
NET_CLIENT_TYPE_DUMP
|
||||||
|
} net_client_type;
|
||||||
|
|
||||||
|
diff -uNr old-qemu-0.14.1//qemu-options.hx qemu-0.14.1/qemu-options.hx
|
||||||
|
--- old-qemu-0.14.1//qemu-options.hx 2011-05-06 21:01:44.000000000 +0200
|
||||||
|
+++ qemu-0.14.1/qemu-options.hx 2011-05-11 15:41:45.755749392 +0200
|
||||||
|
@@ -1070,6 +1070,8 @@
|
||||||
|
"-net socket[,vlan=n][,name=str][,fd=h][,mcast=maddr:port[,localaddr=addr]]\n"
|
||||||
|
" connect the vlan 'n' to multicast maddr and port\n"
|
||||||
|
" use 'localaddr=addr' to specify the host address to send packets from\n"
|
||||||
|
+ "-net udp[,vlan=n]sport=sport,dport=dport,daddr=host\n"
|
||||||
|
+ " connect the vlan 'n' to a UDP tunnel (for Dynamips/GNS3)\n"
|
||||||
|
#ifdef CONFIG_VDE
|
||||||
|
"-net vde[,vlan=n][,name=str][,sock=socketpath][,port=n][,group=groupname][,mode=octalmode]\n"
|
||||||
|
" connect the vlan 'n' to port 'n' of a vde switch running\n"
|
@ -0,0 +1,52 @@
|
|||||||
|
From 39c6bee3d5023a3e339bafd8073bc2c920cd79c5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexander Graf <agraf@suse.de>
|
||||||
|
Date: Sun, 25 Sep 2011 06:21:28 +0200
|
||||||
|
Subject: [PATCH] linux-user: fix openat
|
||||||
|
|
||||||
|
When running openat using qemu-arm, we stumbled over invalid permissions
|
||||||
|
on the created files. The reason for this is that the mode parameter gets
|
||||||
|
treates as an O_... flag, which it isn't - it's a permission bitmask.
|
||||||
|
|
||||||
|
This patch removes the needless translation of the mode parameter,
|
||||||
|
rendering permission passing of openat() to work with linux-user.
|
||||||
|
|
||||||
|
Reported-by: Dirk Mueller <dmueller@suse.de>
|
||||||
|
Signed-off-by: Alexander Graf <agraf@suse.de>
|
||||||
|
---
|
||||||
|
linux-user/syscall.c | 14 +-------------
|
||||||
|
1 files changed, 1 insertions(+), 13 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
|
||||||
|
index 6b73769..27970a4 100644
|
||||||
|
--- a/linux-user/syscall.c
|
||||||
|
+++ b/linux-user/syscall.c
|
||||||
|
@@ -376,25 +376,13 @@ static int sys_mknodat(int dirfd, const char *pathname, mode_t mode,
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef TARGET_NR_openat
|
||||||
|
-static int sys_openat(int dirfd, const char *pathname, int flags, ...)
|
||||||
|
+static int sys_openat(int dirfd, const char *pathname, int flags, mode_t mode)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* open(2) has extra parameter 'mode' when called with
|
||||||
|
* flag O_CREAT.
|
||||||
|
*/
|
||||||
|
if ((flags & O_CREAT) != 0) {
|
||||||
|
- va_list ap;
|
||||||
|
- mode_t mode;
|
||||||
|
-
|
||||||
|
- /*
|
||||||
|
- * Get the 'mode' parameter and translate it to
|
||||||
|
- * host bits.
|
||||||
|
- */
|
||||||
|
- va_start(ap, flags);
|
||||||
|
- mode = va_arg(ap, mode_t);
|
||||||
|
- mode = target_to_host_bitmask(mode, fcntl_flags_tbl);
|
||||||
|
- va_end(ap);
|
||||||
|
-
|
||||||
|
return (openat(dirfd, pathname, flags, mode));
|
||||||
|
}
|
||||||
|
return (openat(dirfd, pathname, flags));
|
||||||
|
--
|
||||||
|
1.6.0.2
|
||||||
|
|
@ -0,0 +1,40 @@
|
|||||||
|
From: Alexander Graf <agraf@suse.de>
|
||||||
|
|
||||||
|
For OBS, we're running a full cross-guest inside of a VM. When a build
|
||||||
|
is done there, we reboot the guest as shutdown mechanism.
|
||||||
|
|
||||||
|
Unfortunately, reboot is not implemented in linux-user. So this mechanism
|
||||||
|
fails, spilling unpretty warnings. This patch implements sys_reboot()
|
||||||
|
emulation.
|
||||||
|
|
||||||
|
Signed-off-by: Alexander Graf <agraf@suse.de>
|
||||||
|
---
|
||||||
|
linux-user/syscall.c | 8 +++++++-
|
||||||
|
1 files changed, 7 insertions(+), 1 deletions(-)
|
||||||
|
|
||||||
|
Index: qemu-0.14.1/linux-user/syscall.c
|
||||||
|
===================================================================
|
||||||
|
--- qemu-0.14.1.orig/linux-user/syscall.c
|
||||||
|
+++ qemu-0.14.1/linux-user/syscall.c
|
||||||
|
@@ -239,6 +239,8 @@ _syscall6(int,sys_futex,int *,uaddr,int,
|
||||||
|
const struct timespec *,timeout,int *,uaddr2,int,val3)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
+_syscall4(int, reboot, int, magic1, int, magic2, unsigned int, cmd,
|
||||||
|
+ void *, arg);
|
||||||
|
|
||||||
|
static bitmask_transtbl fcntl_flags_tbl[] = {
|
||||||
|
{ TARGET_O_ACCMODE, TARGET_O_WRONLY, O_ACCMODE, O_WRONLY, },
|
||||||
|
@@ -5536,7 +5538,11 @@ abi_long do_syscall(void *cpu_env, int n
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
case TARGET_NR_reboot:
|
||||||
|
- goto unimplemented;
|
||||||
|
+ if (!(p = lock_user_string(arg4)))
|
||||||
|
+ goto efault;
|
||||||
|
+ ret = reboot(arg1, arg2, arg3, p);
|
||||||
|
+ unlock_user(p, arg4, 0);
|
||||||
|
+ break;
|
||||||
|
#ifdef TARGET_NR_readdir
|
||||||
|
case TARGET_NR_readdir:
|
||||||
|
goto unimplemented;
|
@ -0,0 +1,117 @@
|
|||||||
|
From agraf@suse.de Thu, 29 Sep 2011 11:00:25 +0200
|
||||||
|
Return-Path: <agraf@suse.de>
|
||||||
|
Received: from imap.suse.de ([unix socket])
|
||||||
|
by imap-int (Cyrus v2.2.12) with LMTPA;
|
||||||
|
Thu, 29 Sep 2011 11:07:10 +0200
|
||||||
|
X-Sieve: CMU Sieve 2.2
|
||||||
|
Received: from relay2.suse.de (relay2.suse.de [149.44.160.134])
|
||||||
|
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
|
||||||
|
(Client CN "relay.suse.de", Issuer "CAcert Class 3 Root" (verified OK))
|
||||||
|
by imap.suse.de (Postfix) with ESMTPS id AF8563C539A9
|
||||||
|
for <adrian@imap.suse.de>; Thu, 29 Sep 2011 11:07:10 +0200 (CEST)
|
||||||
|
Received: by relay2.suse.de (Postfix)
|
||||||
|
id A639118552E6; Thu, 29 Sep 2011 11:07:10 +0200 (CEST)
|
||||||
|
Received: from imap.suse.de (loadbalancer1.suse.de [149.44.160.248])
|
||||||
|
(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
|
||||||
|
(No client certificate requested)
|
||||||
|
by relay2.suse.de (Postfix) with ESMTPS id A573518552E1;
|
||||||
|
Thu, 29 Sep 2011 11:07:10 +0200 (CEST)
|
||||||
|
Received: from localhost.localdomain (charybdis-ext.suse.de [195.135.221.2])
|
||||||
|
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
|
||||||
|
(Client did not present a certificate)
|
||||||
|
by imap.suse.de (Postfix) with ESMTPSA id 7AD993C539A9;
|
||||||
|
Thu, 29 Sep 2011 11:07:10 +0200 (CEST)
|
||||||
|
From: Alexander Graf <agraf@suse.de>
|
||||||
|
To: adrian@suse.de
|
||||||
|
Cc: Peter Maydell <peter.maydell@linaro.org>, Riku Voipio <riku.voipio@linaro.org>
|
||||||
|
Subject: [PATCH] linux-user: Implement prlimit64 syscall
|
||||||
|
Date: Thu, 29 Sep 2011 11:00:25 +0200
|
||||||
|
Message-Id: <1317286825-2033-1-git-send-email-agraf@suse.de>
|
||||||
|
X-Mailer: git-send-email 1.6.0.2
|
||||||
|
|
||||||
|
From: Peter Maydell <peter.maydell@linaro.org>
|
||||||
|
|
||||||
|
Implement the prlimit64 syscall.
|
||||||
|
|
||||||
|
Slightly modified to apply upstream -Riku
|
||||||
|
|
||||||
|
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
|
||||||
|
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
|
||||||
|
|
||||||
|
Index: qemu-0.14.1/linux-user/syscall.c
|
||||||
|
===================================================================
|
||||||
|
--- qemu-0.14.1.orig/linux-user/syscall.c
|
||||||
|
+++ qemu-0.14.1/linux-user/syscall.c
|
||||||
|
@@ -524,6 +524,21 @@ static int sys_inotify_init1(int flags)
|
||||||
|
#endif /* CONFIG_INOTIFY */
|
||||||
|
|
||||||
|
|
||||||
|
+#if defined(TARGET_NR_prlimit64)
|
||||||
|
+#ifndef __NR_prlimit64
|
||||||
|
+# define __NR_prlimit64 -1
|
||||||
|
+#endif
|
||||||
|
+#define __NR_sys_prlimit64 __NR_prlimit64
|
||||||
|
+/* The glibc rlimit structure may not be that used by the underlying syscall */
|
||||||
|
+struct host_rlimit64 {
|
||||||
|
+ uint64_t rlim_cur;
|
||||||
|
+ uint64_t rlim_max;
|
||||||
|
+};
|
||||||
|
+_syscall4(int, sys_prlimit64, pid_t, pid, int, resource,
|
||||||
|
+ const struct host_rlimit64 *, new_limit,
|
||||||
|
+ struct host_rlimit64 *, old_limit)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
extern int personality(int);
|
||||||
|
extern int flock(int, int);
|
||||||
|
extern int setfsuid(int);
|
||||||
|
@@ -7620,6 +7635,34 @@ abi_long do_syscall(void *cpu_env, int n
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
+#ifdef TARGET_NR_prlimit64
|
||||||
|
+ case TARGET_NR_prlimit64:
|
||||||
|
+ {
|
||||||
|
+ /* args: pid, resource number, ptr to new rlimit, ptr to old rlimit */
|
||||||
|
+ struct target_rlimit64 *target_rnew, *target_rold;
|
||||||
|
+ struct host_rlimit64 rnew, rold, *rnewp = 0;
|
||||||
|
+ if (arg3) {
|
||||||
|
+ if (!lock_user_struct(VERIFY_READ, target_rnew, arg3, 1)) {
|
||||||
|
+ goto efault;
|
||||||
|
+ }
|
||||||
|
+ rnew.rlim_cur = tswap64(target_rnew->rlim_cur);
|
||||||
|
+ rnew.rlim_max = tswap64(target_rnew->rlim_max);
|
||||||
|
+ unlock_user_struct(target_rnew, arg3, 0);
|
||||||
|
+ rnewp = &rnew;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ ret = get_errno(sys_prlimit64(arg1, arg2, rnewp, arg4 ? &rold : 0));
|
||||||
|
+ if (!is_error(ret) && arg4) {
|
||||||
|
+ if (!lock_user_struct(VERIFY_WRITE, target_rold, arg4, 1)) {
|
||||||
|
+ goto efault;
|
||||||
|
+ }
|
||||||
|
+ target_rold->rlim_cur = tswap64(rold.rlim_cur);
|
||||||
|
+ target_rold->rlim_max = tswap64(rold.rlim_max);
|
||||||
|
+ unlock_user_struct(target_rold, arg4, 1);
|
||||||
|
+ }
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
default:
|
||||||
|
unimplemented:
|
||||||
|
Index: qemu-0.14.1/linux-user/syscall_defs.h
|
||||||
|
===================================================================
|
||||||
|
--- qemu-0.14.1.orig/linux-user/syscall_defs.h
|
||||||
|
+++ qemu-0.14.1/linux-user/syscall_defs.h
|
||||||
|
@@ -2237,6 +2237,11 @@ struct target_mq_attr {
|
||||||
|
abi_long mq_curmsgs;
|
||||||
|
};
|
||||||
|
|
||||||
|
+struct target_rlimit64 {
|
||||||
|
+ uint64_t rlim_cur;
|
||||||
|
+ uint64_t rlim_max;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
#include "socket.h"
|
||||||
|
|
||||||
|
#include "errno_defs.h"
|
@ -0,0 +1,34 @@
|
|||||||
|
From: Alexander Graf <agraf@suse.de>
|
||||||
|
|
||||||
|
fixes some SMP races
|
||||||
|
---
|
||||||
|
cpu-all.h | 2 +-
|
||||||
|
exec.c | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
Index: qemu-0.14.1/cpu-all.h
|
||||||
|
===================================================================
|
||||||
|
--- qemu-0.14.1.orig/cpu-all.h
|
||||||
|
+++ qemu-0.14.1/cpu-all.h
|
||||||
|
@@ -775,7 +775,7 @@ void cpu_dump_statistics(CPUState *env,
|
||||||
|
void QEMU_NORETURN cpu_abort(CPUState *env, const char *fmt, ...)
|
||||||
|
GCC_FMT_ATTR(2, 3);
|
||||||
|
extern CPUState *first_cpu;
|
||||||
|
-extern CPUState *cpu_single_env;
|
||||||
|
+extern __thread CPUState *cpu_single_env;
|
||||||
|
|
||||||
|
#define CPU_INTERRUPT_HARD 0x02 /* hardware interrupt pending */
|
||||||
|
#define CPU_INTERRUPT_EXITTB 0x04 /* exit the current TB (use for x86 a20 case) */
|
||||||
|
Index: qemu-0.14.1/exec.c
|
||||||
|
===================================================================
|
||||||
|
--- qemu-0.14.1.orig/exec.c
|
||||||
|
+++ qemu-0.14.1/exec.c
|
||||||
|
@@ -112,7 +112,7 @@ RAMList ram_list = { .blocks = QLIST_HEA
|
||||||
|
CPUState *first_cpu;
|
||||||
|
/* current CPU in the current thread. It is only valid inside
|
||||||
|
cpu_exec() */
|
||||||
|
-CPUState *cpu_single_env;
|
||||||
|
+__thread CPUState *cpu_single_env;
|
||||||
|
/* 0 = Do not count executed instructions.
|
||||||
|
1 = Precise instruction counting.
|
||||||
|
2 = Adaptive rate instruction counting. */
|
@ -0,0 +1,167 @@
|
|||||||
|
From 864b2c7da05bc29a94b3e792b100dd5189576942 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexander Graf <agraf@suse.de>
|
||||||
|
Date: Fri, 30 Sep 2011 19:40:36 +0200
|
||||||
|
Subject: [PATCH] linux-user: add binfmt wrapper for argv[0] handling
|
||||||
|
|
||||||
|
When using qemu's linux-user binaries through binfmt, argv[0] gets lost
|
||||||
|
along the execution because qemu only gets passed in the full file name
|
||||||
|
to the executable while argv[0] can be something completely different.
|
||||||
|
|
||||||
|
This breaks in some subtile situations, such as the grep and make test
|
||||||
|
suites.
|
||||||
|
|
||||||
|
This patch adds a wrapper binary called qemu-$TARGET-binfmt that can be
|
||||||
|
used with binfmt's P flag which passes the full path _and_ argv[0] to
|
||||||
|
the binfmt handler.
|
||||||
|
|
||||||
|
The binary would be smart enough to be versatile and only exist in the
|
||||||
|
system once, creating the qemu binary path names from its own argv[0].
|
||||||
|
However, this seemed like it didn't fit the make system too well, so
|
||||||
|
we're currently creating a new binary for each target archictecture.
|
||||||
|
|
||||||
|
CC: Reinhard Max <max@suse.de>
|
||||||
|
Signed-off-by: Alexander Graf <agraf@suse.de>
|
||||||
|
---
|
||||||
|
Makefile.target | 8 ++++++++
|
||||||
|
linux-user/binfmt.c | 42 ++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
scripts/qemu-binfmt-conf.sh | 34 +++++++++++++++++-----------------
|
||||||
|
3 files changed, 67 insertions(+), 17 deletions(-)
|
||||||
|
create mode 100644 linux-user/binfmt.c
|
||||||
|
|
||||||
|
Index: qemu-0.14.1/Makefile.target
|
||||||
|
===================================================================
|
||||||
|
--- qemu-0.14.1.orig/Makefile.target
|
||||||
|
+++ qemu-0.14.1/Makefile.target
|
||||||
|
@@ -33,6 +33,10 @@ endif
|
||||||
|
PROGS=$(QEMU_PROG)
|
||||||
|
STPFILES=
|
||||||
|
|
||||||
|
+ifdef CONFIG_LINUX_USER
|
||||||
|
+PROGS+=$(QEMU_PROG)-binfmt
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
ifndef CONFIG_HAIKU
|
||||||
|
LIBS+=-lm
|
||||||
|
endif
|
||||||
|
@@ -131,6 +135,8 @@ obj-y += $(addprefix ../libuser/, $(user
|
||||||
|
obj-y += $(addprefix ../libdis-user/, $(libdis-y))
|
||||||
|
obj-y += $(libobj-y)
|
||||||
|
|
||||||
|
+obj-binfmt-y += binfmt.o
|
||||||
|
+
|
||||||
|
endif #CONFIG_LINUX_USER
|
||||||
|
|
||||||
|
#########################################################
|
||||||
|
@@ -346,6 +352,8 @@ obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml
|
||||||
|
$(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)
|
||||||
|
$(call LINK,$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y))
|
||||||
|
|
||||||
|
+$(QEMU_PROG)-binfmt: $(obj-binfmt-y)
|
||||||
|
+ $(call LINK,$^)
|
||||||
|
|
||||||
|
gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/scripts/feature_to_c.sh
|
||||||
|
$(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/scripts/feature_to_c.sh $@ $(TARGET_XML_FILES)," GEN $(TARGET_DIR)$@")
|
||||||
|
Index: qemu-0.14.1/linux-user/binfmt.c
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null
|
||||||
|
+++ qemu-0.14.1/linux-user/binfmt.c
|
||||||
|
@@ -0,0 +1,42 @@
|
||||||
|
+#include <stdio.h>
|
||||||
|
+#include <stdarg.h>
|
||||||
|
+#include <unistd.h>
|
||||||
|
+#include <libgen.h>
|
||||||
|
+#include <string.h>
|
||||||
|
+#include <stdlib.h>
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+int main(int argc, char **argv, char **envp)
|
||||||
|
+{
|
||||||
|
+ char *binfmt;
|
||||||
|
+ char **new_argv;
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * Check if our file name ends with -binfmt
|
||||||
|
+ */
|
||||||
|
+ binfmt = argv[0] + strlen(argv[0]) - strlen("-binfmt");
|
||||||
|
+ if (strcmp(binfmt, "-binfmt")) {
|
||||||
|
+ fprintf(stderr, "%s: Invalid executable name\n", argv[0]);
|
||||||
|
+ exit(1);
|
||||||
|
+ }
|
||||||
|
+ if (argc < 3) {
|
||||||
|
+ fprintf(stderr, "%s: Please use me through binfmt with P flag\n",
|
||||||
|
+ argv[0]);
|
||||||
|
+ exit(1);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ binfmt[0] = '\0';
|
||||||
|
+ /* Now argv[0] is the real qemu binary name */
|
||||||
|
+
|
||||||
|
+ new_argv = (char **)malloc((argc + 2) * sizeof(*new_argv));
|
||||||
|
+ if (argc > 3) {
|
||||||
|
+ memcpy(&new_argv[4], &argv[3], (argc - 3) * sizeof(*new_argv));
|
||||||
|
+ }
|
||||||
|
+ new_argv[0] = argv[0];
|
||||||
|
+ new_argv[1] = (char *)"-0";
|
||||||
|
+ new_argv[2] = argv[2];
|
||||||
|
+ new_argv[3] = argv[1];
|
||||||
|
+ new_argv[argc + 1] = NULL;
|
||||||
|
+
|
||||||
|
+ return execve(new_argv[0], new_argv, envp);
|
||||||
|
+}
|
||||||
|
Index: qemu-0.14.1/scripts/qemu-binfmt-conf.sh
|
||||||
|
===================================================================
|
||||||
|
--- qemu-0.14.1.orig/scripts/qemu-binfmt-conf.sh
|
||||||
|
+++ qemu-0.14.1/scripts/qemu-binfmt-conf.sh
|
||||||
|
@@ -34,36 +34,36 @@ esac
|
||||||
|
|
||||||
|
# register the interpreter for each cpu except for the native one
|
||||||
|
if [ $cpu != "i386" ] ; then
|
||||||
|
- echo ':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\xfe\xff\xff\xff:/usr/bin/qemu-i386:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
- echo ':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\xfe\xff\xff\xff:/usr/bin/qemu-i386:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':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\xfe\xff\xff\xff:/usr/bin/qemu-i386-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':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\xfe\xff\xff\xff:/usr/bin/qemu-i386-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "alpha" ] ; then
|
||||||
|
- echo ':alpha:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-alpha:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':alpha:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-alpha-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "arm" ] ; then
|
||||||
|
- echo ':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\xfe\xff\xff\xff:/usr/bin/qemu-arm:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
- echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':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\xfe\xff\xff\xff:/usr/bin/qemu-arm-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "sparc" ] ; then
|
||||||
|
- echo ':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\xff\xfe\xff\xff:/usr/bin/qemu-sparc:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':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\xff\xfe\xff\xff:/usr/bin/qemu-sparc-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "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\xff\xfe\xff\xff:/usr/bin/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\xff\xfe\xff\xff:/usr/bin/qemu-ppc-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "m68k" ] ; then
|
||||||
|
echo 'Please check cpu value and header information for m68k!'
|
||||||
|
- echo ':m68k:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-m68k:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':m68k:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-m68k-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "mips" ] ; then
|
||||||
|
# FIXME: We could use the other endianness on a MIPS host.
|
||||||
|
- echo ':mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
- echo ':mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsel:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
- echo ':mipsn32:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mipsn32:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
- echo ':mipsn32el:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsn32el:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
- echo ':mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips64:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
- echo ':mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mips64el:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsel-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':mipsn32:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mipsn32-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':mipsn32el:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsn32el-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips64-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mips64el-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "sh" ] ; then
|
||||||
|
- echo ':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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-sh4:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
- echo ':sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sh4eb:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-sh4-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
+ echo ':sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sh4eb-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
@ -0,0 +1,357 @@
|
|||||||
|
diff -uNr qemu-0.14.1.orig/linux-user/alpha/syscall_nr.h qemu-0.14.1/linux-user/alpha/syscall_nr.h
|
||||||
|
--- qemu-0.14.1.orig/linux-user/alpha/syscall_nr.h 2011-11-24 22:21:09.636856616 +0100
|
||||||
|
+++ qemu-0.14.1/linux-user/alpha/syscall_nr.h 2011-11-24 22:22:04.528478368 +0100
|
||||||
|
@@ -411,7 +411,28 @@
|
||||||
|
#define TARGET_NR_signalfd 476
|
||||||
|
#define TARGET_NR_timerfd 477
|
||||||
|
#define TARGET_NR_eventfd 478
|
||||||
|
-
|
||||||
|
+#define TARGET_NR_recvmmsg 479
|
||||||
|
+#define TARGET_NR_fallocate 480
|
||||||
|
+#define TARGET_NR_timerfd_create 481
|
||||||
|
+#define TARGET_NR_timerfd_settime 482
|
||||||
|
+#define TARGET_NR_timerfd_gettime 483
|
||||||
|
+#define TARGET_NR_signalfd4 484
|
||||||
|
+#define TARGET_NR_eventfd2 485
|
||||||
|
+#define TARGET_NR_epoll_create1 486
|
||||||
|
+#define TARGET_NR_dup3 487
|
||||||
|
+#define TARGET_NR_pipe2 488
|
||||||
|
+#define TARGET_NR_inotify_init1 489
|
||||||
|
+#define TARGET_NR_preadv 490
|
||||||
|
+#define TARGET_NR_pwritev 491
|
||||||
|
+#define TARGET_NR_rt_tgsigqueueinfo 492
|
||||||
|
+#define TARGET_NR_perf_event_open 493
|
||||||
|
+#define TARGET_NR_fanotify_init 494
|
||||||
|
+#define TARGET_NR_fanotify_mark 495
|
||||||
|
+#define TARGET_NR_prlimit64 496
|
||||||
|
+#define TARGET_NR_name_to_handle_at 497
|
||||||
|
+#define TARGET_NR_open_by_handle_at 498
|
||||||
|
+#define TARGET_NR_clock_adjtime 499
|
||||||
|
+#define TARGET_NR_syncfs 500
|
||||||
|
/* The following aliases are defined in order to match up with the
|
||||||
|
standard i386 syscalls implemented in syscalls.c. */
|
||||||
|
#define TARGET_NR_chown32 TARGET_NR_chown
|
||||||
|
diff -uNr qemu-0.14.1.orig/linux-user/arm/syscall_nr.h qemu-0.14.1/linux-user/arm/syscall_nr.h
|
||||||
|
--- qemu-0.14.1.orig/linux-user/arm/syscall_nr.h 2011-11-24 22:21:09.627597287 +0100
|
||||||
|
+++ qemu-0.14.1/linux-user/arm/syscall_nr.h 2011-11-24 22:21:41.762101277 +0100
|
||||||
|
@@ -365,3 +365,16 @@
|
||||||
|
#define TARGET_NR_dup3 (358)
|
||||||
|
#define TARGET_NR_pipe2 (359)
|
||||||
|
#define TARGET_NR_inotify_init1 (360)
|
||||||
|
+#define TARGET_NR_preadv (361)
|
||||||
|
+#define TARGET_NR_pwritev (362)
|
||||||
|
+#define TARGET_NR_rt_tgsigqueueinfo (363)
|
||||||
|
+#define TARGET_NR_perf_event_open (364)
|
||||||
|
+#define TARGET_NR_recvmmsg (365)
|
||||||
|
+#define TARGET_NR_accept4 (366)
|
||||||
|
+#define TARGET_NR_fanotify_init (367)
|
||||||
|
+#define TARGET_NR_fanotify_mark (368)
|
||||||
|
+#define TARGET_NR_prlimit64 (369)
|
||||||
|
+#define TARGET_NR_name_to_handle_at (370)
|
||||||
|
+#define TARGET_NR_open_by_handle_at (371)
|
||||||
|
+#define TARGET_NR_clock_adjtime (372)
|
||||||
|
+#define TARGET_NR_syncfs (373)
|
||||||
|
diff -uNr qemu-0.14.1.orig/linux-user/cris/syscall_nr.h qemu-0.14.1/linux-user/cris/syscall_nr.h
|
||||||
|
--- qemu-0.14.1.orig/linux-user/cris/syscall_nr.h 2011-11-24 22:21:09.625282454 +0100
|
||||||
|
+++ qemu-0.14.1/linux-user/cris/syscall_nr.h 2011-11-24 22:21:41.762101277 +0100
|
||||||
|
@@ -333,3 +333,5 @@
|
||||||
|
#define TARGET_NR_dup3 330
|
||||||
|
#define TARGET_NR_pipe2 331
|
||||||
|
#define TARGET_NR_inotify_init1 332
|
||||||
|
+#define TARGET_NR_preadv 333
|
||||||
|
+#define TARGET_NR_pwritev 334
|
||||||
|
diff -uNr qemu-0.14.1.orig/linux-user/i386/syscall_nr.h qemu-0.14.1/linux-user/i386/syscall_nr.h
|
||||||
|
--- qemu-0.14.1.orig/linux-user/i386/syscall_nr.h 2011-11-24 22:21:09.632226952 +0100
|
||||||
|
+++ qemu-0.14.1/linux-user/i386/syscall_nr.h 2011-11-24 22:21:41.764416110 +0100
|
||||||
|
@@ -335,3 +335,15 @@
|
||||||
|
#define TARGET_NR_dup3 330
|
||||||
|
#define TARGET_NR_pipe2 331
|
||||||
|
#define TARGET_NR_inotify_init1 332
|
||||||
|
+#define TARGET_NR_preadv 333
|
||||||
|
+#define TARGET_NR_pwritev 334
|
||||||
|
+#define TARGET_NR_rt_tgsigqueueinfo 335
|
||||||
|
+#define TARGET_NR_perf_event_open 336
|
||||||
|
+#define TARGET_NR_recvmmsg 337
|
||||||
|
+#define TARGET_NR_fanotify_init 338
|
||||||
|
+#define TARGET_NR_fanotify_mark 339
|
||||||
|
+#define TARGET_NR_prlimit64 340
|
||||||
|
+#define TARGET_NR_name_to_handle_at 341
|
||||||
|
+#define TARGET_NR_open_by_handle_at 342
|
||||||
|
+#define TARGET_NR_clock_adjtime 343
|
||||||
|
+#define TARGET_NR_syncfs 344
|
||||||
|
diff -uNr qemu-0.14.1.orig/linux-user/m68k/syscall_nr.h qemu-0.14.1/linux-user/m68k/syscall_nr.h
|
||||||
|
--- qemu-0.14.1.orig/linux-user/m68k/syscall_nr.h 2011-11-24 22:21:09.629912120 +0100
|
||||||
|
+++ qemu-0.14.1/linux-user/m68k/syscall_nr.h 2011-11-24 22:21:41.764416110 +0100
|
||||||
|
@@ -328,3 +328,19 @@
|
||||||
|
#define TARGET_NR_dup3 326
|
||||||
|
#define TARGET_NR_pipe2 327
|
||||||
|
#define TARGET_NR_inotify_init1 328
|
||||||
|
+#define TARGET_NR_inotify_init1 328
|
||||||
|
+#define TARGET_NR_preadv 329
|
||||||
|
+#define TARGET_NR_pwritev 330
|
||||||
|
+#define TARGET_NR_rt_tgsigqueueinfo 331
|
||||||
|
+#define TARGET_NR_perf_event_open 332
|
||||||
|
+#define TARGET_NR_get_thread_area 333
|
||||||
|
+#define TARGET_NR_set_thread_area 334
|
||||||
|
+#define TARGET_NR_atomic_cmpxchg_32 335
|
||||||
|
+#define TARGET_NR_atomic_barrier 336
|
||||||
|
+#define TARGET_NR_fanotify_init 337
|
||||||
|
+#define TARGET_NR_fanotify_mark 338
|
||||||
|
+#define TARGET_NR_prlimit64 339
|
||||||
|
+#define TARGET_NR_name_to_handle_at 340
|
||||||
|
+#define TARGET_NR_open_by_handle_at 341
|
||||||
|
+#define TARGET_NR_clock_adjtime 342
|
||||||
|
+#define TARGET_NR_syncfs 343
|
||||||
|
diff -uNr qemu-0.14.1.orig/linux-user/main.c qemu-0.14.1/linux-user/main.c
|
||||||
|
--- qemu-0.14.1.orig/linux-user/main.c 2011-11-24 22:21:09.632226952 +0100
|
||||||
|
+++ qemu-0.14.1/linux-user/main.c 2011-11-24 22:21:41.766730943 +0100
|
||||||
|
@@ -1922,6 +1922,33 @@
|
||||||
|
MIPS_SYS(sys_epoll_pwait, 6)
|
||||||
|
MIPS_SYS(sys_ioprio_set, 3)
|
||||||
|
MIPS_SYS(sys_ioprio_get, 2)
|
||||||
|
+ MIPS_SYS(sys_utimensat, 4)
|
||||||
|
+ MIPS_SYS(sys_signalfd, 3)
|
||||||
|
+ MIPS_SYS(sys_ni_syscall, 0) /* was timerfd */
|
||||||
|
+ MIPS_SYS(sys_eventfd, 1)
|
||||||
|
+ MIPS_SYS(sys_fallocate, 6) /* 4320 */
|
||||||
|
+ MIPS_SYS(sys_timerfd_create, 2)
|
||||||
|
+ MIPS_SYS(sys_timerfd_gettime, 2)
|
||||||
|
+ MIPS_SYS(sys_timerfd_settime, 4)
|
||||||
|
+ MIPS_SYS(sys_signalfd4, 4)
|
||||||
|
+ MIPS_SYS(sys_eventfd2, 2) /* 4325 */
|
||||||
|
+ MIPS_SYS(sys_epoll_create1, 1)
|
||||||
|
+ MIPS_SYS(sys_dup3, 3)
|
||||||
|
+ MIPS_SYS(sys_pipe2, 2)
|
||||||
|
+ MIPS_SYS(sys_inotify_init1, 1)
|
||||||
|
+ MIPS_SYS(sys_preadv, 6) /* 4330 */
|
||||||
|
+ MIPS_SYS(sys_pwritev, 6)
|
||||||
|
+ MIPS_SYS(sys_rt_tgsigqueueinfo, 4)
|
||||||
|
+ MIPS_SYS(sys_perf_event_open, 5)
|
||||||
|
+ MIPS_SYS(sys_accept4, 4)
|
||||||
|
+ MIPS_SYS(sys_recvmmsg, 5) /* 4335 */
|
||||||
|
+ MIPS_SYS(sys_fanotify_init, 2)
|
||||||
|
+ MIPS_SYS(sys_fanotify_mark, 6)
|
||||||
|
+ MIPS_SYS(sys_prlimit64, 4)
|
||||||
|
+ MIPS_SYS(sys_name_to_handle_at, 5)
|
||||||
|
+ MIPS_SYS(sys_open_by_handle_at, 3) /* 4340 */
|
||||||
|
+ MIPS_SYS(sys_clock_adjtime, 2)
|
||||||
|
+ MIPS_SYS(sys_syncfs, 1)
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef MIPS_SYS
|
||||||
|
diff -uNr qemu-0.14.1.orig/linux-user/microblaze/syscall_nr.h qemu-0.14.1/linux-user/microblaze/syscall_nr.h
|
||||||
|
--- qemu-0.14.1.orig/linux-user/microblaze/syscall_nr.h 2011-11-24 22:21:09.629912120 +0100
|
||||||
|
+++ qemu-0.14.1/linux-user/microblaze/syscall_nr.h 2011-11-24 22:21:41.766730943 +0100
|
||||||
|
@@ -364,6 +364,16 @@
|
||||||
|
#define TARGET_NR_sendmsg 360 /* new */
|
||||||
|
#define TARGET_NR_recvmsg 361 /* new */
|
||||||
|
#define TARGET_NR_accept04 362 /* new */
|
||||||
|
-
|
||||||
|
-#define TARGET_NR_syscalls 363
|
||||||
|
+#define TARGET_NR_preadv 363 /* new */
|
||||||
|
+#define TARGET_NR_pwritev 364 /* new */
|
||||||
|
+#define TARGET_NR_rt_tgsigqueueinfo 365 /* new */
|
||||||
|
+#define TARGET_NR_perf_event_open 366 /* new */
|
||||||
|
+#define TARGET_NR_recvmmsg 367 /* new */
|
||||||
|
+#define TARGET_NR_fanotify_init 368
|
||||||
|
+#define TARGET_NR_fanotify_mark 369
|
||||||
|
+#define TARGET_NR_prlimit64 370
|
||||||
|
+#define TARGET_NR_name_to_handle_at 371
|
||||||
|
+#define TARGET_NR_open_by_handle_at 372
|
||||||
|
+#define TARGET_NR_clock_adjtime 373
|
||||||
|
+#define TARGET_NR_syncfs 374
|
||||||
|
|
||||||
|
diff -uNr qemu-0.14.1.orig/linux-user/mips/syscall_nr.h qemu-0.14.1/linux-user/mips/syscall_nr.h
|
||||||
|
--- qemu-0.14.1.orig/linux-user/mips/syscall_nr.h 2011-11-24 22:21:09.632226952 +0100
|
||||||
|
+++ qemu-0.14.1/linux-user/mips/syscall_nr.h 2011-11-24 22:21:41.766730943 +0100
|
||||||
|
@@ -332,3 +332,16 @@
|
||||||
|
#define TARGET_NR_dup3 (TARGET_NR_Linux + 327)
|
||||||
|
#define TARGET_NR_pipe2 (TARGET_NR_Linux + 328)
|
||||||
|
#define TARGET_NR_inotify_init1 (TARGET_NR_Linux + 329)
|
||||||
|
+#define TARGET_NR_preadv (TARGET_NR_Linux + 330)
|
||||||
|
+#define TARGET_NR_pwritev (TARGET_NR_Linux + 331)
|
||||||
|
+#define TARGET_NR_rt_tgsigqueueinfo (TARGET_NR_Linux + 332)
|
||||||
|
+#define TARGET_NR_perf_event_open (TARGET_NR_Linux + 333)
|
||||||
|
+#define TARGET_NR_accept4 (TARGET_NR_Linux + 334)
|
||||||
|
+#define TARGET_NR_recvmmsg (TARGET_NR_Linux + 335)
|
||||||
|
+#define TARGET_NR_fanotify_init (TARGET_NR_Linux + 336)
|
||||||
|
+#define TARGET_NR_fanotify_mark (TARGET_NR_Linux + 337)
|
||||||
|
+#define TARGET_NR_prlimit64 (TARGET_NR_Linux + 338)
|
||||||
|
+#define TARGET_NR_name_to_handle_at (TARGET_NR_Linux + 339)
|
||||||
|
+#define TARGET_NR_open_by_handle_at (TARGET_NR_Linux + 340)
|
||||||
|
+#define TARGET_NR_clock_adjtime (TARGET_NR_Linux + 341)
|
||||||
|
+#define TARGET_NR_syncfs (TARGET_NR_Linux + 342)
|
||||||
|
diff -uNr qemu-0.14.1.orig/linux-user/mips64/syscall_nr.h qemu-0.14.1/linux-user/mips64/syscall_nr.h
|
||||||
|
--- qemu-0.14.1.orig/linux-user/mips64/syscall_nr.h 2011-11-24 22:21:09.627597287 +0100
|
||||||
|
+++ qemu-0.14.1/linux-user/mips64/syscall_nr.h 2011-11-24 22:21:41.769045776 +0100
|
||||||
|
@@ -291,3 +291,16 @@
|
||||||
|
#define TARGET_NR_dup3 (TARGET_NR_Linux + 286)
|
||||||
|
#define TARGET_NR_pipe2 (TARGET_NR_Linux + 287)
|
||||||
|
#define TARGET_NR_inotify_init1 (TARGET_NR_Linux + 288)
|
||||||
|
+#define TARGET_NR_preadv (TARGET_NR_Linux + 289)
|
||||||
|
+#define TARGET_NR_pwritev (TARGET_NR_Linux + 290)
|
||||||
|
+#define TARGET_NR_rt_tgsigqueueinfo (TARGET_NR_Linux + 291)
|
||||||
|
+#define TARGET_NR_perf_event_open (TARGET_NR_Linux + 292)
|
||||||
|
+#define TARGET_NR_accept4 (TARGET_NR_Linux + 293)
|
||||||
|
+#define TARGET_NR_recvmmsg (TARGET_NR_Linux + 294)
|
||||||
|
+#define TARGET_NR_fanotify_init (TARGET_NR_Linux + 295)
|
||||||
|
+#define TARGET_NR_fanotify_mark (TARGET_NR_Linux + 296)
|
||||||
|
+#define TARGET_NR_prlimit64 (TARGET_NR_Linux + 297)
|
||||||
|
+#define TARGET_NR_name_to_handle_at (TARGET_NR_Linux + 298)
|
||||||
|
+#define TARGET_NR_open_by_handle_at (TARGET_NR_Linux + 299)
|
||||||
|
+#define TARGET_NR_clock_adjtime (TARGET_NR_Linux + 300)
|
||||||
|
+#define TARGET_NR_syncfs (TARGET_NR_Linux + 301)
|
||||||
|
diff -uNr qemu-0.14.1.orig/linux-user/mipsn32/syscall_nr.h qemu-0.14.1/linux-user/mipsn32/syscall_nr.h
|
||||||
|
--- qemu-0.14.1.orig/linux-user/mipsn32/syscall_nr.h 2011-11-24 22:21:09.634541784 +0100
|
||||||
|
+++ qemu-0.14.1/linux-user/mipsn32/syscall_nr.h 2011-11-24 22:21:41.769045776 +0100
|
||||||
|
@@ -295,3 +295,17 @@
|
||||||
|
#define TARGET_NR_dup3 (TARGET_NR_Linux + 290)
|
||||||
|
#define TARGET_NR_pipe2 (TARGET_NR_Linux + 291)
|
||||||
|
#define TARGET_NR_inotify_init1 (TARGET_NR_Linux + 292)
|
||||||
|
+#define TARGET_NR_preadv (TARGET_NR_Linux + 293)
|
||||||
|
+#define TARGET_NR_pwritev (TARGET_NR_Linux + 294)
|
||||||
|
+#define TARGET_NR_rt_tgsigqueueinfo (TARGET_NR_Linux + 295)
|
||||||
|
+#define TARGET_NR_perf_event_open (TARGET_NR_Linux + 296)
|
||||||
|
+#define TARGET_NR_accept4 (TARGET_NR_Linux + 297)
|
||||||
|
+#define TARGET_NR_recvmmsg (TARGET_NR_Linux + 298)
|
||||||
|
+#define TARGET_NR_getdents64 (TARGET_NR_Linux + 299)
|
||||||
|
+#define TARGET_NR_fanotify_init (TARGET_NR_Linux + 300)
|
||||||
|
+#define TARGET_NR_fanotify_mark (TARGET_NR_Linux + 301)
|
||||||
|
+#define TARGET_NR_prlimit64 (TARGET_NR_Linux + 302)
|
||||||
|
+#define TARGET_NR_name_to_handle_at (TARGET_NR_Linux + 303)
|
||||||
|
+#define TARGET_NR_open_by_handle_at (TARGET_NR_Linux + 304)
|
||||||
|
+#define TARGET_NR_clock_adjtime (TARGET_NR_Linux + 305)
|
||||||
|
+#define TARGET_NR_syncfs (TARGET_NR_Linux + 306)
|
||||||
|
diff -uNr qemu-0.14.1.orig/linux-user/ppc/syscall_nr.h qemu-0.14.1/linux-user/ppc/syscall_nr.h
|
||||||
|
--- qemu-0.14.1.orig/linux-user/ppc/syscall_nr.h 2011-11-24 22:21:09.627597287 +0100
|
||||||
|
+++ qemu-0.14.1/linux-user/ppc/syscall_nr.h 2011-11-24 22:21:41.769045776 +0100
|
||||||
|
@@ -332,3 +332,33 @@
|
||||||
|
#define TARGET_NR_dup3 316
|
||||||
|
#define TARGET_NR_pipe2 317
|
||||||
|
#define TARGET_NR_inotify_init1 318
|
||||||
|
+#define TARGET_NR_perf_event_open 319
|
||||||
|
+#define TARGET_NR_preadv 320
|
||||||
|
+#define TARGET_NR_pwritev 321
|
||||||
|
+#define TARGET_NR_rt_tgsigqueueinfo 322
|
||||||
|
+#define TARGET_NR_fanotify_init 323
|
||||||
|
+#define TARGET_NR_fanotify_mark 324
|
||||||
|
+#define TARGET_NR_prlimit64 325
|
||||||
|
+#define TARGET_NR_socket 326
|
||||||
|
+#define TARGET_NR_bind 327
|
||||||
|
+#define TARGET_NR_connect 328
|
||||||
|
+#define TARGET_NR_listen 329
|
||||||
|
+#define TARGET_NR_accept 330
|
||||||
|
+#define TARGET_NR_getsockname 331
|
||||||
|
+#define TARGET_NR_getpeername 332
|
||||||
|
+#define TARGET_NR_socketpair 333
|
||||||
|
+#define TARGET_NR_send 334
|
||||||
|
+#define TARGET_NR_sendto 335
|
||||||
|
+#define TARGET_NR_recv 336
|
||||||
|
+#define TARGET_NR_recvfrom 337
|
||||||
|
+#define TARGET_NR_shutdown 338
|
||||||
|
+#define TARGET_NR_setsockopt 339
|
||||||
|
+#define TARGET_NR_getsockopt 340
|
||||||
|
+#define TARGET_NR_sendmsg 341
|
||||||
|
+#define TARGET_NR_recvmsg 342
|
||||||
|
+#define TARGET_NR_recvmmsg 343
|
||||||
|
+#define TARGET_NR_accept4 344
|
||||||
|
+#define TARGET_NR_name_to_handle_at 345
|
||||||
|
+#define TARGET_NR_open_by_handle_at 346
|
||||||
|
+#define TARGET_NR_clock_adjtime 347
|
||||||
|
+#define TARGET_NR_syncfs 348
|
||||||
|
diff -uNr qemu-0.14.1.orig/linux-user/sh4/syscall_nr.h qemu-0.14.1/linux-user/sh4/syscall_nr.h
|
||||||
|
--- qemu-0.14.1.orig/linux-user/sh4/syscall_nr.h 2011-11-24 22:21:09.634541784 +0100
|
||||||
|
+++ qemu-0.14.1/linux-user/sh4/syscall_nr.h 2011-11-24 22:21:41.769045776 +0100
|
||||||
|
@@ -334,3 +334,35 @@
|
||||||
|
#define TARGET_NR_dup3 330
|
||||||
|
#define TARGET_NR_pipe2 331
|
||||||
|
#define TARGET_NR_inotify_init1 332
|
||||||
|
+#define TARGET_NR_preadv 333
|
||||||
|
+#define TARGET_NR_pwritev 334
|
||||||
|
+#define TARGET_NR_rt_tgsigqueueinfo 335
|
||||||
|
+#define TARGET_NR_perf_event_open 336
|
||||||
|
+#define TARGET_NR_fanotify_init 337
|
||||||
|
+#define TARGET_NR_fanotify_mark 338
|
||||||
|
+#define TARGET_NR_prlimit64 339
|
||||||
|
+
|
||||||
|
+/* Non-multiplexed socket family */
|
||||||
|
+#define TARGET_NR_socket 340
|
||||||
|
+#define TARGET_NR_bind 341
|
||||||
|
+#define TARGET_NR_connect 342
|
||||||
|
+#define TARGET_NR_listen 343
|
||||||
|
+#define TARGET_NR_accept 344
|
||||||
|
+#define TARGET_NR_getsockname 345
|
||||||
|
+#define TARGET_NR_getpeername 346
|
||||||
|
+#define TARGET_NR_socketpair 347
|
||||||
|
+#define TARGET_NR_send 348
|
||||||
|
+#define TARGET_NR_sendto 349
|
||||||
|
+#define TARGET_NR_recv 350
|
||||||
|
+#define TARGET_NR_recvfrom 351
|
||||||
|
+#define TARGET_NR_shutdown 352
|
||||||
|
+#define TARGET_NR_setsockopt 353
|
||||||
|
+#define TARGET_NR_getsockopt 354
|
||||||
|
+#define TARGET_NR_sendmsg 355
|
||||||
|
+#define TARGET_NR_recvmsg 356
|
||||||
|
+#define TARGET_NR_recvmmsg 357
|
||||||
|
+#define TARGET_NR_accept4 358
|
||||||
|
+#define TARGET_NR_name_to_handle_at 359
|
||||||
|
+#define TARGET_NR_open_by_handle_at 360
|
||||||
|
+#define TARGET_NR_clock_adjtime 361
|
||||||
|
+#define TARGET_NR_syncfs 362
|
||||||
|
diff -uNr qemu-0.14.1.orig/linux-user/sparc/syscall_nr.h qemu-0.14.1/linux-user/sparc/syscall_nr.h
|
||||||
|
--- qemu-0.14.1.orig/linux-user/sparc/syscall_nr.h 2011-11-24 22:21:09.629912120 +0100
|
||||||
|
+++ qemu-0.14.1/linux-user/sparc/syscall_nr.h 2011-11-24 22:21:41.769045776 +0100
|
||||||
|
@@ -285,3 +285,15 @@
|
||||||
|
#define TARGET_NR_pipe2 321
|
||||||
|
#define TARGET_NR_inotify_init1 322
|
||||||
|
#define TARGET_NR_accept4 323
|
||||||
|
+#define TARGET_NR_preadv 324
|
||||||
|
+#define TARGET_NR_pwritev 325
|
||||||
|
+#define TARGET_NR_rt_tgsigqueueinfo 326
|
||||||
|
+#define TARGET_NR_perf_event_open 327
|
||||||
|
+#define TARGET_NR_recvmmsg 328
|
||||||
|
+#define TARGET_NR_fanotify_init 329
|
||||||
|
+#define TARGET_NR_fanotify_mark 330
|
||||||
|
+#define TARGET_NR_prlimit64 331
|
||||||
|
+#define TARGET_NR_name_to_handle_at 332
|
||||||
|
+#define TARGET_NR_open_by_handle_at 333
|
||||||
|
+#define TARGET_NR_clock_adjtime 334
|
||||||
|
+#define TARGET_NR_syncfs 335
|
||||||
|
diff -uNr qemu-0.14.1.orig/linux-user/sparc64/syscall_nr.h qemu-0.14.1/linux-user/sparc64/syscall_nr.h
|
||||||
|
--- qemu-0.14.1.orig/linux-user/sparc64/syscall_nr.h 2011-11-24 22:21:09.632226952 +0100
|
||||||
|
+++ qemu-0.14.1/linux-user/sparc64/syscall_nr.h 2011-11-24 22:21:41.771360608 +0100
|
||||||
|
@@ -322,3 +322,15 @@
|
||||||
|
#define TARGET_NR_pipe2 321
|
||||||
|
#define TARGET_NR_inotify_init1 322
|
||||||
|
#define TARGET_NR_accept4 323
|
||||||
|
+#define TARGET_NR_preadv 324
|
||||||
|
+#define TARGET_NR_pwritev 325
|
||||||
|
+#define TARGET_NR_rt_tgsigqueueinfo 326
|
||||||
|
+#define TARGET_NR_perf_event_open 327
|
||||||
|
+#define TARGET_NR_recvmmsg 328
|
||||||
|
+#define TARGET_NR_fanotify_init 329
|
||||||
|
+#define TARGET_NR_fanotify_mark 330
|
||||||
|
+#define TARGET_NR_prlimit64 331
|
||||||
|
+#define TARGET_NR_name_to_handle_at 332
|
||||||
|
+#define TARGET_NR_open_by_handle_at 333
|
||||||
|
+#define TARGET_NR_clock_adjtime 334
|
||||||
|
+#define TARGET_NR_syncfs 335
|
||||||
|
diff -uNr qemu-0.14.1.orig/linux-user/x86_64/syscall_nr.h qemu-0.14.1/linux-user/x86_64/syscall_nr.h
|
||||||
|
--- qemu-0.14.1.orig/linux-user/x86_64/syscall_nr.h 2011-11-24 22:21:09.625282454 +0100
|
||||||
|
+++ qemu-0.14.1/linux-user/x86_64/syscall_nr.h 2011-11-24 22:21:41.771360608 +0100
|
||||||
|
@@ -293,3 +293,15 @@
|
||||||
|
#define TARGET_NR_dup3 292
|
||||||
|
#define TARGET_NR_pipe2 293
|
||||||
|
#define TARGET_NR_inotify_init1 294
|
||||||
|
+#define TARGET_NR_preadv 295
|
||||||
|
+#define TARGET_NR_pwritev 296
|
||||||
|
+#define TARGET_NR_rt_tgsigqueueinfo 297
|
||||||
|
+#define TARGET_NR_perf_event_open 298
|
||||||
|
+#define TARGET_NR_recvmmsg 299
|
||||||
|
+#define TARGET_NR_fanotify_init 300
|
||||||
|
+#define TARGET_NR_fanotify_mark 301
|
||||||
|
+#define TARGET_NR_prlimit64 302
|
||||||
|
+#define TARGET_NR_name_to_handle_at 303
|
||||||
|
+#define TARGET_NR_open_by_handle_at 304
|
||||||
|
+#define TARGET_NR_clock_adjtime 305
|
||||||
|
+#define TARGET_NR_syncfs 306
|
46
app-emulation/qemu-user/files/qemu-chroot.patch
Normal file
46
app-emulation/qemu-user/files/qemu-chroot.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
diff --git a/linux-user/main.c b/linux-user/main.c
|
||||||
|
index 124b98c..b010fd2 100644
|
||||||
|
--- a/linux-user/main.c
|
||||||
|
+++ b/linux-user/main.c
|
||||||
|
@@ -1905,6 +1905,10 @@ void usage(void)
|
||||||
|
"-cpu model select CPU (-cpu ? for list)\n"
|
||||||
|
"-drop-ld-preload drop LD_PRELOAD for target process\n"
|
||||||
|
"\n"
|
||||||
|
+ "Root options:\n"
|
||||||
|
+ "-chroot dir chroot to dir\n"
|
||||||
|
+ "-su uid:gid set numeric user and group IDs\n"
|
||||||
|
+ "\n"
|
||||||
|
"Debug options:\n"
|
||||||
|
"-d options activate log (logfile=%s)\n"
|
||||||
|
"-p pagesize set the host page size to 'pagesize'\n"
|
||||||
|
@@ -2011,6 +2015,28 @@ int main(int argc, char **argv)
|
||||||
|
drop_ld_preload = 1;
|
||||||
|
} else if (!strcmp(r, "strace")) {
|
||||||
|
do_strace = 1;
|
||||||
|
+ } else if (!strcmp(r, "chroot")) {
|
||||||
|
+ if (chdir(argv[optind++]) || chroot(".")) {
|
||||||
|
+ fprintf(stderr, "Can't chroot to '%s' (are you root?)\n",
|
||||||
|
+ argv[--optind]);
|
||||||
|
+ _exit(1);
|
||||||
|
+ }
|
||||||
|
+ } else if (!strcmp(r, "su")) {
|
||||||
|
+ int temp;
|
||||||
|
+ char *gid = strchr(argv[optind], ':');
|
||||||
|
+ if (gid) {
|
||||||
|
+ temp = atoi(++gid);
|
||||||
|
+ if (setresgid(temp, temp, temp)) {
|
||||||
|
+ fprintf(stderr, "Can't set gid to %d (are you root?)\n",
|
||||||
|
+ temp);
|
||||||
|
+ _exit(1);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ temp = atoi(argv[optind++]);
|
||||||
|
+ if (setresuid(temp, temp, temp)) {
|
||||||
|
+ fprintf(stderr, "Can't set uid to %d (are you root?)\n", temp);
|
||||||
|
+ _exit(1);
|
||||||
|
+ }
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
usage();
|
||||||
|
|
||||||
|
|
137
app-emulation/qemu-user/files/qemu-user.initd
Normal file
137
app-emulation/qemu-user/files/qemu-user.initd
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
#!/sbin/runscript
|
||||||
|
# Copyright 1999-2006 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: $
|
||||||
|
|
||||||
|
# enable automatic i386/ARM/M68K/MIPS/SPARC/PPC/s390 program execution by the kernel
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
after procfs
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
ebegin "Registering qemu-user binaries"
|
||||||
|
|
||||||
|
if [[ ! -d /proc/sys/fs/binfmt_misc ]] ; then
|
||||||
|
eerror "You need support for \"misc binaries\" in your kernel!"
|
||||||
|
eend 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $(mount | grep -c binfmt_misc) -eq 0 ]] ; then
|
||||||
|
mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc &> /dev/null
|
||||||
|
local result=$?
|
||||||
|
|
||||||
|
if [[ $result -ne 0 ]] ; then
|
||||||
|
eend $result
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# probe cpu type
|
||||||
|
cpu=`uname -m`
|
||||||
|
case "$cpu" in
|
||||||
|
i386|i486|i586|i686|i86pc|BePC|x86_64)
|
||||||
|
cpu="i386"
|
||||||
|
;;
|
||||||
|
m68k)
|
||||||
|
cpu="m68k"
|
||||||
|
;;
|
||||||
|
mips*)
|
||||||
|
cpu="mips"
|
||||||
|
;;
|
||||||
|
"Power Macintosh"|ppc|ppc64)
|
||||||
|
cpu="ppc"
|
||||||
|
;;
|
||||||
|
armv[4-9]*)
|
||||||
|
cpu="arm"
|
||||||
|
;;
|
||||||
|
sparc*)
|
||||||
|
cpu="sparc"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# register the interpreter for each cpu except for the native one
|
||||||
|
if [ $cpu != "i386" ] ; then
|
||||||
|
echo ':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\xfe\xff\xff\xff:/usr/bin/qemu-i386-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
echo ':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\xfe\xff\xff\xff:/usr/bin/qemu-i386-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "alpha" ] ; then
|
||||||
|
echo ':alpha:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-alpha-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "arm" ] ; then
|
||||||
|
echo ':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\xfe\xff\xff\xff:/usr/bin/qemu-arm-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "sparc" ] ; then
|
||||||
|
echo ':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\xff\xfe\xff\xff:/usr/bin/qemu-sparc-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "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\xff\xfe\xff\xff:/usr/bin/qemu-ppc-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "m68k" ] ; then
|
||||||
|
echo 'Please check cpu value and header information for m68k!'
|
||||||
|
echo ':m68k:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-m68k-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "mips" ] ; then
|
||||||
|
# FIXME: We could use the other endianness on a MIPS host.
|
||||||
|
echo ':mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
echo ':mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsel-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
echo ':mipsn32:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mipsn32-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
echo ':mipsn32el:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsn32el-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
echo ':mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips64-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
echo ':mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mips64el-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "sh" ] ; then
|
||||||
|
echo ':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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-sh4-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
echo ':sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sh4eb-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
if [ $cpu != "s390x" ] ; then
|
||||||
|
echo ':s390x:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-s390x-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
ebegin "Unregistering qemu-user binaries"
|
||||||
|
|
||||||
|
if [[ -f /proc/sys/fs/binfmt_misc/i386 ]] ; then
|
||||||
|
echo '-1' > /proc/sys/fs/binfmt_misc/i386
|
||||||
|
echo '-1' > /proc/sys/fs/binfmt_misc/i486
|
||||||
|
fi
|
||||||
|
if [[ -f /proc/sys/fs/binfmt_misc/alpha ]] ; then
|
||||||
|
echo '-1' > /proc/sys/fs/binfmt_misc/alpha
|
||||||
|
fi
|
||||||
|
if [[ -f /proc/sys/fs/binfmt_misc/arm ]] ; then
|
||||||
|
echo '-1' > /proc/sys/fs/binfmt_misc/arm
|
||||||
|
echo '-1' > /proc/sys/fs/binfmt_misc/armeb
|
||||||
|
fi
|
||||||
|
if [[ -f /proc/sys/fs/binfmt_misc/sparc ]] ; then
|
||||||
|
echo '-1' > /proc/sys/fs/binfmt_misc/sparc
|
||||||
|
fi
|
||||||
|
if [[ -f /proc/sys/fs/binfmt_misc/ppc ]] ; then
|
||||||
|
echo '-1' > /proc/sys/fs/binfmt_misc/ppc
|
||||||
|
fi
|
||||||
|
if [[ -f /proc/sys/fs/binfmt_misc/m68k ]] ; then
|
||||||
|
echo '-1' > /proc/sys/fs/binfmt_misc/m68k
|
||||||
|
fi
|
||||||
|
if [[ -f /proc/sys/fs/binfmt_misc/misp ]] ; then
|
||||||
|
echo '-1' > /proc/sys/fs/binfmt_misc/mips
|
||||||
|
echo '-1' > /proc/sys/fs/binfmt_misc/mipsel
|
||||||
|
echo '-1' > /proc/sys/fs/binfmt_misc/mipsn32
|
||||||
|
echo '-1' > /proc/sys/fs/binfmt_misc/mipsn32el
|
||||||
|
echo '-1' > /proc/sys/fs/binfmt_misc/mips64
|
||||||
|
echo '-1' > /proc/sys/fs/binfmt_misc/mips64el
|
||||||
|
fi
|
||||||
|
if [[ -f /proc/sys/fs/binfmt_misc/sh4 ]] ; then
|
||||||
|
echo '-1' > /proc/sys/fs/binfmt_misc/sh4
|
||||||
|
echo '-1' > /proc/sys/fs/binfmt_misc/sh4eb
|
||||||
|
fi
|
||||||
|
if [[ -f /proc/sys/fs/binfmt_misc/s390x ]] ; then
|
||||||
|
echo '-1' > /proc/sys/fs/binfmt_misc/s390x
|
||||||
|
fi
|
||||||
|
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
# vim: ts=4 :
|
||||||
|
|
||||||
|
|
7
app-emulation/qemu-user/metadata.xml
Normal file
7
app-emulation/qemu-user/metadata.xml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||||
|
<pkgmetadata>
|
||||||
|
<maintainer>
|
||||||
|
<email>lu_zero@gentoo.org</email>
|
||||||
|
</maintainer>
|
||||||
|
</pkgmetadata>
|
71
app-emulation/qemu-user/qemu-user-0.14.1.ebuild
Normal file
71
app-emulation/qemu-user/qemu-user-0.14.1.ebuild
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
# Copyright 1999-2010 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-user/qemu-user-0.12.2.ebuild,v 1.1 2010/02/14 23:53:40 solar Exp $
|
||||||
|
|
||||||
|
inherit eutils flag-o-matic pax-utils toolchain-funcs
|
||||||
|
|
||||||
|
MY_PN=${PN/-user/}
|
||||||
|
MY_P=${P/-user/}
|
||||||
|
|
||||||
|
SRC_URI="http://savannah.nongnu.org/download/${MY_PN}/${MY_P}.tar.gz"
|
||||||
|
|
||||||
|
DESCRIPTION="Open source dynamic translator"
|
||||||
|
HOMEPAGE="http://bellard.org/qemu/index.html"
|
||||||
|
|
||||||
|
LICENSE="GPL-2 LGPL-2.1"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~ppc ~x86 ~ppc64"
|
||||||
|
IUSE="static"
|
||||||
|
RESTRICT="test"
|
||||||
|
|
||||||
|
DEPEND="app-text/texi2html
|
||||||
|
!<=app-emulation/qemu-0.7.0"
|
||||||
|
RDEPEND=""
|
||||||
|
|
||||||
|
S="${WORKDIR}/${MY_P}"
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
unpack ${A}
|
||||||
|
|
||||||
|
cd "${S}"
|
||||||
|
# prevent docs to get automatically installed
|
||||||
|
sed -i '/$(DESTDIR)$(docdir)/d' Makefile
|
||||||
|
# Alter target makefiles to accept CFLAGS set via flag-o
|
||||||
|
sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \
|
||||||
|
Makefile Makefile.target
|
||||||
|
EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="patch" \
|
||||||
|
EPATCH_FORCE="yes" epatch
|
||||||
|
epatch "${FILESDIR}/qemu-chroot.patch"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
local conf_opts
|
||||||
|
|
||||||
|
conf_opts="--enable-linux-user --disable-strip"
|
||||||
|
conf_opts+=" --disable-darwin-user --disable-bsd-user"
|
||||||
|
conf_opts+=" --disable-system"
|
||||||
|
conf_opts+=" --disable-vnc-tls"
|
||||||
|
conf_opts+=" --disable-curses"
|
||||||
|
conf_opts+=" --disable-sdl"
|
||||||
|
conf_opts+=" --disable-vde"
|
||||||
|
conf_opts+=" --prefix=/usr --disable-bluez --disable-kvm"
|
||||||
|
conf_opts+=" --cc=$(tc-getCC) --host-cc=$(tc-getBUILD_CC)"
|
||||||
|
conf_opts+=" --extra-ldflags=-Wl,-z,execheap"
|
||||||
|
use static && conf_opts+=" --static"
|
||||||
|
|
||||||
|
filter-flags -fpie -fstack-protector
|
||||||
|
|
||||||
|
./configure ${conf_opts} || die "econf failed"
|
||||||
|
|
||||||
|
emake || die "emake qemu failed"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
emake DESTDIR="${D}" install || die "make install failed"
|
||||||
|
pax-mark r "${D}"/usr/bin/qemu-*
|
||||||
|
rm -fR "${D}/usr/share"
|
||||||
|
dohtml qemu-doc.html
|
||||||
|
dohtml qemu-tech.html
|
||||||
|
newinitd "${FILESDIR}/qemu-user.initd" qemu-user
|
||||||
|
}
|
@ -65,8 +65,7 @@ AUX 0.14.1/0020-linux-user-implement-reboot-syscall.patch 1403 RMD160 456a111c96
|
|||||||
AUX 0.14.1/0021-implement-prlimit64-syscall.patch 4175 RMD160 c31cd2e670c0fe3a8b2df462b1fb4b1e7c55cb9b SHA1 1bf72cfe09bb4bfb5101cd96fdade15bfe538926 SHA256 79d7e395b46430775f8f82b19890d2f73681d9fdfac46b807b3d148e83facf91
|
AUX 0.14.1/0021-implement-prlimit64-syscall.patch 4175 RMD160 c31cd2e670c0fe3a8b2df462b1fb4b1e7c55cb9b SHA1 1bf72cfe09bb4bfb5101cd96fdade15bfe538926 SHA256 79d7e395b46430775f8f82b19890d2f73681d9fdfac46b807b3d148e83facf91
|
||||||
AUX 0.14.1/0022-fixing-smp-races.patch 1224 RMD160 bcb627e31d677dd787c252d40da3faf45742e4bf SHA1 0b92b6b92eb8ebe92b465e0c5266ef74cf52e917 SHA256 cbb12a0cee1a123fc209b563968ee0c8b2111727adbf8b00644a24f23fbbce15
|
AUX 0.14.1/0022-fixing-smp-races.patch 1224 RMD160 bcb627e31d677dd787c252d40da3faf45742e4bf SHA1 0b92b6b92eb8ebe92b465e0c5266ef74cf52e917 SHA256 cbb12a0cee1a123fc209b563968ee0c8b2111727adbf8b00644a24f23fbbce15
|
||||||
AUX 0.14.1/0023-linux-user-add-binfmt-wrapper-for-argv-0-handling.patch 11904 RMD160 0165cdaf6a7307838993285f95c228d005ade149 SHA1 04d8c700314decb3759d530c27b5ba72d8c1c4d9 SHA256 cc2340c63ec2a216bc5d460d7419bf84f3869015fcfd73096530b43ce357ab45
|
AUX 0.14.1/0023-linux-user-add-binfmt-wrapper-for-argv-0-handling.patch 11904 RMD160 0165cdaf6a7307838993285f95c228d005ade149 SHA1 04d8c700314decb3759d530c27b5ba72d8c1c4d9 SHA256 cc2340c63ec2a216bc5d460d7419bf84f3869015fcfd73096530b43ce357ab45
|
||||||
AUX 0.14.1/0024-fix-glibc-install-locales.patch 17811 RMD160 563366d547aeec28faf2602c48c09eaafbb44381 SHA1 ac8585ee6b334969fb79a6fd4844e8a415b6c717 SHA256 2a18ba91c190dc457fe1683af23d9b7814eee1ed5ba44362187756706d26c99c
|
AUX 0.14.1/0025-add-syscall-numbers-from-2.6.39.2.patch 18328 RMD160 61a90462ad0109f2951d4ebb540c716861905220 SHA1 99834573cdc443c4118b6280c5e26433caa95624 SHA256 5aed07e1b71643d880eaa7432dfb99cc08958d275985d23b779cb796f1a73b18
|
||||||
AUX 0.14.1/0025-add-syscall-numbers-from-2.6.39.2.patch 17282 RMD160 8d5ff85efb34788680125a878495d86ec8c6f0d6 SHA1 7ee7fa50a7b7e862bff0c0221080349bc03d710f SHA256 c61c5fc6e9e849bb14548e5f80ec5abcf52c92b78d9c079a359d9d4b0cb55f1d
|
|
||||||
AUX qemu-0.10.3-nopl-fix.patch 1118 RMD160 849e4b88ca7985dc3faae0a225181205043f0265 SHA1 70cf0727a7cbdd79243ae6768f34c07c6e9c5aec SHA256 24656137f1f38aed2c2661ebd20d9a6d86eaf9768c3e239b971f01418b396028
|
AUX qemu-0.10.3-nopl-fix.patch 1118 RMD160 849e4b88ca7985dc3faae0a225181205043f0265 SHA1 70cf0727a7cbdd79243ae6768f34c07c6e9c5aec SHA256 24656137f1f38aed2c2661ebd20d9a6d86eaf9768c3e239b971f01418b396028
|
||||||
AUX qemu-0.11.0-mips64-user-fix.patch 313 RMD160 db016e0a48990a435dd6cf6e807145b33ada4908 SHA1 2ea913b1bcd29734a6d4011794bdb4aa3599a184 SHA256 b4173fc177bd0d0ba67f5551a3512047a19a9b2c0a122f968e32fbd834848d2f
|
AUX qemu-0.11.0-mips64-user-fix.patch 313 RMD160 db016e0a48990a435dd6cf6e807145b33ada4908 SHA1 2ea913b1bcd29734a6d4011794bdb4aa3599a184 SHA256 b4173fc177bd0d0ba67f5551a3512047a19a9b2c0a122f968e32fbd834848d2f
|
||||||
AUX qemu-arm-eabi-0.10.5.patch 21422 RMD160 a2ab6384938b08764324a4239fc30718161a3977 SHA1 2c7cec113b02e9f91226887257b393a3dfba2234 SHA256 b47327d7eab124617941e5403c5d4d0af2b21ce2278d5524677c521be462aa57
|
AUX qemu-arm-eabi-0.10.5.patch 21422 RMD160 a2ab6384938b08764324a4239fc30718161a3977 SHA1 2c7cec113b02e9f91226887257b393a3dfba2234 SHA256 b47327d7eab124617941e5403c5d4d0af2b21ce2278d5524677c521be462aa57
|
||||||
@ -76,8 +75,10 @@ AUX qemu-ifup 554 RMD160 9769d79ab6456bdd7e3e689005f629e2a67b858d SHA1 dde2b27ac
|
|||||||
DIST qemu-0.10.6.tar.gz 3664559 RMD160 1321a10777d2e0c6b53887d0525a28cc1b36ec9b SHA1 9432738ba513e07c981097468945b2e3ad9cb81e SHA256 8725298d4fd937ae41d942d0dd4a22fc02561d8c57a9fdcdbfa56427915757c7
|
DIST qemu-0.10.6.tar.gz 3664559 RMD160 1321a10777d2e0c6b53887d0525a28cc1b36ec9b SHA1 9432738ba513e07c981097468945b2e3ad9cb81e SHA256 8725298d4fd937ae41d942d0dd4a22fc02561d8c57a9fdcdbfa56427915757c7
|
||||||
DIST qemu-0.11.1.tar.gz 3830070 RMD160 4da00fa6c01d7ff6af0ee781bc9260da577ea7d3 SHA1 7b983cd18f44c6e7627532b662f010389d3bcdff SHA256 2ecd2fc0af2ce5d96067ae82cc98a08275c596de53fc929484bedee1d6e7893a
|
DIST qemu-0.11.1.tar.gz 3830070 RMD160 4da00fa6c01d7ff6af0ee781bc9260da577ea7d3 SHA1 7b983cd18f44c6e7627532b662f010389d3bcdff SHA256 2ecd2fc0af2ce5d96067ae82cc98a08275c596de53fc929484bedee1d6e7893a
|
||||||
DIST qemu-0.12.5.tar.gz 4291741 RMD160 c4eba2e649b428e8dd432718443e986057e692d7 SHA1 596a673f3a6697ea8fd90f4f23981241cc13bdc3 SHA256 a6a7b30b53591e160b5c7fd9319985673174e9ea47b182dbe63bc99357741f58
|
DIST qemu-0.12.5.tar.gz 4291741 RMD160 c4eba2e649b428e8dd432718443e986057e692d7 SHA1 596a673f3a6697ea8fd90f4f23981241cc13bdc3 SHA256 a6a7b30b53591e160b5c7fd9319985673174e9ea47b182dbe63bc99357741f58
|
||||||
|
DIST qemu-0.14.1.tar.gz 5439697 RMD160 0601ff4e613fea0a6ce80907e2bfa11704048b36 SHA1 1a5003a03004b62b52562d1cbb8f50c5f135e0b8 SHA256 33ceae3fbe516f2cbb151dc98d16c8ccfec74b1056674ad715e75a2f7fed45c3
|
||||||
EBUILD qemu-0.10.6.ebuild 5000 RMD160 093eeeda7f4872bddeb83688daba67623eb26d01 SHA1 e5c5abf287914b222483cb32853bbcd658fa8fb6 SHA256 117e429849e1f55c17dd76837cb11c974ffccc19eba1b6ae5f33996a18c463c7
|
EBUILD qemu-0.10.6.ebuild 5000 RMD160 093eeeda7f4872bddeb83688daba67623eb26d01 SHA1 e5c5abf287914b222483cb32853bbcd658fa8fb6 SHA256 117e429849e1f55c17dd76837cb11c974ffccc19eba1b6ae5f33996a18c463c7
|
||||||
EBUILD qemu-0.11.1.ebuild 5090 RMD160 9889a49d89c968b9710a159004c0467a82e711f7 SHA1 f3389454f0508c9c9b903d35b2472d429a85a954 SHA256 6963ebb2f42ef4bee899e5c9554eb4b91de11e798c4f632111ae9b6850d801da
|
EBUILD qemu-0.11.1.ebuild 5090 RMD160 9889a49d89c968b9710a159004c0467a82e711f7 SHA1 f3389454f0508c9c9b903d35b2472d429a85a954 SHA256 6963ebb2f42ef4bee899e5c9554eb4b91de11e798c4f632111ae9b6850d801da
|
||||||
EBUILD qemu-0.12.5.ebuild 5128 RMD160 7f1ca4fe533772771d753fdb45565cc62b1e1031 SHA1 bb9960710ea99fb224a5381aec95d11f0b3a4f8c SHA256 b097d506303e4856cb5819642f113162a17644fbc46ae3c483ed1b4fb297b632
|
EBUILD qemu-0.12.5.ebuild 5128 RMD160 7f1ca4fe533772771d753fdb45565cc62b1e1031 SHA1 bb9960710ea99fb224a5381aec95d11f0b3a4f8c SHA256 b097d506303e4856cb5819642f113162a17644fbc46ae3c483ed1b4fb297b632
|
||||||
|
EBUILD qemu-0.14.1.ebuild 6140 RMD160 19c6177eddfbc169a6d185cd5f2cc6694919fa0e SHA1 406288d3fd6d19987b844354f9ce5dfe95c5f60d SHA256 4493e9517e939665d3f926edca6c1dc7ef3dbdf097537ccfca72eb0456cf621e
|
||||||
MISC ChangeLog 11259 RMD160 6e119249ab4ffddf3dc6ef8da9fce0949fc91ad2 SHA1 0914e40152b37c48c175db6b9079eb7990814237 SHA256 db076339aadcd5266d3998d3314a1e1fb54cea58457f5c43cea5a40f3fe4999c
|
MISC ChangeLog 11259 RMD160 6e119249ab4ffddf3dc6ef8da9fce0949fc91ad2 SHA1 0914e40152b37c48c175db6b9079eb7990814237 SHA256 db076339aadcd5266d3998d3314a1e1fb54cea58457f5c43cea5a40f3fe4999c
|
||||||
MISC metadata.xml 910 RMD160 da1d7ba61d401bb22fc22be931b27be432d6d103 SHA1 6ffb7c25e19589933bd016d80a16284ae8df436c SHA256 6a27d48cbcc5a90f1464e302252ea10813317ddcb7bdd2e1e5cb927760a5640d
|
MISC metadata.xml 910 RMD160 da1d7ba61d401bb22fc22be931b27be432d6d103 SHA1 6ffb7c25e19589933bd016d80a16284ae8df436c SHA256 6a27d48cbcc5a90f1464e302252ea10813317ddcb7bdd2e1e5cb927760a5640d
|
||||||
|
@ -1,460 +0,0 @@
|
|||||||
From bf858897b76926b56e948dbe7a1a491b68dccda7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Richard Henderson <rth@twiddle.net>
|
|
||||||
Date: Tue, 27 Jul 2010 17:25:38 +0000
|
|
||||||
Subject: linux-user: Re-use load_elf_image for the main binary.
|
|
||||||
|
|
||||||
This requires moving the PT_INTERP extraction and GUEST_BASE
|
|
||||||
handling into load_elf_image. Key this off a non-null pointer
|
|
||||||
argument to receive the interpreter name.
|
|
||||||
|
|
||||||
Signed-off-by: Richard Henderson <rth@twiddle.net>
|
|
||||||
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
|
|
||||||
---
|
|
||||||
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
|
|
||||||
index 0a3d084..a53285a 100644
|
|
||||||
--- a/linux-user/elfload.c
|
|
||||||
+++ b/linux-user/elfload.c
|
|
||||||
@@ -829,9 +829,6 @@ struct exec
|
|
||||||
#define ZMAGIC 0413
|
|
||||||
#define QMAGIC 0314
|
|
||||||
|
|
||||||
-/* max code+data+bss+brk space allocated to ET_DYN executables */
|
|
||||||
-#define ET_DYN_MAP_SIZE (128 * 1024 * 1024)
|
|
||||||
-
|
|
||||||
/* Necessary parameters */
|
|
||||||
#define TARGET_ELF_EXEC_PAGESIZE TARGET_PAGE_SIZE
|
|
||||||
#define TARGET_ELF_PAGESTART(_v) ((_v) & ~(unsigned long)(TARGET_ELF_EXEC_PAGESIZE-1))
|
|
||||||
@@ -1169,7 +1166,7 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc,
|
|
||||||
On return: INFO values will be filled in, as necessary or available. */
|
|
||||||
|
|
||||||
static void load_elf_image(const char *image_name, int image_fd,
|
|
||||||
- struct image_info *info,
|
|
||||||
+ struct image_info *info, char **pinterp_name,
|
|
||||||
char bprm_buf[BPRM_BUF_SIZE])
|
|
||||||
{
|
|
||||||
struct elfhdr *ehdr = (struct elfhdr *)bprm_buf;
|
|
||||||
@@ -1229,6 +1226,67 @@ static void load_elf_image(const char *image_name, int image_fd,
|
|
||||||
if (load_addr == -1) {
|
|
||||||
goto exit_perror;
|
|
||||||
}
|
|
||||||
+ } else if (pinterp_name != NULL) {
|
|
||||||
+ /* This is the main executable. Make sure that the low
|
|
||||||
+ address does not conflict with MMAP_MIN_ADDR or the
|
|
||||||
+ QEMU application itself. */
|
|
||||||
+#if defined(CONFIG_USE_GUEST_BASE)
|
|
||||||
+ /*
|
|
||||||
+ * In case where user has not explicitly set the guest_base, we
|
|
||||||
+ * probe here that should we set it automatically.
|
|
||||||
+ */
|
|
||||||
+ if (!have_guest_base && !reserved_va) {
|
|
||||||
+ unsigned long host_start, real_start, host_size;
|
|
||||||
+
|
|
||||||
+ /* Round addresses to page boundaries. */
|
|
||||||
+ loaddr &= qemu_host_page_mask;
|
|
||||||
+ hiaddr = HOST_PAGE_ALIGN(hiaddr);
|
|
||||||
+
|
|
||||||
+ if (loaddr < mmap_min_addr) {
|
|
||||||
+ host_start = HOST_PAGE_ALIGN(mmap_min_addr);
|
|
||||||
+ } else {
|
|
||||||
+ host_start = loaddr;
|
|
||||||
+ if (host_start != loaddr) {
|
|
||||||
+ errmsg = "Address overflow loading ELF binary";
|
|
||||||
+ goto exit_errmsg;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ host_size = hiaddr - loaddr;
|
|
||||||
+ while (1) {
|
|
||||||
+ /* Do not use mmap_find_vma here because that is limited to the
|
|
||||||
+ guest address space. We are going to make the
|
|
||||||
+ guest address space fit whatever we're given. */
|
|
||||||
+ real_start = (unsigned long)
|
|
||||||
+ mmap((void *)host_start, host_size, PROT_NONE,
|
|
||||||
+ MAP_ANONYMOUS | MAP_PRIVATE | MAP_NORESERVE, -1, 0);
|
|
||||||
+ if (real_start == (unsigned long)-1) {
|
|
||||||
+ goto exit_perror;
|
|
||||||
+ }
|
|
||||||
+ if (real_start == host_start) {
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ /* That address didn't work. Unmap and try a different one.
|
|
||||||
+ The address the host picked because is typically right at
|
|
||||||
+ the top of the host address space and leaves the guest with
|
|
||||||
+ no usable address space. Resort to a linear search. We
|
|
||||||
+ already compensated for mmap_min_addr, so this should not
|
|
||||||
+ happen often. Probably means we got unlucky and host
|
|
||||||
+ address space randomization put a shared library somewhere
|
|
||||||
+ inconvenient. */
|
|
||||||
+ munmap((void *)real_start, host_size);
|
|
||||||
+ host_start += qemu_host_page_size;
|
|
||||||
+ if (host_start == loaddr) {
|
|
||||||
+ /* Theoretically possible if host doesn't have any suitably
|
|
||||||
+ aligned areas. Normally the first mmap will fail. */
|
|
||||||
+ errmsg = "Unable to find space for application";
|
|
||||||
+ goto exit_errmsg;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ qemu_log("Relocating guest address space from 0x"
|
|
||||||
+ TARGET_ABI_FMT_lx " to 0x%lx\n", loaddr, real_start);
|
|
||||||
+ guest_base = real_start - loaddr;
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
load_bias = load_addr - loaddr;
|
|
||||||
|
|
||||||
@@ -1290,6 +1348,33 @@ static void load_elf_image(const char *image_name, int image_fd,
|
|
||||||
info->brk = vaddr_em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+ } else if (eppnt->p_type == PT_INTERP && pinterp_name) {
|
|
||||||
+ char *interp_name;
|
|
||||||
+
|
|
||||||
+ if (*pinterp_name) {
|
|
||||||
+ errmsg = "Multiple PT_INTERP entries";
|
|
||||||
+ goto exit_errmsg;
|
|
||||||
+ }
|
|
||||||
+ interp_name = malloc(eppnt->p_filesz);
|
|
||||||
+ if (!interp_name) {
|
|
||||||
+ goto exit_perror;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (eppnt->p_offset + eppnt->p_filesz <= BPRM_BUF_SIZE) {
|
|
||||||
+ memcpy(interp_name, bprm_buf + eppnt->p_offset,
|
|
||||||
+ eppnt->p_filesz);
|
|
||||||
+ } else {
|
|
||||||
+ retval = pread(image_fd, interp_name, eppnt->p_filesz,
|
|
||||||
+ eppnt->p_offset);
|
|
||||||
+ if (retval != eppnt->p_filesz) {
|
|
||||||
+ goto exit_perror;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ if (interp_name[eppnt->p_filesz - 1] != 0) {
|
|
||||||
+ errmsg = "Invalid PT_INTERP entry";
|
|
||||||
+ goto exit_errmsg;
|
|
||||||
+ }
|
|
||||||
+ *pinterp_name = interp_name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1336,7 +1421,7 @@ static void load_elf_interp(const char *filename, struct image_info *info,
|
|
||||||
memset(bprm_buf + retval, 0, BPRM_BUF_SIZE - retval);
|
|
||||||
}
|
|
||||||
|
|
||||||
- load_elf_image(filename, fd, info, bprm_buf);
|
|
||||||
+ load_elf_image(filename, fd, info, NULL, bprm_buf);
|
|
||||||
return;
|
|
||||||
|
|
||||||
exit_perror:
|
|
||||||
@@ -1480,291 +1565,31 @@ int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs,
|
|
||||||
{
|
|
||||||
struct image_info interp_info;
|
|
||||||
struct elfhdr elf_ex;
|
|
||||||
- abi_ulong load_addr, load_bias;
|
|
||||||
- int load_addr_set = 0;
|
|
||||||
- int i;
|
|
||||||
- struct elf_phdr * elf_ppnt;
|
|
||||||
- struct elf_phdr *elf_phdata;
|
|
||||||
- abi_ulong k, elf_brk;
|
|
||||||
- int retval;
|
|
||||||
char *elf_interpreter = NULL;
|
|
||||||
- abi_ulong elf_entry;
|
|
||||||
- int status;
|
|
||||||
- abi_ulong start_code, end_code, start_data, end_data;
|
|
||||||
- abi_ulong elf_stack;
|
|
||||||
|
|
||||||
- status = 0;
|
|
||||||
- load_addr = 0;
|
|
||||||
- load_bias = 0;
|
|
||||||
- elf_ex = *((struct elfhdr *) bprm->buf); /* exec-header */
|
|
||||||
+ info->start_mmap = (abi_ulong)ELF_START_MMAP;
|
|
||||||
+ info->mmap = 0;
|
|
||||||
+ info->rss = 0;
|
|
||||||
|
|
||||||
- /* First of all, some simple consistency checks */
|
|
||||||
- if (!elf_check_ident(&elf_ex)) {
|
|
||||||
- return -ENOEXEC;
|
|
||||||
- }
|
|
||||||
- bswap_ehdr(&elf_ex);
|
|
||||||
- if (!elf_check_ehdr(&elf_ex)) {
|
|
||||||
- return -ENOEXEC;
|
|
||||||
- }
|
|
||||||
+ load_elf_image(bprm->filename, bprm->fd, info,
|
|
||||||
+ &elf_interpreter, bprm->buf);
|
|
||||||
+
|
|
||||||
+ /* ??? We need a copy of the elf header for passing to create_elf_tables.
|
|
||||||
+ If we do nothing, we'll have overwritten this when we re-use bprm->buf
|
|
||||||
+ when we load the interpreter. */
|
|
||||||
+ elf_ex = *(struct elfhdr *)bprm->buf;
|
|
||||||
|
|
||||||
bprm->p = copy_elf_strings(1, &bprm->filename, bprm->page, bprm->p);
|
|
||||||
bprm->p = copy_elf_strings(bprm->envc,bprm->envp,bprm->page,bprm->p);
|
|
||||||
bprm->p = copy_elf_strings(bprm->argc,bprm->argv,bprm->page,bprm->p);
|
|
||||||
if (!bprm->p) {
|
|
||||||
- retval = -E2BIG;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- /* Now read in all of the header information */
|
|
||||||
- elf_phdata = (struct elf_phdr *)
|
|
||||||
- malloc(elf_ex.e_phnum * sizeof(struct elf_phdr));
|
|
||||||
- if (elf_phdata == NULL) {
|
|
||||||
- return -ENOMEM;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- i = elf_ex.e_phnum * sizeof(struct elf_phdr);
|
|
||||||
- if (elf_ex.e_phoff + i <= BPRM_BUF_SIZE) {
|
|
||||||
- memcpy(elf_phdata, bprm->buf + elf_ex.e_phoff, i);
|
|
||||||
- } else {
|
|
||||||
- retval = pread(bprm->fd, (char *) elf_phdata, i, elf_ex.e_phoff);
|
|
||||||
- if (retval != i) {
|
|
||||||
- perror("load_elf_binary");
|
|
||||||
- exit(-1);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- bswap_phdr(elf_phdata, elf_ex.e_phnum);
|
|
||||||
-
|
|
||||||
- elf_brk = 0;
|
|
||||||
- elf_stack = ~((abi_ulong)0UL);
|
|
||||||
- start_code = ~((abi_ulong)0UL);
|
|
||||||
- end_code = 0;
|
|
||||||
- start_data = 0;
|
|
||||||
- end_data = 0;
|
|
||||||
-
|
|
||||||
- elf_ppnt = elf_phdata;
|
|
||||||
- for(i=0;i < elf_ex.e_phnum; i++) {
|
|
||||||
- if (elf_ppnt->p_type == PT_INTERP) {
|
|
||||||
- if (elf_ppnt->p_offset + elf_ppnt->p_filesz <= BPRM_BUF_SIZE) {
|
|
||||||
- elf_interpreter = bprm->buf + elf_ppnt->p_offset;
|
|
||||||
- } else {
|
|
||||||
- elf_interpreter = alloca(elf_ppnt->p_filesz);
|
|
||||||
- retval = pread(bprm->fd, elf_interpreter, elf_ppnt->p_filesz,
|
|
||||||
- elf_ppnt->p_offset);
|
|
||||||
- if (retval != elf_ppnt->p_filesz) {
|
|
||||||
- perror("load_elf_binary");
|
|
||||||
- exit(-1);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- elf_ppnt++;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- /* OK, This is the point of no return */
|
|
||||||
- info->end_data = 0;
|
|
||||||
- info->end_code = 0;
|
|
||||||
- info->start_mmap = (abi_ulong)ELF_START_MMAP;
|
|
||||||
- info->mmap = 0;
|
|
||||||
- elf_entry = (abi_ulong) elf_ex.e_entry;
|
|
||||||
-
|
|
||||||
-#if defined(CONFIG_USE_GUEST_BASE)
|
|
||||||
- /*
|
|
||||||
- * In case where user has not explicitly set the guest_base, we
|
|
||||||
- * probe here that should we set it automatically.
|
|
||||||
- */
|
|
||||||
- if (!(have_guest_base || reserved_va)) {
|
|
||||||
- /*
|
|
||||||
- * Go through ELF program header table and find the address
|
|
||||||
- * range used by loadable segments. Check that this is available on
|
|
||||||
- * the host, and if not find a suitable value for guest_base. */
|
|
||||||
- abi_ulong app_start = ~0;
|
|
||||||
- abi_ulong app_end = 0;
|
|
||||||
- abi_ulong addr;
|
|
||||||
- unsigned long host_start;
|
|
||||||
- unsigned long real_start;
|
|
||||||
- unsigned long host_size;
|
|
||||||
- for (i = 0, elf_ppnt = elf_phdata; i < elf_ex.e_phnum;
|
|
||||||
- i++, elf_ppnt++) {
|
|
||||||
- if (elf_ppnt->p_type != PT_LOAD)
|
|
||||||
- continue;
|
|
||||||
- addr = elf_ppnt->p_vaddr;
|
|
||||||
- if (addr < app_start) {
|
|
||||||
- app_start = addr;
|
|
||||||
- }
|
|
||||||
- addr += elf_ppnt->p_memsz;
|
|
||||||
- if (addr > app_end) {
|
|
||||||
- app_end = addr;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- /* If we don't have any loadable segments then something
|
|
||||||
- is very wrong. */
|
|
||||||
- assert(app_start < app_end);
|
|
||||||
-
|
|
||||||
- /* Round addresses to page boundaries. */
|
|
||||||
- app_start = app_start & qemu_host_page_mask;
|
|
||||||
- app_end = HOST_PAGE_ALIGN(app_end);
|
|
||||||
- if (app_start < mmap_min_addr) {
|
|
||||||
- host_start = HOST_PAGE_ALIGN(mmap_min_addr);
|
|
||||||
- } else {
|
|
||||||
- host_start = app_start;
|
|
||||||
- if (host_start != app_start) {
|
|
||||||
- fprintf(stderr, "qemu: Address overflow loading ELF binary\n");
|
|
||||||
- abort();
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- host_size = app_end - app_start;
|
|
||||||
- while (1) {
|
|
||||||
- /* Do not use mmap_find_vma here because that is limited to the
|
|
||||||
- guest address space. We are going to make the
|
|
||||||
- guest address space fit whatever we're given. */
|
|
||||||
- real_start = (unsigned long)mmap((void *)host_start, host_size,
|
|
||||||
- PROT_NONE, MAP_ANONYMOUS | MAP_PRIVATE | MAP_NORESERVE, -1, 0);
|
|
||||||
- if (real_start == (unsigned long)-1) {
|
|
||||||
- fprintf(stderr, "qemu: Virtual memory exausted\n");
|
|
||||||
- abort();
|
|
||||||
- }
|
|
||||||
- if (real_start == host_start) {
|
|
||||||
- break;
|
|
||||||
- }
|
|
||||||
- /* That address didn't work. Unmap and try a different one.
|
|
||||||
- The address the host picked because is typically
|
|
||||||
- right at the top of the host address space and leaves the
|
|
||||||
- guest with no usable address space. Resort to a linear search.
|
|
||||||
- We already compensated for mmap_min_addr, so this should not
|
|
||||||
- happen often. Probably means we got unlucky and host address
|
|
||||||
- space randomization put a shared library somewhere
|
|
||||||
- inconvenient. */
|
|
||||||
- munmap((void *)real_start, host_size);
|
|
||||||
- host_start += qemu_host_page_size;
|
|
||||||
- if (host_start == app_start) {
|
|
||||||
- /* Theoretically possible if host doesn't have any
|
|
||||||
- suitably aligned areas. Normally the first mmap will
|
|
||||||
- fail. */
|
|
||||||
- fprintf(stderr, "qemu: Unable to find space for application\n");
|
|
||||||
- abort();
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- qemu_log("Relocating guest address space from 0x" TARGET_ABI_FMT_lx
|
|
||||||
- " to 0x%lx\n", app_start, real_start);
|
|
||||||
- guest_base = real_start - app_start;
|
|
||||||
+ fprintf(stderr, "%s: %s\n", bprm->filename, strerror(E2BIG));
|
|
||||||
+ exit(-1);
|
|
||||||
}
|
|
||||||
-#endif /* CONFIG_USE_GUEST_BASE */
|
|
||||||
|
|
||||||
/* Do this so that we can load the interpreter, if need be. We will
|
|
||||||
change some of these later */
|
|
||||||
- info->rss = 0;
|
|
||||||
bprm->p = setup_arg_pages(bprm->p, bprm, info);
|
|
||||||
- info->start_stack = bprm->p;
|
|
||||||
-
|
|
||||||
- /* Now we do a little grungy work by mmaping the ELF image into
|
|
||||||
- * the correct location in memory. At this point, we assume that
|
|
||||||
- * the image should be loaded at fixed address, not at a variable
|
|
||||||
- * address.
|
|
||||||
- */
|
|
||||||
-
|
|
||||||
- for(i = 0, elf_ppnt = elf_phdata; i < elf_ex.e_phnum; i++, elf_ppnt++) {
|
|
||||||
- int elf_prot = 0;
|
|
||||||
- int elf_flags = 0;
|
|
||||||
- abi_ulong error;
|
|
||||||
-
|
|
||||||
- if (elf_ppnt->p_type != PT_LOAD)
|
|
||||||
- continue;
|
|
||||||
-
|
|
||||||
- if (elf_ppnt->p_flags & PF_R) elf_prot |= PROT_READ;
|
|
||||||
- if (elf_ppnt->p_flags & PF_W) elf_prot |= PROT_WRITE;
|
|
||||||
- if (elf_ppnt->p_flags & PF_X) elf_prot |= PROT_EXEC;
|
|
||||||
- elf_flags = MAP_PRIVATE | MAP_DENYWRITE;
|
|
||||||
- if (elf_ex.e_type == ET_EXEC || load_addr_set) {
|
|
||||||
- elf_flags |= MAP_FIXED;
|
|
||||||
- } else if (elf_ex.e_type == ET_DYN) {
|
|
||||||
- /* Try and get dynamic programs out of the way of the default mmap
|
|
||||||
- base, as well as whatever program they might try to exec. This
|
|
||||||
- is because the brk will follow the loader, and is not movable. */
|
|
||||||
- /* NOTE: for qemu, we do a big mmap to get enough space
|
|
||||||
- without hardcoding any address */
|
|
||||||
- error = target_mmap(0, ET_DYN_MAP_SIZE,
|
|
||||||
- PROT_NONE, MAP_PRIVATE | MAP_ANON,
|
|
||||||
- -1, 0);
|
|
||||||
- if (error == -1) {
|
|
||||||
- perror("mmap");
|
|
||||||
- exit(-1);
|
|
||||||
- }
|
|
||||||
- load_bias = TARGET_ELF_PAGESTART(error - elf_ppnt->p_vaddr);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- error = target_mmap(TARGET_ELF_PAGESTART(load_bias + elf_ppnt->p_vaddr),
|
|
||||||
- (elf_ppnt->p_filesz +
|
|
||||||
- TARGET_ELF_PAGEOFFSET(elf_ppnt->p_vaddr)),
|
|
||||||
- elf_prot,
|
|
||||||
- (MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE),
|
|
||||||
- bprm->fd,
|
|
||||||
- (elf_ppnt->p_offset -
|
|
||||||
- TARGET_ELF_PAGEOFFSET(elf_ppnt->p_vaddr)));
|
|
||||||
- if (error == -1) {
|
|
||||||
- perror("mmap");
|
|
||||||
- exit(-1);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
-#ifdef LOW_ELF_STACK
|
|
||||||
- if (TARGET_ELF_PAGESTART(elf_ppnt->p_vaddr) < elf_stack)
|
|
||||||
- elf_stack = TARGET_ELF_PAGESTART(elf_ppnt->p_vaddr);
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
- if (!load_addr_set) {
|
|
||||||
- load_addr_set = 1;
|
|
||||||
- load_addr = elf_ppnt->p_vaddr - elf_ppnt->p_offset;
|
|
||||||
- if (elf_ex.e_type == ET_DYN) {
|
|
||||||
- load_bias += error -
|
|
||||||
- TARGET_ELF_PAGESTART(load_bias + elf_ppnt->p_vaddr);
|
|
||||||
- load_addr += load_bias;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- k = elf_ppnt->p_vaddr;
|
|
||||||
- if (k < start_code)
|
|
||||||
- start_code = k;
|
|
||||||
- if (start_data < k)
|
|
||||||
- start_data = k;
|
|
||||||
- k = elf_ppnt->p_vaddr + elf_ppnt->p_filesz;
|
|
||||||
- if ((elf_ppnt->p_flags & PF_X) && end_code < k)
|
|
||||||
- end_code = k;
|
|
||||||
- if (end_data < k)
|
|
||||||
- end_data = k;
|
|
||||||
- k = elf_ppnt->p_vaddr + elf_ppnt->p_memsz;
|
|
||||||
- if (k > elf_brk) {
|
|
||||||
- elf_brk = TARGET_PAGE_ALIGN(k);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- /* If the load segment requests extra zeros (e.g. bss), map it. */
|
|
||||||
- if (elf_ppnt->p_filesz < elf_ppnt->p_memsz) {
|
|
||||||
- abi_ulong base = load_bias + elf_ppnt->p_vaddr;
|
|
||||||
- zero_bss(base + elf_ppnt->p_filesz,
|
|
||||||
- base + elf_ppnt->p_memsz, elf_prot);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- elf_entry += load_bias;
|
|
||||||
- elf_brk += load_bias;
|
|
||||||
- start_code += load_bias;
|
|
||||||
- end_code += load_bias;
|
|
||||||
- start_data += load_bias;
|
|
||||||
- end_data += load_bias;
|
|
||||||
-
|
|
||||||
- info->load_bias = load_bias;
|
|
||||||
- info->load_addr = load_addr;
|
|
||||||
- info->entry = elf_entry;
|
|
||||||
- info->start_brk = info->brk = elf_brk;
|
|
||||||
- info->end_code = end_code;
|
|
||||||
- info->start_code = start_code;
|
|
||||||
- info->start_data = start_data;
|
|
||||||
- info->end_data = end_data;
|
|
||||||
- info->personality = PER_LINUX;
|
|
||||||
-
|
|
||||||
- free(elf_phdata);
|
|
||||||
-
|
|
||||||
- if (qemu_log_enabled()) {
|
|
||||||
- load_symbols(&elf_ex, bprm->fd, load_bias);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- close(bprm->fd);
|
|
||||||
|
|
||||||
if (elf_interpreter) {
|
|
||||||
load_elf_interp(elf_interpreter, &interp_info, bprm->buf);
|
|
||||||
@@ -1796,6 +1621,7 @@ int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs,
|
|
||||||
if (elf_interpreter) {
|
|
||||||
info->load_addr = interp_info.load_addr;
|
|
||||||
info->entry = interp_info.entry;
|
|
||||||
+ free(elf_interpreter);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef USE_ELF_CORE_DUMP
|
|
||||||
--
|
|
||||||
cgit v0.8.3.4
|
|
@ -1,22 +1,7 @@
|
|||||||
Removed s390x pieces.
|
diff -uNr qemu-0.14.1.orig/linux-user/alpha/syscall_nr.h qemu-0.14.1/linux-user/alpha/syscall_nr.h
|
||||||
|
--- qemu-0.14.1.orig/linux-user/alpha/syscall_nr.h 2011-11-24 22:21:09.636856616 +0100
|
||||||
commit d979e8eb544da31df78bc76358a73f0d1c823c17
|
+++ qemu-0.14.1/linux-user/alpha/syscall_nr.h 2011-11-24 22:22:04.528478368 +0100
|
||||||
Author: Peter Maydell <peter.maydell@linaro.org>
|
@@ -411,7 +411,28 @@
|
||||||
Date: Mon Jun 27 17:44:51 2011 +0100
|
|
||||||
|
|
||||||
linux-user: Add syscall numbers from kernel 2.6.39.2
|
|
||||||
|
|
||||||
Add syscall numbers for new syscall numbers; this brings us
|
|
||||||
into line with Linux 2.6.39.2.
|
|
||||||
|
|
||||||
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
|
|
||||||
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
|
|
||||||
|
|
||||||
diff --git a/linux-user/alpha/syscall_nr.h b/linux-user/alpha/syscall_nr.h
|
|
||||||
index e3127df..f6284db 100644
|
|
||||||
--- a/linux-user/alpha/syscall_nr.h
|
|
||||||
+++ b/linux-user/alpha/syscall_nr.h
|
|
||||||
@@ -411,4 +411,25 @@
|
|
||||||
#define TARGET_NR_signalfd 476
|
#define TARGET_NR_signalfd 476
|
||||||
#define TARGET_NR_timerfd 477
|
#define TARGET_NR_timerfd 477
|
||||||
#define TARGET_NR_eventfd 478
|
#define TARGET_NR_eventfd 478
|
||||||
@ -43,10 +28,12 @@ index e3127df..f6284db 100644
|
|||||||
+#define TARGET_NR_open_by_handle_at 498
|
+#define TARGET_NR_open_by_handle_at 498
|
||||||
+#define TARGET_NR_clock_adjtime 499
|
+#define TARGET_NR_clock_adjtime 499
|
||||||
+#define TARGET_NR_syncfs 500
|
+#define TARGET_NR_syncfs 500
|
||||||
diff --git a/linux-user/arm/syscall_nr.h b/linux-user/arm/syscall_nr.h
|
/* The following aliases are defined in order to match up with the
|
||||||
index 79a216a..7f05879 100644
|
standard i386 syscalls implemented in syscalls.c. */
|
||||||
--- a/linux-user/arm/syscall_nr.h
|
#define TARGET_NR_chown32 TARGET_NR_chown
|
||||||
+++ b/linux-user/arm/syscall_nr.h
|
diff -uNr qemu-0.14.1.orig/linux-user/arm/syscall_nr.h qemu-0.14.1/linux-user/arm/syscall_nr.h
|
||||||
|
--- qemu-0.14.1.orig/linux-user/arm/syscall_nr.h 2011-11-24 22:21:09.627597287 +0100
|
||||||
|
+++ qemu-0.14.1/linux-user/arm/syscall_nr.h 2011-11-24 22:21:41.762101277 +0100
|
||||||
@@ -365,3 +365,16 @@
|
@@ -365,3 +365,16 @@
|
||||||
#define TARGET_NR_dup3 (358)
|
#define TARGET_NR_dup3 (358)
|
||||||
#define TARGET_NR_pipe2 (359)
|
#define TARGET_NR_pipe2 (359)
|
||||||
@ -64,20 +51,18 @@ index 79a216a..7f05879 100644
|
|||||||
+#define TARGET_NR_open_by_handle_at (371)
|
+#define TARGET_NR_open_by_handle_at (371)
|
||||||
+#define TARGET_NR_clock_adjtime (372)
|
+#define TARGET_NR_clock_adjtime (372)
|
||||||
+#define TARGET_NR_syncfs (373)
|
+#define TARGET_NR_syncfs (373)
|
||||||
diff --git a/linux-user/cris/syscall_nr.h b/linux-user/cris/syscall_nr.h
|
diff -uNr qemu-0.14.1.orig/linux-user/cris/syscall_nr.h qemu-0.14.1/linux-user/cris/syscall_nr.h
|
||||||
index 6132817..98f1a0b 100644
|
--- qemu-0.14.1.orig/linux-user/cris/syscall_nr.h 2011-11-24 22:21:09.625282454 +0100
|
||||||
--- a/linux-user/cris/syscall_nr.h
|
+++ qemu-0.14.1/linux-user/cris/syscall_nr.h 2011-11-24 22:21:41.762101277 +0100
|
||||||
+++ b/linux-user/cris/syscall_nr.h
|
|
||||||
@@ -333,3 +333,5 @@
|
@@ -333,3 +333,5 @@
|
||||||
#define TARGET_NR_dup3 330
|
#define TARGET_NR_dup3 330
|
||||||
#define TARGET_NR_pipe2 331
|
#define TARGET_NR_pipe2 331
|
||||||
#define TARGET_NR_inotify_init1 332
|
#define TARGET_NR_inotify_init1 332
|
||||||
+#define TARGET_NR_preadv 333
|
+#define TARGET_NR_preadv 333
|
||||||
+#define TARGET_NR_pwritev 334
|
+#define TARGET_NR_pwritev 334
|
||||||
diff --git a/linux-user/i386/syscall_nr.h b/linux-user/i386/syscall_nr.h
|
diff -uNr qemu-0.14.1.orig/linux-user/i386/syscall_nr.h qemu-0.14.1/linux-user/i386/syscall_nr.h
|
||||||
index 3ef71ce..74abfca 100644
|
--- qemu-0.14.1.orig/linux-user/i386/syscall_nr.h 2011-11-24 22:21:09.632226952 +0100
|
||||||
--- a/linux-user/i386/syscall_nr.h
|
+++ qemu-0.14.1/linux-user/i386/syscall_nr.h 2011-11-24 22:21:41.764416110 +0100
|
||||||
+++ b/linux-user/i386/syscall_nr.h
|
|
||||||
@@ -335,3 +335,15 @@
|
@@ -335,3 +335,15 @@
|
||||||
#define TARGET_NR_dup3 330
|
#define TARGET_NR_dup3 330
|
||||||
#define TARGET_NR_pipe2 331
|
#define TARGET_NR_pipe2 331
|
||||||
@ -94,10 +79,9 @@ index 3ef71ce..74abfca 100644
|
|||||||
+#define TARGET_NR_open_by_handle_at 342
|
+#define TARGET_NR_open_by_handle_at 342
|
||||||
+#define TARGET_NR_clock_adjtime 343
|
+#define TARGET_NR_clock_adjtime 343
|
||||||
+#define TARGET_NR_syncfs 344
|
+#define TARGET_NR_syncfs 344
|
||||||
diff --git a/linux-user/m68k/syscall_nr.h b/linux-user/m68k/syscall_nr.h
|
diff -uNr qemu-0.14.1.orig/linux-user/m68k/syscall_nr.h qemu-0.14.1/linux-user/m68k/syscall_nr.h
|
||||||
index 1c0ba07..4d0937e 100644
|
--- qemu-0.14.1.orig/linux-user/m68k/syscall_nr.h 2011-11-24 22:21:09.629912120 +0100
|
||||||
--- a/linux-user/m68k/syscall_nr.h
|
+++ qemu-0.14.1/linux-user/m68k/syscall_nr.h 2011-11-24 22:21:41.764416110 +0100
|
||||||
+++ b/linux-user/m68k/syscall_nr.h
|
|
||||||
@@ -328,3 +328,19 @@
|
@@ -328,3 +328,19 @@
|
||||||
#define TARGET_NR_dup3 326
|
#define TARGET_NR_dup3 326
|
||||||
#define TARGET_NR_pipe2 327
|
#define TARGET_NR_pipe2 327
|
||||||
@ -118,11 +102,10 @@ index 1c0ba07..4d0937e 100644
|
|||||||
+#define TARGET_NR_open_by_handle_at 341
|
+#define TARGET_NR_open_by_handle_at 341
|
||||||
+#define TARGET_NR_clock_adjtime 342
|
+#define TARGET_NR_clock_adjtime 342
|
||||||
+#define TARGET_NR_syncfs 343
|
+#define TARGET_NR_syncfs 343
|
||||||
diff --git a/linux-user/main.c b/linux-user/main.c
|
diff -uNr qemu-0.14.1.orig/linux-user/main.c qemu-0.14.1/linux-user/main.c
|
||||||
index 289054b..48f0443 100644
|
--- qemu-0.14.1.orig/linux-user/main.c 2011-11-24 22:21:09.632226952 +0100
|
||||||
--- a/linux-user/main.c
|
+++ qemu-0.14.1/linux-user/main.c 2011-11-24 22:21:41.766730943 +0100
|
||||||
+++ b/linux-user/main.c
|
@@ -1922,6 +1922,33 @@
|
||||||
@@ -1985,6 +1985,33 @@ static const uint8_t mips_syscall_args[] = {
|
|
||||||
MIPS_SYS(sys_epoll_pwait, 6)
|
MIPS_SYS(sys_epoll_pwait, 6)
|
||||||
MIPS_SYS(sys_ioprio_set, 3)
|
MIPS_SYS(sys_ioprio_set, 3)
|
||||||
MIPS_SYS(sys_ioprio_get, 2)
|
MIPS_SYS(sys_ioprio_get, 2)
|
||||||
@ -156,10 +139,9 @@ index 289054b..48f0443 100644
|
|||||||
};
|
};
|
||||||
|
|
||||||
#undef MIPS_SYS
|
#undef MIPS_SYS
|
||||||
diff --git a/linux-user/microblaze/syscall_nr.h b/linux-user/microblaze/syscall_nr.h
|
diff -uNr qemu-0.14.1.orig/linux-user/microblaze/syscall_nr.h qemu-0.14.1/linux-user/microblaze/syscall_nr.h
|
||||||
index 3e641cd..f1fe0e7 100644
|
--- qemu-0.14.1.orig/linux-user/microblaze/syscall_nr.h 2011-11-24 22:21:09.629912120 +0100
|
||||||
--- a/linux-user/microblaze/syscall_nr.h
|
+++ qemu-0.14.1/linux-user/microblaze/syscall_nr.h 2011-11-24 22:21:41.766730943 +0100
|
||||||
+++ b/linux-user/microblaze/syscall_nr.h
|
|
||||||
@@ -364,6 +364,16 @@
|
@@ -364,6 +364,16 @@
|
||||||
#define TARGET_NR_sendmsg 360 /* new */
|
#define TARGET_NR_sendmsg 360 /* new */
|
||||||
#define TARGET_NR_recvmsg 361 /* new */
|
#define TARGET_NR_recvmsg 361 /* new */
|
||||||
@ -179,10 +161,9 @@ index 3e641cd..f1fe0e7 100644
|
|||||||
+#define TARGET_NR_clock_adjtime 373
|
+#define TARGET_NR_clock_adjtime 373
|
||||||
+#define TARGET_NR_syncfs 374
|
+#define TARGET_NR_syncfs 374
|
||||||
|
|
||||||
diff --git a/linux-user/mips/syscall_nr.h b/linux-user/mips/syscall_nr.h
|
diff -uNr qemu-0.14.1.orig/linux-user/mips/syscall_nr.h qemu-0.14.1/linux-user/mips/syscall_nr.h
|
||||||
index 0595308..fbdc348 100644
|
--- qemu-0.14.1.orig/linux-user/mips/syscall_nr.h 2011-11-24 22:21:09.632226952 +0100
|
||||||
--- a/linux-user/mips/syscall_nr.h
|
+++ qemu-0.14.1/linux-user/mips/syscall_nr.h 2011-11-24 22:21:41.766730943 +0100
|
||||||
+++ b/linux-user/mips/syscall_nr.h
|
|
||||||
@@ -332,3 +332,16 @@
|
@@ -332,3 +332,16 @@
|
||||||
#define TARGET_NR_dup3 (TARGET_NR_Linux + 327)
|
#define TARGET_NR_dup3 (TARGET_NR_Linux + 327)
|
||||||
#define TARGET_NR_pipe2 (TARGET_NR_Linux + 328)
|
#define TARGET_NR_pipe2 (TARGET_NR_Linux + 328)
|
||||||
@ -200,10 +181,9 @@ index 0595308..fbdc348 100644
|
|||||||
+#define TARGET_NR_open_by_handle_at (TARGET_NR_Linux + 340)
|
+#define TARGET_NR_open_by_handle_at (TARGET_NR_Linux + 340)
|
||||||
+#define TARGET_NR_clock_adjtime (TARGET_NR_Linux + 341)
|
+#define TARGET_NR_clock_adjtime (TARGET_NR_Linux + 341)
|
||||||
+#define TARGET_NR_syncfs (TARGET_NR_Linux + 342)
|
+#define TARGET_NR_syncfs (TARGET_NR_Linux + 342)
|
||||||
diff --git a/linux-user/mips64/syscall_nr.h b/linux-user/mips64/syscall_nr.h
|
diff -uNr qemu-0.14.1.orig/linux-user/mips64/syscall_nr.h qemu-0.14.1/linux-user/mips64/syscall_nr.h
|
||||||
index ee1d134..36d27b5 100644
|
--- qemu-0.14.1.orig/linux-user/mips64/syscall_nr.h 2011-11-24 22:21:09.627597287 +0100
|
||||||
--- a/linux-user/mips64/syscall_nr.h
|
+++ qemu-0.14.1/linux-user/mips64/syscall_nr.h 2011-11-24 22:21:41.769045776 +0100
|
||||||
+++ b/linux-user/mips64/syscall_nr.h
|
|
||||||
@@ -291,3 +291,16 @@
|
@@ -291,3 +291,16 @@
|
||||||
#define TARGET_NR_dup3 (TARGET_NR_Linux + 286)
|
#define TARGET_NR_dup3 (TARGET_NR_Linux + 286)
|
||||||
#define TARGET_NR_pipe2 (TARGET_NR_Linux + 287)
|
#define TARGET_NR_pipe2 (TARGET_NR_Linux + 287)
|
||||||
@ -221,10 +201,9 @@ index ee1d134..36d27b5 100644
|
|||||||
+#define TARGET_NR_open_by_handle_at (TARGET_NR_Linux + 299)
|
+#define TARGET_NR_open_by_handle_at (TARGET_NR_Linux + 299)
|
||||||
+#define TARGET_NR_clock_adjtime (TARGET_NR_Linux + 300)
|
+#define TARGET_NR_clock_adjtime (TARGET_NR_Linux + 300)
|
||||||
+#define TARGET_NR_syncfs (TARGET_NR_Linux + 301)
|
+#define TARGET_NR_syncfs (TARGET_NR_Linux + 301)
|
||||||
diff --git a/linux-user/mipsn32/syscall_nr.h b/linux-user/mipsn32/syscall_nr.h
|
diff -uNr qemu-0.14.1.orig/linux-user/mipsn32/syscall_nr.h qemu-0.14.1/linux-user/mipsn32/syscall_nr.h
|
||||||
index 60a99dd..4e1aca3 100644
|
--- qemu-0.14.1.orig/linux-user/mipsn32/syscall_nr.h 2011-11-24 22:21:09.634541784 +0100
|
||||||
--- a/linux-user/mipsn32/syscall_nr.h
|
+++ qemu-0.14.1/linux-user/mipsn32/syscall_nr.h 2011-11-24 22:21:41.769045776 +0100
|
||||||
+++ b/linux-user/mipsn32/syscall_nr.h
|
|
||||||
@@ -295,3 +295,17 @@
|
@@ -295,3 +295,17 @@
|
||||||
#define TARGET_NR_dup3 (TARGET_NR_Linux + 290)
|
#define TARGET_NR_dup3 (TARGET_NR_Linux + 290)
|
||||||
#define TARGET_NR_pipe2 (TARGET_NR_Linux + 291)
|
#define TARGET_NR_pipe2 (TARGET_NR_Linux + 291)
|
||||||
@ -243,10 +222,9 @@ index 60a99dd..4e1aca3 100644
|
|||||||
+#define TARGET_NR_open_by_handle_at (TARGET_NR_Linux + 304)
|
+#define TARGET_NR_open_by_handle_at (TARGET_NR_Linux + 304)
|
||||||
+#define TARGET_NR_clock_adjtime (TARGET_NR_Linux + 305)
|
+#define TARGET_NR_clock_adjtime (TARGET_NR_Linux + 305)
|
||||||
+#define TARGET_NR_syncfs (TARGET_NR_Linux + 306)
|
+#define TARGET_NR_syncfs (TARGET_NR_Linux + 306)
|
||||||
diff --git a/linux-user/ppc/syscall_nr.h b/linux-user/ppc/syscall_nr.h
|
diff -uNr qemu-0.14.1.orig/linux-user/ppc/syscall_nr.h qemu-0.14.1/linux-user/ppc/syscall_nr.h
|
||||||
index cc84a4c..0673b7d 100644
|
--- qemu-0.14.1.orig/linux-user/ppc/syscall_nr.h 2011-11-24 22:21:09.627597287 +0100
|
||||||
--- a/linux-user/ppc/syscall_nr.h
|
+++ qemu-0.14.1/linux-user/ppc/syscall_nr.h 2011-11-24 22:21:41.769045776 +0100
|
||||||
+++ b/linux-user/ppc/syscall_nr.h
|
|
||||||
@@ -332,3 +332,33 @@
|
@@ -332,3 +332,33 @@
|
||||||
#define TARGET_NR_dup3 316
|
#define TARGET_NR_dup3 316
|
||||||
#define TARGET_NR_pipe2 317
|
#define TARGET_NR_pipe2 317
|
||||||
@ -281,10 +259,9 @@ index cc84a4c..0673b7d 100644
|
|||||||
+#define TARGET_NR_open_by_handle_at 346
|
+#define TARGET_NR_open_by_handle_at 346
|
||||||
+#define TARGET_NR_clock_adjtime 347
|
+#define TARGET_NR_clock_adjtime 347
|
||||||
+#define TARGET_NR_syncfs 348
|
+#define TARGET_NR_syncfs 348
|
||||||
diff --git a/linux-user/sh4/syscall_nr.h b/linux-user/sh4/syscall_nr.h
|
diff -uNr qemu-0.14.1.orig/linux-user/sh4/syscall_nr.h qemu-0.14.1/linux-user/sh4/syscall_nr.h
|
||||||
index 262b236..6173a7c 100644
|
--- qemu-0.14.1.orig/linux-user/sh4/syscall_nr.h 2011-11-24 22:21:09.634541784 +0100
|
||||||
--- a/linux-user/sh4/syscall_nr.h
|
+++ qemu-0.14.1/linux-user/sh4/syscall_nr.h 2011-11-24 22:21:41.769045776 +0100
|
||||||
+++ b/linux-user/sh4/syscall_nr.h
|
|
||||||
@@ -334,3 +334,35 @@
|
@@ -334,3 +334,35 @@
|
||||||
#define TARGET_NR_dup3 330
|
#define TARGET_NR_dup3 330
|
||||||
#define TARGET_NR_pipe2 331
|
#define TARGET_NR_pipe2 331
|
||||||
@ -321,10 +298,9 @@ index 262b236..6173a7c 100644
|
|||||||
+#define TARGET_NR_open_by_handle_at 360
|
+#define TARGET_NR_open_by_handle_at 360
|
||||||
+#define TARGET_NR_clock_adjtime 361
|
+#define TARGET_NR_clock_adjtime 361
|
||||||
+#define TARGET_NR_syncfs 362
|
+#define TARGET_NR_syncfs 362
|
||||||
diff --git a/linux-user/sparc/syscall_nr.h b/linux-user/sparc/syscall_nr.h
|
diff -uNr qemu-0.14.1.orig/linux-user/sparc/syscall_nr.h qemu-0.14.1/linux-user/sparc/syscall_nr.h
|
||||||
index 5d1ac21..be503f2 100644
|
--- qemu-0.14.1.orig/linux-user/sparc/syscall_nr.h 2011-11-24 22:21:09.629912120 +0100
|
||||||
--- a/linux-user/sparc/syscall_nr.h
|
+++ qemu-0.14.1/linux-user/sparc/syscall_nr.h 2011-11-24 22:21:41.769045776 +0100
|
||||||
+++ b/linux-user/sparc/syscall_nr.h
|
|
||||||
@@ -285,3 +285,15 @@
|
@@ -285,3 +285,15 @@
|
||||||
#define TARGET_NR_pipe2 321
|
#define TARGET_NR_pipe2 321
|
||||||
#define TARGET_NR_inotify_init1 322
|
#define TARGET_NR_inotify_init1 322
|
||||||
@ -341,10 +317,9 @@ index 5d1ac21..be503f2 100644
|
|||||||
+#define TARGET_NR_open_by_handle_at 333
|
+#define TARGET_NR_open_by_handle_at 333
|
||||||
+#define TARGET_NR_clock_adjtime 334
|
+#define TARGET_NR_clock_adjtime 334
|
||||||
+#define TARGET_NR_syncfs 335
|
+#define TARGET_NR_syncfs 335
|
||||||
diff --git a/linux-user/sparc64/syscall_nr.h b/linux-user/sparc64/syscall_nr.h
|
diff -uNr qemu-0.14.1.orig/linux-user/sparc64/syscall_nr.h qemu-0.14.1/linux-user/sparc64/syscall_nr.h
|
||||||
index bdca2a7..70988b2 100644
|
--- qemu-0.14.1.orig/linux-user/sparc64/syscall_nr.h 2011-11-24 22:21:09.632226952 +0100
|
||||||
--- a/linux-user/sparc64/syscall_nr.h
|
+++ qemu-0.14.1/linux-user/sparc64/syscall_nr.h 2011-11-24 22:21:41.771360608 +0100
|
||||||
+++ b/linux-user/sparc64/syscall_nr.h
|
|
||||||
@@ -322,3 +322,15 @@
|
@@ -322,3 +322,15 @@
|
||||||
#define TARGET_NR_pipe2 321
|
#define TARGET_NR_pipe2 321
|
||||||
#define TARGET_NR_inotify_init1 322
|
#define TARGET_NR_inotify_init1 322
|
||||||
@ -361,10 +336,9 @@ index bdca2a7..70988b2 100644
|
|||||||
+#define TARGET_NR_open_by_handle_at 333
|
+#define TARGET_NR_open_by_handle_at 333
|
||||||
+#define TARGET_NR_clock_adjtime 334
|
+#define TARGET_NR_clock_adjtime 334
|
||||||
+#define TARGET_NR_syncfs 335
|
+#define TARGET_NR_syncfs 335
|
||||||
diff --git a/linux-user/x86_64/syscall_nr.h b/linux-user/x86_64/syscall_nr.h
|
diff -uNr qemu-0.14.1.orig/linux-user/x86_64/syscall_nr.h qemu-0.14.1/linux-user/x86_64/syscall_nr.h
|
||||||
index 568a901..947e961 100644
|
--- qemu-0.14.1.orig/linux-user/x86_64/syscall_nr.h 2011-11-24 22:21:09.625282454 +0100
|
||||||
--- a/linux-user/x86_64/syscall_nr.h
|
+++ qemu-0.14.1/linux-user/x86_64/syscall_nr.h 2011-11-24 22:21:41.771360608 +0100
|
||||||
+++ b/linux-user/x86_64/syscall_nr.h
|
|
||||||
@@ -293,3 +293,15 @@
|
@@ -293,3 +293,15 @@
|
||||||
#define TARGET_NR_dup3 292
|
#define TARGET_NR_dup3 292
|
||||||
#define TARGET_NR_pipe2 293
|
#define TARGET_NR_pipe2 293
|
||||||
|
201
app-emulation/qemu/qemu-0.14.1.ebuild
Normal file
201
app-emulation/qemu/qemu-0.14.1.ebuild
Normal file
@ -0,0 +1,201 @@
|
|||||||
|
# Copyright 1999-2011 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/qemu-0.14.0.ebuild,v 1.3 2011/02/20 22:07:37 zmedico Exp $
|
||||||
|
|
||||||
|
EAPI="2"
|
||||||
|
|
||||||
|
if [[ ${PV} = *9999* ]]; then
|
||||||
|
EGIT_REPO_URI="git://git.qemu.org/qemu.git"
|
||||||
|
GIT_ECLASS="git"
|
||||||
|
fi
|
||||||
|
|
||||||
|
inherit eutils flag-o-matic ${GIT_ECLASS} linux-info toolchain-funcs
|
||||||
|
|
||||||
|
if [[ ${PV} = *9999* ]]; then
|
||||||
|
SRC_URI=""
|
||||||
|
KEYWORDS=""
|
||||||
|
else
|
||||||
|
SRC_URI="http://download.savannah.gnu.org/releases/qemu/${P}.tar.gz"
|
||||||
|
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
|
||||||
|
fi
|
||||||
|
|
||||||
|
DESCRIPTION="QEMU emulator and ABI wrapper"
|
||||||
|
HOMEPAGE="http://www.qemu.org"
|
||||||
|
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
SLOT="0"
|
||||||
|
# xen is disabled until the deps are fixed
|
||||||
|
IUSE="+aio alsa bluetooth brltty curl esd fdt hardened jpeg ncurses \
|
||||||
|
png pulseaudio qemu-ifup sasl sdl ssl static vde"
|
||||||
|
|
||||||
|
COMMON_TARGETS="i386 x86_64 arm cris m68k microblaze mips mipsel ppc ppc64 sh4 sh4eb sparc sparc64"
|
||||||
|
IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} mips64 mips64el ppcemb"
|
||||||
|
IUSE_USER_TARGETS="${COMMON_TARGETS} alpha armeb ppc64abi32 sparc32plus"
|
||||||
|
|
||||||
|
for target in ${IUSE_SOFTMMU_TARGETS}; do
|
||||||
|
IUSE="${IUSE} +qemu_softmmu_targets_${target}"
|
||||||
|
done
|
||||||
|
|
||||||
|
for target in ${IUSE_USER_TARGETS}; do
|
||||||
|
IUSE="${IUSE} +qemu_user_targets_${target}"
|
||||||
|
done
|
||||||
|
|
||||||
|
RESTRICT="test"
|
||||||
|
|
||||||
|
RDEPEND="
|
||||||
|
!app-emulation/qemu-kvm
|
||||||
|
!app-emulation/qemu-softmmu
|
||||||
|
!app-emulation/qemu-user
|
||||||
|
!app-emulation/qemu-kvm-spice
|
||||||
|
sys-apps/pciutils
|
||||||
|
>=sys-apps/util-linux-2.16.0
|
||||||
|
sys-libs/zlib
|
||||||
|
aio? ( dev-libs/libaio )
|
||||||
|
alsa? ( >=media-libs/alsa-lib-1.0.13 )
|
||||||
|
bluetooth? ( net-wireless/bluez )
|
||||||
|
brltty? ( app-accessibility/brltty )
|
||||||
|
curl? ( net-misc/curl )
|
||||||
|
esd? ( media-sound/esound )
|
||||||
|
fdt? ( >=sys-apps/dtc-1.2.0 )
|
||||||
|
jpeg? ( virtual/jpeg )
|
||||||
|
ncurses? ( sys-libs/ncurses )
|
||||||
|
png? ( media-libs/libpng )
|
||||||
|
pulseaudio? ( media-sound/pulseaudio )
|
||||||
|
qemu-ifup? ( sys-apps/iproute2 net-misc/bridge-utils )
|
||||||
|
sasl? ( dev-libs/cyrus-sasl )
|
||||||
|
sdl? ( >=media-libs/libsdl-1.2.11[X] )
|
||||||
|
ssl? ( net-libs/gnutls )
|
||||||
|
vde? ( net-misc/vde )
|
||||||
|
"
|
||||||
|
|
||||||
|
DEPEND="${RDEPEND}
|
||||||
|
app-text/texi2html
|
||||||
|
>=sys-kernel/linux-headers-2.6.29
|
||||||
|
ssl? ( dev-util/pkgconfig )
|
||||||
|
"
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
use qemu_softmmu_targets_x86_64 || ewarn "You disabled default target QEMU_SOFTMMU_TARGETS=x86_64"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
# prevent docs to get automatically installed
|
||||||
|
sed -i '/$(DESTDIR)$(docdir)/d' Makefile || die
|
||||||
|
# Alter target makefiles to accept CFLAGS set via flag-o
|
||||||
|
sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \
|
||||||
|
Makefile Makefile.target || die
|
||||||
|
# append CFLAGS while linking
|
||||||
|
sed -i 's/$(LDFLAGS)/$(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS)/' rules.mak || die
|
||||||
|
EPATCH_SOURCE="${FILESDIR}/0.14.1" EPATCH_SUFFIX="patch" \
|
||||||
|
EPATCH_FORCE="yes" epatch
|
||||||
|
epatch "${FILESDIR}/qemu-chroot.patch"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local conf_opts audio_opts user_targets
|
||||||
|
|
||||||
|
for target in ${IUSE_SOFTMMU_TARGETS} ; do
|
||||||
|
use "qemu_softmmu_targets_${target}" && \
|
||||||
|
softmmu_targets="${softmmu_targets} ${target}-softmmu"
|
||||||
|
done
|
||||||
|
|
||||||
|
for target in ${IUSE_USER_TARGETS} ; do
|
||||||
|
use "qemu_user_targets_${target}" && \
|
||||||
|
user_targets="${user_targets} ${target}-linux-user"
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "${softmmu_targets}" ]; then
|
||||||
|
conf_opts="${conf_opts} --disable-system"
|
||||||
|
else
|
||||||
|
einfo "Building the following softmmu targets: ${softmmu_targets}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "${user_targets}" ]; then
|
||||||
|
einfo "Building the following user targets: ${user_targets}"
|
||||||
|
conf_opts="${conf_opts} --enable-linux-user"
|
||||||
|
else
|
||||||
|
conf_opts="${conf_opts} --disable-linux-user"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Fix QA issues. QEMU needs executable heaps and we need to mark it as such
|
||||||
|
conf_opts="${conf_opts} --extra-ldflags=-Wl,-z,execheap"
|
||||||
|
|
||||||
|
# Add support for static builds
|
||||||
|
use static && conf_opts="${conf_opts} --static"
|
||||||
|
|
||||||
|
# Fix the $(prefix)/etc issue
|
||||||
|
conf_opts="${conf_opts} --sysconfdir=/etc"
|
||||||
|
|
||||||
|
#config options
|
||||||
|
conf_opts="${conf_opts} $(use_enable aio linux-aio)"
|
||||||
|
conf_opts="${conf_opts} $(use_enable bluetooth bluez)"
|
||||||
|
conf_opts="${conf_opts} $(use_enable brltty brlapi)"
|
||||||
|
conf_opts="${conf_opts} $(use_enable curl)"
|
||||||
|
conf_opts="${conf_opts} $(use_enable fdt)"
|
||||||
|
conf_opts="${conf_opts} $(use_enable hardened user-pie)"
|
||||||
|
conf_opts="${conf_opts} $(use_enable jpeg vnc-jpeg)"
|
||||||
|
conf_opts="${conf_opts} $(use_enable ncurses curses)"
|
||||||
|
conf_opts="${conf_opts} $(use_enable png vnc-png)"
|
||||||
|
conf_opts="${conf_opts} $(use_enable sasl vnc-sasl)"
|
||||||
|
conf_opts="${conf_opts} $(use_enable sdl)"
|
||||||
|
conf_opts="${conf_opts} $(use_enable ssl vnc-tls)"
|
||||||
|
conf_opts="${conf_opts} $(use_enable vde)"
|
||||||
|
conf_opts="${conf_opts} --disable-xen"
|
||||||
|
conf_opts="${conf_opts} --disable-darwin-user --disable-bsd-user"
|
||||||
|
|
||||||
|
# audio options
|
||||||
|
audio_opts="oss"
|
||||||
|
use alsa && audio_opts="alsa ${audio_opts}"
|
||||||
|
use esd && audio_opts="esd ${audio_opts}"
|
||||||
|
use pulseaudio && audio_opts="pa ${audio_opts}"
|
||||||
|
use sdl && audio_opts="sdl ${audio_opts}"
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--disable-strip \
|
||||||
|
--disable-werror \
|
||||||
|
--disable-kvm \
|
||||||
|
--enable-nptl \
|
||||||
|
--enable-uuid \
|
||||||
|
${conf_opts} \
|
||||||
|
--audio-drv-list="${audio_opts}" \
|
||||||
|
--target-list="${softmmu_targets} ${user_targets}" \
|
||||||
|
--cc="$(tc-getCC)" \
|
||||||
|
--host-cc="$(tc-getBUILD_CC)" \
|
||||||
|
|| die "configure failed"
|
||||||
|
|
||||||
|
# this is for qemu upstream's threaded support which is
|
||||||
|
# in development and broken
|
||||||
|
# the kvm project has its own support for threaded IO
|
||||||
|
# which is always on and works
|
||||||
|
# --enable-io-thread \
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
# Restricting parallel build until we get a patch to fix this
|
||||||
|
emake || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
emake DESTDIR="${D}" install || die "make install failed"
|
||||||
|
|
||||||
|
if [ ! -z "${softmmu_targets}" ]; then
|
||||||
|
exeinto /etc/qemu
|
||||||
|
use qemu-ifup && { doexe \
|
||||||
|
"${FILESDIR}/qemu-ifup" \
|
||||||
|
"${FILESDIR}/qemu-ifdown" \
|
||||||
|
|| die "qemu interface scripts missing" ; }
|
||||||
|
fi
|
||||||
|
|
||||||
|
dodoc Changelog MAINTAINERS TODO pci-ids.txt || die
|
||||||
|
newdoc pc-bios/README README.pc-bios || die
|
||||||
|
dohtml qemu-doc.html qemu-tech.html || die
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
use qemu-ifup || return
|
||||||
|
elog "You will need the Universal TUN/TAP driver compiled into your"
|
||||||
|
elog "kernel or loaded as a module to use the virtual network device"
|
||||||
|
elog "if using -net tap. You will also need support for 802.1d"
|
||||||
|
elog "Ethernet Bridging and a configured bridge if using the provided"
|
||||||
|
elog "qemu-ifup script from /etc/qemu."
|
||||||
|
echo
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user