summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorjihye kim <jihye1128.kim@samsung.com>2012-07-24 14:35:58 +0900
committerjihye kim <jihye1128.kim@samsung.com>2012-07-24 14:35:58 +0900
commit0ac37a393a64a784cab20e74c63d0188776b62fc (patch)
tree7f92a21a7ef2d0837fb0408c2346b6e4df489d64 /package
parent05e59be87c8d49b3a466cd2faadcf0d28da1152e (diff)
downloademulator-storages-0ac37a393a64a784cab20e74c63d0188776b62fc.tar.gz
emulator-storages-0ac37a393a64a784cab20e74c63d0188776b62fc.tar.bz2
emulator-storages-0ac37a393a64a784cab20e74c63d0188776b62fc.zip
[Title] add build script for 64bit machine
[Type] Enhancement [Module] emulator sdcard [Priority] major [Jira#] [Redmine#] [Problem] [Cause] [Solution] [TestCase]
Diffstat (limited to 'package')
-rwxr-xr-xpackage/build.ubuntu-324
-rwxr-xr-xpackage/build.ubuntu-6482
-rw-r--r--package/pkginfo.manifest5
3 files changed, 87 insertions, 4 deletions
diff --git a/package/build.ubuntu-32 b/package/build.ubuntu-32
index 9e91e44..d5a6150 100755
--- a/package/build.ubuntu-32
+++ b/package/build.ubuntu-32
@@ -4,10 +4,6 @@ set_var () {
echo ==== Init ====
BASE_DIR=`pwd`
echo $BASE_DIR
- PKG_OS="ubuntu-32"
- PKG_META="remove"
- PKG="public"
- PKG_UPLOAD="EMULATOR_PUBLIC"
PKG_DIR=$BASE_DIR/EMUL_PKG
PKG_BIN_DIR=$PKG_DIR/data/tools/emulator
SWAP_IMG_NAME="swap.img"
diff --git a/package/build.ubuntu-64 b/package/build.ubuntu-64
new file mode 100755
index 0000000..d5a6150
--- /dev/null
+++ b/package/build.ubuntu-64
@@ -0,0 +1,82 @@
+#!/bin/sh -xe
+# clean
+set_var () {
+ echo ==== Init ====
+ BASE_DIR=`pwd`
+ echo $BASE_DIR
+ PKG_DIR=$BASE_DIR/EMUL_PKG
+ PKG_BIN_DIR=$PKG_DIR/data/tools/emulator
+ SWAP_IMG_NAME="swap.img"
+ SWAP_DIR=$PKG_BIN_DIR/storages/swap
+
+ mkdir -p $PKG_BIN_DIR/storages/sdcard
+ mkdir -p $SWAP_DIR
+}
+
+create_sdcard_image () {
+ echo ==== Start creating sdcard image ====
+ cd $PKG_BIN_DIR/storages/sdcard
+ qemu-img create -f raw raw_4G.img 4G
+ mkfs.ext3 -F raw_4G.img
+ qemu-img convert -O qcow2 raw_4G.img sdcard_4G.img
+ rm raw_4G.img
+
+ qemu-img create -f raw raw_8G.img 8G
+ mkfs.ext3 -F raw_8G.img
+ qemu-img convert -O qcow2 raw_8G.img sdcard_8G.img
+ rm raw_8G.img
+
+ qemu-img create -f raw raw_16G.img 16G
+ mkfs.ext3 -F raw_16G.img
+ qemu-img convert -O qcow2 raw_16G.img sdcard_16G.img
+ rm raw_16G.img
+
+ qemu-img create -f raw raw_32G.img 32G
+ mkfs.ext3 -F raw_32G.img
+ qemu-img convert -O qcow2 raw_32G.img sdcard_32G.img
+ rm raw_32G.img
+ echo ==== Finish creating sdcard image ====
+}
+
+check_swap_image () {
+ echo ==== Start checking swap image ====
+ if [ -f ${BASE_DIR}/${SWAP_IMG_NAME} ]
+ then
+ cp "${BASE_DIR}/${SWAP_IMG_NAME}" "${SWAP_DIR}/${SWAP_IMG_NAME}"
+ else
+ echo "CAUTION!! There's no ${SWAP_IMG_NAME} file."
+ echo "Packaging is failed."
+ exit 1;
+ fi
+ echo ==== Finish checking swap image ====
+}
+
+set_var
+
+clean()
+{
+ echo "$SRCDIR"
+ rm -rf $PKG_DIR
+ rm -rf $BASE_DIR/*.zip
+ rm -rf $BASE_DIR/package/emulator-storages.package.$TARGET_OS
+}
+
+# build
+build()
+{
+ create_sdcard_image
+ check_swap_image
+}
+
+# install
+install()
+{
+ mkdir -p $SRCDIR/package/emulator-storages.package.$TARGET_OS
+ cp -r $PKG_DIR/* $SRCDIR/package/emulator-storages.package.$TARGET_OS/
+}
+
+[ "$1" = "clean" ] && clean
+[ "$1" = "build" ] && build
+[ "$1" = "install" ] && install
+
+echo "success"
diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest
index c80b829..fe464d2 100644
--- a/package/pkginfo.manifest
+++ b/package/pkginfo.manifest
@@ -6,3 +6,8 @@ Package:emulator-storages
OS:ubuntu-32, windows-32
Build-host-os:ubuntu-32
Description:sdcard for emulator
+
+Package:emulator-storages
+OS:ubuntu-64
+Build-host-os:ubuntu-64
+Description:sdcard for emulator