#define SW_NAME(sw) (sw)->name ? (sw)->name : "unknown"
+#ifdef CONFIG_MARU
+#include "../tizen/src/debug_ch.h"
+MULTI_DEBUG_CHANNEL(tizen, qemu_audio);
+#endif
+
/* Order of CONFIG_AUDIO_DRIVERS is import.
The 1st one is the one used by default, that is the reason
that we generate the list.
monitor_vprintf(default_mon, fmt, ap);
}
else {
+#ifdef CONFIG_MARU
+ TRACE(fmt, ap);
+#else
if (cap) {
fprintf (stderr, "%s: ", cap);
}
vfprintf (stderr, fmt, ap);
+#endif
}
}
}
}
+#ifdef CONFIG_MARU
+// Try to avoid certain wave out locking action in recent Windows...
+// If wave out is locked (because nothing is wired to output jack, ...),
+// QEMU can find voice out device, but open will failed. And it will cause guest audio lock-up.
+// So, we test whether opening is success or not.
+// It can not prevent lock-up caused by runtime voice out lock.
+// To prevent it, QEMU audio backend structure must be changed.
+// We should do it, but now we used simple fix temporarily.
+ HWVoiceOut* hw = audio_calloc(AUDIO_FUNC, 1, s->drv->voice_size_out);
+ if (!hw) {
+ dolog ("Can not allocate voice `%s' size %d\n",
+ s->drv->name, s->drv->voice_size_out);
+ }
+ if(s->drv->pcm_ops->init_out(hw, &conf.fixed_out.settings)) {
+ INFO("Host audio out [%s] is malfunction. Change to noaudio driver\n",
+ s->drv->name);
+ done = 0;
+ }
+ else {
+ INFO("Host audio out [%s] is normal.\n", s->drv->name);
+ s->drv->pcm_ops->fini_out(hw);
+ }
+ g_free(hw);
+#endif
+
if (!done) {
done = !audio_driver_init (s, &no_audio_driver);
if (!done) {
-#!/bin/sh -x
+#!/bin/sh -xe
# clean
clean()
cd $SRCDIR/tizen/
./qemu_configure.sh "$BUILD_CFLAGS $BUILD_LDFLAGS"
make
+ if [ -f "../i386-softmmu/qemu-system-i386.exe" ]
+ then
+ echo "BUILD SUCCESS"
+ else
+ echo "BUILD FAIL!!!"
+ exit 1;
+ fi
}
# install
prepare
BIN_DIR=$SRCDIR/package/emulator.package.windows/data
- EMUL_DIR=$BIN_DIR/Emulator/bin/emulator-x86.exe
mkdir -p $BIN_DIR
cd $SRCDIR/tizen
make install
mv Emulator $BIN_DIR
- editbin.exe /SUBSYSTEM:WINDOWS $EMUL_DIR
}
[ "$1" = "clean" ] && clean
all:
cd src && $(MAKE)
+check_hax:
+ cd src && $(MAKE) check_hax
qemu:
cd src && $(MAKE) qemu
skin_client:
@exit 1
endif
-all: build_info qemu skin_client
+all: build_info qemu skin_client check_hax
qemu:
cd ../../ && $(MAKE)
+check_hax:
+ifdef CONFIG_WIN32
+ $(CC) -o check-hax.exe check_hax.c
+else
+
+endif
skin_client:
ifdef CONFIG_WIN32
ant -buildfile skin/client/build.xml windows-jar
@echo "const char pkginfo_version[] = \"`sed -n '2p' ./../../package/pkginfo.manifest`\";" >> build_info.h
clean:
+ifdef CONFIG_WIN32
+ rm -f check-hax.exe
+else
+
+endif
cd ../../ && $(MAKE) clean
distclean:
cd ../../ && $(MAKE) distclean
mkdir -p $(EMUL_DIR)/bin
mkdir -p $(EMUL_DIR)/etc
mkdir -p $(EMUL_DIR)/x86
+ mkdir -p $(EMUL_DIR)/x86/data
mkdir -p $(EMUL_DIR)/arm
mkdir -p $(EMUL_DIR)/x86/data/pc-bios
cp ../../i386-softmmu/qemu-system-i386 $(EMUL_DIR)/bin/emulator-x86
cp skin/client/emulator-skin.jar $(EMUL_DIR)/bin
+ifdef CONFIG_WIN32
+ cp check-hax.exe $(EMUL_DIR)/bin
+else
+
+endif
cp ../../qemu-img $(EMUL_DIR)/bin
cp -dpr skin/client/skins $(EMUL_DIR)
cp -dpr ../license $(EMUL_DIR)
- cp -dpr ../data $(EMUL_DIR)/x86
cp -dpr ../../pc-bios/bios.bin $(EMUL_DIR)/x86/data/pc-bios
cp -dpr ../../pc-bios/linuxboot.bin $(EMUL_DIR)/x86/data/pc-bios
cp -dpr ../../pc-bios/pxe-rtl8139.rom $(EMUL_DIR)/x86/data/pc-bios
LIBS += -lv4l2 -lv4lconvert
endif
-ifdef CONFIG_WIN32
-obj-i386-y += check_hax.o
-endif
-
ifdef CONFIG_WIN32 # libs for maru camera on windows host
LIBS += -lole32 -loleaut32 -luuid -lstrmiids
endif
static int hax_get_capability( struct hax_state *hax );
static int hax_capability( struct hax_state *hax, struct hax_capabilityinfo *cap );
-int check_hax( void ) {
+static int check_hax( void ) {
struct hax_state hax;
memset( &hax, 0, sizeof( struct hax_state ) );
return -ENXIO;
}
+/*
if ( cap->wstatus & HAX_CAP_MEMQUOTA ) {
if ( cap->mem_quota < hax->mem_quota ) {
fprintf( stderr, "The memory needed by this VM exceeds the driver limit.\n" );
return -ENOSPC;
}
}
+*/
return 0;
}
return 0;
}
+
+int main(int argc, char* argv[]) {
+ return check_hax();
+}
addr.sin_addr.s_addr = INADDR_ANY;
addr.sin_port = htons(port);
- if (((s = qemu_socket(AF_INET,SOCK_STREAM,0)) < 0) ||
- (setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(int)) < 0) ||
- (bind(s,(struct sockaddr *)&addr, sizeof(addr)) < 0) ||
- (listen(s,1) < 0)) {
+ if (((s = qemu_socket(AF_INET, SOCK_STREAM, 0)) < 0) ||
+#ifndef _WIN32
+ (setsockopt(s, SOL_SOCKET,SO_REUSEADDR, (char *)&opt, sizeof(int)) < 0) ||
+#endif
+ (bind(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) ||
+ (listen(s, 1) < 0)) {
/* fail */
ret = -1;
if(tizen_base_port == 0){
for ( ; tries > 0; tries--, port += 10 ) {
- if(check_port_bind_listen(port+1) < 0 )
+ if(check_port_bind_listen(port + 1) < 0 )
continue;
success = 1;
void sdb_setup(void)
{
int tries = 10;
- const char *base_port = "26100";
int success = 0;
- int port;
uint32_t guest_ip;
- const char *p;
char buf[64] = {0,};
inet_strtoip("10.0.2.16", &guest_ip);
- port = strtol(base_port, (char **)&p, 0);
-
- for ( ; tries > 0; tries--, port += 10 ) {
+ for ( ; tries > 0; tries--, tizen_base_port += 10 ) {
// redir form [tcp:26101:10.0.2.16:26101]
- sprintf(buf, "tcp:%d:10.0.2.16:26101", port+1);
+ sprintf(buf, "tcp:%d:10.0.2.16:26101", tizen_base_port + 1);
if(net_slirp_redir((char*)buf) < 0)
continue;
- INFO( "SDBD established on port %d\n", port+1);
+ INFO( "SDBD established on port %d\n", tizen_base_port + 1);
success = 1;
break;
}
exit(1);
}
- if( tizen_base_port != port ){
- ERR( "sdb port is miss match. Aborting port :%d, tizen_base_port: %d\n", port, tizen_base_port);
- exit(1);
- }
-
- /* Save base port. */
- tizen_base_port = port;
INFO( "Port(%d/tcp) listen for SDB \n", tizen_base_port + 1);
/* for sensort */
- sprintf(buf, "tcp:%d:10.0.2.16:3577", get_sdb_base_port() + SDB_TCP_EMULD_INDEX );
+ sprintf(buf, "tcp:%d:10.0.2.16:3577", tizen_base_port + SDB_TCP_EMULD_INDEX );
if(net_slirp_redir((char*)buf) < 0){
ERR( "redirect [%s] fail \n", buf);
}else{
case QEMU_OPTION_enable_hax:
olist = qemu_find_opts("machine");
qemu_opts_reset(olist);
+ hax_disabled = 0;
//qemu_opts_parse(olist, "accel=hax", 0);
break;
#ifdef CONFIG_MARU