From: sungmin82.ha Date: Tue, 30 Jul 2013 06:22:40 +0000 (+0900) Subject: sync with tizen_2.2 X-Git-Tag: accepted/tizen/20130918.211705^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_ivi_genivi;p=sdk%2Fsystem-plugin-emulator.git sync with tizen_2.2 Change-Id: Ie08efee0f9cffac0b6e58c90292883ee83d78fe6 Signed-off-by: Sungmin Ha --- diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..978df0f --- /dev/null +++ b/AUTHORS @@ -0,0 +1,13 @@ +YeongKyoon Lee +DaiYoung Kim +SeokYeon Hwang +SangJin Kim +KiTae Kim +JinHyung Jo +SungMin Ha +MunKyu Im +JiHye Kim +GiWoong Kim +SooYoung Ha +HyunGoo Kang + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f94008a --- /dev/null +++ b/LICENSE @@ -0,0 +1,206 @@ +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + + 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/NOTICE b/NOTICE new file mode 100644 index 0000000..4297ee3 --- /dev/null +++ b/NOTICE @@ -0,0 +1 @@ +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. diff --git a/filesystem/etc/emulator/model-config.sh b/filesystem/etc/emulator/model-config.sh new file mode 100644 index 0000000..946b980 --- /dev/null +++ b/filesystem/etc/emulator/model-config.sh @@ -0,0 +1,67 @@ +#!/bin/sh + +CMDLINE=/proc/cmdline +XML=/etc/config/model-config.xml + + +echo -e "[${_G} model config setting ${C_}]" + +# display resolution +if grep --silent "video=" $CMDLINE ; then + echo -e "[${_G} modify the resolution value of platform features: ${C_}]" + + VIDEO=`sed s/.*video=// $CMDLINE | cut -d ' ' -f1` + FORMAT=`echo $VIDEO | cut -d ',' -f2` + RESOLUTION=`echo $FORMAT | cut -d '-' -f1` + WIDTH=`echo $RESOLUTION | cut -d 'x' -f1` + HEIGHT=`echo $RESOLUTION | cut -d 'x' -f2` + + TR_NUM=`echo $WIDTH$HEIGHT | tr -d '[0-9]'` + if [ "$TR_NUM" != "" ] ; then + echo "non-integer argument" + else + WIDTH_KEY="tizen.org\/feature\/screen.width\" type=\"int\"" + sed -i s/"$WIDTH_KEY".*\"$WIDTH"\"$HEIGHT"\true\false\false\true\false\false\"$SCREEN_DPI"\ /etc/resolv.conf + diff --git a/filesystem/etc/preconf.d/systemd_conf.preinit b/filesystem/etc/preconf.d/systemd_conf.preinit new file mode 100644 index 0000000..014d570 --- /dev/null +++ b/filesystem/etc/preconf.d/systemd_conf.preinit @@ -0,0 +1,10 @@ +#!/bin/sh + +# Prepare systemd log output +# For system.conf +echo "DefaultStandardOutput=kmsg" >> /etc/systemd/system.conf +echo "DefaultStandardError=kmsg" >> /etc/systemd/system.conf +# For user.conf +echo "DefaultStandardOutput=inherit" >> /etc/systemd/user.conf +echo "DefaultStandardError=inherit" >> /etc/systemd/user.conf + diff --git a/filesystem/etc/profile.d/proxy_setting.sh b/filesystem/etc/profile.d/proxy_setting.sh new file mode 100644 index 0000000..00a6787 --- /dev/null +++ b/filesystem/etc/profile.d/proxy_setting.sh @@ -0,0 +1,17 @@ +#!/bin/sh +if grep -q "http_proxy=" /proc/cmdline ; then + __proxy=`sed 's/^.*http_proxy=\([^, ]*\).*$/\1/g' /proc/cmdline` + export "http_proxy=${__proxy}" +fi +if grep -q "https_proxy=" /proc/cmdline ; then + __proxy=`sed 's/^.*https_proxy=\([^, ]*\).*$/\1/g' /proc/cmdline` + export "https_proxy=${__proxy}" +fi +if grep -q "ftp_proxy=" /proc/cmdline ; then + __proxy=`sed 's/^.*ftp_proxy=\([^, ]*\).*$/\1/g' /proc/cmdline` + export "ftp_proxy=${__proxy}" +fi +if grep -q "socks_proxy=" /proc/cmdline ; then + __proxy=`sed 's/^.*socks_proxy=\([^, ]*\).*$/\1/g' /proc/cmdline` + export "socks_proxy=${__proxy}" +fi diff --git a/filesystem/etc/rc.d/rc.emul b/filesystem/etc/rc.d/rc.emul new file mode 100644 index 0000000..e18e653 --- /dev/null +++ b/filesystem/etc/rc.d/rc.emul @@ -0,0 +1,16 @@ +#!/bin/sh + +# Color set for ANSI TERM +_R='\033[0;31;1m' #Red +_G='\033[0;32;1m' #Green +_Y='\033[0;33;1m' #Yellow +C_='\033[0m' #Color off + +echo -e "[${_G}rc.emul : script start ${C_}]" + +# commented out by caramis... +# It is not needed since backlight turn off after 10 minutes. +#echo -e "[${_G}Setting power manager state value ${C_}]" +#/usr/bin/vconftool set -t int memory/pm/state 1 -f + +echo -e "[${_G}rc.emul : script end ${C_}]" diff --git a/filesystem/etc/rc.d/rc.firstboot b/filesystem/etc/rc.d/rc.firstboot new file mode 100644 index 0000000..8fbdf82 --- /dev/null +++ b/filesystem/etc/rc.d/rc.firstboot @@ -0,0 +1,7 @@ +#!/bin/sh + +/sbin/ldconfig + +if [ -e /opt/system/csc/.factoryreset ]; then + rm -f /opt/system/csc/.factoryreset +fi diff --git a/filesystem/etc/rc.d/rc.shutdown b/filesystem/etc/rc.d/rc.shutdown new file mode 100644 index 0000000..adc4e3a --- /dev/null +++ b/filesystem/etc/rc.d/rc.shutdown @@ -0,0 +1,40 @@ +export DISPLAY=:0 +killall power_manager +killall -9 udevd +#killall -9 system_server +killall -9 xinit + +rm -rf /tmp/vip/* +rm -rf /tmp/permanent/* + +echo "Run Shutdown animation..." +nice -n -15 /usr/bin/boot-animation --offmsg " " & +sleep 1 + +echo "Stopping menu screen..." +killall -9 menu_screen + +echo "Stopping all applications..." +/usr/bin/enter_deepsleep + +echo "Stopping indicator..." +killall -9 indicator + +value=1 +while [&value != "0"]; +do + value='vconftool get memory/boot_animation/finished | awk '{print $4}'' + sleep 0.5 +done +sleep 1 +echo "Turn off LCD after finishing boot-animation" +xset dpms force off + +# factory resetting... +# flag set by factory-reset.sh +if [ -f /opt/.factoryreset ]; then + /usr/bin/run-factory-reset.sh +fi + +#echo 4 > /sys/class/graphics/fb0/blank + diff --git a/filesystem/etc/rc.d/rc.sysinit b/filesystem/etc/rc.d/rc.sysinit new file mode 100644 index 0000000..324431b --- /dev/null +++ b/filesystem/etc/rc.d/rc.sysinit @@ -0,0 +1,161 @@ +#!/bin/sh + +# Color set for ANSI TERM +_R='\033[0;31;1m' #Red +_G='\033[0;32;1m' #Green +_Y='\033[0;33;1m' #Yellow +C_='\033[0m' #Color off + +echo -e "[${_G}rc.sysinit : script starts${C_}]" +echo -e "[${_G}mount...${C_}]" +mount -t proc none /proc +mount -t tmpfs tmpfs /tmp +#for emulator : /var/run only for supporting dpkg command +mount -t tmpfs tmpfs /var/run +mount -t sysfs none /sys +mount -t tmpfs runfs /run +mount -t devtmpfs devtmpfs /dev +mkdir -p /dev/pts +mkdir -p /dev/shm +mount -t tmpfs none /dev/shm +mount -t devpts devpts /dev/pts +mount -t debugfs none /sys/kernel/debug + +echo -e "[${_G}check codec dev node${C_}]" +test -c /dev/codec || mknod -m 666 /dev/codec c 240 0 + +echo -e "[${_G}mount filesystems storage${C_}]" +mount -a + +#emulator's swapon +echo -e "[${_G}mount swap /dev/vdb ${C_}]" +/sbin/swapon /dev/vdb + + +echo -e "[${_G}udev start${C_}]" +UDEVD_MAX_CHILDS=1 /sbin/udevd --daemon +/sbin/udevadm trigger + +echo -e "[${_G}create base directory in /opt, /var${C_}]" +# construct directory hierarchy +mkdir -p /opt/var/log/apt +mkdir -p /opt/var/lib +mkdir -p /opt/var/cache +mkdir -p /var/run + +#make a file for /dev/rtc1 +touch /dev/rtc1 +chmod 777 /dev/rtc1 + +if [ ! -e /opt/etc/.firstboot ]; then + echo -e "[${_Y}rc.firstboot${C_}]" + /etc/rc.d/rc.firstboot + touch /opt/etc/.firstboot +fi + +echo -e "[${_G}set device node perm & security${C_}]" +# Set device node permissions for security +chown 0:6501 /dev/video0 +chown 0:6509 /dev/log_main +chown 0:6509 /dev/log_events +chown 0:6509 /dev/log_radio +chown :audio /dev/snd/ +chmod 775 /dev/snd/ +chown :audio /dev/snd/controlC0 +chown :audio /dev/snd/pcmC0D0p +chown :audio /dev/snd/pcmC0D1p +chown :audio /dev/snd/timer +chown 0:6508 /dev/snd/pcmC0D0c +chown :video /dev/fb0 +chown :video /dev/video1 +chmod 666 /dev/glmem +chmod 666 /dev/yagl + +if [ -e /opt/etc/.coredump ]; then + # enable coredump + echo "/opt/usr/share/crash/core/%p_%s_%e.core" > /proc/sys/kernel/core_pattern + ulimit -c unlimited +else + echo "core dump disabled" + ulimit -c 0 +fi + +echo -e "[${_G}run profile${C_}]" +# Run profile +. /etc/profile + +# Check rw mode +DEVEL_UPDATE_MODE=`grep devel_update_boot /proc/cmdline` +if [ -f /opt/etc/.devel_update ] && [ -z "$DEVEL_UPDATE_MODE" ]; then + touch /opt/etc/.hib_capturing + rm /opt/etc/.devel_update +fi + +#for emulator +echo -e "[${_G}make symbolic link for i686${C_}]" +cd /usr/lib/enlightenment/modules/comp-slp/ +ln -s linux-gnu-i686-ver-pre-svn-08 linux-gnu-i486-ver-pre-svn-08 +cd /usr/lib/enlightenment/modules/e17-extra-module-keyrouter/ +ln -s linux-gnu-i686-ver-pre-svn-08 linux-gnu-i486-ver-pre-svn-08 +cd /usr/lib/enlightenment/modules/e17-extra-module-wmready/ +ln -s linux-gnu-i686-ver-pre-svn-08 linux-gnu-i486-ver-pre-svn-08 +cd /usr/lib/enlightenment/modules/illume2-slp/ +ln -s linux-gnu-i686-ver-pre-svn-08 linux-gnu-i486-ver-pre-svn-08 +cd /usr/lib/edje/modules/icon_calendar/ +ln -s linux-gnu-i686-1.0.0 linux-gnu-i486-1.0.0 + +#for emulator : where is press binary? +/usr/bin/press 1 # wait input to stop running scripts +if [ $? -eq 0 ]; then + echo "script is stopped" + # prepare usbnet before exit + insmod /opt/driver/g_ether.ko + sleep 1 + ifconfig usb0 192.168.129.3 netmask 255.255.255.0 + # Run all rc0 scripts + for i in /etc/rc.d/rc0.d/*; do + echo -e "[${_G}${i} start${C_}]" + $i start + done +elif [ -f /opt/etc/.hib_capturing ] && [ -z "$DEVEL_UPDATE_MODE" ]; then + echo -e "[${_Y}run all rc4 scripts${C_}]" + # Run all rc4 scripts + /usr/bin/write-to-lcd /dev/fb3 "Initializing daemons" + echo "there is /opt/etc/.hib_capturing hibernation capturing mode" + for i in /etc/rc.d/rc4.d/*; do + echo -e "[${_G}${i} start${C_}]" + $i start + done +else + # Run all rc3 scripts + echo -e "[${_G}run all rc3 scripts${C_}]" + echo "normal boot" + # modify script for checking boot up progress... + NUMBER_OF_RCS=`ls /etc/rc.d/rc3.d/ | wc -l` + count=0; + for i in /etc/rc.d/rc3.d/*; do + echo -e "[${_G}${i} start${C_}]" + $i start + count=$((count + 1)) + echo `expr $count \* 100 / $NUMBER_OF_RCS` > /dev/esm + done +fi + + +# symbolic link +if [ ! -e /opt/apps ]; then + echo -e "[${_G}link /opt/apps -> /opt/media/apps${C_}]" + ln -s /opt/media/apps /opt/apps +fi + +# inhouse home-directory +chown 5000:5000 /home/inhouse + +if [ "$DEVEL_UPDATE_MODE" ]; then + touch /opt/etc/.devel_update +fi + +#for emulator : +/etc/rc.d/rc.emul + +echo -e "[${_G}rc.sysinit : script end ${C_}]" diff --git a/filesystem/usr/lib/systemd/system/emul-common-preinit.service b/filesystem/usr/lib/systemd/system/emul-common-preinit.service new file mode 100644 index 0000000..3ad24cf --- /dev/null +++ b/filesystem/usr/lib/systemd/system/emul-common-preinit.service @@ -0,0 +1,16 @@ +[Unit] +Description=Legacy emulator startup script +DefaultDependencies=no +After=vconf-setup.service +Before=basic.target + +[Service] +Type=oneshot + +# platform features +ExecStartPre=/bin/sh -c '/etc/emulator/model-config.sh' +# W/A for alarm-service +ExecStart=/bin/touch /dev/rtc1 + +[Install] +WantedBy=emulator_preinit.target diff --git a/filesystem/usr/lib/systemd/system/emul-mount-hostdir.service b/filesystem/usr/lib/systemd/system/emul-mount-hostdir.service new file mode 100644 index 0000000..4e79310 --- /dev/null +++ b/filesystem/usr/lib/systemd/system/emul-mount-hostdir.service @@ -0,0 +1,10 @@ +[Unit] +Description=Mount host directory +DefaultDependencies=no + +[Service] +Type=oneshot +ExecStart=/etc/emulator/mount-hostdir.sh + +[Install] +WantedBy=emulator_preinit.target diff --git a/filesystem/usr/lib/systemd/system/emul-setup-audio-volume.service b/filesystem/usr/lib/systemd/system/emul-setup-audio-volume.service new file mode 100644 index 0000000..f930330 --- /dev/null +++ b/filesystem/usr/lib/systemd/system/emul-setup-audio-volume.service @@ -0,0 +1,10 @@ +[Unit] +Description=Audio volume setup on emulator +DefaultDependencies=no + +[Service] +Type=oneshot +ExecStart=/etc/emulator/setup-audio-volume.sh + +[Install] +WantedBy=emulator_preinit.target diff --git a/filesystem/usr/lib/systemd/system/emulator.target b/filesystem/usr/lib/systemd/system/emulator.target new file mode 100644 index 0000000..37e991f --- /dev/null +++ b/filesystem/usr/lib/systemd/system/emulator.target @@ -0,0 +1,12 @@ +# Target for emulator specified service +# This target runs after network.service in multi-user.target + +[Unit] +Description=Emulator specified +Requires=multi-user.target +After=network.service +AllowIsolate=no + +[Install] +WantedBy=multi-user.target + diff --git a/filesystem/usr/lib/systemd/system/emulator_preinit.target b/filesystem/usr/lib/systemd/system/emulator_preinit.target new file mode 100644 index 0000000..1442e19 --- /dev/null +++ b/filesystem/usr/lib/systemd/system/emulator_preinit.target @@ -0,0 +1,12 @@ +# Target for emulator specified preinit service +# This target runs after vconf-setup.service in basic.target + +[Unit] +Description=Emulator specified preinit +Requires=basic.target +After=vconf-setup.service +AllowIsolate=no + +[Install] +WantedBy=basic.target + diff --git a/filesystem/usr/lib/systemd/system/sdbd.service b/filesystem/usr/lib/systemd/system/sdbd.service new file mode 100644 index 0000000..0432676 --- /dev/null +++ b/filesystem/usr/lib/systemd/system/sdbd.service @@ -0,0 +1,14 @@ +[Unit] +Description=sdbd +Before=sensord.service + +[Service] +Type=forking +Environment=DISPLAY=:0 +PIDFile=/tmp/.sdbd.pid +RemainAfterExit=yes +ExecStartPre=/bin/bash -c "/bin/echo `/bin/sed 's/^.*sdb_port=\([^, ]*\).*$/\1/g' /proc/cmdline` > /opt/home/sdb_port.txt" +ExecStart=/usr/sbin/sdbd + +[Install] +WantedBy=emulator.target diff --git a/filesystem/usr/lib/systemd/system/sshd.service b/filesystem/usr/lib/systemd/system/sshd.service new file mode 100644 index 0000000..150ca10 --- /dev/null +++ b/filesystem/usr/lib/systemd/system/sshd.service @@ -0,0 +1,13 @@ +[Unit] +Description=OpenSSH Daemon +After=network.target + +[Service] +Type=forking +ExecStart=/etc/init.d/ssh start +KillMode=process +Restart=always + +[Install] +WantedBy=emulator.target + diff --git a/filesystem/usr/lib/udev/rules.d/95-tizen-emulator.rules b/filesystem/usr/lib/udev/rules.d/95-tizen-emulator.rules new file mode 100644 index 0000000..ec89f06 --- /dev/null +++ b/filesystem/usr/lib/udev/rules.d/95-tizen-emulator.rules @@ -0,0 +1,13 @@ +KERNEL=="glmem", MODE="0666", SMACK="*" +KERNEL=="yagl", MODE="0666", SMACK="*" + +KERNEL=="codec", GROUP="hwcodec", MODE="0666", SMACK="device::hwcodec" + +KERNEL=="video0", GROUP="camera", MODE="0660", SMACK="device::camera" +KERNEL=="video1", GROUP="video", MODE="0660", SMACK="device::video" +KERNEL=="video2", GROUP="video", MODE="0660", SMACK="device::video" + +KERNEL=="vdpram*", MODE="0644" + +# Moved from /etc/rc.d/rc3.d/S30brightness +SUBSYSTEM=="lcd", ATTR{lcd_power}=="?*", RUN+="/bin/chown :system_bklight 0664 %S/%p/lcd_power" diff --git a/packaging/system-plugin-emulator.changes b/packaging/system-plugin-emulator.changes new file mode 100644 index 0000000..a4ad7b2 --- /dev/null +++ b/packaging/system-plugin-emulator.changes @@ -0,0 +1,5 @@ +* Mon Jul 01 2013 GiWoong Kim +- manage a key value of screen size for each model + +* Wed Jun 26 2013 GiWoong Kim +- added number checking routine to model-config.sh diff --git a/packaging/system-plugin-emulator.manifest b/packaging/system-plugin-emulator.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/system-plugin-emulator.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/system-plugin-emulator.spec b/packaging/system-plugin-emulator.spec new file mode 100644 index 0000000..51aa5b2 --- /dev/null +++ b/packaging/system-plugin-emulator.spec @@ -0,0 +1,97 @@ +Name: system-plugin-emulator +Version: 0.0.10 +Release: 1 + +%define systemd_dir /usr/lib/systemd + +Summary: System plugin for emulator +License: Apache-2.0 +Group: System/Base +Requires: udev +Requires: util-linux +Requires: sysvinit +Requires(post): setup +Requires(post): coreutils +Source0: %{name}-%{version}.tar.gz +Source1001: packaging/%{name}.manifest + +%description +System plugin files for emulator + +%prep + +%setup -q + +%build + +%install +find . -name .gitignore -exec rm -f {} \; +cp -arf filesystem/* %{buildroot} + +# for legacy init +if [ ! -d %{buildroot}/etc/rc.d/rc3.d ]; then + mkdir -p %{buildroot}/etc/rc.d/rc3.d +fi +ln -s /etc/init.d/setup-audio-volume %{buildroot}//etc/rc.d/rc3.d/S02setup-audio-volume +ln -s /etc/init.d/mount-hostdir %{buildroot}//etc/rc.d/rc3.d/S03mount-hostdir +ln -s /etc/init.d/ssh %{buildroot}/etc/rc.d/rc3.d/S50ssh + +# for systemd +# for emulator_preinit.target +mkdir -p %{buildroot}/%{systemd_dir}/system/basic.target.wants +ln -s %{systemd_dir}/system/emulator_preinit.target %{buildroot}/%{systemd_dir}/system/basic.target.wants/ +mkdir -p %{buildroot}/%{systemd_dir}/system/emulator_preinit.target.wants +ln -s %{systemd_dir}/system/emul-setup-audio-volume.service %{buildroot}/%{systemd_dir}/system/emulator_preinit.target.wants/ +ln -s %{systemd_dir}/system/emul-mount-hostdir.service %{buildroot}/%{systemd_dir}/system/emulator_preinit.target.wants/ +ln -s %{systemd_dir}/system/emul-common-preinit.service %{buildroot}/%{systemd_dir}/system/emulator_preinit.target.wants/ +# for emulator.target +mkdir -p %{buildroot}/%{systemd_dir}/system/multi-user.target.wants +ln -s %{systemd_dir}/system/emulator.target %{buildroot}/%{systemd_dir}/system/multi-user.target.wants/ +mkdir -p %{buildroot}/%{systemd_dir}/system/emulator.target.wants +ln -s %{systemd_dir}/system/sdbd.service %{buildroot}/%{systemd_dir}/system/emulator.target.wants/ +ln -s %{systemd_dir}/system/sshd.service %{buildroot}/%{systemd_dir}/system/emulator.target.wants/ + +# for host file sharing +mkdir -p %{buildroot}/mnt/host + +%post +#make fstab +if [ -e /etc/fstab ]; then + echo "/opt/var /var bind bind 0 0" >> /etc/fstab + echo "/tmpfs /tmp tmpfs defaults 0 0" >> /etc/fstab + echo "/dev/vdb swap swap defaults 0 0" >> /etc/fstab +fi + +%files +/etc/emulator/setup-audio-volume.sh +/etc/emulator/mount-hostdir.sh +/etc/emulator/model-config.sh +/etc/init.d/setup-audio-volume +/etc/init.d/mount-hostdir +/etc/inittab +/etc/preconf.d/emulator_ns.preinit +/etc/preconf.d/systemd_conf.preinit +/etc/profile.d/proxy_setting.sh +/etc/rc.d/rc.emul +/etc/rc.d/rc.firstboot +/etc/rc.d/rc.shutdown +/etc/rc.d/rc.sysinit +/etc/rc.d/rc3.d/S02setup-audio-volume +/etc/rc.d/rc3.d/S03mount-hostdir +/etc/rc.d/rc3.d/S50ssh +/usr/lib/systemd/system/emulator_preinit.target +/usr/lib/systemd/system/emulator.target +/usr/lib/systemd/system/basic.target.wants/emulator_preinit.target +/usr/lib/systemd/system/multi-user.target.wants/emulator.target +/usr/lib/systemd/system/emul-setup-audio-volume.service +/usr/lib/systemd/system/emul-mount-hostdir.service +/usr/lib/systemd/system/emul-common-preinit.service +/usr/lib/systemd/system/emulator_preinit.target.wants/emul-setup-audio-volume.service +/usr/lib/systemd/system/emulator_preinit.target.wants/emul-mount-hostdir.service +/usr/lib/systemd/system/emulator_preinit.target.wants/emul-common-preinit.service +/usr/lib/systemd/system/sdbd.service +/usr/lib/systemd/system/sshd.service +/usr/lib/systemd/system/emulator.target.wants/sdbd.service +/usr/lib/systemd/system/emulator.target.wants/sshd.service +/usr/lib/udev/rules.d/95-tizen-emulator.rules +%dir /mnt/host