From d92cd2d900d52034ef02defc357061f54eb01d73 Mon Sep 17 00:00:00 2001 From: SeokYeon Hwang Date: Sat, 18 Jul 2015 18:17:04 +0900 Subject: [PATCH] arch: we use x86_64 target as a default Change-Id: I55412755ce36a4cf9191a42aab432615858a4209 Signed-off-by: SeokYeon Hwang --- package/build.macos-64 | 29 ++-------------------------- package/build.ubuntu-32 | 4 ++-- package/build.ubuntu-64 | 4 ++-- package/build.windows-32 | 4 ++-- tizen/emulator_configure.sh | 14 ++++++++------ tizen/src/Makefile | 47 ++++++++++++++++++++++----------------------- 6 files changed, 39 insertions(+), 63 deletions(-) diff --git a/package/build.macos-64 b/package/build.macos-64 index 25f1628..4e3d8e0 100755 --- a/package/build.macos-64 +++ b/package/build.macos-64 @@ -7,7 +7,7 @@ clean() cd $SRCDIR/tizen if test -e "Makefile" then - ./emulator_configure.sh x86 -e "$BUILD_CFLAGS $BUILD_LDFLAGS" + ./emulator_configure.sh x86_64 -e "$BUILD_CFLAGS $BUILD_LDFLAGS" make distclean fi rm -rf $SRCDIR/*.zip @@ -60,17 +60,6 @@ modify_files(){ sed 's/export PKG_CONFIG_PATH/ export PKG_CONFIG_PATH/g' tmpfile > $SRCDIR/Makefile.target rm -f tmpfile - - #just in case -# sed "1 i\\ -# export PKG_CONFIG_PATH=$PKG_CONFIG_PATH -# -# " $SRCDIR/Makefile.target > tmp -# cp -f tmp $SRCDIR/Makefile.target -# rm -f tmp -# sed 's/export PKG_CONFIG_PATH/ export PKG_CONFIG_PATH/g' $SRCDIR/Makefile.target > tmp -# cp -f tmp $SRCDIR/Makefile.target -# rm -f tmp } # build build() @@ -81,7 +70,7 @@ build() cd $SRCDIR/tizen/ - ./emulator_configure.sh x86 -e "$BUILD_CFLAGS $BUILD_LDFLAGS" + ./emulator_configure.sh x86_64 -e "$BUILD_CFLAGS $BUILD_LDFLAGS" make all_dibs -j4 if [ $? -eq 0 ] then @@ -90,20 +79,6 @@ build() echo "build failure" exit 1 fi - -# make install_dibs -# make clean -# -# ./emulator_configure.sh arm -# make all_dibs -# if [ $? -eq 0 ] -# then -# echo "arm build success" -# else -# echo "arm build failure" -# exit 1 -# fi -# make install_dibs } # install diff --git a/package/build.ubuntu-32 b/package/build.ubuntu-32 index f3f125e..e56b440 100755 --- a/package/build.ubuntu-32 +++ b/package/build.ubuntu-32 @@ -9,7 +9,7 @@ clean() cd $SRCDIR/tizen if test -e "Makefile" then - ./emulator_configure.sh x86 + ./emulator_configure.sh x86_64 make distclean fi rm -rf $SRCDIR/*.zip @@ -52,7 +52,7 @@ build() export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${ROOTDIR}/remote/lib cd $SRCDIR/tizen/ - ./emulator_configure.sh x86 + ./emulator_configure.sh x86_64 make all_dibs -j4 if [ $? -eq 0 ] then diff --git a/package/build.ubuntu-64 b/package/build.ubuntu-64 index 71ce1aa..7c8e1fb 100755 --- a/package/build.ubuntu-64 +++ b/package/build.ubuntu-64 @@ -9,7 +9,7 @@ clean() cd $SRCDIR/tizen if test -e "Makefile" then - ./emulator_configure.sh x86 + ./emulator_configure.sh x86_64 make distclean fi rm -rf $SRCDIR/*.zip @@ -52,7 +52,7 @@ build() export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${ROOTDIR}/remote/lib cd $SRCDIR/tizen/ - ./emulator_configure.sh x86 + ./emulator_configure.sh x86_64 make all_dibs -j4 if [ $? -eq 0 ] then diff --git a/package/build.windows-32 b/package/build.windows-32 index ac3185f..d87b18f 100755 --- a/package/build.windows-32 +++ b/package/build.windows-32 @@ -7,7 +7,7 @@ clean() cd $SRCDIR/tizen if test -e "Makefile" then - ./emulator_configure.sh x86 -e "$BUILD_CFLAGS $BUILD_LDFLAGS" + ./emulator_configure.sh x86_64 -e "$BUILD_CFLAGS $BUILD_LDFLAGS" make distclean fi rm -rf $SRCDIR/*.zip @@ -57,7 +57,7 @@ build() prepare cd $SRCDIR/tizen - ./emulator_configure.sh x86 -e "$BUILD_CFLAGS $BUILD_LDFLAGS" + ./emulator_configure.sh x86_64 -e "$BUILD_CFLAGS $BUILD_LDFLAGS" make all_dibs -j4 if [ $? -eq 0 ] then diff --git a/tizen/emulator_configure.sh b/tizen/emulator_configure.sh index 18bd342..bf357b2 100755 --- a/tizen/emulator_configure.sh +++ b/tizen/emulator_configure.sh @@ -5,13 +5,13 @@ if [ -z "$TIZEN_SDK_DEV_PATH" ] ; then fi CONFIGURE_APPEND="" -EMUL_TARGET_LIST="i386-softmmu" +EMUL_TARGET_LIST="x86_64-softmmu" usage() { echo "usage: build.sh [options] [target]" echo "" echo "target" - echo " emulator target, one of: [x86|i386|i486|i586|i686|arm|all]. Defaults to \"all\"" + echo " emulator target, one of: [i386|x86_64|arm|all]. Defaults to \"x86_64\"" echo "" echo "options:" echo "-d, --debug" @@ -24,15 +24,17 @@ usage() { set_target() { case "$1" in - x86|i386|i486|i586|i686) + i386) EMUL_TARGET_LIST="i386-softmmu" ;; + x86_64) + EMUL_TARGET_LIST="x86_64-softmmu" + ;; arm) EMUL_TARGET_LIST="arm-softmmu" ;; all) -# EMUL_TARGET_LIST="i386-softmmu,arm-softmmu" - EMUL_TARGET_LIST="i386-softmmu" + EMUL_TARGET_LIST="i386-softmmu,x86_64-softmmu,arm-softmmu" ;; esac } @@ -49,7 +51,7 @@ echo "$*" while [ "$#" -gt "0" ] do case $1 in - x86|i386|i486|i586|i686|arm|all) + i386|x86_64|arm|all) set_target $1 ;; -d|--debug) diff --git a/tizen/src/Makefile b/tizen/src/Makefile index fd8ca35..7827a75 100755 --- a/tizen/src/Makefile +++ b/tizen/src/Makefile @@ -1,6 +1,5 @@ EMUL_DIR=../emulator DIBS_X86_DIR=../x86 -DIBS_ARM_DIR=../arm DIBS_COMMON_DIR=../common ifeq ($(CC),"") @@ -149,22 +148,25 @@ install: all mkdir -p $(EMUL_DIR)/images @for target in $(TARGET_DIRS); do \ - case "$$target" in \ - i386-softmmu) \ - mkdir -p $(EMUL_DIR)/data/bios ;\ - echo "Copying i386-softmmu/qemu-system-i386$(EXESUF) to $(EMUL_DIR)/bin/emulator-x86$(EXESUF)" ;\ - cp -pP ../../i386-softmmu/qemu-system-i386$(EXESUF) $(EMUL_DIR)/bin/emulator-x86$(EXESUF) ;\ + arch=$$(echo $$target | cut -f1 -d"-") ;\ + src_bin="../../$${arch}-softmmu/qemu-system-$${arch}$(EXESUF)" ;\ + dest_bin="$(EMUL_DIR)/bin/emulator-$${arch}$(EXESUF)" ;\ + \ + echo "Copying $${src_bin} to $${dest_bin}" ;\ + cp -pP $${src_bin} $${dest_bin} ;\ + \ + case $${arch} in \ + i386|x86_64) \ echo "Copying bioses to $(EMUL_DIR)/data/bios" ;\ + mkdir -p $(EMUL_DIR)/data/bios ;\ cp -pP ../../pc-bios/bios-256k.bin $(EMUL_DIR)/data/bios ;\ cp -pP ../../pc-bios/linuxboot.bin $(EMUL_DIR)/data/bios ;\ cp -pP ../../pc-bios/efi-virtio.rom $(EMUL_DIR)/data/bios ;\ cp -pP ../../pc-bios/acpi-dsdt.aml $(EMUL_DIR)/data/bios ;\ - ;; \ - arm-softmmu) \ - echo "Copying arm-softmmu/qemu-system-arm$(EXESUF) to $(EMUL_DIR)/bin/emulator-arm$(EXESUF)" ;\ - cp -pP ../../arm-softmmu/qemu-system-arm$(EXESUF) $(EMUL_DIR)/bin/emulator-arm$(EXESUF) ;\ - ;; \ - esac; \ + ;;\ + arm) \ + ;;\ + esac ;\ done cp -pP ../../qemu-img$(EXESUF) $(EMUL_DIR)/bin @@ -269,6 +271,7 @@ else endif install_dibs: all_dibs +# we care about only x86_64 in DIBS now mkdir -p $(DIBS_COMMON_DIR)/bin mkdir -p $(DIBS_COMMON_DIR)/etc mkdir -p $(DIBS_COMMON_DIR)/icons @@ -276,23 +279,21 @@ install_dibs: all_dibs mkdir -p $(DIBS_X86_DIR)/bin mkdir -p $(DIBS_X86_DIR)/data mkdir -p $(DIBS_X86_DIR)/etc - mkdir -p $(DIBS_ARM_DIR)/bin @for target in $(TARGET_DIRS); do \ - case "$$target" in \ - i386-softmmu) \ + arch=$$(echo $$target | cut -f1 -d"-") ;\ + src_bin="../../$${arch}-softmmu/qemu-system-$${arch}$(EXESUF)" ;\ + dest_bin="$(EMUL_DIR)/bin/emulator-$${arch}$(EXESUF)" ;\ + case $${arch} in \ + x86_64) \ + echo "Copying $${src_bin} to $${dest_bin}" ;\ + cp -pP $${src_bin} $${dest_bin} ;\ mkdir -p $(DIBS_X86_DIR)/data/bios ;\ - echo "Copying i386-softmmu/qemu-system-i386$(EXESUF) to $(DIBS_X86__DIR)/bin/emulator-x86$(EXESUF)" ;\ - cp ../../i386-softmmu/qemu-system-i386$(EXESUF) $(DIBS_X86_DIR)/bin/emulator-x86$(EXESUF) ;\ echo "Copying bioses to $(DIBS_X86_DIR)/data/bios" ;\ cp -pP ../../pc-bios/bios-256k.bin $(DIBS_X86_DIR)/data/bios ;\ cp -pP ../../pc-bios/linuxboot.bin $(DIBS_X86_DIR)/data/bios ;\ cp -pP ../../pc-bios/efi-virtio.rom $(DIBS_X86_DIR)/data/bios ;\ cp -pP ../../pc-bios/acpi-dsdt.aml $(DIBS_X86_DIR)/data/bios ;\ ;; \ - arm-softmmu) \ - echo "Copying arm-softmmu/qemu-system-arm$(EXESUF) to $(DIBS_ARM_DIR)/bin/emulator-arm$(EXESUF)" ;\ - cp -pP ../../arm-softmmu/qemu-system-arm$(EXESUF) $(DIBS_ARM_DIR)/bin/emulator-arm$(EXESUF) ;\ - ;; \ esac; \ done @@ -384,7 +385,7 @@ ifdef CONFIG_DARWIN done ; \ for target in $(TARGET_DIRS); do \ case "$$target" in \ - i386-softmmu) \ + x86_64-softmmu) \ BIN_ARR=( emulator-x86 ); \ for bin in $${BIN_ARR[@]}; do \ LIB_ARR=( $$(otool -L $(DIBS_X86_DIR)/bin/$$bin | awk '/\opt\/local\/lib/ { split($$1, lib, "/"); print lib[5]}') ); \ @@ -409,8 +410,6 @@ ifdef CONFIG_DARWIN done \ done \ ;; \ - arm-softmmu) \ - ;; \ esac; \ done endif -- 2.7.4