[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH RFC 3/7] qom: Add QOM support to user emulators
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH RFC 3/7] qom: Add QOM support to user emulators |
Date: |
Sun, 29 Jan 2012 14:25:27 +0100 |
Link the Object base class and the module infrastructure for class
registration. Call early module init.
Signed-off-by: Andreas Färber <address@hidden>
Cc: Anthony Liguori <address@hidden>
---
Makefile.target | 6 ++++++
Makefile.user | 1 +
bsd-user/main.c | 2 ++
darwin-user/main.c | 3 +++
linux-user/main.c | 2 ++
5 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/Makefile.target b/Makefile.target
index 68481a3..d1b7867 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -129,6 +129,8 @@ obj-m68k-y += m68k-sim.o m68k-semi.o
$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
+obj-y += module.o
+obj-y += $(addprefix ../qom/, $(qom-y))
obj-y += $(addprefix ../libuser/, $(user-obj-y))
obj-y += $(addprefix ../libdis-user/, $(libdis-y))
obj-y += $(libobj-y)
@@ -156,6 +158,8 @@ obj-i386-y += ioport-user.o
$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
+obj-y += module.o
+obj-y += $(addprefix ../qom/, $(qom-y))
obj-y += $(addprefix ../libuser/, $(user-obj-y))
obj-y += $(addprefix ../libdis-user/, $(libdis-y))
obj-y += $(libobj-y)
@@ -178,6 +182,8 @@ obj-i386-y += ioport-user.o
$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
+obj-y += module.o
+obj-y += $(addprefix ../qom/, $(qom-y))
obj-y += $(addprefix ../libuser/, $(user-obj-y))
obj-y += $(addprefix ../libdis-user/, $(libdis-y))
obj-y += $(libobj-y)
diff --git a/Makefile.user b/Makefile.user
index 2b1e4d1..72d01c1 100644
--- a/Makefile.user
+++ b/Makefile.user
@@ -9,6 +9,7 @@ include $(SRC_PATH)/rules.mak
$(call set-vpath, $(SRC_PATH))
QEMU_CFLAGS+=-I..
+QEMU_CFLAGS+=-I$(SRC_PATH)/include
include $(SRC_PATH)/Makefile.objs
diff --git a/bsd-user/main.c b/bsd-user/main.c
index cc7d4a3..2ff0361 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -748,6 +748,8 @@ int main(int argc, char **argv)
if (argc <= 1)
usage();
+ module_call_init(MODULE_INIT_EARLY);
+
if ((envlist = envlist_create()) == NULL) {
(void) fprintf(stderr, "Unable to allocate envlist\n");
exit(1);
diff --git a/darwin-user/main.c b/darwin-user/main.c
index 9b57c20..a4c630d 100644
--- a/darwin-user/main.c
+++ b/darwin-user/main.c
@@ -28,6 +28,7 @@
#include <sys/mman.h>
#include "qemu.h"
+#include "qemu-common.h"
#define DEBUG_LOGFILE "/tmp/qemu.log"
@@ -749,6 +750,8 @@ int main(int argc, char **argv)
if (argc <= 1)
usage();
+ module_call_init(MODULE_INIT_EARLY);
+
optind = 1;
for(;;) {
if (optind >= argc)
diff --git a/linux-user/main.c b/linux-user/main.c
index 64d2208..d4368b6 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -3280,6 +3280,8 @@ int main(int argc, char **argv, char **envp)
qemu_cache_utils_init(envp);
+ module_call_init(MODULE_INIT_EARLY);
+
if ((envlist = envlist_create()) == NULL) {
(void) fprintf(stderr, "Unable to allocate envlist\n");
exit(1);
--
1.7.7
- [Qemu-devel] [PATCH RFC 0/7] Introduce QOM CPU and use for target-arm, Andreas Färber, 2012/01/29
- [Qemu-devel] [PATCH RFC 2/7] qom: Register QOM infrastructure early, Andreas Färber, 2012/01/29
- [Qemu-devel] [PATCH RFC 3/7] qom: Add QOM support to user emulators,
Andreas Färber <=
- [Qemu-devel] [PATCH RFC 5/7] cpu: Introduce cpu_class_foreach(), Andreas Färber, 2012/01/29
- [Qemu-devel] [PATCH 1/7][RESEND] qom: Introduce object_class_is_abstract(), Andreas Färber, 2012/01/29
- [Qemu-devel] [PATCH RFC 4/7] qom: Introduce CPU class, Andreas Färber, 2012/01/29
- [Qemu-devel] [PATCH RFC 6/7] target-arm: Introduce QOM CPU and use for it CPUID lookup, Andreas Färber, 2012/01/29