pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
qemu-neo1973: Drop, unmaintained and broken
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Sat Sep 24 19:13:59 2016 +0200
Changeset: abf890fd4056ad03b790ed7aecf9c9ea5bcfa4e8
Removed Files:
qemu-neo1973/DESCR
qemu-neo1973/MESSAGE
qemu-neo1973/Makefile
qemu-neo1973/NOTES
qemu-neo1973/PLIST
qemu-neo1973/TODO
qemu-neo1973/distinfo
qemu-neo1973/patches/patch-aa
qemu-neo1973/patches/patch-ab
qemu-neo1973/patches/patch-ac
qemu-neo1973/patches/patch-ad
qemu-neo1973/patches/patch-ag
qemu-neo1973/patches/patch-ak
qemu-neo1973/patches/patch-am
qemu-neo1973/patches/patch-ao
qemu-neo1973/patches/patch-au
qemu-neo1973/patches/patch-av
qemu-neo1973/patches/patch-aw
qemu-neo1973/patches/patch-ax
qemu-neo1973/patches/patch-ay
qemu-neo1973/patches/patch-ba
qemu-neo1973/patches/patch-bb
qemu-neo1973/patches/patch-bc
qemu-neo1973/patches/patch-bd
qemu-neo1973/patches/patch-be
qemu-neo1973/patches/patch-ua
qemu-neo1973/patches/patch-ub
qemu-neo1973/patches/patch-ue
qemu-neo1973/patches/patch-uf
qemu-neo1973/patches/patch-ug
qemu-neo1973/patches/patch-uh
qemu-neo1973/patches/patch-wu
qemu-neo1973/patches/patch-wv
qemu-neo1973/patches/patch-ww
qemu-neo1973/patches/patch-wx
Log Message:
qemu-neo1973: Drop, unmaintained and broken
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=abf890fd4056ad03b790ed7aecf9c9ea5bcfa4e8
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
qemu-neo1973/DESCR | 17 --
qemu-neo1973/MESSAGE | 11 -
qemu-neo1973/Makefile | 112 --------
qemu-neo1973/NOTES | 20 --
qemu-neo1973/PLIST | 68 -----
qemu-neo1973/TODO | 4 -
qemu-neo1973/distinfo | 33 ---
qemu-neo1973/patches/patch-aa | 26 --
qemu-neo1973/patches/patch-ab | 28 --
qemu-neo1973/patches/patch-ac | 33 ---
qemu-neo1973/patches/patch-ad | 15 --
qemu-neo1973/patches/patch-ag | 84 ------
qemu-neo1973/patches/patch-ak | 34 ---
qemu-neo1973/patches/patch-am | 13 -
qemu-neo1973/patches/patch-ao | 170 ------------
qemu-neo1973/patches/patch-au | 29 --
qemu-neo1973/patches/patch-av | 27 --
qemu-neo1973/patches/patch-aw | 22 --
qemu-neo1973/patches/patch-ax | 24 --
qemu-neo1973/patches/patch-ay | 92 -------
qemu-neo1973/patches/patch-ba | 47 ----
qemu-neo1973/patches/patch-bb | 22 --
qemu-neo1973/patches/patch-bc | 13 -
qemu-neo1973/patches/patch-bd | 31 ---
qemu-neo1973/patches/patch-be | 15 --
qemu-neo1973/patches/patch-ua | 40 ---
qemu-neo1973/patches/patch-ub | 12 -
qemu-neo1973/patches/patch-ue | 31 ---
qemu-neo1973/patches/patch-uf | 16 --
qemu-neo1973/patches/patch-ug | 607 ------------------------------------------
qemu-neo1973/patches/patch-uh | 17 --
qemu-neo1973/patches/patch-wu | 12 -
qemu-neo1973/patches/patch-wv | 13 -
qemu-neo1973/patches/patch-ww | 59 ----
qemu-neo1973/patches/patch-wx | 13 -
35 files changed, 1810 deletions(-)
diffs:
diff --git a/qemu-neo1973/DESCR b/qemu-neo1973/DESCR
deleted file mode 100644
index 2b84b64..0000000
--- a/qemu-neo1973/DESCR
+++ /dev/null
@@ -1,17 +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 peripherals.
- 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.
-
- * This package has been changed to use OpenMoko's Qemu emulating
- the Neo1973 phone.
-
-
-Lonnie Mendez's USB forward patch integrated, so in Qemu you can usb_add.
diff --git a/qemu-neo1973/MESSAGE b/qemu-neo1973/MESSAGE
deleted file mode 100644
index c07db12..0000000
--- a/qemu-neo1973/MESSAGE
+++ /dev/null
@@ -1,11 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE,v 1.3 2008/04/13 12:29:48 noud4 Exp $
-fetch u-boot, kernel and filesystem by
-
-cd ${NEO1973_PREFIX}/libexec; openmoko/download.sh
-(or use wip/qemu-neo1973-images)
-
-flash these by
-
-cd ${NEO1973_PREFIX}/libexec; openmoko/flash.sh
-===========================================================================
diff --git a/qemu-neo1973/Makefile b/qemu-neo1973/Makefile
deleted file mode 100644
index 984ac65..0000000
--- a/qemu-neo1973/Makefile
+++ /dev/null
@@ -1,112 +0,0 @@
-# $NetBSD: Makefile,v 1.10 2014/02/11 21:04:07 noud4 Exp $
-#
-
-DISTNAME= qemu-neo1973-4412
-CATEGORIES= emulators
-MASTER_SITES= http://wiki.openmoko.org/
-SVN_REPOSITORY= https://svn.openmoko.org/trunk/src/host/qemu-neo1973
-#NO_CHECKSUM= yes
-
-MAINTAINER= noud4%users.sourceforge.net@localhost
-HOMEPAGE= http://wiki.openmoko.org/wiki/OpenMoko_under_QEMU
-COMMENT= Qemu OpenMoko Neo1973 phone emulator
-
-BROKEN= please convert this to svn-package.mk
-NOT_FOR_PLATFORM= NetBSD-1.[0-6]*-*
-
-
-USE_TOOLS+= gmake perl:build
-USE_TOOLS+= tar gzip
-HAS_CONFIGURE= yes
-
-BUILD_DEPENDS+= subversion-base>=1.4.2:../../devel/subversion-base
-DEPENDS+= wget>=1.10.2:../../net/wget
-DEPENDS+= lynx>=2.8.5.5:../../www/lynx
-DEPENDS+= netpbm>=10.34:../../graphics/netpbm
-BUILD_DEPENDS+= texi2html-[0-9]*:../../textproc/texi2html
-
-.include "../../mk/bsd.prefs.mk"
-
-GCC_REQD+= 3.0
-
-.if !empty(MACHINE_PLATFORM:MNetBSD-4*)
-USE_PKGSRC_GCC= yes
-.endif
-
-NEO1973_PREFIX= ${PREFIX}/${PKGBASE}
-PLIST_SUBST+= NEO1973_PREFIX=${PKGBASE}
-MESSAGE_SUBST+= NEO1973_PREFIX=${NEO1973_PREFIX}
-
-CONFIGURE_ARGS+= --prefix=${NEO1973_PREFIX:Q}
-CONFIGURE_ARGS+= --interp-prefix=${NEO1973_PREFIX:Q}/share/qemu
-CONFIGURE_ARGS+= --target-list=arm-softmmu
-CONFIGURE_ENV+= PKGMANDIR=/${PKGMANDIR}
-.if ${OPSYS} == "NetBSD" && !empty(OS_VERSION:M4.99.[0-9]*)
-CONFIGURE_ENV+= FORCE_AIO="yes"
-.endif
-
-SUBST_CLASSES+= snd
-SUBST_STAGE.snd= post-patch
-SUBST_FILES.snd= audio/ossaudio.c
-SUBST_SED.snd= -e s,/dev/dsp,${DEVOSSAUDIO:Q},g
-SUBST_MESSAGE.snd= Fixing hardcoded audio device.
-
-SUBST_CLASSES+= smbd
-SUBST_STAGE.smbd= post-patch
-SUBST_FILES.smbd= vl.c
-SUBST_SED.smbd= -e s,/usr/sbin/smbd,${PREFIX:Q}/sbin/smbd,g
-SUBST_MESSAGE.smbd= Fixing hardcoded paths.
-
-SUBST_CLASSES+= moko
-SUBST_STAGE.moko= post-patch
-SUBST_FILES.moko= openmoko/Makefile openmoko/flash.sh
-SUBST_SED.moko= -e s,@@PREFIX@@,${PREFIX:Q},g
-SUBST_MESSAGE.moko= Fixing OpenMoko paths.
-
-REPLACE_PERL+= texi2pod.pl
-
-# Remove -march/-mcpu from CFLAGS, otherwise it will fail
-# to build in the SSE code.
-BUILDLINK_TRANSFORM+= rm-optarg:-march rm-optarg:-mcpu
-
-# Does not build with the stack protector
-.if ${OPSYS} == "DragonFly"
-CFLAGS+= -fno-stack-protector
-.endif
-
-SUBDIR= ${PKGNAME}
-WRKSRC= ${WRKDIR}/${SUBDIR}
-
-.include "../../mk/compiler.mk"
-
-.if !empty(CC_VERSION:Mgcc-4*)
-CONFIGURE_ARGS+= --disable-gcc-check
-.endif
-
-do-fetch:
- if [ ! -f ${DISTDIR}/${SUBDIR:Q}.tar.gz ]; then \
- cd ${DISTDIR:Q}; \
- svn export -r ${PKGVERSION} ${SVN_REPOSITORY} ${SUBDIR:Q}; \
- tar -czf ${SUBDIR:Q}.tar.gz ${SUBDIR:Q}; \
- ${RM} -r ${DISTDIR}/${SUBDIR:Q}; \
- fi
-
-post-install:
- ${MV} ${NEO1973_PREFIX:Q}/bin/qemu-system-arm ${NEO1973_PREFIX:Q}/bin/qemu-neo1973
- ${MV} ${NEO1973_PREFIX:Q}/bin/qemu-img ${NEO1973_PREFIX:Q}/bin/qemu-neo1973-img
- ${LN} -sf ../${PKGBASE}/bin/qemu-neo1973 ${PREFIX:Q}/bin/qemu-neo1973
-
- ${INSTALL_DATA_DIR} ${NEO1973_PREFIX:Q}/libexec/openmoko/
- ${INSTALL_DATA} ${WRKSRC}/openmoko/Makefile ${NEO1973_PREFIX:Q}/libexec/openmoko
- ${INSTALL_SCRIPT} ${WRKSRC}/openmoko/download.sh ${NEO1973_PREFIX:Q}/libexec/openmoko
- ${INSTALL_DATA} ${WRKSRC}/openmoko/env ${NEO1973_PREFIX:Q}/libexec/openmoko
- ${INSTALL_SCRIPT} ${WRKSRC}/openmoko/flash.sh ${NEO1973_PREFIX:Q}/libexec/openmoko
-
-.include "../../devel/SDL/buildlink3.mk"
-.include "../../lang/python/application.mk"
-.include "../../mk/oss.buildlink3.mk"
-.include "../../mk/pthread.buildlink3.mk"
-.include "../../mk/bsd.pkg.mk"
-
-# ln -s /usr/pkg/bin/python2.X /usr/pkg/bin/python
-# cd /usr/pkg/qemu-neo1973/libexec; ../bin/qemu-neo1973 openmoko/openmoko-flash.image -kernel openmoko/openmoko-kernel.bin -show-cursor -monitor stdio -M gta01 -m 130 -mtdblock openmoko/openmoko-flash.image -kernel openmoko/openmoko-kernel.bin -usb -usbdevice host:07a6:8511 -show-cursor -monitor stdio -usbdevice keyboard -serial telnet:localhost:1200,server
diff --git a/qemu-neo1973/NOTES b/qemu-neo1973/NOTES
deleted file mode 100644
index 665e274..0000000
--- a/qemu-neo1973/NOTES
+++ /dev/null
@@ -1,20 +0,0 @@
-IMAGES:
-
-working images from
-http://buildhost.openmoko.org/daily/neo1973/deploy/glibc/images/neo1973/
-
-uImage-2.6.24+svnr4301-r4251-r5-om-gta01.bin
-u-boot-gta01bv4-1.3.1+svnr4297+gitb29661fc1151077776454288051bc9a488351ce8-r3.bin
-Openmoko-openmoko-devel-image-glibc-ipk-P1-Snapshot-20080404-om-gta01.rootfs.jffs2
-
-
-USB:
-
-# usbdevs -v
-Controller /dev/usb0:
-addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), VIA Technologies(0x1106), rev 1.00
- port 1 addr 2: full speed, power 160 mA, config 1, USB To LAN Converter(0x8511), ADMtek(0x07a6), rev 1.01, serial 0001
-
-so you're able to
-
- -usb -usbdevice host:07a6:8511
diff --git a/qemu-neo1973/PLIST b/qemu-neo1973/PLIST
deleted file mode 100644
index 02fb6cd..0000000
--- a/qemu-neo1973/PLIST
+++ /dev/null
@@ -1,68 +0,0 @@
-@comment $NetBSD: PLIST,v 1.3 2009/10/11 10:45:12 thomasklausner Exp $
-bin/qemu-neo1973
-${NEO1973_PREFIX}/bin/flash2raw
-${NEO1973_PREFIX}/bin/flash2raw.akita
-${NEO1973_PREFIX}/bin/flash2raw.borzoi
-${NEO1973_PREFIX}/bin/flash2raw.neo
-${NEO1973_PREFIX}/bin/flash2raw.spitz
-${NEO1973_PREFIX}/bin/flash2raw.terrier
-${NEO1973_PREFIX}/bin/qemu-neo1973
-${NEO1973_PREFIX}/bin/qemu-neo1973-img
-${NEO1973_PREFIX}/bin/raw2flash
-${NEO1973_PREFIX}/bin/raw2flash.akita
-${NEO1973_PREFIX}/bin/raw2flash.borzoi
-${NEO1973_PREFIX}/bin/raw2flash.neo
-${NEO1973_PREFIX}/bin/raw2flash.spitz
-${NEO1973_PREFIX}/bin/raw2flash.terrier
-${NEO1973_PREFIX}/libexec/openmoko/Makefile
-${NEO1973_PREFIX}/libexec/openmoko/download.sh
-${NEO1973_PREFIX}/libexec/openmoko/flash.sh
-${NEO1973_PREFIX}/libexec/openmoko/env
-${NEO1973_PREFIX}/man/man1/qemu.1
-${NEO1973_PREFIX}/man/man1/qemu-img.1
-${NEO1973_PREFIX}/share/doc/qemu/qemu-doc.html
-${NEO1973_PREFIX}/share/doc/qemu/qemu-tech.html
-${NEO1973_PREFIX}/share/qemu/bios.bin
-${NEO1973_PREFIX}/share/qemu/keymaps/ar
-${NEO1973_PREFIX}/share/qemu/keymaps/common
-${NEO1973_PREFIX}/share/qemu/keymaps/da
-${NEO1973_PREFIX}/share/qemu/keymaps/de
-${NEO1973_PREFIX}/share/qemu/keymaps/de-ch
-${NEO1973_PREFIX}/share/qemu/keymaps/en-gb
-${NEO1973_PREFIX}/share/qemu/keymaps/en-us
-${NEO1973_PREFIX}/share/qemu/keymaps/es
-${NEO1973_PREFIX}/share/qemu/keymaps/et
-${NEO1973_PREFIX}/share/qemu/keymaps/fi
-${NEO1973_PREFIX}/share/qemu/keymaps/fo
-${NEO1973_PREFIX}/share/qemu/keymaps/fr
-${NEO1973_PREFIX}/share/qemu/keymaps/fr-be
-${NEO1973_PREFIX}/share/qemu/keymaps/fr-ca
-${NEO1973_PREFIX}/share/qemu/keymaps/fr-ch
-${NEO1973_PREFIX}/share/qemu/keymaps/hr
-${NEO1973_PREFIX}/share/qemu/keymaps/hu
-${NEO1973_PREFIX}/share/qemu/keymaps/is
-${NEO1973_PREFIX}/share/qemu/keymaps/it
-${NEO1973_PREFIX}/share/qemu/keymaps/ja
-${NEO1973_PREFIX}/share/qemu/keymaps/lt
-${NEO1973_PREFIX}/share/qemu/keymaps/lv
-${NEO1973_PREFIX}/share/qemu/keymaps/mk
-${NEO1973_PREFIX}/share/qemu/keymaps/modifiers
-${NEO1973_PREFIX}/share/qemu/keymaps/nl
-${NEO1973_PREFIX}/share/qemu/keymaps/nl-be
-${NEO1973_PREFIX}/share/qemu/keymaps/no
-${NEO1973_PREFIX}/share/qemu/keymaps/pl
-${NEO1973_PREFIX}/share/qemu/keymaps/pt
-${NEO1973_PREFIX}/share/qemu/keymaps/pt-br
-${NEO1973_PREFIX}/share/qemu/keymaps/ru
-${NEO1973_PREFIX}/share/qemu/keymaps/sl
-${NEO1973_PREFIX}/share/qemu/keymaps/sv
-${NEO1973_PREFIX}/share/qemu/keymaps/th
-${NEO1973_PREFIX}/share/qemu/keymaps/tr
-${NEO1973_PREFIX}/share/qemu/openbios-sparc32
-${NEO1973_PREFIX}/share/qemu/ppc_rom.bin
-${NEO1973_PREFIX}/share/qemu/pxe-ne2k_pci.bin
-${NEO1973_PREFIX}/share/qemu/pxe-pcnet.bin
-${NEO1973_PREFIX}/share/qemu/pxe-rtl8139.bin
-${NEO1973_PREFIX}/share/qemu/vgabios-cirrus.bin
-${NEO1973_PREFIX}/share/qemu/vgabios.bin
-${NEO1973_PREFIX}/share/qemu/video.x
diff --git a/qemu-neo1973/TODO b/qemu-neo1973/TODO
deleted file mode 100644
index 143e500..0000000
--- a/qemu-neo1973/TODO
+++ /dev/null
@@ -1,4 +0,0 @@
-
-given
-hw/wm8750.c:24: error: parse error before "QEMUSoundCard"
-all audio is disabled.
diff --git a/qemu-neo1973/distinfo b/qemu-neo1973/distinfo
deleted file mode 100644
index a053f6a..0000000
--- a/qemu-neo1973/distinfo
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD: distinfo,v 1.7 2008/05/01 14:34:11 noud4 Exp $
-
-SHA1 (qemu-neo1973-4412.tar.gz) = b6844bfcb2941c0eb89af0c11be5339d6911c26a
-RMD160 (qemu-neo1973-4412.tar.gz) = c8e5cfa0c9994b2234fb8f8091fb9b191d1e27a6
-Size (qemu-neo1973-4412.tar.gz) = 3184007 bytes
-SHA1 (patch-aa) = 455575215bad8864da285e1979da9ff7d8476a24
-SHA1 (patch-ab) = e9789a5526f4dc06993053601d53ce7358f0cbb4
-SHA1 (patch-ac) = 895703d61200250f98978c11ad238db642185b27
-SHA1 (patch-ad) = ac69a03e4945e8c8fd5aadca070b876d0970910d
-SHA1 (patch-ag) = c1cb278081a4644c2e004089082e2a7e444c89e9
-SHA1 (patch-ak) = c3d5fbc573a8ebdb82000f55f71a18da0cb76237
-SHA1 (patch-am) = a22a3b23284c377afa8113768d68c8ef40c514f9
-SHA1 (patch-ao) = eb2a07a24a7a1c57fb7f191cff41bfdbe8b00d37
-SHA1 (patch-au) = 7674469b20c9b19335c1836f28373aabdb60d354
-SHA1 (patch-av) = 715e9680d70c1aa1c83bda0270125144a26d6140
-SHA1 (patch-aw) = f34c93683c9b9c819d3ba7c8c597dab3c41930c2
-SHA1 (patch-ax) = 66b060005ecbf9fd0451f7960e81eccbabf959ca
-SHA1 (patch-ay) = 0f6e190ece6d2ffe5f36c3986eff732eaef5a948
-SHA1 (patch-ba) = 7c5043a39405f52b512e479a46fc76108580b7bc
-SHA1 (patch-bb) = b762467b7f6ce84d26c8f524832c74d9cd894883
-SHA1 (patch-bc) = a1e87c058000c244e390d8243df9511fa120ab88
-SHA1 (patch-bd) = 9d959f877283e8d92f54cfc21f371d41a16afca6
-SHA1 (patch-be) = e1cd09c7438c772b32a9f6749bfe10dec307b4af
-SHA1 (patch-ua) = a076aacf2829543bf80d327341ea19ed898a4d72
-SHA1 (patch-ub) = e1824622fa51b9a69dc421b60f53c91ba8f6384a
-SHA1 (patch-ue) = 205a5e00c871030ae5ea372363e724b1193ae9ae
-SHA1 (patch-uf) = 8b256345f9af4e491a1301dcc62d9ebd70809b19
-SHA1 (patch-ug) = 1a97e241a2ec37167b6347885d24c08efa46e15e
-SHA1 (patch-uh) = 5d3a6129e7650b7aaee79ecb7fdd28e649a5b688
-SHA1 (patch-wu) = 943389ce0a434b72d23b92857b2d66ab6bc6adda
-SHA1 (patch-wv) = 7df15acfd6e151c83428a4e01b53a4d659a31c12
-SHA1 (patch-ww) = d607de4d02e51d3d0fbf841c04284662db490f9c
-SHA1 (patch-wx) = 89bad232fae6510f5689d9eda2850d08179537f8
diff --git a/qemu-neo1973/patches/patch-aa b/qemu-neo1973/patches/patch-aa
deleted file mode 100644
index 254967f..0000000
--- a/qemu-neo1973/patches/patch-aa
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD: patch-aa,v 1.1.1.1 2007/07/31 18:18:57 noud4 Exp $
-
---- bswap.h.orig Sun Nov 14 15:51:33 2004
-+++ bswap.h
-@@ -5,6 +5,12 @@
-
- #include <inttypes.h>
-
-+#ifdef HAVE_MACHINE_BSWAP_H
-+#include <sys/endian.h>
-+#include <sys/types.h>
-+#include <machine/bswap.h>
-+#else
-+
- #ifdef HAVE_BYTESWAP_H
- #include <byteswap.h>
- #else
-@@ -57,6 +63,8 @@ static inline uint64_t bswap64(uint64_t
- {
- return bswap_64(x);
- }
-+
-+#endif /* ! HAVE_MACHINE_BSWAP_H */
-
- static inline void bswap16s(uint16_t *s)
- {
diff --git a/qemu-neo1973/patches/patch-ab b/qemu-neo1973/patches/patch-ab
deleted file mode 100644
index f612760..0000000
--- a/qemu-neo1973/patches/patch-ab
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD: patch-ab,v 1.1 2008/04/27 10:08:48 noud4 Exp $
-
---- Makefile.target.orig 2008-01-06 20:38:41.000000000 +0100
-+++ Makefile.target 2007-12-18 20:23:05.000000000 +0100
-@@ -115,6 +115,10 @@
- OP_CFLAGS+=$(call cc-option, -fno-align-functions, $(call cc-option, -malign-functions=0, ""))
- OP_CFLAGS+=$(call cc-option, -fno-section-anchors, "")
-
-+ifdef STACK_PROTECTOR_PRESENT
-+OP_CFLAGS += -fno-stack-protector
-+endif
-+
- ifeq ($(ARCH),i386)
- HELPER_CFLAGS+=-fomit-frame-pointer
- OP_CFLAGS+=-mpreferred-stack-boundary=2 -fomit-frame-pointer
-@@ -537,10 +541,12 @@
- ifndef CONFIG_DARWIN
- ifndef CONFIG_WIN32
- ifndef CONFIG_SOLARIS
-+ifndef CONFIG_DRAGONFLY
- VL_LIBS+=-lutil
- endif
- endif
- endif
-+endif
- ifdef TARGET_GPROF
- vl.o: BASE_CFLAGS+=-p
- VL_LDFLAGS+=-p
diff --git a/qemu-neo1973/patches/patch-ac b/qemu-neo1973/patches/patch-ac
deleted file mode 100644
index 7e39f7b..0000000
--- a/qemu-neo1973/patches/patch-ac
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD: patch-ac,v 1.2 2007/10/07 20:59:32 noud4 Exp $
-
---- vl.c.orig 2007-07-19 22:00:53.000000000 +0200
-+++ vl.c 2007-07-19 22:23:29.000000000 +0200
-@@ -44,7 +44,7 @@
- #include <arpa/inet.h>
- #ifdef _BSD
- #include <sys/stat.h>
--#ifndef __APPLE__
-+#ifndef _BSD
- #include <libutil.h>
- #endif
- #elif defined (__GLIBC__) && defined (__FreeBSD_kernel__)
-@@ -1953,6 +1953,9 @@
-
- static int pp_ioctl(CharDriverState *chr, int cmd, void *arg)
- {
-+#ifdef __NetBSD__
-+ return ENOTSUP;
-+#endif
- ParallelCharDriver *drv = chr->opaque;
- int fd = drv->fd;
- uint8_t b;
-@@ -2041,6 +2044,9 @@
-
- static CharDriverState *qemu_chr_open_pp(const char *filename)
- {
-+#ifdef __NetBSD__
-+ return ENOTSUP;
-+#endif
- CharDriverState *chr;
- ParallelCharDriver *drv;
- int fd;
diff --git a/qemu-neo1973/patches/patch-ad b/qemu-neo1973/patches/patch-ad
deleted file mode 100644
index b936c3c..0000000
--- a/qemu-neo1973/patches/patch-ad
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-ad,v 1.1 2008/04/27 10:08:48 noud4 Exp $
-
---- block.c.orig 2007-02-05 23:01:54 +0000
-+++ block.c
-@@ -29,8 +29,10 @@
- #include <sys/stat.h>
- #include <sys/ioctl.h>
- #include <sys/queue.h>
-+#ifndef __DragonFly__
- #include <sys/disk.h>
- #endif
-+#endif
-
- #define SECTOR_BITS 9
- #define SECTOR_SIZE (1 << SECTOR_BITS)
diff --git a/qemu-neo1973/patches/patch-ag b/qemu-neo1973/patches/patch-ag
deleted file mode 100644
index 124b1d1..0000000
--- a/qemu-neo1973/patches/patch-ag
+++ /dev/null
@@ -1,84 +0,0 @@
-$NetBSD: patch-ag,v 1.2 2008/04/13 12:29:48 noud4 Exp $
-
---- configure.orig 2008-01-15 00:24:21.000000000 +0100
-+++ configure 2007-12-27 22:54:21.000000000 +0100
-@@ -29,7 +29,7 @@
- make="make"
- install="install"
- strip="strip"
--cpu=`uname -m`
-+cpu=`uname -p`
- target_list=""
- case "$cpu" in
- i386|i486|i586|i686|i86pc|BePC)
-@@ -44,7 +44,7 @@
- alpha)
- cpu="alpha"
- ;;
-- "Power Macintosh"|ppc|ppc64)
-+ "Power Macintosh"|ppc|ppc64|powerpc)
- cpu="powerpc"
- ;;
- mips)
-@@ -141,6 +141,12 @@
- kqemu="yes"
- fi
- ;;
-+DragonFly)
-+bsd="yes"
-+oss="yes"
-+dragonfly="yes"
-+;;
-+
- NetBSD)
- bsd="yes"
- oss="yes"
-@@ -495,6 +501,16 @@
- fi
- fi
-
-+# Check for stack protector
-+cat > $TMPC <<EOF
-+extern int foo;
-+EOF
-+if "$cc" -o $TMPE $TMPC -fno-stack-protector 2> /dev/null ; then
-+ stack_protector_present="yes"
-+else
-+ stack_protector_present="no"
-+fi
-+
- #
- # Solaris specific configure tool chain decisions
- #
-@@ -697,7 +713,7 @@
- if test -z "$prefix" ; then
- prefix="/usr/local"
- fi
-- mansuffix="/share/man"
-+ mansuffix="/$PKGMANDIR"
- datasuffix="/share/qemu"
- docsuffix="/share/doc/qemu"
- binsuffix="/bin"
-@@ -908,6 +924,11 @@
- EOF
- if $cc -o $TMPE $TMPC 2> /dev/null ; then
- echo "#define HAVE_BYTESWAP_H 1" >> $config_h
-+elif test -f "/usr/include/machine/bswap.h" ; then
-+ echo "#define HAVE_MACHINE_BSWAP_H 1" >> $config_h
-+fi
-+if test "$dragonfly" = "yes" ; then
-+ echo "CONFIG_DRAGONFLY=yes" >> $config_mak
- fi
- fi
- if test "$darwin" = "yes" ; then
-@@ -1032,6 +1053,10 @@
- echo "#define _BSD 1" >> $config_h
- fi
-
-+if [ "$stack_protector_present" = "yes" ] ; then
-+ echo "STACK_PROTECTOR_PRESENT=yes" >> $config_mak
-+fi
-+
- echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h
-
- if test "$gadgetfs" = "yes" ; then
diff --git a/qemu-neo1973/patches/patch-ak b/qemu-neo1973/patches/patch-ak
deleted file mode 100644
index 8dee2b8..0000000
--- a/qemu-neo1973/patches/patch-ak
+++ /dev/null
@@ -1,34 +0,0 @@
-$NetBSD: patch-ak,v 1.3 2008/04/13 12:29:48 noud4 Exp $
-
---- Makefile 2008-01-15 00:24:21.000000000 +0100
-+++ Makefile.new 2007-12-27 22:29:27.000000000 +0100
-@@ -190,23 +190,23 @@
- common de-ch es fo fr-ca hu ja mk nl-be pt sl tr
-
- install-doc: $(DOCS)
-- mkdir -p "$(DESTDIR)$(docdir)"
-- $(INSTALL) -m 644 qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
-+ $(BSD_INSTALL_MAN_DIR) "$(DESTDIR)$(docdir)"
-+ $(BSD_INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
- ifndef CONFIG_WIN32
- mkdir -p "$(DESTDIR)$(mandir)/man1"
- $(INSTALL) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
- endif
-
- install: all $(if $(BUILD_DOCS),install-doc)
-- mkdir -p "$(DESTDIR)$(bindir)"
-+ $(BSD_INSTALL_PROGRAM_DIR) "$(DESTDIR)$(bindir)"
- ifneq ($(TOOLS),)
-- $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)"
-+ $(BSD_INSTALL_PROGRAM) $(TOOLS) "$(DESTDIR)$(bindir)"
- endif
-- mkdir -p "$(DESTDIR)$(datadir)"
-+ $(BSD_INSTALL_DATA_DIR) "$(DESTDIR)$(datadir)"
- for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
- video.x openbios-sparc32 pxe-ne2k_pci.bin \
- pxe-rtl8139.bin pxe-pcnet.bin; do \
-- $(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
-+ $(BSD_INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
- done
- ifndef CONFIG_WIN32
- mkdir -p "$(DESTDIR)$(datadir)/keymaps"
diff --git a/qemu-neo1973/patches/patch-am b/qemu-neo1973/patches/patch-am
deleted file mode 100644
index a8df23f..0000000
--- a/qemu-neo1973/patches/patch-am
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-am,v 1.1.1.1 2007/07/31 18:18:57 noud4 Exp $
-
---- audio/ossaudio.c.orig 2005-12-19 17:51:53.000000000 -0500
-+++ audio/ossaudio.c
-@@ -229,7 +229,7 @@ static int oss_open (int in, struct oss_
- goto err;
- }
-
-- if (ioctl (fd, SNDCTL_DSP_NONBLOCK)) {
-+ if (ioctl (fd, SNDCTL_DSP_NONBLOCK, NULL)) {
- oss_logerr2 (errno, typ, "Failed to set non-blocking mode\n");
- goto err;
- }
diff --git a/qemu-neo1973/patches/patch-ao b/qemu-neo1973/patches/patch-ao
deleted file mode 100644
index 8f656e0..0000000
--- a/qemu-neo1973/patches/patch-ao
+++ /dev/null
@@ -1,170 +0,0 @@
-$NetBSD: patch-ao,v 1.2 2008/04/13 12:29:48 noud4 Exp $
-
---- audio/mixeng.c.orig 2008-01-06 20:38:41.000000000 +0100
-+++ audio/mixeng.c 2007-12-18 20:56:45.000000000 +0100
-@@ -145,56 +145,64 @@
- #undef IN_T
- #undef SHIFT
-
-+/*
-+ * Work around ugly XX_t #defines in NetBSD 2.x,
-+ * fixed as typedefs in NetBSD 3.x. Two macros needed to
-+ * get CPP defines expanded properly. - HF
-+ */
-+#define _NBglue(x,y,z) x ## y ## z
-+#define NBglue(x,y,z) _NBglue(x,y,z)
-+
- t_sample *mixeng_conv[2][2][2][3] = {
- {
- {
- {
-- conv_natural_uint8_t_to_mono,
-- conv_natural_uint16_t_to_mono,
-- conv_natural_uint32_t_to_mono
-+ NBglue(conv_natural_, uint8_t, _to_mono),
-+ NBglue(conv_natural_, uint16_t, _to_mono),
-+ NBglue(conv_natural_, uint32_t, _to_mono)
- },
- {
-- conv_natural_uint8_t_to_mono,
-- conv_swap_uint16_t_to_mono,
-- conv_swap_uint32_t_to_mono,
-+ NBglue(conv_natural_, uint8_t, _to_mono),
-+ NBglue(conv_swap_, uint16_t, _to_mono),
-+ NBglue(conv_swap_, uint32_t, _to_mono),
- }
- },
- {
- {
-- conv_natural_int8_t_to_mono,
-- conv_natural_int16_t_to_mono,
-- conv_natural_int32_t_to_mono
-+ NBglue(conv_natural_, int8_t, _to_mono),
-+ NBglue(conv_natural_, int16_t, _to_mono),
-+ NBglue(conv_natural_, int32_t, _to_mono),
- },
- {
-- conv_natural_int8_t_to_mono,
-- conv_swap_int16_t_to_mono,
-- conv_swap_int32_t_to_mono
-+ NBglue(conv_natural_, int8_t, _to_mono),
-+ NBglue(conv_swap_, int16_t, _to_mono),
-+ NBglue(conv_swap_, int32_t, _to_mono)
- }
- }
- },
- {
- {
- {
-- conv_natural_uint8_t_to_stereo,
-- conv_natural_uint16_t_to_stereo,
-- conv_natural_uint32_t_to_stereo
-+ NBglue(conv_natural_, uint8_t, _to_stereo),
-+ NBglue(conv_natural_, uint16_t, _to_stereo),
-+ NBglue(conv_natural_, uint32_t, _to_stereo)
- },
- {
-- conv_natural_uint8_t_to_stereo,
-- conv_swap_uint16_t_to_stereo,
-- conv_swap_uint32_t_to_stereo
-+ NBglue(conv_natural_, uint8_t, _to_stereo),
-+ NBglue(conv_swap_, uint16_t, _to_stereo),
-+ NBglue(conv_swap_, uint32_t, _to_stereo)
- }
- },
- {
- {
-- conv_natural_int8_t_to_stereo,
-- conv_natural_int16_t_to_stereo,
-- conv_natural_int32_t_to_stereo
-+ NBglue(conv_natural_, int8_t, _to_stereo),
-+ NBglue(conv_natural_, int16_t, _to_stereo),
-+ NBglue(conv_natural_, int32_t, _to_stereo)
- },
- {
-- conv_natural_int8_t_to_stereo,
-- conv_swap_int16_t_to_stereo,
-- conv_swap_int32_t_to_stereo,
-+ NBglue(conv_natural_, int8_t, _to_stereo),
-+ NBglue(conv_swap_, int16_t, _to_stereo),
-+ NBglue(conv_swap_, int32_t, _to_stereo),
- }
- }
- }
-@@ -204,52 +212,52 @@
- {
- {
- {
-- clip_natural_uint8_t_from_mono,
-- clip_natural_uint16_t_from_mono,
-- clip_natural_uint32_t_from_mono
-+ NBglue(clip_natural_, uint8_t, _from_mono),
-+ NBglue(clip_natural_, uint16_t, _from_mono),
-+ NBglue(clip_natural_, uint32_t, _from_mono)
- },
- {
-- clip_natural_uint8_t_from_mono,
-- clip_swap_uint16_t_from_mono,
-- clip_swap_uint32_t_from_mono
-+ NBglue(clip_natural_, uint8_t, _from_mono),
-+ NBglue(clip_swap_, uint16_t, _from_mono),
-+ NBglue(clip_swap_, uint32_t, _from_mono)
- }
- },
- {
- {
-- clip_natural_int8_t_from_mono,
-- clip_natural_int16_t_from_mono,
-- clip_natural_int32_t_from_mono
-+ NBglue(clip_natural_, int8_t, _from_mono),
-+ NBglue(clip_natural_, int16_t, _from_mono),
-+ NBglue(clip_natural_, int32_t, _from_mono)
- },
- {
-- clip_natural_int8_t_from_mono,
-- clip_swap_int16_t_from_mono,
-- clip_swap_int32_t_from_mono
-+ NBglue(clip_natural_, int8_t, _from_mono),
-+ NBglue(clip_swap_, int16_t, _from_mono),
-+ NBglue(clip_swap_, int32_t, _from_mono)
- }
- }
- },
- {
- {
- {
-- clip_natural_uint8_t_from_stereo,
-- clip_natural_uint16_t_from_stereo,
-- clip_natural_uint32_t_from_stereo
-+ NBglue(clip_natural_, uint8_t, _from_stereo),
-+ NBglue(clip_natural_, uint16_t, _from_stereo),
-+ NBglue(clip_natural_, uint32_t, _from_stereo)
- },
- {
-- clip_natural_uint8_t_from_stereo,
-- clip_swap_uint16_t_from_stereo,
-- clip_swap_uint32_t_from_stereo
-+ NBglue(clip_natural_, uint8_t, _from_stereo),
-+ NBglue(clip_swap_, uint16_t, _from_stereo),
-+ NBglue(clip_swap_, uint32_t, _from_stereo)
- }
- },
- {
- {
-- clip_natural_int8_t_from_stereo,
-- clip_natural_int16_t_from_stereo,
-- clip_natural_int32_t_from_stereo
-+ NBglue(clip_natural_, int8_t, _from_stereo),
-+ NBglue(clip_natural_, int16_t, _from_stereo),
-+ NBglue(clip_natural_, int32_t, _from_stereo)
- },
- {
-- clip_natural_int8_t_from_stereo,
-- clip_swap_int16_t_from_stereo,
-- clip_swap_int32_t_from_stereo
-+ NBglue(clip_natural_, int8_t, _from_stereo),
-+ NBglue(clip_swap_, int16_t, _from_stereo),
-+ NBglue(clip_swap_, int32_t, _from_stereo)
- }
- }
- }
diff --git a/qemu-neo1973/patches/patch-au b/qemu-neo1973/patches/patch-au
deleted file mode 100644
index 23a6d18..0000000
--- a/qemu-neo1973/patches/patch-au
+++ /dev/null
@@ -1,29 +0,0 @@
-$NetBSD: patch-au,v 1.1.1.1 2007/07/31 18:18:57 noud4 Exp $
-
---- fpu/softfloat-native.h.orig 2007-07-19 22:00:47.000000000 +0200
-+++ fpu/softfloat-native.h 2007-07-19 22:47:13.000000000 +0200
-@@ -33,6 +33,24 @@
- #define isunordered(x,y) unordered(x, y)
- #endif
-
-+#ifdef __NetBSD__
-+#ifndef isgreater
-+#define isgreater(x, y) __builtin_isgreater(x, y)
-+#endif
-+#ifndef isgreaterequal
-+#define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
-+#endif
-+#ifndef isless
-+#define isless(x, y) __builtin_isless(x, y)
-+#endif
-+#ifndef islessequal
-+#define islessequal(x, y) __builtin_islessequal(x, y)
-+#endif
-+#ifndef isunordered
-+#define isunordered(x, y) __builtin_isunordered(x, y)
-+#endif
-+#endif
-+
- #if defined(__sun__) && !defined(NEED_LIBSUNMATH)
-
- #ifndef isnan
diff --git a/qemu-neo1973/patches/patch-av b/qemu-neo1973/patches/patch-av
deleted file mode 100644
index febb194..0000000
--- a/qemu-neo1973/patches/patch-av
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD: patch-av,v 1.1 2008/04/27 10:08:48 noud4 Exp $
-
- Provide trunc() implementation for NetBSD 3 and Dragonfly
-
---- fpu/softfloat-native.c.orig 2007-02-06 00:01:54.000000000 +0100
-+++ fpu/softfloat-native.c
-@@ -3,6 +3,20 @@
- #include "softfloat.h"
- #include <math.h>
-
-+#if defined(__DragonFly__) || defined(__NetBSD__)
-+# include <sys/param.h>
-+#endif
-+
-+#if (defined(__DragonFly__) && __DragonFly_version < 195000) || (defined(__NetBSD__) && __NetBSD_Version__ <= 399001700)
-+static double trunc( double val )
-+{
-+ if (val > 0)
-+ return floor(val);
-+ else
-+ return ceil(val);
-+}
-+#endif
-+
- void set_float_rounding_mode(int val STATUS_PARAM)
- {
- STATUS(float_rounding_mode) = val;
diff --git a/qemu-neo1973/patches/patch-aw b/qemu-neo1973/patches/patch-aw
deleted file mode 100644
index 1f8e9bb..0000000
--- a/qemu-neo1973/patches/patch-aw
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-aw,v 1.3 2008/04/13 12:29:48 noud4 Exp $
-
---- dyngen.c.orig 2008-01-06 20:38:42.000000000 +0100
-+++ dyngen.c 2007-12-18 21:01:06.000000000 +0100
-@@ -1738,6 +1738,7 @@
- if(!sym_name)
- continue;
- if (*sym_name &&
-+ !strstart(sym_name, "bswap64", NULL) && /* HF hack */
- !strstart(sym_name, "__op_param", NULL) &&
- !strstart(sym_name, "__op_jmp", NULL) &&
- !strstart(sym_name, "__op_gen_label", NULL)) {
-@@ -1762,6 +1763,9 @@
- */
- fprintf(outfile, " extern char %s;\n",
- sym_name);
-+#elif defined(HOST_PPC)
-+ if(strcmp("bswap32", sym_name))
-+ fprintf(outfile, "extern char %s;\n", sym_name);
- #else
- fprintf(outfile, "extern char %s;\n", sym_name);
- #endif
diff --git a/qemu-neo1973/patches/patch-ax b/qemu-neo1973/patches/patch-ax
deleted file mode 100644
index 03d7eb0..0000000
--- a/qemu-neo1973/patches/patch-ax
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-ax,v 1.1.1.1 2007/07/31 18:18:57 noud4 Exp $
-
---- target-i386/op.c.orig 2006-01-06 05:10:30.000000000 +0100
-+++ target-i386/op.c
-@@ -2099,14 +2099,17 @@ void OPPROTO op_fdivr_STN_ST0(void)
- }
-
- /* misc FPU operations */
-+
-+void fchs_dummy() {ST0 = floatx_chs(ST0);}
- void OPPROTO op_fchs_ST0(void)
- {
-- ST0 = floatx_chs(ST0);
-+ fchs_dummy();
- }
-
-+void fabs_dummy() {ST0 = floatx_abs(ST0);}
- void OPPROTO op_fabs_ST0(void)
- {
-- ST0 = floatx_abs(ST0);
-+ fabs_dummy();
- }
-
- void OPPROTO op_fxam_ST0(void)
diff --git a/qemu-neo1973/patches/patch-ay b/qemu-neo1973/patches/patch-ay
deleted file mode 100644
index ea3649a..0000000
--- a/qemu-neo1973/patches/patch-ay
+++ /dev/null
@@ -1,92 +0,0 @@
-$NetBSD: patch-ay,v 1.4 2008/04/13 12:29:48 noud4 Exp $
-
---- block-raw-posix.c.orig 2007-12-18 21:06:02.000000000 +0100
-+++ block-raw-posix.c 2007-12-18 21:11:10.000000000 +0100
-@@ -28,7 +28,9 @@
- #endif
- #include "block_int.h"
- #include <assert.h>
-+#ifdef _POSIX_ASYNCHRONOUS_IO
- #include <aio.h>
-+#endif
-
- #ifdef CONFIG_COCOA
- #include <paths.h>
-@@ -230,6 +232,7 @@
- return ret;
- }
-
-+#ifdef _POSIX_ASYNCHRONOUS_IO
- /***********************************************************/
- /* Unix AIO using POSIX AIO */
-
-@@ -455,6 +458,7 @@
- pacb = &acb->next;
- }
- }
-+#endif
-
- static void raw_close(BlockDriverState *bs)
- {
-@@ -545,6 +549,35 @@
- fsync(s->fd);
- }
-
-+#ifndef _POSIX_ASYNCHRONOUS_IO
-+void qemu_aio_init(void)
-+{
-+}
-+
-+void qemu_aio_poll(void)
-+{
-+}
-+
-+void qemu_aio_flush(void)
-+{
-+}
-+
-+void qemu_aio_wait_start(void)
-+{
-+}
-+
-+void qemu_aio_wait(void)
-+{
-+#ifndef QEMU_IMG
-+ qemu_bh_poll();
-+#endif
-+}
-+
-+void qemu_aio_wait_end(void)
-+{
-+}
-+#endif
-+
- BlockDriver bdrv_raw = {
- "raw",
- sizeof(BDRVRawState),
-@@ -556,10 +589,12 @@
- raw_create,
- raw_flush,
-
-+#ifdef _POSIX_ASYNCHRONOUS_IO
- .bdrv_aio_read = raw_aio_read,
- .bdrv_aio_write = raw_aio_write,
- .bdrv_aio_cancel = raw_aio_cancel,
- .aiocb_size = sizeof(RawAIOCB),
-+#endif
- .protocol_name = "file",
- .bdrv_pread = raw_pread,
- .bdrv_pwrite = raw_pwrite,
-@@ -908,10 +943,12 @@
- NULL,
- raw_flush,
-
-+#ifdef _POSIX_ASYNCHRONOUS_IO
- .bdrv_aio_read = raw_aio_read,
- .bdrv_aio_write = raw_aio_write,
- .bdrv_aio_cancel = raw_aio_cancel,
- .aiocb_size = sizeof(RawAIOCB),
-+#endif
- .bdrv_pread = raw_pread,
- .bdrv_pwrite = raw_pwrite,
- .bdrv_getlength = raw_getlength,
diff --git a/qemu-neo1973/patches/patch-ba b/qemu-neo1973/patches/patch-ba
deleted file mode 100644
index 09af4d5..0000000
--- a/qemu-neo1973/patches/patch-ba
+++ /dev/null
@@ -1,47 +0,0 @@
-$NetBSD: patch-ba,v 1.2 2008/04/13 12:29:48 noud4 Exp $
-
---- hw/pcspk.c.orig 2007-02-06 01:01:54.000000000 +0200
-+++ hw/pcspk.c
-@@ -38,7 +38,6 @@ typedef struct {
- unsigned int samples;
- unsigned int play_pos;
- int data_on;
-- int dummy_refresh_clock;
- } PCSpkState;
-
- static const char *s_spk = "pcspk";
-@@ -112,15 +111,32 @@ int pcspk_audio_init(AudioState *audio)
- return 0;
- }
-
-+/*
-+ * Emulate the speaker port's refresh clock bit. This is supposed
-+ * to toggle between 0 and 1<<4 every 15 microseconds. XXX: We use
-+ * gettimeofday() in the real machine instead of a monotonic clock
-+ * in the virtual machine, and we are a bit sloppy about the 15
-+ * microseconds. This should be good enough for crude loops that
-+ * measure approximate delays by counting how often this line toggles.
-+ */
-+static uint32_t pcspk_dummy_refresh_clock(void)
-+{
-+ struct timeval tv;
-+
-+ gettimeofday(&tv, NULL);
-+ return ((tv.tv_sec ^ (tv.tv_usec / 15)) & 1) << 4;
-+}
-+
- static uint32_t pcspk_ioport_read(void *opaque, uint32_t addr)
- {
- PCSpkState *s = opaque;
- int out;
-+ int dummy_refresh_clock;
-
-- s->dummy_refresh_clock ^= (1 << 4);
- out = pit_get_out(s->pit, 2, qemu_get_clock(vm_clock)) << 5;
-
-- return pit_get_gate(s->pit, 2) | (s->data_on << 1) | s->dummy_refresh_clock | out;
-+ return pit_get_gate(s->pit, 2) | (s->data_on << 1) |
-+ pcspk_dummy_refresh_clock() | out;
- }
-
- static void pcspk_ioport_write(void *opaque, uint32_t addr, uint32_t val)
diff --git a/qemu-neo1973/patches/patch-bb b/qemu-neo1973/patches/patch-bb
deleted file mode 100644
index f0d56c2..0000000
--- a/qemu-neo1973/patches/patch-bb
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-bb,v 1.2 2007/10/21 19:29:17 noud4 Exp $
-
---- openmoko/Makefile 2007-07-20 19:54:50.000000000 +0200
-+++ openmoko/Makefile.new 2007-07-20 20:49:33.000000000 +0200
-@@ -38,6 +38,8 @@
-
- $(SPLASH):
- wget http://svn.openmoko.org/trunk/src/host/splash/$(SPLASH)
-+ cp $(SPLASH) $(SPLASH).tmp
-+ sed -e "s|/usr/bin/perl|@@PREFIX@@/bin/perl|" < $(SPLASH).tmp > $(SPLASH)
- chmod 0755 $(SPLASH)
-
- $(FLASHIMG):
-@@ -59,7 +61,7 @@
- rm -rf .8b .16b .512b .sec .8sec .64sec .512sec .2ksec .16ksec
-
- $(FLASHOVERLAY): $(FLASHIMG)
-- ../qemu-img create -b $^ -f qcow2 $@
-+ ../../bin/qemu-neo1973-img create -b $^ -f qcow2 $@
-
- clean:
- rm -rf $(SPLASH) $(SPLASHIMG) $(FLASHIMG) $(FLASHOVERLAY) \
diff --git a/qemu-neo1973/patches/patch-bc b/qemu-neo1973/patches/patch-bc
deleted file mode 100644
index bbb60b9..0000000
--- a/qemu-neo1973/patches/patch-bc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-bc,v 1.3 2008/04/13 12:29:48 noud4 Exp $
-
---- openmoko/env.orig 2008-04-01 19:09:42.000000000 +0200
-+++ openmoko/env 2008-04-06 12:39:56.000000000 +0200
-@@ -4,7 +4,7 @@
- script_dir_relative=openmoko
- script_dir="$src_dir/$script_dir_relative"
- uboot_symlink="$src_dir/u-boot.bin"
--qemu_relative="arm-softmmu/qemu-system-arm -M gta01 -m 130"
-+qemu_relative="../bin/qemu-neo1973 -M gta01 -m 130"
- qemu="$src_dir/$qemu_relative"
- flash_base=openmoko-flash.base
- flash_image=openmoko-flash.image
diff --git a/qemu-neo1973/patches/patch-bd b/qemu-neo1973/patches/patch-bd
deleted file mode 100644
index 9f87512..0000000
--- a/qemu-neo1973/patches/patch-bd
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD: patch-bd,v 1.4 2008/04/13 12:29:48 noud4 Exp $
-
---- openmoko/flash.sh.orig 2007-11-19 23:09:06.000000000 +0100
-+++ openmoko/flash.sh 2008-04-06 13:43:28.000000000 +0200
-@@ -55,6 +55,8 @@
- most_recent "$rootfs_wildcard" rootfs_image rootfs_size || exit -1
- most_recent "$uboot_wildcard" uboot_image uboot_size || exit -1
-
-+#kernel_image="/usr/pkg/qemu-neo1973/libexec/openmoko/netbsd.boot"
-+
- echo Using \'$kernel_image\' as the kernel image.
- echo Using \'$rootfs_image\' as the root filesystem image.
- echo Using \'$uboot_image\' as bootloader.
-@@ -124,7 +126,7 @@
- nand write.e $kernel_addr kernel $kernel_size"
-
- # Program the root filesystem.
--uboot $rootfs_image 120 "
-+uboot $rootfs_image 240 "
- nand write.jffs2 $kernel_addr rootfs $rootfs_size"
-
- # Make the kernel image accessible under a fixed name
-@@ -139,7 +141,7 @@
- echo " "All done.
- echo
- echo " "Read the qemu manual and use a commandline like the following to boot:
--echo \ \$ $qemu_relative -mtdblock $script_dir_relative/$flash_image -kernel $script_dir_relative/openmoko-kernel.bin -usb -show-cursor
-+echo \ \$ cd /usr/pkg/qemu-neo1973/libexec\; $qemu_relative -mtdblock $script_dir_relative/$flash_image -kernel $script_dir_relative/openmoko-kernel.bin -usb -show-cursor
- echo
- echo " "Append \'-snapshot\' to make the flash image read-only so that every
- echo " "time emulation starts in the original unmodified state.
diff --git a/qemu-neo1973/patches/patch-be b/qemu-neo1973/patches/patch-be
deleted file mode 100644
index 234a47f..0000000
--- a/qemu-neo1973/patches/patch-be
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-be,v 1.2 2008/04/13 12:29:48 noud4 Exp $
-
---- configure.orig 2007-10-14 19:59:17.000000000 +0200
-+++ configure 2007-10-14 20:03:14.000000000 +0200
-@@ -348,6 +350,10 @@
- AIOLIBS="-lrt -lpthread"
- fi
-
-+if [ "$FORCE_AIO" = "yes" ]; then
-+ AIOLIBS="-lrt"
-+fi
-+
- # default flags for all hosts
- CFLAGS="$CFLAGS -Wall -O2 -g -fno-strict-aliasing"
- LDFLAGS="$LDFLAGS -g"
diff --git a/qemu-neo1973/patches/patch-ua b/qemu-neo1973/patches/patch-ua
deleted file mode 100644
index 82b30f9..0000000
--- a/qemu-neo1973/patches/patch-ua
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD: patch-ua,v 1.3 2008/04/13 12:29:48 noud4 Exp $
-
---- configure.orig 2007-10-14 19:59:17.000000000 +0200
-+++ configure 2007-10-14 20:03:14.000000000 +0200
-@@ -137,6 +137,7 @@
- NetBSD)
- bsd="yes"
- oss="yes"
-+usb="bsd"
- ;;
- OpenBSD)
- bsd="yes"
-@@ -195,6 +196,7 @@
- if [ "$bsd" = "yes" ] ; then
- if [ "$darwin" != "yes" ] ; then
- make="gmake"
-+ usb="bsd"
- fi
- fi
-
-@@ -1059,6 +1059,19 @@
- echo "#define _BSD 1" >> $config_h
- fi
-
-+# USB host support
-+case "$usb" in
-+linux)
-+ echo "HOST_USB=linux" >> $conig_mak
-+;;
-+bsd)
-+ echo "HOST_USB=bsd" >> $config_mak
-+;;
-+*)
-+ echo "HOST_USB=stub" >> $config_mak
-+;;
-+esac
-+
- if [ "$stack_protector_present" = "yes" ] ; then
- echo "STACK_PROTECTOR_PRESENT=yes" >> $config_mak
- fi
diff --git a/qemu-neo1973/patches/patch-ub b/qemu-neo1973/patches/patch-ub
deleted file mode 100644
index 961c5ab..0000000
--- a/qemu-neo1973/patches/patch-ub
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-ub,v 1.3 2008/04/13 12:29:48 noud4 Exp $
-
---- Makefile 2008-01-15 00:24:21.000000000 +0100
-+++ Makefile.new 2007-12-27 23:01:38.000000000 +0100
-@@ -59,6 +59,6 @@
- OBJS+=scsi-disk.o cdrom.o
- OBJS+=scsi-generic.o
--OBJS+=usb.o usb-hub.o usb-linux.o usb-linux-gadget.o
-+OBJS+=usb.o usb-hub.o usb-$(HOST_USB).o usb-linux-gadget.o
- OBJS+=usb-hid.o usb-msd.o usb-wacom.o usb-net.o usb-bt.o usb-serial.o
- OBJS+=sd.o ssi-sd.o ar6000.o
-
diff --git a/qemu-neo1973/patches/patch-ue b/qemu-neo1973/patches/patch-ue
deleted file mode 100644
index c0bd23a..0000000
--- a/qemu-neo1973/patches/patch-ue
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD: patch-ue,v 1.3 2008/04/13 12:29:48 noud4 Exp $
-
---- usb-linux.c.orig 2007-11-19 19:54:17.000000000 +0100
-+++ usb-linux.c 2007-12-27 22:46:13.000000000 +0100
-@@ -25,7 +25,6 @@
- #include "hw/usb.h"
- #include "console.h"
-
--#if defined(__linux__)
- #include <dirent.h>
- #include <sys/ioctl.h>
- #include <linux/usbdevice_fs.h>
-@@ -957,18 +956,3 @@
- {
- usb_host_scan(NULL, usb_host_info_device);
- }
--
--#else
--
--void usb_host_info(void)
--{
-- term_printf("USB host devices not supported\n");
--}
--
--/* XXX: modify configure to compile the right host driver */
--USBDevice *usb_host_device_open(const char *devname)
--{
-- return NULL;
--}
--
--#endif
diff --git a/qemu-neo1973/patches/patch-uf b/qemu-neo1973/patches/patch-uf
deleted file mode 100644
index e11a66b..0000000
--- a/qemu-neo1973/patches/patch-uf
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-uf,v 1.2 2007/10/21 19:29:17 noud4 Exp $
-
---- /dev/null 2007-10-14 19:58:41.000000000 +0200
-+++ usb-stub.c 2007-10-14 20:14:25.000000000 +0200
-@@ -0,0 +1,11 @@
-+#include "vl.h"
-+
-+void usb_host_info(void)
-+{
-+ term_printf("USB host devices not supported\n");
-+}
-+
-+USBDevice *usb_host_device_open(const char *devname)
-+{
-+ return NULL;
-+}
diff --git a/qemu-neo1973/patches/patch-ug b/qemu-neo1973/patches/patch-ug
deleted file mode 100644
index c1a2f42..0000000
--- a/qemu-neo1973/patches/patch-ug
+++ /dev/null
@@ -1,607 +0,0 @@
-$NetBSD: patch-ug,v 1.3 2008/04/13 12:29:48 noud4 Exp $
-
---- /dev/null 2007-10-14 19:58:41.000000000 +0200
-+++ usb-bsd.c 2007-10-14 20:17:02.000000000 +0200
-@@ -0,0 +1,602 @@
-+/*
-+ * BSD host USB redirector
-+ *
-+ * Copyright (c) 2006 Lonnie Mendez
-+ * Portions of code and concepts borrowed from
-+ * usb-linux.c and libusb's bsd.c and are copyright their respective owners.
-+ *
-+ * 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 "qemu-common.h"
-+#include "hw/usb.h"
-+#include "console.h"
-+
-+/* usb.h declares these */
-+#undef USB_SPEED_HIGH
-+#undef USB_SPEED_FULL
-+#undef USB_SPEED_LOW
-+
-+#include <sys/ioctl.h>
-+#include <dev/usb/usb.h>
-+#include <signal.h>
-+
-+/* This value has maximum potential at 16.
-+ * You should also set hw.usb.debug to gain
-+ * more detailed view.
-+ */
-+#define DEBUG
-+#define UGEN_DEBUG_LEVEL 16
-+
-+
-+typedef int USBScanFunc(void *opaque, int bus_num, int addr, int class_id,
-+ int vendor_id, int product_id,
-+ const char *product_name, int speed);
-+static int usb_host_find_device(int *pbus_num, int *paddr,
-+ const char *devname);
-+
-+typedef struct USBHostDevice {
-+ USBDevice dev;
-+ int ep_fd[USB_MAX_ENDPOINTS];
-+ int devfd;
-+ char devpath[32];
-+} USBHostDevice;
-+
-+
-+static int ensure_ep_open(USBHostDevice *dev, int ep, int mode)
-+{
-+ char buf[32];
-+ int fd;
-+
-+ /* Get the address for this endpoint */
-+ ep = UE_GET_ADDR(ep);
-+
-+ if (dev->ep_fd[ep] < 0) {
-+#if __FreeBSD__
-+ snprintf(buf, sizeof(buf) - 1, "%s.%d", dev->devpath, ep);
-+#else
-+ snprintf(buf, sizeof(buf) - 1, "%s.%02d", dev->devpath, ep);
-+#endif
-+ /* Try to open it O_RDWR first for those devices which have in and out
-+ * endpoints with the same address (eg 0x02 and 0x82)
-+ */
-+ fd = open(buf, O_RDWR);
-+ if (fd < 0 && errno == ENXIO)
-+ fd = open(buf, mode);
-+ if (fd < 0) {
-+#ifdef DEBUG
-+ printf("ensure_ep_open: failed to open device endpoint %s: %s\n",
-+ buf, strerror(errno));
-+#endif
-+ }
-+ dev->ep_fd[ep] = fd;
-+ }
-+
-+ return dev->ep_fd[ep];
-+}
-+
-+static void ensure_eps_closed(USBHostDevice *dev)
-+{
-+ int epnum = 1;
-+
-+ if (!dev)
-+ return;
-+
-+ while (epnum < USB_MAX_ENDPOINTS) {
-+ if (dev->ep_fd[epnum] >= 0) {
-+ close(dev->ep_fd[epnum]);
-+ dev->ep_fd[epnum] = -1;
-+ }
-+ epnum++;
-+ }
-+}
-+
-+static void usb_host_handle_reset(USBDevice *dev)
-+{
-+#if 0
-+ USBHostDevice *s = (USBHostDevice *)dev;
-+#endif
-+}
-+
-+/* XXX:
-+ * -check device states against transfer requests
-+ * and return appropriate response
-+ */
-+static int usb_host_handle_control(USBDevice *dev,
-+ int request,
-+ int value,
-+ int index,
-+ int length,
-+ uint8_t *data)
-+{
-+ USBHostDevice *s = (USBHostDevice *)dev;
-+ struct usb_ctl_request req;
-+ struct usb_alt_interface aiface;
-+ int ret, timeout = 50;
-+
-+ if ((request >> 8) == UT_WRITE_DEVICE &&
-+ (request & 0xff) == UR_SET_ADDRESS) {
-+
-+ /* specific SET_ADDRESS support */
-+ dev->addr = value;
-+ return 0;
-+ } else if ((request >> 8) == UT_WRITE_DEVICE &&
-+ (request & 0xff) == UR_SET_CONFIG) {
-+
-+ ensure_eps_closed(s); /* can't do this without all eps closed */
-+
-+ ret = ioctl(s->devfd, USB_SET_CONFIG, &value);
-+ if (ret < 0) {
-+#ifdef DEBUG
-+ printf("handle_control: failed to set configuration - %s\n",
-+ strerror(errno));
-+#endif
-+ return USB_RET_STALL;
-+ }
-+
-+ return 0;
-+ } else if ((request >> 8) == UT_WRITE_INTERFACE &&
-+ (request & 0xff) == UR_SET_INTERFACE) {
-+
-+ aiface.uai_interface_index = index;
-+ aiface.uai_alt_no = value;
-+
-+ ensure_eps_closed(s); /* can't do this without all eps closed */
-+ ret = ioctl(s->devfd, USB_SET_ALTINTERFACE, &aiface);
-+ if (ret < 0) {
-+#ifdef DEBUG
-+ printf("handle_control: failed to set alternate interface - %s\n",
-+ strerror(errno));
-+#endif
-+ return USB_RET_STALL;
-+ }
-+
-+ return 0;
-+ } else {
-+ req.ucr_request.bmRequestType = request >> 8;
-+ req.ucr_request.bRequest = request & 0xff;
-+ USETW(req.ucr_request.wValue, value);
-+ USETW(req.ucr_request.wIndex, index);
-+ USETW(req.ucr_request.wLength, length);
-+ req.ucr_data = data;
-+ req.ucr_flags = USBD_SHORT_XFER_OK;
-+
-+ ret = ioctl(s->devfd, USB_SET_TIMEOUT, &timeout);
-+#if (__NetBSD__ || __OpenBSD__)
-+ if (ret < 0 && errno != EINVAL) {
-+#else
-+ if (ret < 0) {
-+#endif
-+#ifdef DEBUG
-+ printf("handle_control: setting timeout failed - %s\n",
-+ strerror(errno));
-+#endif
-+ }
-+
-+ ret = ioctl(s->devfd, USB_DO_REQUEST, &req);
-+ /* ugen returns EIO for usbd_do_request_ no matter what
-+ * happens with the transfer */
-+ if (ret < 0) {
-+#ifdef DEBUG
-+ printf("handle_control: error after request - %s\n",
-+ strerror(errno));
-+#endif
-+ return USB_RET_NAK; // STALL
-+ } else {
-+ return req.ucr_actlen;
-+ }
-+ }
-+}
-+
-+static int usb_host_handle_data(USBDevice *dev, USBPacket *p)
-+{
-+ USBHostDevice *s = (USBHostDevice *)dev;
-+ int ret, fd, mode;
-+ int one = 1, shortpacket = 0, timeout = 50;
-+ sigset_t new_mask, old_mask;
-+ uint8_t devep = p->devep;
-+
-+ /* protect data transfers from SIGALRM signal */
-+ sigemptyset(&new_mask);
-+ sigaddset(&new_mask, SIGALRM);
-+ sigprocmask(SIG_BLOCK, &new_mask, &old_mask);
-+
-+ if (p->pid == USB_TOKEN_IN) {
-+ devep |= 0x80;
-+ mode = O_RDONLY;
-+ shortpacket = 1;
-+ } else {
-+ mode = O_WRONLY;
-+ }
-+
-+ fd = ensure_ep_open(s, devep, mode);
-+ if (fd < 0) {
-+ sigprocmask(SIG_SETMASK, &old_mask, NULL);
-+ return USB_RET_NODEV;
-+ }
-+
-+ if (ioctl(fd, USB_SET_TIMEOUT, &timeout) < 0) {
-+#ifdef DEBUG
-+ printf("handle_data: failed to set timeout - %s\n",
-+ strerror(errno));
-+#endif
-+ }
-+
-+ if (shortpacket) {
-+ if (ioctl(fd, USB_SET_SHORT_XFER, &one) < 0) {
-+#ifdef DEBUG
-+ printf("handle_data: failed to set short xfer mode - %s\n",
-+ strerror(errno));
-+#endif
-+ sigprocmask(SIG_SETMASK, &old_mask, NULL);
-+ }
-+ }
-+
-+ if (p->pid == USB_TOKEN_IN)
-+ ret = read(fd, p->data, p->len);
-+ else
-+ ret = write(fd, p->data, p->len);
-+
-+ sigprocmask(SIG_SETMASK, &old_mask, NULL);
-+
-+ if (ret < 0) {
-+#ifdef DEBUG
-+ //printf("handle_data: error after %s data - %s\n",
-+ // pid == USB_TOKEN_IN ? "reading" : "writing", strerror(errno));
-+#endif
-+ switch(errno) {
-+ case ETIMEDOUT:
-+ case EINTR:
-+ return USB_RET_NAK;
-+ default:
-+ return USB_RET_STALL;
-+ }
-+ } else {
-+ return ret;
-+ }
-+}
-+
-+static void usb_host_handle_destroy(USBDevice *opaque)
-+{
-+ USBHostDevice *s = (USBHostDevice *)opaque;
-+ int i;
-+
-+ for (i = 0; i < USB_MAX_ENDPOINTS; i++)
-+ if (s->ep_fd[i] >= 0)
-+ close(s->ep_fd[i]);
-+
-+ if (s->devfd < 0)
-+ return;
-+
-+ close(s->devfd);
-+
-+ qemu_free(s);
-+}
-+
-+USBDevice *usb_host_device_open(const char *devname)
-+{
-+ struct usb_device_info bus_info, dev_info;
-+ USBHostDevice *dev;
-+ char ctlpath[PATH_MAX + 1];
-+ char buspath[PATH_MAX + 1];
-+ int bfd, dfd, bus, address, i;
-+ int ugendebug = UGEN_DEBUG_LEVEL;
-+
-+ if (usb_host_find_device(&bus, &address, devname) < 0)
-+ return NULL;
-+
-+ snprintf(buspath, PATH_MAX, "/dev/usb%d", bus);
-+
-+ bfd = open(buspath, O_RDWR);
-+ if (bfd < 0) {
-+#ifdef DEBUG
-+ printf("usb_host_device_open: failed to open usb bus - %s\n",
-+ strerror(errno));
-+#endif
-+ return NULL;
-+ }
-+
-+ bus_info.udi_addr = address;
-+ if (ioctl(bfd, USB_DEVICEINFO, &bus_info) < 0) {
-+#ifdef DEBUG
-+ printf("usb_host_device_open: failed to grab bus information - %s\n",
-+ strerror(errno));
-+#endif
-+ return NULL;
-+ }
-+
-+#if __FreeBSD__
-+ snprintf(ctlpath, PATH_MAX, "/dev/%s", bus_info.udi_devnames[0]);
-+#else
-+ snprintf(ctlpath, PATH_MAX, "/dev/%s.00", bus_info.udi_devnames[0]);
-+#endif
-+
-+ dfd = open(ctlpath, O_RDWR);
-+ if (dfd < 0) {
-+ dfd = open(ctlpath, O_RDONLY);
-+ if (dfd < 0) {
-+#ifdef DEBUG
-+ printf("usb_host_device_open: failed to open usb device %s - %s\n",
-+ ctlpath, strerror(errno));
-+#endif
-+ }
-+ }
-+
-+ if (dfd >= 0) {
-+ dev = qemu_mallocz(sizeof(USBHostDevice));
-+ if (!dev)
-+ goto fail;
-+ dev->devfd = dfd;
-+
-+ if (ioctl(dfd, USB_GET_DEVICEINFO, &dev_info) < 0) {
-+#ifdef DEBUG
-+ printf("usb_host_device_open: failed to grab device info - %s\n",
-+ strerror(errno));
-+#endif
-+ goto fail;
-+ }
-+
-+ if (dev_info.udi_speed == 1)
-+ dev->dev.speed = USB_SPEED_LOW - 1;
-+ else
-+ dev->dev.speed = USB_SPEED_FULL - 1;
-+
-+ dev->dev.handle_packet = usb_generic_handle_packet;
-+
-+ dev->dev.handle_reset = usb_host_handle_reset;
-+ dev->dev.handle_control = usb_host_handle_control;
-+ dev->dev.handle_data = usb_host_handle_data;
-+ dev->dev.handle_destroy = usb_host_handle_destroy;
-+
-+ if (strncmp(dev_info.udi_product, "product", 7) != 0)
-+ pstrcpy(dev->dev.devname, sizeof(dev->dev.devname),
-+ dev_info.udi_product);
-+ else
-+ snprintf(dev->dev.devname, sizeof(dev->dev.devname),
-+ "host:%s", devname);
-+
-+ pstrcpy(dev->devpath, sizeof(dev->devpath), "/dev/");
-+ strcat(dev->devpath, dev_info.udi_devnames[0]);
-+
-+ /* Mark the endpoints as not yet open */
-+ for (i = 0; i < USB_MAX_ENDPOINTS; i++)
-+ dev->ep_fd[i] = -1;
-+
-+ ioctl(dfd, USB_SETDEBUG, &ugendebug);
-+
-+ return (USBDevice *)dev;
-+ }
-+
-+fail:
-+ return NULL;
-+}
-+
-+static int usb_host_scan(void *opaque, USBScanFunc *func)
-+{
-+ struct usb_device_info bus_info;
-+ struct usb_device_info dev_info;
-+ uint16_t vendor_id, product_id, class_id, speed;
-+ int bfd, dfd, bus, address;
-+ char busbuf[20], devbuf[20], product_name[256];
-+ int ret = 0;
-+
-+ for (bus = 0; bus < 10; bus++) {
-+
-+ snprintf(busbuf, sizeof(busbuf) - 1, "/dev/usb%d", bus);
-+ bfd = open(busbuf, O_RDWR);
-+ if (bfd < 0)
-+ continue;
-+
-+ for (address = 1; address < 127; address++) {
-+
-+ bus_info.udi_addr = address;
-+ if (ioctl(bfd, USB_DEVICEINFO, &bus_info) < 0)
-+ continue;
-+
-+ /* only list devices that can be used by generic layer */
-+ if (strncmp(bus_info.udi_devnames[0], "ugen", 4) != 0)
-+ continue;
-+
-+#if __FreeBSD__
-+ snprintf(devbuf, sizeof(devbuf) - 1, "/dev/%s", bus_info.udi_devnames[0]);
-+#else
-+ snprintf(devbuf, sizeof(devbuf) - 1, "/dev/%s.00", bus_info.udi_devnames[0]);
-+#endif
-+
-+ dfd = open(devbuf, O_RDONLY);
-+ if (dfd < 0) {
-+#ifdef DEBUG
-+ printf("usb_host_scan: couldn't open device %s - %s\n", devbuf,
-+ strerror(errno));
-+#endif
-+ continue;
-+ }
-+
-+ if (ioctl(dfd, USB_GET_DEVICEINFO, &dev_info) < 0)
-+ printf("usb_host_scan: couldn't get device information for %s - %s\n",
-+ devbuf, strerror(errno));
-+
-+ // XXX: might need to fixup endianess of word values before copying over
-+
-+ vendor_id = dev_info.udi_vendorNo;
-+ product_id = dev_info.udi_productNo;
-+ class_id = dev_info.udi_class;
-+ speed = dev_info.udi_speed;
-+
-+ if (strncmp(dev_info.udi_product, "product", 7) != 0)
-+ pstrcpy(product_name, sizeof(product_name),
-+ dev_info.udi_product);
-+ else
-+ product_name[0] = '\0';
-+
-+ ret = func(opaque, bus, address, class_id, vendor_id,
-+ product_id, product_name, speed);
-+
-+ close(dfd);
-+
-+ if (ret)
-+ goto the_end;
-+ }
-+
-+ close(bfd);
-+ }
-+
-+the_end:
-+ return ret;
-+}
-+
-+typedef struct FindDeviceState {
-+ int vendor_id;
-+ int product_id;
-+ int bus_num;
-+ int addr;
-+} FindDeviceState;
-+
-+static int usb_host_find_device_scan(void *opaque, int bus_num, int addr,
-+ int class_id,
-+ int vendor_id, int product_id,
-+ const char *product_name, int speed)
-+{
-+ FindDeviceState *s = opaque;
-+ if (vendor_id == s->vendor_id &&
-+ product_id == s->product_id) {
-+ s->bus_num = bus_num;
-+ s->addr = addr;
-+ return 1;
-+ } else {
-+ return 0;
-+ }
-+}
-+
-+
-+/* the syntax is :
-+ 'bus.addr' (decimal numbers) or
-+ 'vendor_id:product_id' (hexa numbers) */
-+static int usb_host_find_device(int *pbus_num, int *paddr,
-+ const char *devname)
-+{
-+ const char *p;
-+ int ret;
-+ FindDeviceState fs;
-+
-+ p = strchr(devname, '.');
-+ if (p) {
-+ *pbus_num = strtoul(devname, NULL, 0);
-+ *paddr = strtoul(p + 1, NULL, 0);
-+ return 0;
-+ }
-+ p = strchr(devname, ':');
-+ if (p) {
-+ fs.vendor_id = strtoul(devname, NULL, 16);
-+ fs.product_id = strtoul(p + 1, NULL, 16);
-+ ret = usb_host_scan(&fs, usb_host_find_device_scan);
-+ if (ret) {
-+ *pbus_num = fs.bus_num;
-+ *paddr = fs.addr;
-+ return 0;
-+ }
-+ }
-+ return -1;
-+}
-+
-+/**********************/
-+/* USB host device info */
-+
-+struct usb_class_info {
-+ int class;
-+ const char *class_name;
-+};
-+
-+static const struct usb_class_info usb_class_info[] = {
-+ { USB_CLASS_AUDIO, "Audio"},
-+ { USB_CLASS_COMM, "Communication"},
-+ { USB_CLASS_HID, "HID"},
-+ { USB_CLASS_HUB, "Hub" },
-+ { USB_CLASS_PHYSICAL, "Physical" },
-+ { USB_CLASS_PRINTER, "Printer" },
-+ { USB_CLASS_MASS_STORAGE, "Storage" },
-+ { USB_CLASS_CDC_DATA, "Data" },
-+ { USB_CLASS_APP_SPEC, "Application Specific" },
-+ { USB_CLASS_VENDOR_SPEC, "Vendor Specific" },
-+ { USB_CLASS_STILL_IMAGE, "Still Image" },
-+ { USB_CLASS_CSCID, "Smart Card" },
-+ { USB_CLASS_CONTENT_SEC, "Content Security" },
-+ { -1, NULL }
-+};
-+
-+static const char *usb_class_str(uint8_t class)
-+{
-+ const struct usb_class_info *p;
-+ for (p = usb_class_info; p->class != -1; p++) {
-+ if (p->class == class)
-+ break;
-+ }
-+ return p->class_name;
-+}
-+
-+void usb_info_device(int bus_num, int addr, int class_id,
-+ int vendor_id, int product_id,
-+ const char *product_name,
-+ int speed)
-+{
-+ const char *class_str, *speed_str;
-+
-+ switch(speed) {
-+ case USB_SPEED_LOW:
-+ speed_str = "1.5";
-+ break;
-+ case USB_SPEED_FULL:
-+ speed_str = "12";
-+ break;
-+ case USB_SPEED_HIGH:
-+ speed_str = "480";
-+ break;
-+ default:
-+ speed_str = "?";
-+ break;
-+ }
-+
-+ term_printf(" Device %d.%d, speed %s Mb/s\n",
-+ bus_num, addr, speed_str);
-+ class_str = usb_class_str(class_id);
-+ if (class_str)
-+ term_printf(" %s:", class_str);
-+ else
-+ term_printf(" Class %02x:", class_id);
-+ term_printf(" USB device %04x:%04x", vendor_id, product_id);
-+ if (product_name[0] != '\0')
-+ term_printf(", %s", product_name);
-+ term_printf("\n");
-+}
-+
-+static int usb_host_info_device(void *opaque, int bus_num, int addr,
-+ int class_id,
-+ int vendor_id, int product_id,
-+ const char *product_name,
-+ int speed)
-+{
-+ usb_info_device(bus_num, addr, class_id, vendor_id, product_id,
-+ product_name, speed);
-+ return 0;
-+}
-+
-+void usb_host_info(void)
-+{
-+ usb_host_scan(NULL, usb_host_info_device);
-+}
diff --git a/qemu-neo1973/patches/patch-uh b/qemu-neo1973/patches/patch-uh
deleted file mode 100644
index 9537e31..0000000
--- a/qemu-neo1973/patches/patch-uh
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-uh,v 1.1 2008/04/27 10:08:48 noud4 Exp $
-
---- gnokiigsm/device.h 2007-07-20 00:06:18.000000000 +0200
-+++ gnokiigsm/device.h.new 2007-07-20 00:06:10.000000000 +0200
-@@ -46,8 +46,10 @@
- void device_setdtrrts(int dtr, int rts, struct gn_statemachine *state);
- void device_changespeed(int speed, struct gn_statemachine *state);
-
--size_t device_read(__ptr_t buf, size_t nbytes, struct gn_statemachine *state);
--size_t device_write(const __ptr_t buf, size_t n, struct gn_statemachine *state);
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
-+size_t device_read(__ptr_t buf, size_t nbytes, struct gn_statemachine *state);
-+size_t device_write(const __ptr_t buf, size_t n, struct gn_statemachine *state);
-+#endif
-
- int device_select(struct timeval *timeout, struct gn_statemachine *state);
-
diff --git a/qemu-neo1973/patches/patch-wu b/qemu-neo1973/patches/patch-wu
deleted file mode 100644
index 679252c..0000000
--- a/qemu-neo1973/patches/patch-wu
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-wu,v 1.1 2008/04/27 10:08:48 noud4 Exp $
-
---- vl.c.orig 2007-12-27 22:37:22.000000000 +0100
-+++ vl.c 2007-12-27 22:41:30.000000000 +0100
-@@ -8217,7 +8217,6 @@
- qemu_register_machine(&terrierpda_machine);
- qemu_register_machine(>a01_machine);
- qemu_register_machine(>a02f_machine);
-- qemu_register_machine(&palmte_machine);
- qemu_register_machine(&lm3s811evb_machine);
- qemu_register_machine(&lm3s6965evb_machine);
- qemu_register_machine(&connex_machine);
diff --git a/qemu-neo1973/patches/patch-wv b/qemu-neo1973/patches/patch-wv
deleted file mode 100644
index b6f0d74..0000000
--- a/qemu-neo1973/patches/patch-wv
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-wv,v 1.1 2008/04/27 10:08:48 noud4 Exp $
-
---- Makefile 2008-01-15 00:24:21.000000000 +0100
-+++ Makefile.new 2007-12-27 22:29:27.000000000 +0100
-@@ -54,7 +54,7 @@
- OBJS+=block.o
-
- OBJS+=irq.o
--OBJS+=i2c.o smbus.o smbus_eeprom.o max7310.o max111x.o wm8750.o wm8753.o
-+OBJS+=i2c.o smbus.o smbus_eeprom.o max7310.o max111x.o
- OBJS+=ssd0303.o ssd0323.o ads7846.o pcf5060x.o stellaris_input.o
- OBJS+=scsi-disk.o cdrom.o
- OBJS+=scsi-generic.o
diff --git a/qemu-neo1973/patches/patch-ww b/qemu-neo1973/patches/patch-ww
deleted file mode 100644
index 2467094..0000000
--- a/qemu-neo1973/patches/patch-ww
+++ /dev/null
@@ -1,59 +0,0 @@
-$NetBSD: patch-ww,v 1.1 2008/04/27 10:08:48 noud4 Exp $
-
---- Makefile.target.orig 2007-12-27 22:37:22.000000000 +0100
-+++ Makefile.target 2007-12-27 22:44:53.000000000 +0100
-@@ -418,9 +418,9 @@
- LIBS += $(CONFIG_FMOD_LIB)
- endif
-
--SOUND_HW = sb16.o es1370.o
-+SOUND_HW =
- ifdef CONFIG_AC97
--SOUND_HW += ac97.o
-+SOUND_HW +=
- endif
- ifdef CONFIG_ADLIB
- SOUND_HW += fmopl.o adlib.o
-@@ -460,13 +460,11 @@
- ifeq ($(TARGET_BASE_ARCH), i386)
- # Hardware support
- VL_OBJS+= ide.o pckbd.o ps2.o vga.o $(SOUND_HW) dma.o
--VL_OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o
-+VL_OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pc.o
- VL_OBJS+= cirrus_vga.o apic.o parallel.o acpi.o piix_pci.o
- VL_OBJS+= usb-uhci.o vmmouse.o vmport.o vmware_vga.o
--CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
- endif
- ifeq ($(TARGET_BASE_ARCH), ppc)
--CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
- # shared objects
- VL_OBJS+= ppc.o ide.o vga.o $(SOUND_HW) dma.o openpic.o
- # PREP target
-@@ -489,7 +487,6 @@
- VL_OBJS+= piix_pci.o parallel.o cirrus_vga.o $(SOUND_HW)
- VL_OBJS+= mipsnet.o
- VL_OBJS+= pflash_cfi01.o
--CPPFLAGS += -DHAS_AUDIO
- endif
- ifeq ($(TARGET_BASE_ARCH), cris)
- VL_OBJS+= etraxfs.o
-@@ -524,9 +521,8 @@
- VL_OBJS+= s3c24xx_udc.o
- VL_OBJS+= neo1973.o jbt6k74.o gps.o $(GSM_OBJS) modem.o
- VL_OBJS+= omap.o omap_lcdc.o omap1_clk.o omap_mmc.o omap_i2c.o
--VL_OBJS+= palm.o tsc210x.o
- VL_OBJS+= mst_fpga.o mainstone.o
--CPPFLAGS+= -DHAS_AUDIO $(GSM_CPPFLAGS)
-+CPPFLAGS+= $(GSM_CPPFLAGS)
- endif
- ifeq ($(TARGET_BASE_ARCH), sh4)
- VL_OBJS+= shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o
-@@ -667,7 +663,7 @@
-
- ifeq (1, 0)
- audio.o sdlaudio.o dsoundaudio.o ossaudio.o wavaudio.o noaudio.o \
--fmodaudio.o alsaaudio.o mixeng.o sb16.o es1370.o ac97.o gus.o adlib.o \
-+fmodaudio.o alsaaudio.o mixeng.o gus.o adlib.o \
- esdaudio.o audio_pt_int.o: \
- CFLAGS := $(CFLAGS) -O0 -g -Wall -Werror -W -Wsign-compare -Wno-unused
- endif
diff --git a/qemu-neo1973/patches/patch-wx b/qemu-neo1973/patches/patch-wx
deleted file mode 100644
index ea0a9a1..0000000
--- a/qemu-neo1973/patches/patch-wx
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-wx,v 1.1 2008/04/27 10:08:48 noud4 Exp $
-
---- hw/pc.c.orig 2007-12-20 22:33:17.000000000 +0100
-+++ hw/pc.c 2007-12-20 22:33:48.000000000 +0100
-@@ -891,7 +891,7 @@
- ioapic = ioapic_init();
- }
- pit = pit_init(0x40, i8259[0]);
-- pcspk_init(pit);
-+ //pcspk_init(pit);
- if (pci_enabled) {
- pic_set_alt_irq_func(isa_pic, ioapic_set_irq, ioapic);
- }
Home |
Main Index |
Thread Index |
Old Index