summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.target28
-rw-r--r--arch_init.c4
-rw-r--r--bsd-user/main.c6
-rwxr-xr-xconfigure60
-rw-r--r--default-configs/ppc-softmmu.mak2
-rw-r--r--default-configs/ppc64-softmmu.mak4
-rw-r--r--default-configs/ppcemb-softmmu.mak2
-rw-r--r--docs/tracing.txt2
-rw-r--r--hw/arm/boot.c7
-rw-r--r--hw/microblaze/boot.c12
-rw-r--r--hw/ppc/ppc440_bamboo.c2
-rw-r--r--hw/ppc/spapr_vio.c6
-rw-r--r--hw/ppc/virtex_ml507.c18
-rw-r--r--include/libfdt_env.h36
-rw-r--r--linux-user/main.c6
-rw-r--r--qapi-schema.json18
-rwxr-xr-xscripts/create_config15
-rwxr-xr-xscripts/tracetool.py18
18 files changed, 87 insertions, 159 deletions
diff --git a/Makefile.target b/Makefile.target
index b0be124d29..9a4985213b 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -15,14 +15,14 @@ QEMU_CFLAGS+=-I$(SRC_PATH)/include
ifdef CONFIG_USER_ONLY
# user emulator name
-QEMU_PROG=qemu-$(TARGET_ARCH2)
+QEMU_PROG=qemu-$(TARGET_NAME)
else
# system emulator name
ifneq (,$(findstring -mwindows,$(libs_softmmu)))
# Terminate program name with a 'w' because the linker builds a windows executable.
-QEMU_PROGW=qemu-system-$(TARGET_ARCH2)w$(EXESUF)
+QEMU_PROGW=qemu-system-$(TARGET_NAME)w$(EXESUF)
endif # windows executable
-QEMU_PROG=qemu-system-$(TARGET_ARCH2)$(EXESUF)
+QEMU_PROG=qemu-system-$(TARGET_NAME)$(EXESUF)
endif
PROGS=$(QEMU_PROG)
@@ -35,7 +35,7 @@ config-target.h: config-target.h-timestamp
config-target.h-timestamp: config-target.mak
ifdef CONFIG_TRACE_SYSTEMTAP
-stap: $(QEMU_PROG).stp
+stap: $(QEMU_PROG).stp-installed $(QEMU_PROG).stp
ifdef CONFIG_USER_ONLY
TARGET_TYPE=user
@@ -43,14 +43,24 @@ else
TARGET_TYPE=system
endif
-$(QEMU_PROG).stp: $(SRC_PATH)/trace-events
+$(QEMU_PROG).stp-installed: $(SRC_PATH)/trace-events
$(call quiet-command,$(TRACETOOL) \
--format=stap \
--backend=$(TRACE_BACKEND) \
--binary=$(bindir)/$(QEMU_PROG) \
- --target-arch=$(TARGET_ARCH) \
+ --target-name=$(TARGET_NAME) \
+ --target-type=$(TARGET_TYPE) \
+ < $< > $@," GEN $(TARGET_DIR)$(QEMU_PROG).stp-installed")
+
+$(QEMU_PROG).stp: $(SRC_PATH)/trace-events
+ $(call quiet-command,$(TRACETOOL) \
+ --format=stap \
+ --backend=$(TRACE_BACKEND) \
+ --binary=$(realpath .)/$(QEMU_PROG) \
+ --target-name=$(TARGET_NAME) \
--target-type=$(TARGET_TYPE) \
< $< > $@," GEN $(TARGET_DIR)$(QEMU_PROG).stp")
+
else
stap:
endif
@@ -93,7 +103,7 @@ endif #CONFIG_LINUX_USER
ifdef CONFIG_BSD_USER
-QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH)
+QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ABI_DIR)
obj-y += bsd-user/
obj-y += gdbstub.o user-exec.o
@@ -118,7 +128,7 @@ obj-$(CONFIG_XEN) += xen-all.o xen-mapcache.o
obj-$(CONFIG_NO_XEN) += xen-stub.o
# Hardware support
-ifeq ($(TARGET_ARCH), sparc64)
+ifeq ($(TARGET_NAME), sparc64)
obj-y += hw/sparc64/
else
obj-y += hw/$(TARGET_BASE_ARCH)/
@@ -182,7 +192,7 @@ endif
endif
ifdef CONFIG_TRACE_SYSTEMTAP
$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset"
- $(INSTALL_DATA) $(QEMU_PROG).stp "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset"
+ $(INSTALL_DATA) $(QEMU_PROG).stp-installed "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset/$(QEMU_PROG).stp"
endif
GENERATED_HEADERS += config-target.h
diff --git a/arch_init.c b/arch_init.c
index 872020e062..a8b91eed7a 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -123,7 +123,7 @@ static struct defconfig_file {
bool userconfig;
} default_config_files[] = {
{ CONFIG_QEMU_CONFDIR "/qemu.conf", true },
- { CONFIG_QEMU_CONFDIR "/target-" TARGET_ARCH ".conf", true },
+ { CONFIG_QEMU_CONFDIR "/target-" TARGET_NAME ".conf", true },
{ NULL }, /* end of list */
};
@@ -1093,7 +1093,7 @@ TargetInfo *qmp_query_target(Error **errp)
{
TargetInfo *info = g_malloc0(sizeof(*info));
- info->arch = TARGET_TYPE;
+ info->arch = g_strdup(TARGET_NAME);
return info;
}
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 0da3ab9e21..572f13afe4 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -670,8 +670,8 @@ void cpu_loop(CPUSPARCState *env)
static void usage(void)
{
- printf("qemu-" TARGET_ARCH " version " QEMU_VERSION ", Copyright (c) 2003-2008 Fabrice Bellard\n"
- "usage: qemu-" TARGET_ARCH " [options] program [arguments...]\n"
+ printf("qemu-" TARGET_NAME " version " QEMU_VERSION ", Copyright (c) 2003-2008 Fabrice Bellard\n"
+ "usage: qemu-" TARGET_NAME " [options] program [arguments...]\n"
"BSD CPU emulator (compiled for %s emulation)\n"
"\n"
"Standard options:\n"
@@ -706,7 +706,7 @@ static void usage(void)
"Note that if you provide several changes to single variable\n"
"last change will stay in effect.\n"
,
- TARGET_ARCH,
+ TARGET_NAME,
interp_prefix,
x86_stack_size);
exit(1);
diff --git a/configure b/configure
index 60b0811706..ad32f87b8e 100755
--- a/configure
+++ b/configure
@@ -2486,9 +2486,31 @@ fi
##########################################
# fdt probe
+# fdt support is mandatory for at least some target architectures,
+# so insist on it if we're building those system emulators.
+fdt_required=no
+for target in $target_list; do
+ case $target in
+ arm*-softmmu|ppc*-softmmu|microblaze*-softmmu)
+ fdt_required=yes
+ ;;
+ esac
+done
+
+if test "$fdt_required" = "yes"; then
+ if test "$fdt" = "no"; then
+ error_exit "fdt disabled but some requested targets require it." \
+ "You can turn off fdt only if you also disable all the system emulation" \
+ "targets which need it (by specifying a cut down --target-list)."
+ fi
+ fdt=yes
+fi
+
if test "$fdt" != "no" ; then
fdt_libs="-lfdt"
+ # explicitly check for libfdt_env.h as it is missing in some stable installs
cat > $TMPC << EOF
+#include <libfdt_env.h>
int main(void) { return 0; }
EOF
if compile_prog "" "$fdt_libs" ; then
@@ -4083,10 +4105,10 @@ fi
for target in $target_list; do
target_dir="$target"
config_target_mak=$target_dir/config-target.mak
-target_arch2=`echo $target | cut -d '-' -f 1`
+target_name=`echo $target | cut -d '-' -f 1`
target_bigendian="no"
-case "$target_arch2" in
+case "$target_name" in
armeb|lm32|m68k|microblaze|mips|mipsn32|mips64|moxie|or32|ppc|ppcemb|ppc64|ppc64abi32|s390x|sh4eb|sparc|sparc64|sparc32plus|xtensaeb)
target_bigendian=yes
;;
@@ -4096,17 +4118,17 @@ target_user_only="no"
target_linux_user="no"
target_bsd_user="no"
case "$target" in
- ${target_arch2}-softmmu)
+ ${target_name}-softmmu)
target_softmmu="yes"
;;
- ${target_arch2}-linux-user)
+ ${target_name}-linux-user)
if test "$linux" != "yes" ; then
error_exit "Target '$target' is only available on a Linux host"
fi
target_user_only="yes"
target_linux_user="yes"
;;
- ${target_arch2}-bsd-user)
+ ${target_name}-bsd-user)
if test "$bsd" != "yes" ; then
error_exit "Target '$target' is only available on a BSD host"
fi
@@ -4124,14 +4146,14 @@ echo "# Automatically generated by configure - do not modify" > $config_target_m
bflt="no"
target_nptl="no"
-interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_arch2/g"`
+interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_name/g"`
gdb_xml_files=""
-TARGET_ARCH="$target_arch2"
+TARGET_ARCH="$target_name"
TARGET_BASE_ARCH=""
TARGET_ABI_DIR=""
-case "$target_arch2" in
+case "$target_name" in
i386)
;;
x86_64)
@@ -4243,17 +4265,15 @@ upper() {
echo "$@"| LC_ALL=C tr '[a-z]' '[A-Z]'
}
-echo "TARGET_ARCH=$TARGET_ARCH" >> $config_target_mak
target_arch_name="`upper $TARGET_ARCH`"
echo "TARGET_$target_arch_name=y" >> $config_target_mak
-echo "TARGET_ARCH2=$target_arch2" >> $config_target_mak
-echo "TARGET_TYPE=TARGET_TYPE_`upper $target_arch2`" >> $config_target_mak
+echo "TARGET_NAME=$target_name" >> $config_target_mak
echo "TARGET_BASE_ARCH=$TARGET_BASE_ARCH" >> $config_target_mak
if [ "$TARGET_ABI_DIR" = "" ]; then
TARGET_ABI_DIR=$TARGET_ARCH
fi
echo "TARGET_ABI_DIR=$TARGET_ABI_DIR" >> $config_target_mak
-case "$target_arch2" in
+case "$target_name" in
i386|x86_64)
if test "$xen" = "yes" -a "$target_softmmu" = "yes" ; then
echo "CONFIG_XEN=y" >> $config_target_mak
@@ -4264,17 +4284,17 @@ case "$target_arch2" in
;;
*)
esac
-case "$target_arch2" in
+case "$target_name" in
arm|i386|x86_64|ppcemb|ppc|ppc64|s390x)
# Make sure the target and host cpus are compatible
if test "$kvm" = "yes" -a "$target_softmmu" = "yes" -a \
- \( "$target_arch2" = "$cpu" -o \
- \( "$target_arch2" = "ppcemb" -a "$cpu" = "ppc" \) -o \
- \( "$target_arch2" = "ppc64" -a "$cpu" = "ppc" \) -o \
- \( "$target_arch2" = "ppc" -a "$cpu" = "ppc64" \) -o \
- \( "$target_arch2" = "ppcemb" -a "$cpu" = "ppc64" \) -o \
- \( "$target_arch2" = "x86_64" -a "$cpu" = "i386" \) -o \
- \( "$target_arch2" = "i386" -a "$cpu" = "x86_64" \) \) ; then
+ \( "$target_name" = "$cpu" -o \
+ \( "$target_name" = "ppcemb" -a "$cpu" = "ppc" \) -o \
+ \( "$target_name" = "ppc64" -a "$cpu" = "ppc" \) -o \
+ \( "$target_name" = "ppc" -a "$cpu" = "ppc64" \) -o \
+ \( "$target_name" = "ppcemb" -a "$cpu" = "ppc64" \) -o \
+ \( "$target_name" = "x86_64" -a "$cpu" = "i386" \) -o \
+ \( "$target_name" = "i386" -a "$cpu" = "x86_64" \) \) ; then
echo "CONFIG_KVM=y" >> $config_target_mak
if test "$vhost_net" = "yes" ; then
echo "CONFIG_VHOST_NET=y" >> $config_target_mak
diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index cc3587f721..bcaa52fb10 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -42,6 +42,6 @@ CONFIG_I8259=y
CONFIG_XILINX=y
CONFIG_XILINX_ETHLITE=y
CONFIG_OPENPIC=y
-CONFIG_E500=$(CONFIG_FDT)
+CONFIG_E500=y
# For PReP
CONFIG_MC146818RTC=y
diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak
index 884ea8a1cd..8b7874ea6a 100644
--- a/default-configs/ppc64-softmmu.mak
+++ b/default-configs/ppc64-softmmu.mak
@@ -42,8 +42,8 @@ CONFIG_I8259=y
CONFIG_XILINX=y
CONFIG_XILINX_ETHLITE=y
CONFIG_OPENPIC=y
-CONFIG_PSERIES=$(CONFIG_FDT)
-CONFIG_E500=$(CONFIG_FDT)
+CONFIG_PSERIES=y
+CONFIG_E500=y
# For pSeries
CONFIG_PCI_HOTPLUG=y
# For PReP
diff --git a/default-configs/ppcemb-softmmu.mak b/default-configs/ppcemb-softmmu.mak
index be93e03ce2..61920ffe63 100644
--- a/default-configs/ppcemb-softmmu.mak
+++ b/default-configs/ppcemb-softmmu.mak
@@ -37,6 +37,6 @@ CONFIG_I8259=y
CONFIG_XILINX=y
CONFIG_XILINX_ETHLITE=y
CONFIG_OPENPIC=y
-CONFIG_E500=$(CONFIG_FDT)
+CONFIG_E500=y
# For PReP
CONFIG_MC146818RTC=y
diff --git a/docs/tracing.txt b/docs/tracing.txt
index 60ff9c5e6e..bfc261bcaf 100644
--- a/docs/tracing.txt
+++ b/docs/tracing.txt
@@ -225,7 +225,7 @@ probes:
scripts/tracetool --dtrace --stap \
--binary path/to/qemu-binary \
--target-type system \
- --target-arch x86_64 \
+ --target-name x86_64 \
<trace-events >qemu.stp
== Trace event properties ==
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index f451529fce..defcf15097 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -227,7 +227,6 @@ static void set_kernel_args_old(const struct arm_boot_info *info)
static int load_dtb(hwaddr addr, const struct arm_boot_info *binfo)
{
-#ifdef CONFIG_FDT
uint32_t *mem_reg_property;
uint32_t mem_reg_propsize;
void *fdt = NULL;
@@ -308,12 +307,6 @@ static int load_dtb(hwaddr addr, const struct arm_boot_info *binfo)
cpu_physical_memory_write(addr, fdt, size);
return 0;
-
-#else
- fprintf(stderr, "Device tree requested, "
- "but qemu was compiled without fdt support\n");
- return -1;
-#endif
}
static void do_cpu_reset(void *opaque)
diff --git a/hw/microblaze/boot.c b/hw/microblaze/boot.c
index e543d886b8..3f1d70ef9b 100644
--- a/hw/microblaze/boot.c
+++ b/hw/microblaze/boot.c
@@ -61,7 +61,6 @@ static int microblaze_load_dtb(hwaddr addr,
const char *dtb_filename)
{
int fdt_size;
-#ifdef CONFIG_FDT
void *fdt = NULL;
int r;
@@ -81,17 +80,6 @@ static int microblaze_load_dtb(hwaddr addr,
}
cpu_physical_memory_write(addr, fdt, fdt_size);
-#else
- /* We lack libfdt so we cannot manipulate the fdt. Just pass on the blob
- to the kernel. */
- if (dtb_filename) {
- fdt_size = load_image_targphys(dtb_filename, addr, 0x10000);
- }
- if (kernel_cmdline) {
- fprintf(stderr,
- "Warning: missing libfdt, cannot pass cmdline to kernel!\n");
- }
-#endif
return fdt_size;
}
diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c
index a55e7170cc..b0c1c027d4 100644
--- a/hw/ppc/ppc440_bamboo.c
+++ b/hw/ppc/ppc440_bamboo.c
@@ -58,7 +58,6 @@ static int bamboo_load_device_tree(hwaddr addr,
const char *kernel_cmdline)
{
int ret = -1;
-#ifdef CONFIG_FDT
uint32_t mem_reg_property[] = { 0, 0, cpu_to_be32(ramsize) };
char *filename;
int fdt_size;
@@ -115,7 +114,6 @@ static int bamboo_load_device_tree(hwaddr addr,
g_free(fdt);
out:
-#endif
return ret;
}
diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c
index 1405c3202c..304f3168f7 100644
--- a/hw/ppc/spapr_vio.c
+++ b/hw/ppc/spapr_vio.c
@@ -34,9 +34,7 @@
#include "hw/ppc/spapr_vio.h"
#include "hw/ppc/xics.h"
-#ifdef CONFIG_FDT
#include <libfdt.h>
-#endif /* CONFIG_FDT */
/* #define DEBUG_SPAPR */
@@ -94,7 +92,6 @@ VIOsPAPRDevice *spapr_vio_find_by_reg(VIOsPAPRBus *bus, uint32_t reg)
return NULL;
}
-#ifdef CONFIG_FDT
static int vio_make_devnode(VIOsPAPRDevice *dev,
void *fdt)
{
@@ -159,7 +156,6 @@ static int vio_make_devnode(VIOsPAPRDevice *dev,
return node_off;
}
-#endif /* CONFIG_FDT */
/*
* CRQ handling
@@ -570,7 +566,6 @@ static void spapr_vio_register_types(void)
type_init(spapr_vio_register_types)
-#ifdef CONFIG_FDT
static int compare_reg(const void *p1, const void *p2)
{
VIOsPAPRDevice const *dev1, *dev2;
@@ -655,4 +650,3 @@ int spapr_populate_chosen_stdout(void *fdt, VIOsPAPRBus *bus)
return ret;
}
-#endif /* CONFIG_FDT */
diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
index 1b4ce760e6..709a707243 100644
--- a/hw/ppc/virtex_ml507.c
+++ b/hw/ppc/virtex_ml507.c
@@ -141,7 +141,6 @@ static int xilinx_load_device_tree(hwaddr addr,
{
char *path;
int fdt_size;
-#ifdef CONFIG_FDT
void *fdt;
int r;
@@ -162,23 +161,6 @@ static int xilinx_load_device_tree(hwaddr addr,
if (r < 0)
fprintf(stderr, "couldn't set /chosen/bootargs\n");
cpu_physical_memory_write(addr, fdt, fdt_size);
-#else
- /* We lack libfdt so we cannot manipulate the fdt. Just pass on the blob
- to the kernel. */
- fdt_size = load_image_targphys("ppc.dtb", addr, 0x10000);
- if (fdt_size < 0) {
- path = qemu_find_file(QEMU_FILE_TYPE_BIOS, BINARY_DEVICE_TREE_FILE);
- if (path) {
- fdt_size = load_image_targphys(path, addr, 0x10000);
- g_free(path);
- }
- }
-
- if (kernel_cmdline) {
- fprintf(stderr,
- "Warning: missing libfdt, cannot pass cmdline to kernel!\n");
- }
-#endif
return fdt_size;
}
diff --git a/include/libfdt_env.h b/include/libfdt_env.h
deleted file mode 100644
index 3667d4cb3a..0000000000
--- a/include/libfdt_env.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
- *
- * Copyright IBM Corp. 2008
- * Authors: Hollis Blanchard <hollisb@us.ibm.com>
- *
- */
-
-#ifndef _LIBFDT_ENV_H
-#define _LIBFDT_ENV_H
-
-#include "qemu/bswap.h"
-
-#ifdef HOST_WORDS_BIGENDIAN
-#define fdt32_to_cpu(x) (x)
-#define cpu_to_fdt32(x) (x)
-#define fdt64_to_cpu(x) (x)
-#define cpu_to_fdt64(x) (x)
-#else
-#define fdt32_to_cpu(x) bswap32(x)
-#define cpu_to_fdt32(x) bswap32(x)
-#define fdt64_to_cpu(x) bswap64(x)
-#define cpu_to_fdt64(x) bswap64(x)
-#endif
-
-#endif /* _LIBFDT_ENV_H */
diff --git a/linux-user/main.c b/linux-user/main.c
index b97b8cfd33..21725a4971 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -3339,7 +3339,7 @@ static void handle_arg_strace(const char *arg)
static void handle_arg_version(const char *arg)
{
- printf("qemu-" TARGET_ARCH " version " QEMU_VERSION QEMU_PKGVERSION
+ printf("qemu-" TARGET_NAME " version " QEMU_VERSION QEMU_PKGVERSION
", Copyright (c) 2003-2008 Fabrice Bellard\n");
exit(0);
}
@@ -3400,8 +3400,8 @@ static void usage(void)
int maxarglen;
int maxenvlen;
- printf("usage: qemu-" TARGET_ARCH " [options] program [arguments...]\n"
- "Linux CPU emulator (compiled for " TARGET_ARCH " emulation)\n"
+ printf("usage: qemu-" TARGET_NAME " [options] program [arguments...]\n"
+ "Linux CPU emulator (compiled for " TARGET_NAME " emulation)\n"
"\n"
"Options and associated environment variables:\n"
"\n");
diff --git a/qapi-schema.json b/qapi-schema.json
index 5ad6894738..a80ee405d1 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -3013,22 +3013,6 @@
{ 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
##
-# @TargetType
-#
-# Target CPU emulation type
-#
-# These parameters correspond to the softmmu binary CPU name that is currently
-# running.
-#
-# Since: 1.2.0
-##
-{ 'enum': 'TargetType',
- 'data': [ 'alpha', 'arm', 'cris', 'i386', 'lm32', 'm68k', 'microblazeel',
- 'microblaze', 'mips64el', 'mips64', 'mipsel', 'mips', 'moxie',
- 'or32', 'ppc64', 'ppcemb', 'ppc', 's390x', 'sh4eb', 'sh4',
- 'sparc64', 'sparc', 'unicore32', 'x86_64', 'xtensaeb', 'xtensa' ] }
-
-##
# @TargetInfo:
#
# Information describing the QEMU target.
@@ -3038,7 +3022,7 @@
# Since: 1.2.0
##
{ 'type': 'TargetInfo',
- 'data': { 'arch': 'TargetType' } }
+ 'data': { 'arch': 'str' } }
##
# @query-target:
diff --git a/scripts/create_config b/scripts/create_config
index 258513a887..b1adbf5897 100755
--- a/scripts/create_config
+++ b/scripts/create_config
@@ -77,16 +77,10 @@ case $line in
value=${line#*=}
echo "#define $name $value"
;;
- TARGET_ARCH=*) # configuration
- target_arch=${line#*=}
- echo "#define TARGET_ARCH \"$target_arch\""
- ;;
TARGET_BASE_ARCH=*) # configuration
target_base_arch=${line#*=}
- if [ "$target_base_arch" != "$target_arch" ]; then
- base_arch_name=`echo $target_base_arch | LC_ALL=C tr '[a-z]' '[A-Z]'`
- echo "#define TARGET_$base_arch_name 1"
- fi
+ base_arch_name=`echo $target_base_arch | LC_ALL=C tr '[a-z]' '[A-Z]'`
+ echo "#define TARGET_$base_arch_name 1"
;;
TARGET_XML_FILES=*)
# do nothing
@@ -94,8 +88,9 @@ case $line in
TARGET_ABI_DIR=*)
# do nothing
;;
- TARGET_ARCH2=*)
- # do nothing
+ TARGET_NAME=*)
+ target_name=${line#*=}
+ echo "#define TARGET_NAME \"$target_name\""
;;
TARGET_DIRS=*)
# do nothing
diff --git a/scripts/tracetool.py b/scripts/tracetool.py
index a79ec0f096..5f4890f3ab 100755
--- a/scripts/tracetool.py
+++ b/scripts/tracetool.py
@@ -46,9 +46,9 @@ Options:
--check-backend Check if the given backend is valid.
--binary <path> Full path to QEMU binary.
--target-type <type> QEMU emulator target type ('system' or 'user').
- --target-arch <arch> QEMU emulator target arch.
+ --target-name <name> QEMU emulator target name.
--probe-prefix <prefix> Prefix for dtrace probe names
- (default: qemu-<target-type>-<target-arch>).\
+ (default: qemu-<target-type>-<target-name>).\
""" % {
"script" : _SCRIPT,
"backends" : backend_descr,
@@ -66,7 +66,7 @@ def main(args):
_SCRIPT = args[0]
long_opts = [ "backend=", "format=", "help", "list-backends", "check-backend" ]
- long_opts += [ "binary=", "target-type=", "target-arch=", "probe-prefix=" ]
+ long_opts += [ "binary=", "target-type=", "target-name=", "probe-prefix=" ]
try:
opts, args = getopt.getopt(args[1:], "", long_opts)
@@ -78,7 +78,7 @@ def main(args):
arg_format = ""
binary = None
target_type = None
- target_arch = None
+ target_name = None
probe_prefix = None
for opt, arg in opts:
if opt == "--help":
@@ -100,8 +100,8 @@ def main(args):
binary = arg
elif opt == '--target-type':
target_type = arg
- elif opt == '--target-arch':
- target_arch = arg
+ elif opt == '--target-name':
+ target_name = arg
elif opt == '--probe-prefix':
probe_prefix = arg
@@ -122,11 +122,11 @@ def main(args):
error_opt("--binary is required for SystemTAP tapset generator")
if probe_prefix is None and target_type is None:
error_opt("--target-type is required for SystemTAP tapset generator")
- if probe_prefix is None and target_arch is None:
- error_opt("--target-arch is required for SystemTAP tapset generator")
+ if probe_prefix is None and target_name is None:
+ error_opt("--target-name is required for SystemTAP tapset generator")
if probe_prefix is None:
- probe_prefix = ".".join([ "qemu", target_type, target_arch ])
+ probe_prefix = ".".join([ "qemu", target_type, target_name ])
try:
tracetool.generate(sys.stdin, arg_format, arg_backend,