svn commit: r350371 - in head/emulators/qemu-devel: . files

Juergen Lock nox at FreeBSD.org
Sun Apr 6 15:56:24 UTC 2014


Author: nox
Date: Sun Apr  6 15:56:23 2014
New Revision: 350371
URL: http://svnweb.freebsd.org/changeset/ports/350371
QAT: https://qat.redports.org/buildarchive/r350371/

Log:
  - Add two more bsd-user patches, with these sbruno can now build 32bit
    mips packages in poudriere (after adding 32bit qemu-mips support to it),
    tho he used his git repo that has the same patches: (and sson's binmisc
    code)
  
  	https://github.com/seanbruno/qemu/tree/bsd-user/bsd-user
  
  	https://wiki.freebsd.org/QemuUserModeHowTo
  
    - Fixup comment s/daddu/addu/g . [1]
    - Wrap mmap() allocation search to low memory to avoid another assert.
  
  - Bump PORTREVISION.
  
  Submitted by:	sbruno [1]
  Obtained from:	https://github.com/seanbruno/qemu/commit/6201cb17ad905dffee1b2eb76f58fb032e99b2a1#diff-3ed994b5af908e5063b9d5724056d1b4 [1]

Added:
  head/emulators/qemu-devel/files/extra-patch-6201cb17ad905dffee1b2eb76f58fb032e99b2a1   (contents, props changed)
  head/emulators/qemu-devel/files/extra-patch-bsd-user-mmap.c   (contents, props changed)
Modified:
  head/emulators/qemu-devel/Makefile

Modified: head/emulators/qemu-devel/Makefile
==============================================================================
--- head/emulators/qemu-devel/Makefile	Sun Apr  6 15:46:05 2014	(r350370)
+++ head/emulators/qemu-devel/Makefile	Sun Apr  6 15:56:23 2014	(r350371)
@@ -3,7 +3,7 @@
 
 PORTNAME=	qemu
 PORTVERSION=	1.7.1
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	emulators
 MASTER_SITES=	http://wiki.qemu.org/download/:release \
 		LOCAL/nox:snapshot
@@ -71,9 +71,11 @@ EXTRA_PATCHES+=	${FILESDIR}/extra-patch-
 EXTRA_PATCHES+=	${FILESDIR}/extra-patch-bsd-user-mips-target_arch_vmparam.h
 EXTRA_PATCHES+=	${FILESDIR}/extra-patch-inherit-interp_prefix
 EXTRA_PATCHES+=	${FILESDIR}/extra-patch-d62553b108aa27c0c020dbb771d29f8673807a3b
+EXTRA_PATCHES+=	${FILESDIR}/extra-patch-6201cb17ad905dffee1b2eb76f58fb032e99b2a1
 EXTRA_PATCHES+=	${FILESDIR}/extra-patch-bsd-user-syscall.c
 EXTRA_PATCHES+=	${FILESDIR}/extra-patch-sysctl-hw-availpages
 EXTRA_PATCHES+=	${FILESDIR}/extra-patch-sysctl-0oldlen
+EXTRA_PATCHES+=	${FILESDIR}/extra-patch-bsd-user-mmap.c
 .endif
 
 CONFIGURE_ARGS+=	--extra-ldflags=-L${LOCALBASE}/lib

Added: head/emulators/qemu-devel/files/extra-patch-6201cb17ad905dffee1b2eb76f58fb032e99b2a1
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/qemu-devel/files/extra-patch-6201cb17ad905dffee1b2eb76f58fb032e99b2a1	Sun Apr  6 15:56:23 2014	(r350371)
@@ -0,0 +1,11 @@
+--- a/bsd-user/mips/target_arch_sigtramp.h
++++ b/bsd-user/mips/target_arch_sigtramp.h
+@@ -8,7 +8,7 @@ static inline abi_long setup_sigtramp(abi_ulong offset, unsigned sigf_uc,
+ {
+     int i;
+     uint32_t sigtramp_code[TARGET_SZSIGCODE/TARGET_INSN_SIZE] = {
+-    /* 1 */ 0x27A40000 + sigf_uc,       /* daddu   $a0, $sp, (sigf_uc) */
++    /* 1 */ 0x27A40000 + sigf_uc,       /* addu   $a0, $sp, (sigf_uc) */
+     /* 2 */ 0x24020000 + sys_sigreturn, /* li      $v0, (sys_sigreturn) */
+     /* 3 */ 0x0000000C,                 /* syscall */
+     /* 4 */ 0x0000000D                  /* break */

Added: head/emulators/qemu-devel/files/extra-patch-bsd-user-mmap.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/qemu-devel/files/extra-patch-bsd-user-mmap.c	Sun Apr  6 15:56:23 2014	(r350371)
@@ -0,0 +1,18 @@
+--- a/bsd-user/mmap.c
++++ b/bsd-user/mmap.c
+@@ -238,8 +238,13 @@ abi_ulong mmap_find_vma(abi_ulong start,
+         for (addr1 = addr; addr1 < (addr + size); addr1 += TARGET_PAGE_SIZE) {
+             prot |= page_get_flags(addr1);
+         }
+-        if (prot == 0)
+-            break;
++        if (prot == 0) {
++            if (reserved_va && addr + size >= reserved_va) {
++                addr = 0;
++            } else {
++                break;
++            }
++        }
+         addr += qemu_host_page_size;
+         /* we found nothing */
+         if (addr == addr_start)


More information about the svn-ports-head mailing list