qemu: enable virtfs
This commit is contained in:
parent
b00c80b8cb
commit
31750c84aa
@ -5,7 +5,7 @@ TERMUX_PKG_DESCRIPTION="A generic and open source machine emulator (x86_64)"
|
||||
TERMUX_PKG_VERSION=3.0.0
|
||||
TERMUX_PKG_SRCURL=https://download.qemu.org/qemu-${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=8d7af64fe8bd5ea5c3bdf17131a8b858491bcce1ee3839425a6d91fb821b5713
|
||||
TERMUX_PKG_DEPENDS="glib, libandroid-shmem, libandroid-support, libbz2, libc++, libcurl, libgnutls, libjpeg-turbo, liblzo, libnettle, libpixman, libpng, libsasl, libssh2, libutil, ncurses, qemu-common, sdl2"
|
||||
TERMUX_PKG_DEPENDS="attr, glib, libandroid-shmem, libandroid-support, libbz2, libc++, libcap, libcurl, libgnutls, libjpeg-turbo, liblzo, libnettle, libpixman, libpng, libsasl, libssh2, libutil, ncurses, qemu-common, sdl2"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
TERMUX_PKG_RM_AFTER_INSTALL="
|
||||
@ -48,6 +48,7 @@ termux_step_configure() {
|
||||
--enable-bzip2 \
|
||||
--disable-seccomp \
|
||||
--enable-coroutine-pool \
|
||||
--enable-virtfs \
|
||||
--enable-tpm \
|
||||
--enable-libssh2 \
|
||||
--disable-jemalloc \
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/audio/ossaudio.c qemu-3.0.0.mod/audio/ossaudio.c
|
||||
--- qemu-3.0.0/audio/ossaudio.c 2018-08-14 22:10:34.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/audio/ossaudio.c 2018-10-26 15:33:11.243105139 +0300
|
||||
+++ qemu-3.0.0.mod/audio/ossaudio.c 2018-10-26 16:49:45.240264962 +0300
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
#include "qemu/osdep.h"
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/block.c qemu-3.0.0.mod/block.c
|
||||
--- qemu-3.0.0/block.c 2018-08-14 22:10:34.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/block.c 2018-10-26 15:33:11.249771868 +0300
|
||||
+++ qemu-3.0.0.mod/block.c 2018-10-26 16:49:45.246931666 +0300
|
||||
@@ -549,7 +549,7 @@
|
||||
const char *tmpdir;
|
||||
tmpdir = getenv("TMPDIR");
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/block/cloop.c qemu-3.0.0.mod/block/cloop.c
|
||||
--- qemu-3.0.0/block/cloop.c 2018-08-14 22:10:34.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/block/cloop.c 2018-10-26 15:33:11.246438503 +0300
|
||||
+++ qemu-3.0.0.mod/block/cloop.c 2018-10-26 16:49:45.243598314 +0300
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
static int cloop_probe(const uint8_t *buf, int buf_size, const char *filename)
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/configure qemu-3.0.0.mod/configure
|
||||
--- qemu-3.0.0/configure 2018-08-14 22:10:34.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/configure 2018-10-26 15:33:11.256438597 +0300
|
||||
+++ qemu-3.0.0.mod/configure 2018-10-26 16:49:45.253598370 +0300
|
||||
@@ -2158,23 +2158,10 @@
|
||||
LIBS="$LIBS -lz"
|
||||
|
||||
|
@ -0,0 +1,22 @@
|
||||
diff -uNr qemu-3.0.0/fsdev/9p-marshal.h qemu-3.0.0.mod/fsdev/9p-marshal.h
|
||||
--- qemu-3.0.0/fsdev/9p-marshal.h 2018-08-14 22:10:34.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/fsdev/9p-marshal.h 2018-10-26 16:58:37.620555116 +0300
|
||||
@@ -48,6 +48,18 @@
|
||||
int64_t mtime_nsec;
|
||||
} V9fsIattr;
|
||||
|
||||
+#ifdef st_atime_nsec
|
||||
+# undef st_atime_nsec
|
||||
+#endif
|
||||
+
|
||||
+#ifdef st_mtime_nsec
|
||||
+# undef st_mtime_nsec
|
||||
+#endif
|
||||
+
|
||||
+#ifdef st_ctime_nsec
|
||||
+# undef st_ctime_nsec
|
||||
+#endif
|
||||
+
|
||||
typedef struct V9fsStatDotl {
|
||||
uint64_t st_result_mask;
|
||||
V9fsQID qid;
|
@ -0,0 +1,37 @@
|
||||
diff -uNr qemu-3.0.0/hw/9pfs/9p-local.c qemu-3.0.0.mod/hw/9pfs/9p-local.c
|
||||
--- qemu-3.0.0/hw/9pfs/9p-local.c 2018-08-14 22:10:34.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/hw/9pfs/9p-local.c 2018-10-26 17:08:50.995577413 +0300
|
||||
@@ -535,9 +535,23 @@
|
||||
rewinddir(fs->dir.stream);
|
||||
}
|
||||
|
||||
+struct DIR {
|
||||
+ int fd_;
|
||||
+};
|
||||
+
|
||||
+static long android_telldir(struct DIR *dirp)
|
||||
+{
|
||||
+ return (long) lseek(dirp->fd_, 0, SEEK_CUR);
|
||||
+}
|
||||
+
|
||||
+static void android_seekdir(DIR *dirp, long loc)
|
||||
+{
|
||||
+ (void) lseek(dirp->fd_, loc, SEEK_SET);
|
||||
+}
|
||||
+
|
||||
static off_t local_telldir(FsContext *ctx, V9fsFidOpenState *fs)
|
||||
{
|
||||
- return telldir(fs->dir.stream);
|
||||
+ return android_telldir(fs->dir.stream);
|
||||
}
|
||||
|
||||
static bool local_is_mapped_file_metadata(FsContext *fs_ctx, const char *name)
|
||||
@@ -571,7 +585,7 @@
|
||||
|
||||
static void local_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off)
|
||||
{
|
||||
- seekdir(fs->dir.stream, off);
|
||||
+ android_seekdir(fs->dir.stream, off);
|
||||
}
|
||||
|
||||
static ssize_t local_preadv(FsContext *ctx, V9fsFidOpenState *fs,
|
@ -0,0 +1,37 @@
|
||||
diff -uNr qemu-3.0.0/hw/9pfs/9p-proxy.c qemu-3.0.0.mod/hw/9pfs/9p-proxy.c
|
||||
--- qemu-3.0.0/hw/9pfs/9p-proxy.c 2018-08-14 22:10:34.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/hw/9pfs/9p-proxy.c 2018-10-26 17:09:13.395768387 +0300
|
||||
@@ -674,9 +674,23 @@
|
||||
rewinddir(fs->dir.stream);
|
||||
}
|
||||
|
||||
+struct DIR {
|
||||
+ int fd_;
|
||||
+};
|
||||
+
|
||||
+static long android_telldir(struct DIR *dirp)
|
||||
+{
|
||||
+ return (long) lseek(dirp->fd_, 0, SEEK_CUR);
|
||||
+}
|
||||
+
|
||||
+static void android_seekdir(DIR *dirp, long loc)
|
||||
+{
|
||||
+ (void) lseek(dirp->fd_, loc, SEEK_SET);
|
||||
+}
|
||||
+
|
||||
static off_t proxy_telldir(FsContext *ctx, V9fsFidOpenState *fs)
|
||||
{
|
||||
- return telldir(fs->dir.stream);
|
||||
+ return android_telldir(fs->dir.stream);
|
||||
}
|
||||
|
||||
static struct dirent *proxy_readdir(FsContext *ctx, V9fsFidOpenState *fs)
|
||||
@@ -686,7 +700,7 @@
|
||||
|
||||
static void proxy_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off)
|
||||
{
|
||||
- seekdir(fs->dir.stream, off);
|
||||
+ android_seekdir(fs->dir.stream, off);
|
||||
}
|
||||
|
||||
static ssize_t proxy_preadv(FsContext *ctx, V9fsFidOpenState *fs,
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/hw/usb/ccid-card-emulated.c qemu-3.0.0.mod/hw/usb/ccid-card-emulated.c
|
||||
--- qemu-3.0.0/hw/usb/ccid-card-emulated.c 2018-08-14 22:10:34.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/hw/usb/ccid-card-emulated.c 2018-10-26 15:33:11.259771962 +0300
|
||||
+++ qemu-3.0.0.mod/hw/usb/ccid-card-emulated.c 2018-10-26 16:49:45.256931721 +0300
|
||||
@@ -409,7 +409,7 @@
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/hw/xenpv/xen_domainbuild.c qemu-3.0.0.mod/hw/xenpv/xen_domainbuild.c
|
||||
--- qemu-3.0.0/hw/xenpv/xen_domainbuild.c 2018-08-14 22:10:34.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/hw/xenpv/xen_domainbuild.c 2018-10-26 15:33:11.259771962 +0300
|
||||
+++ qemu-3.0.0.mod/hw/xenpv/xen_domainbuild.c 2018-10-26 16:49:45.260265074 +0300
|
||||
@@ -167,7 +167,7 @@
|
||||
|
||||
/* close all file handles, except stdio/out/err,
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/include/net/net.h qemu-3.0.0.mod/include/net/net.h
|
||||
--- qemu-3.0.0/include/net/net.h 2018-08-14 22:10:34.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/include/net/net.h 2018-10-26 15:33:11.263105327 +0300
|
||||
+++ qemu-3.0.0.mod/include/net/net.h 2018-10-26 16:49:45.260265074 +0300
|
||||
@@ -216,8 +216,8 @@
|
||||
int net_hub_id_for_client(NetClientState *nc, int *id);
|
||||
NetClientState *net_hub_port_find(int hub_id);
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/linux-user/aarch64/signal.c qemu-3.0.0.mod/linux-user/aarch64/signal.c
|
||||
--- qemu-3.0.0/linux-user/aarch64/signal.c 2018-08-14 22:10:34.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/linux-user/aarch64/signal.c 2018-10-26 15:33:35.159997747 +0300
|
||||
+++ qemu-3.0.0.mod/linux-user/aarch64/signal.c 2018-10-26 16:49:45.263598425 +0300
|
||||
@@ -38,7 +38,7 @@
|
||||
target_stack_t tuc_stack;
|
||||
target_sigset_t tuc_sigmask;
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/linux-user/arm/signal.c qemu-3.0.0.mod/linux-user/arm/signal.c
|
||||
--- qemu-3.0.0/linux-user/arm/signal.c 2018-08-14 22:10:34.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/linux-user/arm/signal.c 2018-10-26 16:04:01.381418576 +0300
|
||||
+++ qemu-3.0.0.mod/linux-user/arm/signal.c 2018-10-26 16:49:45.263598425 +0300
|
||||
@@ -59,7 +59,7 @@
|
||||
target_stack_t tuc_stack;
|
||||
struct target_sigcontext tuc_mcontext;
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/linux-user/signal.c qemu-3.0.0.mod/linux-user/signal.c
|
||||
--- qemu-3.0.0/linux-user/signal.c 2018-08-14 22:10:34.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/linux-user/signal.c 2018-10-26 15:33:11.266438691 +0300
|
||||
+++ qemu-3.0.0.mod/linux-user/signal.c 2018-10-26 16:49:45.270265128 +0300
|
||||
@@ -189,6 +189,27 @@
|
||||
return atomic_xchg(&ts->signal_pending, 1);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/linux-user/strace.c qemu-3.0.0.mod/linux-user/strace.c
|
||||
--- qemu-3.0.0/linux-user/strace.c 2018-08-14 22:10:34.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/linux-user/strace.c 2018-10-26 15:33:11.269772056 +0300
|
||||
+++ qemu-3.0.0.mod/linux-user/strace.c 2018-10-26 16:49:45.273598481 +0300
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include <sys/ipc.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/linux-user/syscall.c qemu-3.0.0.mod/linux-user/syscall.c
|
||||
--- qemu-3.0.0/linux-user/syscall.c 2018-08-14 22:10:34.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/linux-user/syscall.c 2018-10-26 15:33:11.273105420 +0300
|
||||
+++ qemu-3.0.0.mod/linux-user/syscall.c 2018-10-26 16:49:45.276931833 +0300
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <poll.h>
|
||||
#include <sys/times.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/linux-user/syscall_defs.h qemu-3.0.0.mod/linux-user/syscall_defs.h
|
||||
--- qemu-3.0.0/linux-user/syscall_defs.h 2018-08-14 22:10:34.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/linux-user/syscall_defs.h 2018-10-26 15:33:11.276438785 +0300
|
||||
+++ qemu-3.0.0.mod/linux-user/syscall_defs.h 2018-10-26 16:49:45.280265184 +0300
|
||||
@@ -1698,7 +1698,7 @@
|
||||
abi_ulong target_st_mtime_nsec;
|
||||
abi_ulong target_st_ctime;
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/lockf_implementation.h qemu-3.0.0.mod/lockf_implementation.h
|
||||
--- qemu-3.0.0/lockf_implementation.h 1970-01-01 03:00:00.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/lockf_implementation.h 2018-10-26 15:33:11.283105515 +0300
|
||||
+++ qemu-3.0.0.mod/lockf_implementation.h 2018-10-26 16:49:45.283598536 +0300
|
||||
@@ -0,0 +1,56 @@
|
||||
+#ifndef LOCKF_IMPLEMENTATION_H
|
||||
+#define LOCKF_IMPLEMENTATION_H
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/migration/exec.c qemu-3.0.0.mod/migration/exec.c
|
||||
--- qemu-3.0.0/migration/exec.c 2018-08-14 22:10:34.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/migration/exec.c 2018-10-26 15:33:11.283105515 +0300
|
||||
+++ qemu-3.0.0.mod/migration/exec.c 2018-10-26 16:49:45.283598536 +0300
|
||||
@@ -28,7 +28,7 @@
|
||||
void exec_start_outgoing_migration(MigrationState *s, const char *command, Error **errp)
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/net/tap.c qemu-3.0.0.mod/net/tap.c
|
||||
--- qemu-3.0.0/net/tap.c 2018-08-14 22:10:34.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/net/tap.c 2018-10-26 15:33:11.286438879 +0300
|
||||
+++ qemu-3.0.0.mod/net/tap.c 2018-10-26 16:49:45.286931887 +0300
|
||||
@@ -526,7 +526,7 @@
|
||||
*parg++ = helper_cmd;
|
||||
*parg++ = NULL;
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/os-posix.c qemu-3.0.0.mod/os-posix.c
|
||||
--- qemu-3.0.0/os-posix.c 2018-08-14 22:10:34.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/os-posix.c 2018-10-26 15:33:11.289772244 +0300
|
||||
+++ qemu-3.0.0.mod/os-posix.c 2018-10-26 16:49:45.286931887 +0300
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/log.h"
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/qemu-nbd.c qemu-3.0.0.mod/qemu-nbd.c
|
||||
--- qemu-3.0.0/qemu-nbd.c 2018-08-14 22:10:34.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/qemu-nbd.c 2018-10-26 15:33:11.289772244 +0300
|
||||
+++ qemu-3.0.0.mod/qemu-nbd.c 2018-10-26 16:49:45.290265240 +0300
|
||||
@@ -43,7 +43,7 @@
|
||||
#include "trace/control.h"
|
||||
#include "qemu-version.h"
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/qga/main.c qemu-3.0.0.mod/qga/main.c
|
||||
--- qemu-3.0.0/qga/main.c 2018-08-14 22:10:34.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/qga/main.c 2018-10-26 15:33:11.293105608 +0300
|
||||
+++ qemu-3.0.0.mod/qga/main.c 2018-10-26 16:49:45.290265240 +0300
|
||||
@@ -45,6 +45,8 @@
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/scsi/qemu-pr-helper.c qemu-3.0.0.mod/scsi/qemu-pr-helper.c
|
||||
--- qemu-3.0.0/scsi/qemu-pr-helper.c 2018-08-14 22:10:35.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/scsi/qemu-pr-helper.c 2018-10-26 15:33:11.296438974 +0300
|
||||
+++ qemu-3.0.0.mod/scsi/qemu-pr-helper.c 2018-10-26 16:49:45.293598592 +0300
|
||||
@@ -24,6 +24,8 @@
|
||||
#include <linux/dm-ioctl.h>
|
||||
#include <scsi/sg.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/slirp/misc.c qemu-3.0.0.mod/slirp/misc.c
|
||||
--- qemu-3.0.0/slirp/misc.c 2018-08-14 22:10:35.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/slirp/misc.c 2018-10-26 15:33:11.299772338 +0300
|
||||
+++ qemu-3.0.0.mod/slirp/misc.c 2018-10-26 16:49:45.296931943 +0300
|
||||
@@ -146,7 +146,7 @@
|
||||
dup2(s, 0);
|
||||
dup2(s, 1);
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/slirp/slirp.c qemu-3.0.0.mod/slirp/slirp.c
|
||||
--- qemu-3.0.0/slirp/slirp.c 2018-08-14 22:10:35.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/slirp/slirp.c 2018-10-26 15:33:11.299772338 +0300
|
||||
+++ qemu-3.0.0.mod/slirp/slirp.c 2018-10-26 16:49:45.300265295 +0300
|
||||
@@ -133,7 +133,7 @@
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/tcg/i386/tcg-target.inc.c qemu-3.0.0.mod/tcg/i386/tcg-target.inc.c
|
||||
--- qemu-3.0.0/tcg/i386/tcg-target.inc.c 2018-08-14 22:10:35.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/tcg/i386/tcg-target.inc.c 2018-10-26 15:33:11.303105703 +0300
|
||||
+++ qemu-3.0.0.mod/tcg/i386/tcg-target.inc.c 2018-10-26 16:49:45.303598647 +0300
|
||||
@@ -1869,8 +1869,12 @@
|
||||
#elif defined(__x86_64__) && defined(__linux__)
|
||||
# include <asm/prctl.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/tcg/tcg.c qemu-3.0.0.mod/tcg/tcg.c
|
||||
--- qemu-3.0.0/tcg/tcg.c 2018-08-14 22:10:35.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/tcg/tcg.c 2018-10-26 15:33:11.306439067 +0300
|
||||
+++ qemu-3.0.0.mod/tcg/tcg.c 2018-10-26 16:49:45.303598647 +0300
|
||||
@@ -3909,7 +3909,7 @@
|
||||
/* Enable this block to be able to debug the ELF image file creation.
|
||||
One can use readelf, objdump, or other inspection utilities. */
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qemu-3.0.0/util/qemu-sockets.c qemu-3.0.0.mod/util/qemu-sockets.c
|
||||
--- qemu-3.0.0/util/qemu-sockets.c 2018-08-14 22:10:35.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/util/qemu-sockets.c 2018-10-26 15:33:11.309772432 +0300
|
||||
+++ qemu-3.0.0.mod/util/qemu-sockets.c 2018-10-26 16:49:45.306931999 +0300
|
||||
@@ -841,7 +841,7 @@
|
||||
path = saddr->path;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user