summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjk7744.park <jk7744.park@samsung.com>2015-10-24 06:28:57 (GMT)
committerjk7744.park <jk7744.park@samsung.com>2015-10-24 06:28:57 (GMT)
commitfd535e60fb3a5a23d8603a663bb7010087c59be0 (patch)
tree73b57a0dfca4586f92aaec0356f43f4a4dcc7cfc
parentdee72dd1019839260187b1ccbf22515c46ee0674 (diff)
downloadsystem-plugin-spreadtrum-fd535e60fb3a5a23d8603a663bb7010087c59be0.zip
system-plugin-spreadtrum-fd535e60fb3a5a23d8603a663bb7010087c59be0.tar.gz
system-plugin-spreadtrum-fd535e60fb3a5a23d8603a663bb7010087c59be0.tar.bz2
-rw-r--r--AUTHORS2
-rw-r--r--ChangeLog0
-rw-r--r--LICENSE202
-rw-r--r--Makefile.am192
-rw-r--r--NEWS0
-rw-r--r--README0
-rw-r--r--conf/fstab23
-rw-r--r--conf/machine-id1
-rw-r--r--configure.ac147
-rw-r--r--packaging/system-plugin-spreadtrum.manifest8
-rw-r--r--packaging/system-plugin-spreadtrum.spec99
-rw-r--r--rules/51-tizen-udev-spreadtrum.rules24
-rw-r--r--scripts/resize2fs_by_partlabel.sh17
-rw-r--r--units/boot.mount10
-rw-r--r--units/csa.mount10
-rw-r--r--units/fsck@.service13
-rw-r--r--units/opt-usr.mount13
-rw-r--r--units/opt.mount13
-rw-r--r--units/resize2fs-root.service12
-rw-r--r--units/resize2fs@.service14
-rw-r--r--units/usr-share-locale.mount9
21 files changed, 809 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..b13f918
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,2 @@
+Byung-Soo Kim <bs1770.kim@samsung.com>
+WaLyong Cho <walyong.cho@samsung.com>
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/ChangeLog
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..ee3f970
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,192 @@
+ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+
+SUBDIRS = .
+
+# legacy rc script dir
+rcdir=$(sysconfdir)/rc.d
+
+# Inherit from systemd
+pkgsysconfdir=$(sysconfdir)/systemd
+systemconfigunitdir=$(pkgsysconfdir)/system
+userconfigunitdir=$(pkgsysconfdir)/user
+systemunitdir=$(rootprefix)/lib/systemd/system
+userunitdir=$(prefix)/lib/systemd/user
+udevlibexecdir=$(rootprefix)/lib/udev
+udevhomedir=$(udevlibexecdir)
+udevrulesdir=$(udevlibexecdir)/rules.d
+
+# And these are the special ones for /
+rootprefix=@rootprefix@
+rootbindir=$(rootprefix)/bin
+rootlibexecdir=$(rootprefix)/lib/systemd
+
+if WITH_ENGMODE
+engbindir=/opt/usr/devel/$(rootbindir)
+endif
+
+bin_SCRIPTS =
+rc_SCRIPTS =
+SCRIPT_IN_FILES =
+sysconf_DATA =
+systemconfigunit_DATA =
+systemunit_DATA =
+udevrules_DATA =
+
+if WITH_ENGMODE
+engbin_PROGRAMS =
+endif
+
+INSTALL_EXEC_HOOKS =
+UNINSTALL_EXEC_HOOKS =
+
+SHUTDOWN_TARGET_WANTS =
+LOCAL_FS_TARGET_WANTS =
+BASIC_TARGET_WANTS =
+SYSINIT_TARGET_WANTS =
+SOCKETS_TARGET_WANTS =
+TIMERS_TARGET_WANTS =
+TIZEN_INIT_TARGET_WANTS =
+TIZEN_BOOT_TARGET_WANTS =
+TIZEN_SYSTEM_TARGET_WANTS =
+TIZEN_RUNTIME_TARGET_WANTS =
+MULTI_USER_TARGET_WANTS =
+DEFAULT_TARGET_WANTS =
+SYSCONF_LOCAL_FS_TARGET_WANTS =
+
+install-target-wants-hook:
+ where=$(systemunitdir) && what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && $(add-wants)
+ where=$(systemunitdir) && what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && $(add-wants)
+ where=$(systemunitdir) && what="$(BASIC_TARGET_WANTS)" && wants=basic.target && $(add-wants)
+ where=$(systemunitdir) && what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && $(add-wants)
+ where=$(systemunitdir) && what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && $(add-wants)
+ where=$(systemunitdir) && what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && $(add-wants)
+ where=$(systemunitdir) && what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && $(add-wants)
+ where=$(systemunitdir) && what="$(SLICES_TARGET_WANTS)" && wants=slices.target && $(add-wants)
+ where=$(systemunitdir) && what="$(TIZEN_INIT_TARGET_WANTS)" && wants=tizen-init.target && $(add-wants)
+ where=$(systemunitdir) && what="$(TIZEN_BOOT_TARGET_WANTS)" && wants=tizen-boot.target && $(add-wants)
+ where=$(systemunitdir) && what="$(TIZEN_SYSTEM_TARGET_WANTS)" && wants=tizen-system.target && $(add-wants)
+ where=$(systemunitdir) && what="$(TIZEN_RUNTIME_TARGET_WANTS)" && wants=tizen-runtime.target && $(add-wants)
+ where=$(systemunitdir) && what="$(TIZEN_RUNTIME_TARGET_WANTS)" && wants=tizen-runtime.target && $(add-wants)
+ where=$(systemunitdir) && what="$(DEFAULT_TARGET_WANTS)" && wants=default.target && $(add-wants)
+ where=$(systemconfigunitdir) && what="$(SYSCONF_LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && $(add-wants)
+
+define add-wants
+[ -z "$$what" -o -z "$$where" ] || ( \
+ dir=$(DESTDIR)$$where/$$wants.wants && \
+ $(MKDIR_P) -m 0755 $$dir && \
+ cd $$dir && \
+ rm -f $$what && \
+ for i in $$what; do $(LN_S) ../$$i . || exit $$? ; done )
+endef
+
+INSTALL_EXEC_HOOKS += \
+ install-target-wants-hook
+
+bin_SCRIPTS += \
+ scripts/resize2fs_by_partlabel.sh
+
+sysconf_DATA += \
+ conf/machine-id \
+ conf/fstab
+
+systemconfigunit_DATA += \
+ units/opt.mount \
+ units/opt-usr.mount \
+ units/csa.mount
+
+if WITH_BOOT_PARTITION
+systemconfigunit_DATA += \
+ units/boot.mount
+endif
+
+systemunit_DATA += \
+ units/usr-share-locale.mount \
+ units/fsck@.service \
+ units/resize2fs@.service \
+ units/resize2fs-root.service
+
+LOCAL_FS_TARGET_WANTS += \
+ usr-share-locale.mount \
+ resize2fs-root.service
+
+SYSCONF_LOCAL_FS_TARGET_WANTS += \
+ opt.mount \
+ opt-usr.mount \
+ csa.mount
+
+if WITH_BOOT_PARTITION
+SYSCONF_LOCAL_FS_TARGET_WANTS += \
+ boot.mount
+endif
+
+udevrules_DATA += \
+ rules/51-tizen-udev-spreadtrum.rules
+
+# ------------------------------------------------------------------------------
+substitutions = \
+ '|rootlibexecdir=$(rootlibexecdir)|' \
+ '|rootbindir=$(rootbindir)|' \
+ '|bindir=$(bindir)|' \
+ '|SYSTEMCTL=$(rootbindir)/systemctl|' \
+ '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
+ '|pkgsysconfdir=$(pkgsysconfdir)|' \
+ '|SYSTEM_CONFIG_UNIT_PATH=$(pkgsysconfdir)/system|' \
+ '|USER_CONFIG_UNIT_PATH=$(pkgsysconfdir)/user|' \
+ '|pkgdatadir=$(pkgdatadir)|' \
+ '|systemunitdir=$(systemunitdir)|' \
+ '|userunitdir=$(userunitdir)|' \
+ '|systempresetdir=$(systempresetdir)|' \
+ '|userpresetdir=$(userpresetdir)|' \
+ '|udevhwdbdir=$(udevhwdbdir)|' \
+ '|udevrulesdir=$(udevrulesdir)|' \
+ '|catalogdir=$(catalogdir)|' \
+ '|tmpfilesdir=$(tmpfilesdir)|' \
+ '|sysctldir=$(sysctldir)|' \
+ '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
+ '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
+ '|PACKAGE_URL=$(PACKAGE_URL)|' \
+ '|RANDOM_SEED=$(localstatedir)/lib/random-seed|' \
+ '|prefix=$(prefix)|' \
+ '|exec_prefix=$(exec_prefix)|' \
+ '|libdir=$(libdir)|' \
+ '|includedir=$(includedir)|' \
+ '|VERSION=$(VERSION)|' \
+ '|rootprefix=$(rootprefix)|' \
+ '|udevlibexecdir=$(udevlibexecdir)|' \
+ '|SUSHELL=$(SUSHELL)|' \
+ '|DEBUGTTY=$(DEBUGTTY)|' \
+ '|KILL=$(KILL)|' \
+ '|KMOD=$(KMOD)|' \
+ '|MKDIR_P=$(MKDIR_P)|' \
+ '|QUOTAON=$(QUOTAON)|' \
+ '|QUOTACHECK=$(QUOTACHECK)|' \
+ '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \
+ '|VARLOGDIR=$(varlogdir)|' \
+ '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
+ '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
+ '|PYTHON=$(PYTHON)|' \
+ '|PYTHON_BINARY=$(PYTHON_BINARY)|' \
+ '|INITAILBOOT_DONE=$(INITAILBOOT_DONE)|' \
+ '|INITIALIZE_DONE=$(INITIALIZE_DONE)|' \
+ '|READAHEAD_DIR=$(READAHEAD_DIR)|'
+
+SED_PROCESS = \
+ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
+ $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
+ < $< > $@
+
+units/%: units/%.in Makefile
+ $(SED_PROCESS)
+
+units/%: units/%.m4 Makefile
+ $(AM_V_M4)$(MKDIR_P) $(dir $@)
+ $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
+
+%.rules: %.rules.in Makefile
+ $(SED_PROCESS)
+
+%.sh: %.sh.in Makefile
+ $(SED_PROCESS)
+ $(AM_V_GEN)chmod +x $@
+
+install-exec-hook: $(INSTALL_EXEC_HOOKS)
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/NEWS
diff --git a/README b/README
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/README
diff --git a/conf/fstab b/conf/fstab
new file mode 100644
index 0000000..aca7c7e
--- /dev/null
+++ b/conf/fstab
@@ -0,0 +1,23 @@
+# fstab(5)
+
+# NOTE: systemd tries to mount following filesystems on every boot:
+#
+# - proc on /proc
+# - sysfs on /sys
+# - devtmpfs on /dev
+# - securityfs on /sys/kernel/security
+# - tmpfs on /dev/shm
+# - devpts on /dev/pts
+# - tmpfs on /run
+# - tmpfs on /sys/fs/cgroup
+# - cgroup on /sys/fs/cgroup/systemd
+# - <all or configured cgroup controllers> on /sys/fs/cgroup/<controller name>
+#
+# Information about above filesystems is hardcoded into systemd. systemd will
+# _try_ to apply mount options from this file by systemd-remount-fs.service.
+#
+# Please see: http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
+
+#<file system> <mount point> <type> <options> <dump> <pass>
+
+tmpfs /tmp tmpfs comment=havefs-smackfs-smackfsroot=* 0 0
diff --git a/conf/machine-id b/conf/machine-id
new file mode 100644
index 0000000..d7fca6d
--- /dev/null
+++ b/conf/machine-id
@@ -0,0 +1 @@
+c481794187f9445b8071869a18fa20cd
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..e9c5494
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,147 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.68])
+AC_INIT(system-plugin-spreadtrum, 0.1.01, [BUG-REPORT-ADDRESS])
+
+AC_CONFIG_MACRO_DIR([m4])
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
+AC_PREFIX_DEFAULT([/usr])
+AM_INIT_AUTOMAKE([foreign])
+
+# Checks for programs.
+AC_PROG_MKDIR_P
+AC_PROG_LN_S
+AC_PROG_SED
+AC_PROG_GREP
+AC_PROG_AWK
+#AC_PROG_INSTALL
+
+AC_PATH_PROG([M4], [m4])
+M4_DEFINES=
+# ------------------------------------------------------------------------------
+AC_ARG_ENABLE([engmode],
+ AS_HELP_STRING([--disable-engmode], [disable engineer mode]),
+ [case "${enableval}" in
+ yes) with_engmode=yes ;;
+ no) with_engmode=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-engmode) ;;
+ esac],
+ with_engmode=no)
+AC_SUBST(WITH_ENGMODE)
+AM_CONDITIONAL([WITH_ENGMODE], [test "x$with_engmode" != xno])
+
+# ------------------------------------------------------------------------------
+AC_ARG_ENABLE([xattr],
+ AS_HELP_STRING([--disable-xattr],[Disable optional XATTR support]),
+ [case "${enableval}" in
+ yes) have_xattr=yes ;;
+ no) have_xattr=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-xattr) ;;
+ esac],
+ [have_xattr=auto])
+
+if test "x${have_xattr}" != xno ; then
+ AC_CHECK_HEADERS(
+ [attr/xattr.h],
+ [have_xattr=yes],
+ [if test "x$have_xattr" = xyes ; then
+ AC_MSG_ERROR([*** XATTR headers not found.])
+ fi])
+
+ AC_CHECK_LIB(
+ [attr],
+ [fsetxattr],
+ [have_xattr=yes],
+ [if test "x$have_xattr" = xyes ; then
+ AC_MSG_ERROR([*** libattr not found.])
+ fi])
+
+ if test "x$have_xattr" = xyes ; then
+ XATTR_LIBS="-lattr"
+ AC_DEFINE(HAVE_XATTR, 1, [XATTR available])
+ else
+ have_xattr=no
+ fi
+else
+ XATTR_LIBS=
+fi
+AC_SUBST(XATTR_LIBS)
+AM_CONDITIONAL([HAVE_XATTR], [test "x$have_xattr" != xno])
+
+# ------------------------------------------------------------------------------
+AC_ARG_ENABLE([smack], AS_HELP_STRING([--disable-smack],[Disable optional SMACK support]),
+ [case "${enableval}" in
+ yes) have_smack=yes ;;
+ no) have_smack=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-smack) ;;
+ esac],
+ [have_smack=auto])
+
+if test "x${have_xattr}" = xno; then
+ if test "x${have_smack}" = xyes; then
+ AC_MSG_ERROR(SMACK requires xattr support)
+ else
+ have_smack=no
+ fi
+else
+ if test "x${have_smack}" = xauto; then
+ have_smack=yes
+ fi
+fi
+
+if test "x${have_smack}" = xyes ; then
+ AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available])
+fi
+# ------------------------------------------------------------------------------
+AC_ARG_ENABLE([boot-partition],
+ AS_HELP_STRING([--enable-boot-partition], [install boot partition units]),
+ [case "${enableval}" in
+ yes) with_boot_part=yes ;;
+ no) with_boot_part=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-boot-partition) ;;
+ esac],
+ with_boot_part=no)
+AC_SUBST(WITH_BOOT_PARTITION)
+AM_CONDITIONAL([WITH_BOOT_PARTITION], [test "x$with_boot_part" != xno])
+
+# ------------------------------------------------------------------------------
+AC_ARG_WITH([rootprefix],
+ AS_HELP_STRING([--with-rootprefix=DIR],
+ [rootfs directory prefix for config files and kernel modules]),
+ [], [with_rootprefix=${ac_default_prefix}])
+AC_SUBST([rootprefix], [$with_rootprefix])
+# ------------------------------------------------------------------------------
+AC_ARG_ENABLE([default-smack-label], AS_HELP_STRING([--enable-default-smack-label],[Enable default smack label]),
+ [case "${enableval}" in
+ yes) have_default_smack_label=yes ;;
+ no) have_default_smack_label=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-default-smack-label) ;;
+ esac],
+ [have_default_smack_label=auto])
+
+if test "x${have_default_smack_label}" = xyes ; then
+ M4_DEFINES="$M4_DEFINES -DHAVE_DEFAULT_SMACK_LABEL"
+fi
+# ------------------------------------------------------------------------------
+AC_SUBST(M4_DEFINES)
+AC_CONFIG_FILES([Makefile])
+
+AC_OUTPUT
+AC_MSG_RESULT([
+ $PACKAGE_NAME $VERSION
+
+ engineer mode: ${with_engmode}
+
+ XATTR: ${have_xattr}
+ SMACK: ${have_smack}
+ BOOT PARTITION: ${with_boot_part}
+ DEFAULT SMACK LABEL: ${have_default_smack_label}
+
+ prefix: ${prefix}
+ rootprefix: ${with_rootprefix}
+ sysconf dir: ${sysconfdir}
+ datarootdir: ${datarootdir}
+ lib dir: ${libdir}
+])
diff --git a/packaging/system-plugin-spreadtrum.manifest b/packaging/system-plugin-spreadtrum.manifest
new file mode 100644
index 0000000..da94ced
--- /dev/null
+++ b/packaging/system-plugin-spreadtrum.manifest
@@ -0,0 +1,8 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+ <assign>
+ <filesystem path="/usr/bin/resize2fs_by_partlabel.sh" exec_label="none" />
+ </assign>
+</manifest>
diff --git a/packaging/system-plugin-spreadtrum.spec b/packaging/system-plugin-spreadtrum.spec
new file mode 100644
index 0000000..7425b57
--- /dev/null
+++ b/packaging/system-plugin-spreadtrum.spec
@@ -0,0 +1,99 @@
+###########################
+# Default feature config. #
+###########################
+# SMACK
+%define WITH_SMACK 0
+%define WITH_BOOT_PARTITION 0
+%define WITH_DEFAULT_SMACK_LABEL 1
+
+Name: system-plugin-spreadtrum
+Summary: system-plugin for spreadtrum system
+Version: 0.1.01
+Release: 0
+License: Apache-2.0
+Group: System/Base
+%ifarch %{arm}
+ExclusiveArch: %arm
+%endif
+Source: %{name}-%{version}.tar.gz
+Source1001: %{name}.manifest
+
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: libattr
+%if %{WITH_SMACK}
+BuildRequires: libacl-devel
+BuildRequires: smack-devel
+%endif
+
+Requires: e2fsprogs
+Requires: /bin/grep
+Requires: /usr/bin/awk
+Requires: psmisc
+Requires: system-plugin-common
+Requires(post): coreutils
+
+%description
+Startup files
+
+%prep
+%setup -q
+
+%build
+cp %{SOURCE1001} .
+
+aclocal
+automake --add-missing
+autoconf
+
+%configure \
+ --prefix=%{_prefix} \
+%if %{WITH_SMACK}
+ --enable-smack \
+%endif
+%if %{WITH_BOOT_PARTITION}
+ --enable-boot-partition \
+%endif
+%if %{WITH_DEFAULT_SMACK_LABEL}
+ --enable-default-smack-label \
+%endif
+
+make %{?_smp_mflags}
+
+%install
+%make_install
+
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/license
+cat LICENSE > $RPM_BUILD_ROOT%{_datadir}/license/%{name}
+
+%post
+
+%files
+%defattr(-,root,root,-)
+%{_datadir}/license/%{name}
+%{_sysconfdir}/fstab
+%{_sysconfdir}/machine-id
+%{_bindir}/resize2fs_by_partlabel.sh
+%{_libdir}/udev/rules.d/51-tizen-udev-spreadtrum.rules
+
+# systemd service units
+%{_libdir}/systemd/system/fsck@.service
+%{_libdir}/systemd/system/resize2fs@.service
+%{_libdir}/systemd/system/resize2fs-root.service
+%{_libdir}/systemd/system/local-fs.target.wants/resize2fs-root.service
+
+# systemd mount units
+%{_libdir}/systemd/system/usr-share-locale.mount
+%{_libdir}/systemd/system/local-fs.target.wants/usr-share-locale.mount
+%if %{WITH_BOOT_PARTITION}
+%{_sysconfdir}/systemd/system/boot.mount
+%{_sysconfdir}/systemd/system/local-fs.target.wants/boot.mount
+%endif
+%{_sysconfdir}/systemd/system/csa.mount
+%{_sysconfdir}/systemd/system/local-fs.target.wants/csa.mount
+%{_sysconfdir}/systemd/system/opt-usr.mount
+%{_sysconfdir}/systemd/system/local-fs.target.wants/opt-usr.mount
+%{_sysconfdir}/systemd/system/opt.mount
+%{_sysconfdir}/systemd/system/local-fs.target.wants/opt.mount
+%manifest %{name}.manifest
+
diff --git a/rules/51-tizen-udev-spreadtrum.rules b/rules/51-tizen-udev-spreadtrum.rules
new file mode 100644
index 0000000..937cf37
--- /dev/null
+++ b/rules/51-tizen-udev-spreadtrum.rules
@@ -0,0 +1,24 @@
+ACTION!="add", GOTO="system_plugin_end"
+
+# audio
+SUBSYSTEM=="spipe", KERNEL=="stty_td[0-9]*|stty_w[0-9]*|spipe_td[0-9]*|spipe_w[0-9]*", GROUP="audio", SECLABEL{smack}="device::audio"
+KERNEL=="ion", GROUP="audio", SECLABEL{smack}="*"
+KERNEL=="diag", GROUP="audio", SECLABEL{smack}="*"
+
+# video
+KERNEL=="video[0-3]", GROUP="video", SECLABEL{smack}="device::video"
+KERNEL=="media[0-2]", GROUP="video", SECLABEL{smack}="device::video"
+KERNEL=="jpeg[0-2]", GROUP="video", SECLABEL{smack}="device::video"
+KERNEL=="video[32-33]", GROUP="video", SECLABEL{smack}="device::video"
+KERNEL=="v4l_subdev[0-16]", GROUP="video", SECLABEL{smack}="device::video"
+
+# radio
+KERNEL=="Trout_FM", GROUP="radio", SECLABEL{smack}="device::Trout_FM"
+
+# VT
+KERNEL=="smd11", GROUP="app", SECLABEL{smack}="device::vt"
+
+# graphics
+SUBSYSTEM=="graphics", RUN+="/bin/chmod 0660 %S/%p/vsync_event", RUN+="/bin/chown :video %S/%p/vsync_event", RUN+="/usr/bin/chsmack -a device::video %S/%p/vsync_event"
+
+LABEL="system_plugin_end"
diff --git a/scripts/resize2fs_by_partlabel.sh b/scripts/resize2fs_by_partlabel.sh
new file mode 100644
index 0000000..455d5a6
--- /dev/null
+++ b/scripts/resize2fs_by_partlabel.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+if [ ! -n "$1" ]
+then
+ exit 1
+fi
+
+EMMC_DEVICE="/dev/mmcblk0"
+RET_PARTX=$(/usr/sbin/partx -s ${EMMC_DEVICE})
+PARTITION=${EMMC_DEVICE}p$(IFS=; echo $RET_PARTX | /bin/awk -v part=$1 'tolower($6) == part {print $1}')
+
+if [ ${EMMC_DEVICE}p != ${PARTITION} ]
+then
+ /sbin/resize2fs -f ${PARTITION}
+ exit 0
+fi
+exit 1
diff --git a/units/boot.mount b/units/boot.mount
new file mode 100644
index 0000000..10944a3
--- /dev/null
+++ b/units/boot.mount
@@ -0,0 +1,10 @@
+[Unit]
+DefaultDependencies=no
+Before=local-fs.target
+After=local-fs-pre.target
+
+[Mount]
+What=/dev/disk/by-partlabel/boot
+Where=/boot
+Type=ext4
+Options=ro
diff --git a/units/csa.mount b/units/csa.mount
new file mode 100644
index 0000000..636af6c
--- /dev/null
+++ b/units/csa.mount
@@ -0,0 +1,10 @@
+[Unit]
+DefaultDependencies=no
+Before=local-fs.target
+After=local-fs-pre.target
+
+[Mount]
+What=/dev/disk/by-partlabel/csa
+Where=/csa
+Type=ext4
+Options=data=journal,nosuid
diff --git a/units/fsck@.service b/units/fsck@.service
new file mode 100644
index 0000000..f70d1d4
--- /dev/null
+++ b/units/fsck@.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=File System Check on %f
+DefaultDependencies=no
+BindsTo=%i.device
+After=%i.device
+Before=shutdown.target
+
+[Service]
+Type=oneshot
+ExecStart=/sbin/e2fsck -y -f %f
+StandardOutput=journal+console
+TimeoutSec=0
+SuccessExitStatus=0 1
diff --git a/units/opt-usr.mount b/units/opt-usr.mount
new file mode 100644
index 0000000..70912ff
--- /dev/null
+++ b/units/opt-usr.mount
@@ -0,0 +1,13 @@
+[Unit]
+Description=Mount to /opt/usr
+DefaultDependencies=no
+ConditionPathExists=!/opt/etc/.odeprogress
+Before=local-fs.target
+After=local-fs-pre.target fsck@dev-disk-by\x2dpartlabel-user.service resize2fs@dev-disk-by\x2dpartlabel-user.service
+Wants=resize2fs@dev-disk-by\x2dpartlabel-user.service
+
+[Mount]
+What=/dev/disk/by-partlabel/user
+Where=/opt/usr
+Type=ext4
+Options=errors=panic,nosuid
diff --git a/units/opt.mount b/units/opt.mount
new file mode 100644
index 0000000..e4a2201
--- /dev/null
+++ b/units/opt.mount
@@ -0,0 +1,13 @@
+[Unit]
+Description=Mount to /opt
+DefaultDependencies=no
+Before=local-fs.target
+After=local-fs-pre.target fsck@dev-disk-by\x2dpartlabel-system\x2ddata.service resize2fs@dev-disk-by\x2dpartlabel-system\x2ddata.service
+Wants=resize2fs@dev-disk-by\x2dpartlabel-system\x2ddata.service
+
+[Mount]
+What=/dev/disk/by-partlabel/system-data
+Where=/opt
+Type=ext4
+Options=errors=panic,nosuid
+
diff --git a/units/resize2fs-root.service b/units/resize2fs-root.service
new file mode 100644
index 0000000..8b8a899
--- /dev/null
+++ b/units/resize2fs-root.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Resize of File System on the Root Device
+DefaultDependencies=no
+Before=local-fs.target shutdown.target
+
+[Service]
+Type=oneshot
+ExecStartPre=/bin/mount -o remount,rw /
+ExecStart=/bin/bash -c "/usr/bin/resize2fs_by_partlabel.sh rootfs"
+ExecStartPost=/bin/ln -s /dev/null /etc/systemd/system/resize2fs-root.service
+StandardOutput=journal+console
+TimeoutSec=0
diff --git a/units/resize2fs@.service b/units/resize2fs@.service
new file mode 100644
index 0000000..e761df5
--- /dev/null
+++ b/units/resize2fs@.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Resize of File System on %f
+DefaultDependencies=no
+BindsTo=%i.device
+After=fsck@%i.service
+Requires=fsck@%i.service
+Before=local-fs.target shutdown.target
+
+[Service]
+Type=oneshot
+ExecStart=/sbin/resize2fs -f %f
+ExecStartPost=/bin/ln -s /dev/null /etc/systemd/system/resize2fs@%i.service
+StandardOutput=journal+console
+TimeoutSec=0
diff --git a/units/usr-share-locale.mount b/units/usr-share-locale.mount
new file mode 100644
index 0000000..7a22b65
--- /dev/null
+++ b/units/usr-share-locale.mount
@@ -0,0 +1,9 @@
+[Unit]
+Description=Compressed locale directory (/usr/share/locale)
+ConditionFileNotEmpty=/usr/share/usr_share_locale.squash
+
+[Mount]
+What=/usr/share/usr_share_locale.squash
+Where=/usr/share/locale
+Type=squashfs
+Options=loop,ro