diff options
author | Juergen Lock <nox@FreeBSD.org> | 2014-06-27 18:31:19 +0000 |
---|---|---|
committer | Juergen Lock <nox@FreeBSD.org> | 2014-06-27 18:31:19 +0000 |
commit | bccbf3e27fcb7f983d3bc7275252f27e704bd53f (patch) | |
tree | 2c29b383e8c1232b2dca8a8bc1077429f4c2a656 /emulators | |
parent | - upgrade to 0.99.08 (diff) |
- bsd-user: add posix-openpt syscall and TIOCPTMASTER/TIOCPKT ioctl
handling. (this fixes sysutils/screen) [1]
- arm-bsd-user: fix sigreturn frame handling. [2]
- Bump PORTREVISION.
Submitted by: kan [1], sson [2]
Notes
Notes:
svn path=/head/; revision=359593
Diffstat (limited to 'emulators')
3 files changed, 64 insertions, 6 deletions
diff --git a/emulators/qemu-devel/Makefile b/emulators/qemu-devel/Makefile index 19d4fb65f2ea..83ed5fc5751f 100644 --- a/emulators/qemu-devel/Makefile +++ b/emulators/qemu-devel/Makefile @@ -3,7 +3,7 @@ PORTNAME= qemu PORTVERSION= 2.0.0 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= emulators MASTER_SITES= http://wiki.qemu.org/download/:release \ LOCAL/nox:snapshot @@ -69,6 +69,7 @@ EXTRA_PATCHES+= ${FILESDIR}/extra-patch-bsd-user-mmap.c EXTRA_PATCHES+= ${FILESDIR}/extra-patch-sysctl-hw-pagesizes EXTRA_PATCHES+= ${FILESDIR}/extra-patch-bsd-user-x86_64-target_arch_vmparam.h EXTRA_PATCHES+= ${FILESDIR}/extra-patch-target_siginfo +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-bsd-user-arm-signal .endif CONFIGURE_ARGS+= --extra-ldflags=-L${LOCALBASE}/lib diff --git a/emulators/qemu-devel/files/extra-patch-790d0ef625d22ff3f1a895d266a48e2bacd63776 b/emulators/qemu-devel/files/extra-patch-790d0ef625d22ff3f1a895d266a48e2bacd63776 index 42687afaf09e..dfd3d87acb5d 100644 --- a/emulators/qemu-devel/files/extra-patch-790d0ef625d22ff3f1a895d266a48e2bacd63776 +++ b/emulators/qemu-devel/files/extra-patch-790d0ef625d22ff3f1a895d266a48e2bacd63776 @@ -7299,7 +7299,7 @@ new file mode 100644 index 0000000..85d3c41 --- /dev/null +++ b/bsd-user/freebsd/os-ioctl-cmds.h -@@ -0,0 +1,47 @@ +@@ -0,0 +1,49 @@ + +/* sys/ttycom.h tty(4) */ +IOCTL(TIOCSETD, IOC_W, MK_PTR(TYPE_INT)) @@ -7314,11 +7314,13 @@ index 0000000..85d3c41 +IOCTL(TIOCSETA, IOC_W, MK_PTR(MK_STRUCT(STRUCT_termios))) +IOCTL(TIOCSETAW, IOC_W, MK_PTR(MK_STRUCT(STRUCT_termios))) +IOCTL(TIOCSETAF, IOC_W, MK_PTR(MK_STRUCT(STRUCT_termios))) ++IOCTL(TIOCPTMASTER, IOC_, TYPE_NULL) +IOCTL(TIOCOUTQ, IOC_R, MK_PTR(TYPE_INT)) +IOCTL(TIOCSTI, IOC_W, MK_PTR(TYPE_CHAR)) +IOCTL(TIOCNOTTY, IOC_, TYPE_NULL) +IOCTL(TIOCSTOP, IOC_, TYPE_NULL) +IOCTL(TIOCSTART, IOC_, TYPE_NULL) ++IOCTL(TIOCPKT, IOC_W, MK_PTR(TYPE_INT)) +IOCTL(TIOCSCTTY, IOC_, TYPE_NULL) +IOCTL(TIOCDRAIN, IOC_, TYPE_NULL) +IOCTL(TIOCEXCL, IOC_, TYPE_NULL) @@ -7739,7 +7741,7 @@ new file mode 100644 index 0000000..07e60fe --- /dev/null +++ b/bsd-user/freebsd/os-misc.h -@@ -0,0 +1,442 @@ +@@ -0,0 +1,441 @@ +/* + * miscellaneous FreeBSD system call shims + * @@ -8167,8 +8169,7 @@ index 0000000..07e60fe +static inline abi_long do_freebsd_posix_openpt(abi_long flags) +{ + -+ qemu_log("qemu: Unsupported syscall posix_openpt()\n"); -+ return -TARGET_ENOSYS; ++ return get_errno(posix_openpt(flags)); +} + +/* posix_fadvise(2) */ @@ -13325,6 +13326,11 @@ index 1edf412..ae2a4a3 100644 { TARGET_FREEBSD_NR_truncate, "truncate", NULL, NULL, NULL }, { TARGET_FREEBSD_NR_umask, "umask", "%s(%#o)", NULL, NULL }, { TARGET_FREEBSD_NR_unlink, "unlink", "%s(\"%s\")", NULL, NULL }, +@@ -169,3 +231,4 @@ + { TARGET_FREEBSD_NR_wait4, "wait4", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_write, "write", "%s(%d,%#x,%d)", NULL, NULL }, + { TARGET_FREEBSD_NR_writev, "writev", "%s(%d,%p,%#x)", NULL, NULL }, ++{ TARGET_FREEBSD_NR_posix_openpt, "posix_openpt", "%s(%d)", NULL, NULL }, diff --git a/bsd-user/freebsd/syscall_nr.h b/bsd-user/freebsd/syscall_nr.h index 36336ab..d849024 100644 --- a/bsd-user/freebsd/syscall_nr.h @@ -28235,7 +28241,7 @@ index a4d1583..35bf394 100644 + ret = do_freebsd_posix_fallocate(arg1, arg2, arg3); + break; + -+ case TARGET_FREEBSD_NR_posix_openpt: /* posix_fallocate(2) */ ++ case TARGET_FREEBSD_NR_posix_openpt: /* posix_openpt(2) */ + ret = do_freebsd_posix_openpt(arg1); + break; + diff --git a/emulators/qemu-devel/files/extra-patch-bsd-user-arm-signal b/emulators/qemu-devel/files/extra-patch-bsd-user-arm-signal new file mode 100644 index 000000000000..55604c367022 --- /dev/null +++ b/emulators/qemu-devel/files/extra-patch-bsd-user-arm-signal @@ -0,0 +1,51 @@ +diff --git a/bsd-user/arm/target_arch_signal.h b/bsd-user/arm/target_arch_signal.h +index 048bd4f..0b14b0b 100644 +--- a/bsd-user/arm/target_arch_signal.h ++++ b/bsd-user/arm/target_arch_signal.h +@@ -47,7 +47,7 @@ + #define TARGET_INSN_SIZE 4 /* arm instruction size */ + + /* Size of the signal trampolin code. See _sigtramp(). */ +-#define TARGET_SZSIGCODE ((abi_ulong)(8 * TARGET_INSN_SIZE)) ++#define TARGET_SZSIGCODE ((abi_ulong)(9 * TARGET_INSN_SIZE)) + + /* compare to arm/include/_limits.h */ + #define TARGET_MINSIGSTKSZ (1024 * 4) /* min sig stack size */ +@@ -248,7 +248,7 @@ static inline abi_long get_ucontext_sigreturn(CPUARMState *regs, + return -TARGET_EINVAL; + } + +- *target_uc = target_sf + offsetof(struct target_sigframe, sf_uc); ++ *target_uc = target_sf; + + return 0; + } +diff --git a/bsd-user/arm/target_arch_sigtramp.h b/bsd-user/arm/target_arch_sigtramp.h +index 98dc313..5b7424c 100644 +--- a/bsd-user/arm/target_arch_sigtramp.h ++++ b/bsd-user/arm/target_arch_sigtramp.h +@@ -15,16 +15,17 @@ static inline abi_long setup_sigtramp(abi_ulong offset, unsigned sigf_uc, + */ + uint32_t sigtramp_code[] = { + /* 1 */ 0xE1A0000D, /* mov r0, sp */ +- /* 2 */ 0xE59F700C, /* ldr r7, [pc, #12] */ +- /* 3 */ 0xEF000000 + sys_sigreturn, /* swi (SYS_sigreturn) */ +- /* 4 */ 0xE59F7008, /* ldr r7, [pc, #8] */ +- /* 5 */ 0xEF000000 + sys_exit, /* swi (SYS_exit)*/ +- /* 6 */ 0xEAFFFFFA, /* b . -16 */ +- /* 7 */ sys_sigreturn, +- /* 8 */ sys_exit ++ /* 2 */ 0xE2800000 + sigf_uc, /* add r0, r0, #SIGF_UC */ ++ /* 3 */ 0xE59F700C, /* ldr r7, [pc, #12] */ ++ /* 4 */ 0xEF000000 + sys_sigreturn, /* swi (SYS_sigreturn) */ ++ /* 5 */ 0xE59F7008, /* ldr r7, [pc, #8] */ ++ /* 6 */ 0xEF000000 + sys_exit, /* swi (SYS_exit)*/ ++ /* 7 */ 0xEAFFFFFA, /* b . -16 */ ++ /* 8 */ sys_sigreturn, ++ /* 9 */ sys_exit + }; + +- for (i = 0; i < 8; i++) { ++ for (i = 0; i < 9; i++) { + tswap32s(&sigtramp_code[i]); + } |