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
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()
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
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
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"
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
}
while [ "$#" -gt "0" ]
do
case $1 in
- x86|i386|i486|i586|i686|arm|all)
+ i386|x86_64|arm|all)
set_target $1
;;
-d|--debug)
EMUL_DIR=../emulator
DIBS_X86_DIR=../x86
-DIBS_ARM_DIR=../arm
DIBS_COMMON_DIR=../common
ifeq ($(CC),"")
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
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
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
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]}') ); \
done \
done \
;; \
- arm-softmmu) \
- ;; \
esac; \
done
endif