Index: emulators/qemu-sbruno/Makefile =================================================================== --- emulators/qemu-sbruno/Makefile (revision 525282) +++ emulators/qemu-sbruno/Makefile (working copy) @@ -20,6 +20,9 @@ USES= bison compiler:c11 gmake perl5 pkgconfig py USE_PERL5= build MAKE_ENV+= BSD_MAKE="${MAKE}" V=1 +DEPRECATED= Port will be removed in favor of emulators/qemu +EXPIRATION_DATE= 2020-07-01 + ONLY_FOR_ARCHS= amd64 powerpc powerpc64 # XXX someone wants to debug sparc64 hosts? BROKEN_i386= aarch64 system target is currently broken for i386 hosts, disable for now while dealing with upstream Index: emulators/qemu-user-static/Makefile =================================================================== --- emulators/qemu-user-static/Makefile (revision 525282) +++ emulators/qemu-user-static/Makefile (nonexistent) @@ -1,35 +0,0 @@ -# Created by: nox@FreeBSD.org -# $FreeBSD$ - -COMMENT= QEMU CPU Emulator github bsd-user branch - static user targets -PKGNAMESUFFIX= -user-static - -QEMU_USER_STATIC= yes -PKGMESSAGE= /dev/null -DESCR= ${.CURDIR}/pkg-descr -OPTIONS_SLAVE= STATIC_LINK BSD_USER X86_TARGETS -OPTIONS_EXCLUDE=SAMBA X11 GTK2 OPENGL GNUTLS SASL JPEG PNG CURL \ - CDROM_DMA PCAP USBREDIR GNS3 DOCS -MASTERDIR= ${.CURDIR}/../qemu-sbruno -CONFIGURE_ARGS+= --extra-cflags=-D_IFI_OQDROPS - -post-install: - @${RM} -r ${STAGEDIR}${PREFIX}/bin/qemu-ga - @${RM} -r ${STAGEDIR}${PREFIX}/bin/qemu-img - @${RM} -r ${STAGEDIR}${PREFIX}/bin/qemu-io - @${RM} -r ${STAGEDIR}${PREFIX}/bin/qemu-nbd - @${RM} -r ${STAGEDIR}${PREFIX}/bin/ivshmem-client - @${RM} -r ${STAGEDIR}${PREFIX}/bin/ivshmem-server - @${MV} ${STAGEDIR}${PREFIX}/etc/rc.d ${WRKDIR} - @${RM} -r ${STAGEDIR}${PREFIX}/etc -.if exists(/usr/sbin/binmiscctl) - @${MKDIR} ${STAGEDIR}${PREFIX}/etc - @${MV} ${WRKDIR}/rc.d ${STAGEDIR}${PREFIX}/etc -.endif - @${RM} -r ${STAGEDIR}${PREFIX}/man - @${RM} -r ${STAGEDIR}${DATADIR} - @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qemu-* - @(cd ${STAGEDIR}${PREFIX}/bin && \ - for i in qemu-*; do ${MV} -i $$i $$i-static; done) - -.include "${MASTERDIR}/Makefile" Property changes on: emulators/qemu-user-static/Makefile ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: emulators/qemu-user-static/pkg-descr =================================================================== --- emulators/qemu-user-static/pkg-descr (revision 525282) +++ emulators/qemu-user-static/pkg-descr (nonexistent) @@ -1,23 +0,0 @@ -QEMU is a FAST! processor emulator using dynamic translation to achieve -good emulation speed. -QEMU has two operating modes: - - * Full system emulation. In this mode, QEMU emulates a full system -(for example a PC), including a processor and various peripherials. -It can be used to launch different Operating Systems without rebooting -the PC or to debug system code. - * User mode emulation (Linux host only). In this mode, QEMU can launch -Linux processes compiled for one CPU on another CPU. It can be used to -launch the Wine Windows API emulator or to ease cross-compilation and -cross-debugging. - -As QEMU requires no host kernel patches to run, it is very safe and easy to use. - -This is a slave port of emulators/qemu-sbruno to build only static -bsd-user targets named like qemu-mips-static. While still being -experimental people have already built quite a few armv6/mips/mips64 -packages using these and e.g. poudriere. Some notes are also here: - - http://wiki.freebsd.org/QemuUserModeHowTo - -WWW: http://wiki.qemu.org/Main_Page Property changes on: emulators/qemu-user-static/pkg-descr ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: emulators/qemu-user-static/Makefile =================================================================== --- emulators/qemu-user-static/Makefile (nonexistent) +++ emulators/qemu-user-static/Makefile (working copy) @@ -0,0 +1,91 @@ +# $FreeBSD$ + +PORTNAME= qemu +PORTVERSION= 3.1.0 +PORTREVISION= 3 +CATEGORIES= emulators +PKGNAMESUFFIX= -user-static +DIST_SUBDIR= qemu/${PORTVERSION} + +MAINTAINER= emulation@FreeBSD.org +COMMENT= QEMU CPU Emulator (github bsd-user branch) + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING + +ONLY_FOR_ARCHS= amd64 powerpc powerpc64 +CONFLICTS_INSTALL= qemu-user-static-devel-[0-9]* + +USES= bison compiler:c11 gmake perl5 pkgconfig python:build +USE_GITHUB= yes +GH_TUPLE= seanbruno:qemu-bsd-user:e21442a \ + qemu:keycodemapdb:10739aa:keycodemapdb/ui/keycodemapdb +HAS_CONFIGURE= yes +USE_PERL5= build +MAKE_ENV+= BSD_MAKE="${MAKE}" V=1 + +USE_RC_SUBR= qemu_user_static +SUB_LIST= NAME=qemu_user_static + +# When static linking we have a build dependency on libglib-2.0.a, otherwise +# we use glib20 in the usual way (shared-lib runtime dependency). +BUILD_DEPENDS+= ${LOCALBASE}/lib/libglib-2.0.a:devel/glib20 + +.include + +CONFIGURE_ARGS+= --localstatedir=/var +CONFIGURE_ARGS+= --extra-ldflags=-L${LOCALBASE}/lib +CONFIGURE_ARGS+= --extra-cflags=-I${LOCALBASE}/include +CONFIGURE_ARGS+= --disable-libssh2 + +QEMU_TARGETS= i386-bsd-user sparc-bsd-user arm-bsd-user mips-bsd-user mipsel-bsd-user ppc-bsd-user +.if ${ARCH} == "amd64" || ${ARCH} == "powerpc64" +QEMU_TARGETS+= x86_64-bsd-user riscv64-bsd-user sparc64-bsd-user mips64-bsd-user mips64el-bsd-user ppc64-bsd-user aarch64-bsd-user +PLIST_SUB+= 64BIT="" +.else +PLIST_SUB+= 64BIT="@comment " +.endif +CONFIGURE_ARGS+= --target-list=${QEMU_TARGETS:ts,} + +WITHOUT_CPU_CFLAGS=yes #to avoid problems with register allocation +CFLAGS:= ${CFLAGS:C/-fno-tree-vrp//} +CFLAGS+= -Wno-address-of-packed-member +CFLAGS+= -D_WANT_SEMUN +CONFIGURE_ARGS+= --prefix=${PREFIX} --cc=${CC} --enable-docs \ + --disable-linux-user --disable-linux-aio \ + --disable-kvm --disable-xen \ + --smbd=${LOCALBASE}/sbin/smbd \ + --enable-debug \ + --enable-debug-info \ + --static \ + --python=${PYTHON_CMD} \ + --disable-sdl --disable-gtk --disable-vte --disable-gnutls --disable-vnc \ + --disable-curl --disable-opengl --disable-usb-redir --disable-pcap \ + --disable-docs --disable-tools --disable-system --disable-guest-agent \ + --extra-cflags=-I${WRKSRC}\ -I${LOCALBASE}/include\ -DPREFIX=\\\"\"${PREFIX}\\\"\" + +QEMU_ARCH= ${ARCH:C/amd64/x86_64/:C/powerpc/ppc/} +MAKE_ARGS+= ARCH=${QEMU_ARCH} + +post-patch: + @${REINPLACE_CMD} -E \ + -e "s|^(CFLAGS=).*|\1${CFLAGS} -fno-strict-aliasing|" \ + -e "s|^(LDFLAGS=).*|\1${LDFLAGS}|" \ + ${WRKSRC}/Makefile.target + @${REINPLACE_CMD} -E \ + -e "s|^(CFLAGS=).*|\1${CFLAGS} -fno-strict-aliasing -I.|" \ + -e "s|^(LDFLAGS=).*|\1${LDFLAGS}|" \ + ${WRKSRC}/Makefile + +post-install: + @${MV} ${STAGEDIR}${PREFIX}/etc/rc.d ${WRKDIR} + @${RM} -r ${STAGEDIR}${PREFIX}/etc + @${MKDIR} ${STAGEDIR}${PREFIX}/etc + @${MV} ${WRKDIR}/rc.d ${STAGEDIR}${PREFIX}/etc + @${RM} -r ${STAGEDIR}${PREFIX}/man + @${RM} -r ${STAGEDIR}${DATADIR} + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qemu-* + @(cd ${STAGEDIR}${PREFIX}/bin && \ + for i in qemu-*; do ${MV} -i $$i $$i-static; done) + +.include Property changes on: emulators/qemu-user-static/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: emulators/qemu-user-static/distinfo =================================================================== --- emulators/qemu-user-static/distinfo (nonexistent) +++ emulators/qemu-user-static/distinfo (working copy) @@ -0,0 +1,5 @@ +TIMESTAMP = 1576119784 +SHA256 (qemu/3.1.0/seanbruno-qemu-bsd-user-3.1.0-e21442a_GH0.tar.gz) = 8396a53fbf6f46f89327bc0b747aca928dc21916f67952f938f6c527ccab8cfd +SIZE (qemu/3.1.0/seanbruno-qemu-bsd-user-3.1.0-e21442a_GH0.tar.gz) = 16902208 +SHA256 (qemu/3.1.0/qemu-keycodemapdb-10739aa_GH0.tar.gz) = ae43fb1e2b07b78be88a7882306b6e71383eb77472a35d7d78fed21e345d134a +SIZE (qemu/3.1.0/qemu-keycodemapdb-10739aa_GH0.tar.gz) = 47895 Property changes on: emulators/qemu-user-static/distinfo ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: emulators/qemu-user-static/files/qemu_user_static.in =================================================================== --- emulators/qemu-user-static/files/qemu_user_static.in (nonexistent) +++ emulators/qemu-user-static/files/qemu_user_static.in (working copy) @@ -0,0 +1,164 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: %%NAME%% +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable `%%NAME%%': +# +# %%NAME%%_enable="YES" +# + +. /etc/rc.subr + +name=%%NAME%% +rcvar=%%NAME%%_enable + +# read configuration and set defaults +load_rc_config "$name" + +: ${%%NAME%%_enable:="NO"} + +BINMISCCTL=/usr/sbin/binmiscctl +QEMU_DIR=%%PREFIX%%/bin +QEMU_PREFIX=qemu- +QEMU_SUFFIX=-static + +start_cmd=%%NAME%%_start +stop_cmd=%%NAME%%_stop +extra_commands=list +list_cmd="${BINMISCCTL} list" + +%%NAME%%_start() +{ + # register arm interpreter styled 'arm' + interpreter=${QEMU_DIR}/${QEMU_PREFIX}arm${QEMU_SUFFIX} + if [ -x "${interpreter}" ]; then + ${BINMISCCTL} add arm --interpreter "${interpreter}" \ + --magic "\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00" \ + --mask "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff" \ + --size 20 --set-enabled + else + echo "$0: interpreter ${interpreter} not found, cannot register." + fi + # register armv6 interpreter styled 'arm' + interpreter=${QEMU_DIR}/${QEMU_PREFIX}arm${QEMU_SUFFIX} + if [ -x "${interpreter}" ]; then + ${BINMISCCTL} add armv6 --interpreter "${interpreter}" \ + --magic "\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00" \ + --mask "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff" \ + --size 20 --set-enabled + else + echo "$0: interpreter ${interpreter} not found, cannot register." + fi + # register armv7 interpreter styled 'arm' + interpreter=${QEMU_DIR}/${QEMU_PREFIX}arm${QEMU_SUFFIX} + if [ -x "${interpreter}" ]; then + ${BINMISCCTL} add armv7 --interpreter "${interpreter}" \ + --magic "\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00" \ + --mask "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff" \ + --size 20 --set-enabled + else + echo "$0: interpreter ${interpreter} not found, cannot register." + fi + # register aarch64 interpreter styled 'aarch64' + interpreter=${QEMU_DIR}/${QEMU_PREFIX}aarch64${QEMU_SUFFIX} + if [ -x "${interpreter}" ]; then + ${BINMISCCTL} add aarch64 --interpreter "${interpreter}" \ + --magic "\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00" \ + --mask "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff" \ + --size 20 --set-enabled + else + echo "$0: interpreter ${interpreter} not found, cannot register." + fi + # register mips interpreter styled 'mips' + interpreter=${QEMU_DIR}/${QEMU_PREFIX}mips${QEMU_SUFFIX} + if [ -x "${interpreter}" ]; then + ${BINMISCCTL} add mips --interpreter "${interpreter}" \ + --magic "\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08" \ + --mask "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff" \ + --size 20 --set-enabled + else + echo "$0: interpreter ${interpreter} not found, cannot register." + fi + # register mipsle interpreter styled 'mipsel' + interpreter=${QEMU_DIR}/${QEMU_PREFIX}mipsel${QEMU_SUFFIX} + if [ -x "${interpreter}" ]; then + ${BINMISCCTL} add mipsel --interpreter "${interpreter}" \ + --magic "\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00" \ + --mask "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff" \ + --size 20 --set-enabled + else + echo "$0: interpreter ${interpreter} not found, cannot register." + fi + # register mips64 interpreter styled 'mips64' + interpreter=${QEMU_DIR}/${QEMU_PREFIX}mips64${QEMU_SUFFIX} + if [ -x "${interpreter}" ]; then + ${BINMISCCTL} add mips64 --interpreter "${interpreter}" \ + --magic "\x7f\x45\x4c\x46\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08" \ + --mask "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff" \ + --size 20 --set-enabled + else + echo "$0: interpreter ${interpreter} not found, cannot register." + fi + # register powerpc interpreter styled 'ppc' + interpreter=${QEMU_DIR}/${QEMU_PREFIX}ppc${QEMU_SUFFIX} + if [ -x "${interpreter}" ]; then + ${BINMISCCTL} add powerpc --interpreter "${interpreter}" \ + --magic "\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14" \ + --mask "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff" \ + --size 20 --set-enabled + else + echo "$0: interpreter ${interpreter} not found, cannot register." + fi + # register powerpc64 interpreter styled 'ppc64' + interpreter=${QEMU_DIR}/${QEMU_PREFIX}ppc64${QEMU_SUFFIX} + if [ -x "${interpreter}" ]; then + ${BINMISCCTL} add powerpc64 --interpreter "${interpreter}" \ + --magic "\x7f\x45\x4c\x46\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x15" \ + --mask "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff" \ + --size 20 --set-enabled + else + echo "$0: interpreter ${interpreter} not found, cannot register." + fi + # register riscv64 interpreter styled 'riscv64' + interpreter=${QEMU_DIR}/${QEMU_PREFIX}riscv64${QEMU_SUFFIX} + if [ -x "${interpreter}" ]; then + ${BINMISCCTL} add riscv64 --interpreter "${interpreter}" \ + --magic "\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00" \ + --mask "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff" \ + --size 20 --set-enabled + else + echo "$0: interpreter ${interpreter} not found, cannot register." + fi + # register sparc64 interpreter styled 'sparc64' + interpreter=${QEMU_DIR}/${QEMU_PREFIX}sparc64${QEMU_SUFFIX} + if [ -x "${interpreter}" ]; then + ${BINMISCCTL} add sparc64 --interpreter "${interpreter}" \ + --magic "\x7f\x45\x4c\x46\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2b" \ + --mask "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff" \ + --size 20 --set-enabled + else + echo "$0: interpreter ${interpreter} not found, cannot register." + fi +} + +%%NAME%%_stop() +{ + ${BINMISCCTL} remove arm + ${BINMISCCTL} remove armv6 + ${BINMISCCTL} remove armv7 + ${BINMISCCTL} remove aarch64 + ${BINMISCCTL} remove mips + ${BINMISCCTL} remove mips64 + ${BINMISCCTL} remove mipsel + ${BINMISCCTL} remove powerpc + ${BINMISCCTL} remove powerpc64 + ${BINMISCCTL} remove riscv64 + ${BINMISCCTL} remove sparc64 +} + +run_rc_command "$1" Property changes on: emulators/qemu-user-static/files/qemu_user_static.in ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: emulators/qemu-user-static/pkg-descr =================================================================== --- emulators/qemu-user-static/pkg-descr (nonexistent) +++ emulators/qemu-user-static/pkg-descr (working copy) @@ -0,0 +1,22 @@ +QEMU is a FAST! processor emulator using dynamic translation to achieve +good emulation speed. +QEMU has two operating modes: + + * Full system emulation. In this mode, QEMU emulates a full system +(for example a PC), including a processor and various peripherials. +It can be used to launch different Operating Systems without rebooting +the PC or to debug system code. + * User mode emulation (Linux host only). In this mode, QEMU can launch +Linux processes compiled for one CPU on another CPU. It can be used to +launch the Wine Windows API emulator or to ease cross-compilation and +cross-debugging. + +As QEMU requires no host kernel patches to run, it is very safe and easy to use. + +This port builds static bsd-user targets named like qemu-mips-static. While +still being experimental, people have already built many armv6/mips/mips64 ports +using these and, e.g., poudriere. Some notes are also here: + + http://wiki.freebsd.org/QemuUserModeHowTo + +WWW: http://wiki.qemu.org/Main_Page Property changes on: emulators/qemu-user-static/pkg-descr ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: emulators/qemu-user-static/pkg-plist =================================================================== --- emulators/qemu-user-static/pkg-plist (nonexistent) +++ emulators/qemu-user-static/pkg-plist (working copy) @@ -0,0 +1,13 @@ +%%64BIT%%bin/qemu-aarch64-static +bin/qemu-arm-static +bin/qemu-i386-static +bin/qemu-mips-static +%%64BIT%%bin/qemu-mips64-static +%%64BIT%%bin/qemu-mips64el-static +bin/qemu-mipsel-static +bin/qemu-ppc-static +%%64BIT%%bin/qemu-ppc64-static +%%64BIT%%bin/qemu-riscv64-static +bin/qemu-sparc-static +%%64BIT%%bin/qemu-sparc64-static +%%64BIT%%bin/qemu-x86_64-static Property changes on: emulators/qemu-user-static/pkg-plist ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property