From: SeokYeon Hwang Date: Fri, 19 Apr 2013 05:41:51 +0000 (+0900) Subject: Clean filesystems up X-Git-Tag: submit/tizen_common/20140529.181337~11^2~11^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e5a4233e35241d198ae1c687664f22ed9880eb0;p=platform%2Fadaptation%2Femulator%2Fsystem-plugin-emulator.git Clean filesystems up Change-Id: I526f1e3631072610a9f4324568ccbd5204939136 Signed-off-by: SeokYeon Hwang --- diff --git a/filesystem/bin/change-booting-mode.sh b/filesystem/bin/change-booting-mode.sh deleted file mode 100755 index 09b5df6..0000000 --- a/filesystem/bin/change-booting-mode.sh +++ /dev/null @@ -1,140 +0,0 @@ -#!/bin/sh -# -# Copyright 2010 -# Read the file COPYING -# -# Authors: Yeongil Jang -# -# Copyright Samsung Electronics -# -FOTA_CONFIG_FILE="/sys/devices/platform/s3c_samsung_fota/samsung_fota_config" -FUS_CONFIG_FILE="/sys/devices/platform/s3c_samsung_fota/samsung_fus_config" -UPDATE_CONFIG_FILE="/sys/devices/platform/s3c_samsung_fota/samsung_update_config" -RTL_CONFIG_FILE="/sys/devices/platform/s3c_samsung_fota/samsung_rtl_config" - -# print help message -do_help() -{ - cat >&2 </dev/null 2>&1 - if test "$?" != "0"; then - val=$possibleval - if [ "$#" -ge 1 ]; then - shift - fi - fi - fi - - case "$arg" in - - --fota) - echo "Setting fota update mode" >&2 - echo fota_enable > $FOTA_CONFIG_FILE - /bin/fw_setenv SLP_FLAG_FOTA 1 - /bin/fw_setenv SLP_FOTA_PATH $val - ;; - --fus) - echo "Setting fus update mode" >&2 - echo fus_enable > $FUS_CONFIG_FILE - /bin/fw_setenv SLP_FLAG_FUS 1 - echo "kill mtp-ui, data-router" >> /opt/var/log/fus_update.log 2>&1 - killall mtp-ui >> /opt/var/log/fus_update.log 2>&1 - killall data-router >> /opt/var/log/fus_update.log 2>&1 - umount /dev/gadget >> /opt/var/log/fus_update.log 2>&1 - lsmod >> /opt/var/log/fus_update.log 2>&1 - rmmod g_samsung >> /opt/var/log/fus_update.log 2>&1 - ;; - --fus_binary) - echo "Setting fus binary update mode" >&2 - echo fus_enable > $FUS_CONFIG_FILE - /bin/fw_setenv SLP_FLAG_FUS 2 - /bin/fw_setenv SLP_FUS_PATH $val -# echo "kill mtp-ui, data-router" >> /opt/var/log/fus_update.log 2>&1 -# killall mtp-ui >> /opt/var/log/fus_update.log 2>&1 -# killall data-router >> /opt/var/log/fus_update.log 2>&1 -# umount /dev/gadget >> /opt/var/log/fus_update.log 2>&1 -# lsmod >> /opt/var/log/fus_update.log 2>&1 -# rmmod g_samsung >> /opt/var/log/fus_update.log 2>&1 - ;; - --update) - echo "Setting update mode for engineers" >&2 - echo 0 > /sys/power/always_resume -# touch /opt/etc/.hib_capturing # make fastboot image again on next booting - mount -o remount,rw / - exit - ;; - --rtl) - echo "Setting rtl mode" >&2 - echo rtl_enable > $RTL_CONFIG_FILE - /bin/fw_setenv SLP_FLAG_RTL 1 - ;; - --fota_disable) - echo "Clear fota update flag" >&2 - /bin/fw_setenv SLP_FLAG_FOTA 0 - ;; - --fus_disable) - echo "Clear fus update flag" >&2 - /bin/fw_setenv SLP_FLAG_FUS 0 - ;; - --fus_binary_disable) - echo "Clear fus binary update flag" >&2 - /bin/fw_setenv SLP_FLAG_FUS 0 - ;; - --update_disable) - echo "Clear engineer update flag" >&2 - /bin/fw_setenv SLP_FLAG_UPDATE 0 - ;; - --rtl_disable) - echo "Clear rtl test flag" >&2 - /bin/fw_setenv SLP_FLAG_RTL 0 - ;; - - -?|--help) - do_help - exit 0 - ;; - *) - echo "Unknown option \"$arg\". See --help" >&2 - do_help - exit 0 - ;; - esac - done -} - -## main - -if test -z "$1"; then - do_help - exit 0 -fi - -do_options $@ -reboot diff --git a/filesystem/bin/ifconfig b/filesystem/bin/ifconfig deleted file mode 120000 index a3aaff7..0000000 --- a/filesystem/bin/ifconfig +++ /dev/null @@ -1 +0,0 @@ -/bin/busybox \ No newline at end of file diff --git a/filesystem/bin/mdev b/filesystem/bin/mdev deleted file mode 120000 index a3aaff7..0000000 --- a/filesystem/bin/mdev +++ /dev/null @@ -1 +0,0 @@ -/bin/busybox \ No newline at end of file diff --git a/filesystem/bin/route b/filesystem/bin/route deleted file mode 120000 index a3aaff7..0000000 --- a/filesystem/bin/route +++ /dev/null @@ -1 +0,0 @@ -/bin/busybox \ No newline at end of file diff --git a/filesystem/bin/ubimnt.sh b/filesystem/bin/ubimnt.sh deleted file mode 100755 index 471be13..0000000 --- a/filesystem/bin/ubimnt.sh +++ /dev/null @@ -1,159 +0,0 @@ -#!/bin/sh -# -# ubimnt.sh : mount ubifs volume on directory -# ubifs [ubi_vol_name] [mnt pos] [force] -# ubi_vol_name : volume name -# mnt_pos : mount directory -# force : if failed print error and stop -# -# ex) ./ubifs csa /csa -f -# -if [ $# -lt 2 ];then - echo "$0 Error : no volume name or mount directory" - echo "ex) $0 modem /modem" - exit 1 -fi - -_volname=$1 -_mntpos=$2 -_force=$3 - -_kernelver=$(uname -r) -_modpath="/lib/modules/${_kernelver}" -_ubisysfs="/sys/class/ubi" -_winpower="/sys/devices/platform/s3cfb/win_power" -_vtcon="/sys/class/vtconsole/vtcon1" -_vt_insmod="font softcursor bitblit fbcon" -_vt_rmmod="fbcon bitblit softcursor font" -_fbcondev="/dev/tty1" -_stdcon="/dev/console" -_condev="${_stdcon}" - -_mtdname=$(grep ${_volname} /proc/mtd | cut -d : -f 1) -_mtdnum=${_mtdname#mtd} - -fbcon_open() { - for i in `echo ${_vt_insmod}` - do - if [ ! -f "${_modpath}/${i}.ko" ];then - _condev=${_stdcon} - return 1 - fi - insmod ${_modpath}/${i}.ko >/dev/null 2>&1 - done - echo 0 1 > ${_winpower} - echo 3 0 > ${_winpower} - - _condev="${_fbcondev}" -} - -fbcon_close() { - if [ ! -f "${_vtcon}/bind" ];then - echo "FB console is not opened" - return 1 - fi - - echo 0 > ${_vtcon}/bind - echo 3 1 > ${_winpower} - echo 0 0 > ${_winpower} - for i in `echo ${_vt_rmmod}` - do - rmmod ${i} >/dev/null 2>&1 - done - _condev=${_stdcon} -} - -put_error1() { - echo -e "\n\nFATAL !!! Can't mount ${_volname} partition." >${_condev} - echo -e " Please contact sh0130.kim(010-8820-2960) or anyone in kernel part.\n\n" >${_condev} -} - -put_error2() { - echo -e "\n\nFATAL !! Can't make ${_volname} volume in ${_ubidev}." >${_condev} - echo -e " Please contact sh0130.kim(010-8820-2960) or anyone in kernel part." >${_condev} -} - -############################ -# Main -############################ - -# Check volume exists. -_ubidev=$(grep ${_volname} $(find ${_ubisysfs} -name name)|cut -d "/" -f 5) - -if [ -z "${_ubidev}" ];then - - if [ -z "${_force}" ]; then - exit 0 - fi - - fbcon_open - - echo -e "\n\nWARNNING !!! ${_volname} partition is not exists." >${_condev} - - # Check if failed on csa. CSA may need to initialize. - if [ "${_volname}" == "csa" ];then - echo -e " Initilize ${_volname} forcibly despite of not in manufacturing process, you may loose your data (eg, IMEI)." >${_condev} - echo -e "\nErase anyway? [y/N] " >${_condev} - read _answer; _answer=$(echo ${_answer} | tr a-z A-Z) - - if [ "${_answer}" == "Y" ];then - - /bin/ubidetach -p /dev/${_mtdname} - - /bin/ubiformat -y /dev/${_mtdname} - if [ $? -ne 0 ]; then - echo -e "\nubiformat error\n" >${_condev} - put_error2 - exit 1 - fi - - /bin/ubiattach -p /dev/${_mtdname} - if [ $? -ne 0 ]; then - echo -e "\nubiattach error\n" >${_condev} - put_error2 - exit 1 - fi - - _ubidev=$(grep "^${_mtdnum}$" $(find ${_ubisysfs} -name mtd_num)|cut -d / -f 5) - _devmajor=$(cat ${_ubisysfs}/${_ubidev}/dev|cut -d : -f 1) - - echo -e "\t$ /bin/mknod /dev/${_ubidev} c ${_devmajor} 0" - /bin/mknod /dev/${_ubidev} c ${_devmajor} 0 - - echo -e "\t$ /bin/ubimkvol /dev/${_ubidev} -m -N ${_volname}" - /bin/ubimkvol /dev/${_ubidev} -m -N ${_volname} - - if [ $? -ne 0 ]; then - put_error2 - exit 1 - fi - else - put_error1 - exit 1 - fi - else - put_error1 - exit 1 - fi - - fbcon_close - - _ubidev=$(grep ${_volname} $(find ${_ubisysfs} -name name)|cut -d "/" -f 5) -fi - -# Check if mounted already -_mounted_already=$(grep "${_ubidev}!${_volname} ${_mntpos}" /etc/mtab) -if [ -n "${_mounted_already}" ];then - echo -e "\nWARNNING !!! ${_volname} partition seems to be mounted already.\n" - exit 0 -fi - -# Mount it. -mount -t ubifs -o bulk_read,no_chk_data_crc ${_ubidev}!${_volname} ${_mntpos} -if [ $? -ne 0 ]; then - fbcon_open - put_error1 - exit 1 -fi - -exit 0 diff --git a/filesystem/etc/emulator/virtgl.sh b/filesystem/etc/emulator/virtgl.sh new file mode 100755 index 0000000..df3a11d --- /dev/null +++ b/filesystem/etc/emulator/virtgl.sh @@ -0,0 +1,32 @@ + #!/bin/sh + +echo -e "[${_G} Opengl-es acceleration module setting. ${C_}]" +if grep "gles=1" /proc/cmdline ; then + echo -e "[${_G} Emulator support gles hw acceleration. ${C_}]" + echo -e "[${_G} Change permission of /dev/glmem. ${C_}]" + chmod 666 /dev/glmem + echo -e "[${_G} Apply to use hw gles library. ${C_}]" + ln -s -f /usr/lib/host-gl/libEGL.so.1.0 /usr/lib/libEGL.so + ln -s -f /usr/lib/host-gl/libEGL.so.1.0 /usr/lib/libEGL.so.1 + ln -s -f /usr/lib/host-gl/libGLESv1_CM.so.1.0 /usr/lib/libGLESv1_CM.so + ln -s -f /usr/lib/host-gl/libGLESv1_CM.so.1.0 /usr/lib/libGLESv1_CM.so.1 + ln -s -f /usr/lib/host-gl/libGLESv2.so.1.0 /usr/lib/libGLESv2.so + ln -s -f /usr/lib/host-gl/libGLESv2.so.1.0 /usr/lib/libGLESv2.so.1 + rm -f /usr/lib/st_GL.so + rm -f /usr/lib/egl_gallium.so + rm -f /usr/lib/libglapi.so* +else + echo -e "[${_G} Emulator does not support gles hw acceleration. ${C_}]" + echo -e "[${_G} Apply to use sw mesa gles library. ${C_}]" + ln -s -f /usr/lib/mesa-gl/libEGL.so.1.0 /usr/lib/libEGL.so + ln -s -f /usr/lib/mesa-gl/libEGL.so.1.0 /usr/lib/libEGL.so.1 + ln -s -f /usr/lib/mesa-gl/libGLESv1_CM.so.1.1.0 /usr/lib/libGLESv1_CM.so + ln -s -f /usr/lib/mesa-gl/libGLESv1_CM.so.1.1.0 /usr/lib/libGLESv1_CM.so.1 + ln -s -f /usr/lib/mesa-gl/libGLESv2.so.2.0.0 /usr/lib/libGLESv2.so + ln -s -f /usr/lib/mesa-gl/libGLESv2.so.2.0.0 /usr/lib/libGLESv2.so.1 + ln -s -f /usr/lib/mesa-gl/st_GL.so /usr/lib/st_GL.so + ln -s -f /usr/lib/mesa-gl/egl_gallium.so /usr/lib/egl_gallium.so + ln -s -f /usr/lib/mesa-gl/libglapi.so.0.0.0 /usr/lib/libglapi.so + ln -s -f /usr/lib/mesa-gl/libglapi.so.0.0.0 /usr/lib/libglapi.so.0 + ln -s -f /usr/lib/mesa-gl/libglapi.so.0.0.0 /usr/lib/libglapi.so.0.0.0 +fi diff --git a/filesystem/etc/emulator/yagl.sh b/filesystem/etc/emulator/yagl.sh new file mode 100755 index 0000000..5d1c0cc --- /dev/null +++ b/filesystem/etc/emulator/yagl.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +if test -f '/usr/lib/yagl/libGLESv2.so' && grep -q 'yagl=1' /proc/cmdline; then + export LD_LIBRARY_PATH="/usr/lib/yagl${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" + export ELM_ENGINE=gl + export YAGL_DEBUG=4 +# export YAGL_DEBUG_FUNC_TRACE=1 + + # XXX FIXME: This has to be dropped too + ulimit -SHl unlimited +fi diff --git a/filesystem/etc/init.d/csa-tools b/filesystem/etc/init.d/csa-tools deleted file mode 100755 index f0b7148..0000000 --- a/filesystem/etc/init.d/csa-tools +++ /dev/null @@ -1,129 +0,0 @@ -#!/bin/sh - -_csa_part=`mount | grep csa | awk '{print $3}'` -_bak_path="/opt/system/csa" -_bak_end="$_bak_path/.backup_end" -_log_file="$_bak_path/.log" -_src_stamp="$_csa_part/.backup_stamp" - -chk_must_have () { - _must_have="$_csa_part/nv/nvdata.bin" - - for file in $_must_have; do - if [ ! -e $file ]; then - return 1 - fi - done - return 0 -} - -do_backup () { - # wait for making nv data - sleep 60 - for i in 10 20 30; do - chk_must_have - if [ $? -eq 0 ]; then - break - fi - sleep $i - done - - chk_must_have - if [ $? -ne 0 ]; then - echo "$file does not exist." >> $_log_file - date >> $_log_file - exit 1 - fi - - cp -rf $_csa_part ${_bak_path%/csa} - echo "Success CSA backup!!!" - echo "Success CSA backup!!!" > $_log_file - date >> $_log_file - touch $_src_stamp - sync - mount | grep csa > $_bak_end -} - -do_restore () { - if [ "z$_bak_path" == "z" ]; then - mkdir -p $_bak_path - echo "Failed to restore CSA, no backup data" >> $_log_file - date >> $_log_file - exit 1 - fi - - _csa_dev=`mount | grep csa | awk '{print $1}'` - if [ $_csa_dev ]; then - # CSA partition is mounted but we don't trust it. Clean up - umount $_csa_part - if [ -e $_csa_dev ]; then - dd if=/dev/zero of=$_csa_dev bs=1024 count=1024 - fi - fi - # format and mount csa partition - /usr/bin/mount_slp.sh -f csa - cp -rf $_bak_path ${_csa_part%csa} - - echo "Success to restore CSA" - echo "Success to restore CSA" >> $_log_file - date >> $_log_file - touch $_src_stamp - sync -} - -do_mount () { - if [ "z$_csa_part" == "z" ]; then - /usr/bin/mount_slp.sh -f csa - _csa_part=`mount | grep csa | awk '{print $3}'` - _src_stamp="$_csa_part/.backup_stamp" - - chk_must_have - if [[ "$?" == "0" && -e $_src_stamp ]]; then - echo "CSA is mounted and seems normal." - echo "Don't restore CSA" - echo "[modem power on]" - echo on > /sys/devices/platform/modemctl/exec_util - else - do_restore - echo "[modem power on]" - echo on > /sys/devices/platform/modemctl/exec_util - exit 1 - fi - - else - echo "CSA is already mounted.." - mount | grep csa - fi -} - -do_start () { - mkdir -p $_bak_path - if [ ! -e $_bak_path ]; then - echo "There is no available backup dir, $_bak_path" - exit 1 - fi - - if [ ! -e "$_bak_end" ]; then - $0 backup & - fi -} - -case "$1" in - start) - do_start - ;; - backup) - do_backup - ;; - restore) - do_restore - ;; - mount) - do_mount - ;; - *) - echo "Usage: $0 start | backup | restore | mount" -esac - -exit 0 - diff --git a/filesystem/etc/init.d/emulator-opengl b/filesystem/etc/init.d/emulator-opengl new file mode 100755 index 0000000..36a2d76 --- /dev/null +++ b/filesystem/etc/init.d/emulator-opengl @@ -0,0 +1,5 @@ +#!/bin/sh + +. /etc/emulator/virtgl.sh +# yagl init script should be modified to old symlink mode, not a LD_LIBRARY_PATH mode. +#. /etc/emulator/yagl.sh diff --git a/filesystem/etc/mdev.conf b/filesystem/etc/mdev.conf deleted file mode 100644 index 8376ef3..0000000 --- a/filesystem/etc/mdev.conf +++ /dev/null @@ -1,22 +0,0 @@ -audio 0:5 0666 -console 0:5 0600 -controlC[0-9] 0:0 0660 @cp -R /dev/$MDEV /dev/snd/ -dsp 0:5 0666 -event[0-9] 0:0 0600 -fb 0:5 0666 -nfs 0:5 0770 -null 0:0 0777 -pcmC[0-1]D[0-9][a-z] 0:0 0660 @mv /dev/$MDEV /dev/snd/ -timer 0:0 0660 @mv /dev/$MDEV /dev/snd/ -rtc 0:0 0666 -tty 0:5 0660 -tty0* 0:5 0660 -tty1* 0:5 0660 -tty2* 0:5 0660 -tty3* 0:5 0660 -tty4* 0:5 0660 -tty5* 0:5 0660 -tty6* 0:5 0660 -ttyS* 0:5 0640 -urandom 0:0 0444 -zero 0:0 0666 diff --git a/filesystem/etc/mtools.conf b/filesystem/etc/mtools.conf deleted file mode 100755 index 3cf0aa7..0000000 --- a/filesystem/etc/mtools.conf +++ /dev/null @@ -1,66 +0,0 @@ -# Example mtools.conf files. Uncomment the lines which correspond to -# your architecture and comment out the "SAMPLE FILE" line below -# SAMPLE FILE - -# # Linux floppy drives -# drive a: file="/dev/fd0" exclusive -# drive b: file="/dev/fd1" exclusive - -# # First SCSI hard disk partition -# drive c: file="/dev/sda1" - -# # First IDE hard disk partition -# drive c: file="/dev/hda1" - -# # dosemu floppy image -# drive m: file="/var/lib/dosemu/diskimage" - -# # dosemu hdimage -# drive n: file="/var/lib/dosemu/diskimage" offset=3840 - -# # Atari ramdisk image -# drive o: file="/tmp/atari_rd" offset=136 - -# # ZIP disk for Solaris: -# Drive X is ZIP-100 at target 5 -# drive X: file="/dev/rdsk/c0t5d0s2" partition=4 scsi=1 nodelay - -# # ZIP disk for SunOS: -# # Zip drive is at target 5, which default kernel calls tape st1 !! -# drive Y: file="/dev/rsd5c" partition=4 scsi=1 nodelay - -# # autoselect zip drive/floppy on HP-UX 9/10 -# drive a: file="/dev/rdsk/c201d5" exclusive partition=4 -# drive a: file="/dev/rdsk/c201d5s0" exclusive partition=4 -# drive a: file="/dev/rfloppy/c201d0s0" exclusive - -# A/UX target 5 on 1st scsi bus jaz or zip -# drive X: file="/dev/rdsk/c105d0s31" partition=4 - - -# Some examples for BeOS. -# floppy drive. hardcoded in devices.c, so no real need to define it here -#drive a: file="/dev/floppy_disk" exclusive -# ZIP drive on SCSI ID 6 -#drive z: file="/dev/scsi_disk_060" offset=16384 fat_bits=16 - -# SCO Unix 3.2v4 -# # Floppy disk drives -# -# drive a: file="/dev/install" exclusive -# drive b: file="/dev/install1" exclusive -# -# # SCSI hard disk partitions -# -# drive c: file="/dev/dsk/0sC" -# drive d: file="/dev/dsk/0sD" -# drive e: file="/dev/dsk/0sE" -drive f: file="/dev/mmcblk0p1" -# drive g: file="/dev/dsk/0sG" -# drive h: file="/dev/dsk/0sH" - -mtools_skip_check=1 - -# # uncomment the following line to display all file names in lower -# # case by default -# mtools_lower_case=1 diff --git a/filesystem/etc/profile.d/simulator-opengl.sh b/filesystem/etc/profile.d/simulator-opengl.sh deleted file mode 100644 index 8956676..0000000 --- a/filesystem/etc/profile.d/simulator-opengl.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -. /etc/virtgl.sh -# yagl init script should be modified to old symlink mode, not a LD_LIBRARY_PATH mode. -#. /etc/yagl.sh diff --git a/filesystem/etc/rc.d/rc.emul b/filesystem/etc/rc.d/rc.emul index 2ef708f..e8b8b51 100755 --- a/filesystem/etc/rc.d/rc.emul +++ b/filesystem/etc/rc.d/rc.emul @@ -11,33 +11,4 @@ echo -e "[${_G}rc.emul : script start ${C_}]" echo -e "[${_G}Setting power manager state value ${C_}]" /usr/bin/vconftool set -t int memory/pm/state 1 -f -echo -e "[${_G}Initialize battery level ${C_}]" -#/usr/bin/vconftool set -t int memory/Battery/Level 5 -f -/usr/bin/vconftool set -t int memory/sysman/battery_status_low 4 -f - -if grep -q "enable_cam" /proc/cmdline ; then - if grep -q "enable_cam=1" /proc/cmdline ; then - echo -e "[${_Y}Webcam is connected. We can use '/dev/video0' for camera.${C_}]" - else - echo -e "[${_Y}Webcam is not connected! We will remove '/dev/video0'.${C_}]" - rm -rf /dev/video0 - fi -fi - -#--move to rc3.d/S30brgihtness -#echo -e "[${_G}to change brightness's group${C_}]" -#chgrp system_bklight /sys/class/backlight/emulator/brightness -#chmod g+w /sys/class/backlight/emulator/brightness - -#echo -e "[${_G}to change lcd_power's group${C_}]" -#chown -R root:system_bklight /sys/devices/virtual/lcd/emulator/lcd_power -#-- - -echo -e "[${_G}Initialize display setting value${C_}]" -##/usr/bin/vconftool set -t int db/setting/Brightness "24" -f -/usr/bin/vconftool set -t int db/sysman/lcd_backlight_normal "600" -f - -echo -e "[${_G}For menu_screen booting..${C_}]" -/usr/bin/vconftool set -t int memory/startapps/sequence 1 -f - echo -e "[${_G}rc.emul : script end ${C_}]" diff --git a/filesystem/etc/rc.d/rc3.d/S01setup-audio-volume b/filesystem/etc/rc.d/rc3.d/S01setup-audio-volume deleted file mode 120000 index 65ee766..0000000 --- a/filesystem/etc/rc.d/rc3.d/S01setup-audio-volume +++ /dev/null @@ -1 +0,0 @@ -../../init.d/setup-audio-volume \ No newline at end of file diff --git a/filesystem/etc/rc.d/rc3.d/S02mount-hostdir b/filesystem/etc/rc.d/rc3.d/S02mount-hostdir deleted file mode 120000 index dbe3ef0..0000000 --- a/filesystem/etc/rc.d/rc3.d/S02mount-hostdir +++ /dev/null @@ -1 +0,0 @@ -../../init.d/mount-hostdir \ No newline at end of file diff --git a/filesystem/etc/rc.d/rc3.d/S45vconf-menuscreen b/filesystem/etc/rc.d/rc3.d/S45vconf-menuscreen deleted file mode 100755 index 527b797..0000000 --- a/filesystem/etc/rc.d/rc3.d/S45vconf-menuscreen +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -echo -e "[${_G}set a vconf for menu-screen sw backend${C_}]" -/usr/bin/vconftool set -t string file/private/org.tizen.menu-screen/engine "x11" -i -u 5000 -f diff --git a/filesystem/etc/virtgl.sh b/filesystem/etc/virtgl.sh deleted file mode 100755 index df3a11d..0000000 --- a/filesystem/etc/virtgl.sh +++ /dev/null @@ -1,32 +0,0 @@ - #!/bin/sh - -echo -e "[${_G} Opengl-es acceleration module setting. ${C_}]" -if grep "gles=1" /proc/cmdline ; then - echo -e "[${_G} Emulator support gles hw acceleration. ${C_}]" - echo -e "[${_G} Change permission of /dev/glmem. ${C_}]" - chmod 666 /dev/glmem - echo -e "[${_G} Apply to use hw gles library. ${C_}]" - ln -s -f /usr/lib/host-gl/libEGL.so.1.0 /usr/lib/libEGL.so - ln -s -f /usr/lib/host-gl/libEGL.so.1.0 /usr/lib/libEGL.so.1 - ln -s -f /usr/lib/host-gl/libGLESv1_CM.so.1.0 /usr/lib/libGLESv1_CM.so - ln -s -f /usr/lib/host-gl/libGLESv1_CM.so.1.0 /usr/lib/libGLESv1_CM.so.1 - ln -s -f /usr/lib/host-gl/libGLESv2.so.1.0 /usr/lib/libGLESv2.so - ln -s -f /usr/lib/host-gl/libGLESv2.so.1.0 /usr/lib/libGLESv2.so.1 - rm -f /usr/lib/st_GL.so - rm -f /usr/lib/egl_gallium.so - rm -f /usr/lib/libglapi.so* -else - echo -e "[${_G} Emulator does not support gles hw acceleration. ${C_}]" - echo -e "[${_G} Apply to use sw mesa gles library. ${C_}]" - ln -s -f /usr/lib/mesa-gl/libEGL.so.1.0 /usr/lib/libEGL.so - ln -s -f /usr/lib/mesa-gl/libEGL.so.1.0 /usr/lib/libEGL.so.1 - ln -s -f /usr/lib/mesa-gl/libGLESv1_CM.so.1.1.0 /usr/lib/libGLESv1_CM.so - ln -s -f /usr/lib/mesa-gl/libGLESv1_CM.so.1.1.0 /usr/lib/libGLESv1_CM.so.1 - ln -s -f /usr/lib/mesa-gl/libGLESv2.so.2.0.0 /usr/lib/libGLESv2.so - ln -s -f /usr/lib/mesa-gl/libGLESv2.so.2.0.0 /usr/lib/libGLESv2.so.1 - ln -s -f /usr/lib/mesa-gl/st_GL.so /usr/lib/st_GL.so - ln -s -f /usr/lib/mesa-gl/egl_gallium.so /usr/lib/egl_gallium.so - ln -s -f /usr/lib/mesa-gl/libglapi.so.0.0.0 /usr/lib/libglapi.so - ln -s -f /usr/lib/mesa-gl/libglapi.so.0.0.0 /usr/lib/libglapi.so.0 - ln -s -f /usr/lib/mesa-gl/libglapi.so.0.0.0 /usr/lib/libglapi.so.0.0.0 -fi diff --git a/filesystem/etc/yagl.sh b/filesystem/etc/yagl.sh deleted file mode 100755 index 5d1c0cc..0000000 --- a/filesystem/etc/yagl.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -if test -f '/usr/lib/yagl/libGLESv2.so' && grep -q 'yagl=1' /proc/cmdline; then - export LD_LIBRARY_PATH="/usr/lib/yagl${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" - export ELM_ENGINE=gl - export YAGL_DEBUG=4 -# export YAGL_DEBUG_FUNC_TRACE=1 - - # XXX FIXME: This has to be dropped too - ulimit -SHl unlimited -fi diff --git a/filesystem/lib/udev/rules.d/99-serial-console.rules b/filesystem/lib/udev/rules.d/99-serial-console.rules deleted file mode 100644 index c7f8f94..0000000 --- a/filesystem/lib/udev/rules.d/99-serial-console.rules +++ /dev/null @@ -1,2 +0,0 @@ -ACTION=="add|change", SUBSYSTEM=="tty", KERNEL=="s3c2410_serial2", SYMLINK="serial_console" -SUBSYSTEM=="tty", KERNEL=="s3c2410_serial[0-9]*", TAG+="systemd" diff --git a/filesystem/opt/home/root/.launcher/launcher.exit b/filesystem/opt/home/root/.launcher/launcher.exit deleted file mode 100755 index 67f504d..0000000 --- a/filesystem/opt/home/root/.launcher/launcher.exit +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -# script for launcher exit - - -# find scim process and kill it first -LIST=`ps ax | grep 'scim' | grep 'lib' | awk '{print $1}'` -for PID in $LIST -do -kill -9 $PID -done - diff --git a/filesystem/opt/media/.emptydir b/filesystem/opt/media/.emptydir deleted file mode 100644 index e69de29..0000000 diff --git a/filesystem/usr/bin/mount_slp.sh b/filesystem/usr/bin/mount_slp.sh deleted file mode 100755 index db0ef9b..0000000 --- a/filesystem/usr/bin/mount_slp.sh +++ /dev/null @@ -1,246 +0,0 @@ -#!/bin/sh -# mount_slp.sh : mount variable partitions and the partition described on fstab for slp -# -# - -_device= -_mnt_point= -_fs_type= -_var_part= -_ignore_part="/mnt/csc" -_force= - -mount_fail() { - for part in $_ignore_part - do - if [ "$part" == "$_mnt_point" ]; then - return - fi - done - echo -e "\n\nFATAL !!! ${_device} is not mounted on ${_mnt_point} as $_fs_type." - echo -e " Please contact wonil22.choi@samsung.com or anyone in kernel part.\n\n" -# Wait until user's input - echo -e "\nPress 'y' key and press enter" - read _answer < /dev/console; _answer=$(echo ${_answer} | tr a-z A-Z) - while [ "${_answer}" != "Y" ]; do - echo -e "\nPress 'y' key and press enter" - read _answer < /dev/console; _answer=$(echo ${_answer} | tr a-z A-Z) - done -} - -# $1 - device -# $2 - mount point -# $3 - fs type -# if mounted properly, return 1 or return 0 -chk_mnt() { - if [ -z $_device ]; then - return 0 - fi - _tmp_mp=`grep $_mnt_point /etc/mtab | awk '{print $2}' | grep $_mnt_point` - _tmp_ft=`grep $_mnt_point /etc/mtab | awk '{print $3}'| grep $_fs_type` - if [[ -z "$_tmp_mp" || -z "$_tmp_ft" ]]; then - return 0 - fi - return 1 -} - -chk_mnt_fstab() { - while read line - do - if [[ "z" != "z$line" && "#" != "${line:0:1}" ]]; then - _device=`echo $line | awk '{print $1}'` - _mnt_point=`echo $line | awk '{print $2}'` - _fs_type=`echo $line | awk '{print $3}'` - chk_mnt - if [ $? -eq 0 ]; then - mount_fail - fi - fi - done < /etc/fstab -} - -# If we have each fstab file for each specific target, -# following scripts are not required. -# But we don't have that now, so we get the variable partitions from the -# bootloader environment variable, that is SLP_VAR_PART. -# SLP_VAR_PART has " " - -get_fw_env() { - _tmp_vp=`/bin/fw_printenv | grep SLP_VAR_PART` - if [ "z$_tmp_vp" == "z" ]; then - echo "There is no SLP_VAR_PART variable from bootloader" - return - fi - _var_part="${_tmp_vp#SLP_VAR_PART=}" -} - -mount_one_part() { - - chk_mnt - if [ $? -eq 1 ]; then - echo "$_device is already mounted on $_mnt_point" - return - fi - - _tmp_ft=`/sbin/fs-type-checker $_device` - if [[ "$_tmp_ft" == "Unknown fs-type" && "$_fs_type" == "ext4" ]]; then - echo -e " Initilize ${_device} forcibly despite of not in manufacturing process, you may loose your data." - echo -e "\nErase anyway? [y/N] " - if [ -z "$_force" ]; then - read _answer < /dev/console; _answer=$(echo ${_answer} | tr a-z A-Z) - else - _answer=Y - fi - - if [ "${_answer}" == "Y" ];then - /sbin/mkfs.ext4 $_device -F - if [ $? -ne 0 ]; then - echo "mkfs.ext4 error" - exit 1 - fi - fi - fi - - if [ $_fs_type == "ubifs" ]; then - if [ -z "$_force" ]; then - /bin/ubimnt.sh $_name $_mnt_point -F - else - /bin/ubimnt.sh $_name $_mnt_point -F << EOF -y -EOF - fi - else - mount -t $_fs_type $_device $_mnt_point - fi - if [ $? -ne 0 ]; then - mount_fail - exit 1 - fi -} - -# get one partition info from SLP_VAR_PART and mount it -mount_var() { - get_fw_env - i=0 - for word in $_var_part; do - case `expr $i % 4` in - 0) - _name=$word - ;; - 1) - _device=$word - ;; - 2) - _mnt_point=$word - ;; - 3) - _fs_type=${word%;} - mount_one_part - ;; - esac - let i+=1 - done -} - -_arg= -parse_arg() { - get_fw_env - i=0 - _match= - for word in $_var_part; do - if [ "$_arg" == "$word" ]; then - _match=1 - fi - case `expr $i % 4` in - 0) - _name=$word - ;; - 1) - _device=$word - ;; - 2) - _mnt_point=$word - ;; - 3) - _fs_type=${word%;} - if [ "z$_match" == "z1" ]; then - mount_one_part - return - fi - ;; - esac - let i+=1 - done -# It is not a variable partition. mount with fstab. - echo "mount with fstab" - mount $_arg - - if [ $? -eq 255 ]; then - _mnt_chk=`grep $_arg /etc/mtab` - if [ "z$_mnt_chk" == "z" ]; then - exit 1 - fi - echo "WARNING !!! $_arg seems to be mounted already." - elif [ $? -ne 0 ]; then - exit 1 - fi -} - -# print help -do_help() { - echo - echo "Usage: $0 -a/PART_NAME/DEVICE/MOUNT_POINT" - echo - echo " Mount partition(s) for SLP." - echo " PART_NAME is only availalbe with SLP_VAR_PART variable of the bootloader" - echo - echo -e " ex) $0 csa \t For specified partition on SLP_VAR_PART" - echo -e " $0 -a \t For mount all partitions" - echo -e " $0 /dev/mmcblk0p3\t For mount /dev/mmcblk0p3" - echo - get_fw_env - if [ "z" != "z$_var_part" ]; then - echo -e "There is one or more variable partition(s)..\n\t $_var_part\n" - fi -} - - - -# mount all for SLP partitions -mount_all() { - mount_var - mount -a - if [ $? -ne 0 ]; then - chk_mnt_fstab - exit 1 - fi -} - -case "$1" in - -a) - mount_all - ;; - -f) - if [ $# != 2 ]; then - do_help - else - _force=$1 - _arg=$2 - parse_arg - fi - ;; - *) - if [ $# != 1 ]; then - do_help - else - _arg=$1 - parse_arg - fi - ;; -esac - -date > /opt/etc/mnt.log -cat /opt/etc/info.ini >> /opt/etc/mnt.log -mount >> /opt/etc/mnt.log -exit 0 - diff --git a/filesystem/usr/bin/save_blenv b/filesystem/usr/bin/save_blenv deleted file mode 100755 index 8b37648..0000000 --- a/filesystem/usr/bin/save_blenv +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# -# save_blenv: Save env variables of bootloader -# Usage) save_blenv VARIABLE_NAME VALUE -# -# This script is for saving variables of bootloader which is required to be -# shared between bootloader and platform. (ex) display brightness level) -# -# Manufacturer SHOULD modify this file adapted to their target and bootloader. -# (If there is no shared variables, this file can be removed.) - -usage () { - echo "Not supported variable(s) or wrong usage" - echo "Usage: $0 NAME VALUE" - exit 1 -} - -_val="$2" -case "$1" in -# Supported variables for SLP : usbpath, uartpath, SLP_LCD_BRIGHT - usbpath | uartpath) - case "$2" in - AP | ap) - _val="ap" - ;; - CP | cp) - _val="cp" - ;; - *) - usage - ;; - esac - ;; - SLP_LCD_BRIGHT) - if [ "z$2" == "z" ]; then - usage - fi - ;; -# NOT SUPPOTED - *) - usage - ;; -esac - -# This is for uboot. If you don't use uboot, change following command. -/bin/fw_setenv $1 $_val - -exit 0 - diff --git a/filesystem/usr/bin/wlan.sh b/filesystem/usr/bin/wlan.sh deleted file mode 100755 index 7c5d32b..0000000 --- a/filesystem/usr/bin/wlan.sh +++ /dev/null @@ -1,184 +0,0 @@ -#!/bin/sh - -#PWRND=/proc/btwlan/bcm4329 -DRV_PATH=/lib/modules/2.6.32.9 -FW_PATH=/lib/firmware - -# Driver path -DRIVER=$DRV_PATH/dhd.ko -MFTDRV=$DRV_PATH/wlan_manufacture.ko - -# Firmware path -FIRMWARE=$FW_PATH/sdio-g-cdc-full11n-reclaim-roml-wme-idsup-pktfilter.bin -SOFTAP_FIRMWARE=$FW_PATH/sdio-g-cdc-roml-reclaim-wme-apsta-idsup-idauth.bin -MFTFW=$FW_PATH/sdio-ag-cdc-11n-roml-mfgtest.bin - -# NVRAM path -NVRAM_COB=$FW_PATH/nvram_bcm4329_26.txt -NVRAM_MOD=$FW_PATH/nvram_bcm4329_38.txt -NVRAM=$NVRAM_COB -MFTNVRAM_COB=$FW_PATH/nvram_mfg_rev09.txt -MFTNVRAM_MOD=$FW_PATH/nvram_mfg_h2.txt -MFTNVRAM=$MFTNVRAM_COB - - -check_hw() -{ - REVISION_NUM=`grep Revision /proc/cpuinfo | awk "{print \\$3}"` - echo $REVISION_NUM > /tmp/revision_tmp - REVISION_LOW=`cut -c3- /tmp/revision_tmp` - REVISION_HIGH=`cut -c1-2 /tmp/revision_tmp` - - #echo $REVISION_LOW - echo "HW revision = $REVISION_NUM" - rm /tmp/revision_tmp -# hw rev -# H2=200c S1=100e AQ03=0809 LM08=8002 - - if [ "$REVISION_HIGH" == 20 ]||[ "$REVISION_NUM" == 200c ]|| - [ "$REVISION_NUM" == 1008 ]||[ "$REVISION_NUM" == 100e ]|| - [ "$REVISION_NUM" == 0809 ] - then - NVRAM=$NVRAM_MOD - MFTNVRAM=$MFTNVRAM_MOD - echo "This is for H2 S1" - fi -} -start() -{ -check_hw - rfkill unblock wlan - echo $FIRMWARE - insmod $DRIVER firmware_path=$FIRMWARE nvram_path=$NVRAM - - sleep 1 - ifconfig eth0 up -# exit 1 - -# while true -# do -# if ifconfig -a | grep eth0 > /dev/null -# then -# ifconfig eth0 up -# exit 1 -# fi -# done -} -stop() -{ - killall udhcpd - ifconfig eth0 down - rmmod dhd - rfkill block wlan -} - -softap() -{ - if ifconfig -a | grep eth0 > /dev/null - then - stop - fi - FIRMWARE=$SOFTAP_FIRMWARE - start - create_softap - ifconfig wl0.1 192.168.16.1 up - udhcpd /etc/udhcpd_wl01.conf -} - -mfton() -{ -check_hw - rfkill unblock wlan - - lsmod | grep 'wlan_' > /dev/null - if [ $? -ne 0 ]; then - echo manufacture mode is not on! proceed - else - echo manufacture mode is already running! quit - exit 1 - fi - - insmod $DRIVER firmware_path=$MFTFW nvram_path=$MFTNVRAM - sleep 1 - ifconfig eth0 up - wl PM 0 - mknod /dev/wlanserial c 230 0 - echo 0 > /proc/sys/kernel/printk - insmod $MFTDRV - mft_wlan - -} -mftphone() -{ -check_hw - rfkill unblock wlan - - lsmod | grep 'wlan_' > /dev/null - if [ $? -ne 0 ]; then - echo manufacture mode is not on! proceed - else - echo manufacture mode is already running! quit - exit 1 - fi - - insmod $DRIVER firmware_path=$MFTFW nvram_path=$MFTNVRAM - sleep 1 - ifconfig eth0 up - - wl PM 0 -# getWifiMac -# mknod /dev/wlanserial c 230 0 -# echo 0 > /proc/sys/kernel/printk -# insmod /lib/modules/wlan_manufacture.ko -# mft_wlan -m -} -mftoff() -{ - ifconfig eth0 down - killall mft_wlan - rmmod wlan_manufacture - rmmod dhd - rm /dev/wlanserial - rfkill block wlan -} -rftest() -{ -check_hw - rfkill unblock wlan - insmod $DRIVER firmware_path=$MFTFW nvram_path=$MFTNVRAM - sleep 1 - ifconfig eth0 up - wl PM 0 -} - - -case $1 in -"start") -start -;; -"stop") -stop -;; -"softap") -softap -;; -"mfton") -mfton -;; -"mftphone") -mftphone -;; -"mftoff") -mftoff -;; -"rftest") -rftest -;; -"test") -check_hw -;; -*) -echo wlan.sh [start] [stop] [softap] [mfton] [mftoff] [rftest] -exit 1 -;; -esac diff --git a/filesystem/usr/lib/systemd/system/emul-opengl-mode.service b/filesystem/usr/lib/systemd/system/emul-opengl-mode.service index e849ee1..3346513 100644 --- a/filesystem/usr/lib/systemd/system/emul-opengl-mode.service +++ b/filesystem/usr/lib/systemd/system/emul-opengl-mode.service @@ -5,7 +5,7 @@ Before=basic.target [Service] Type=oneshot -ExecStart=/bin/sh -c '/etc/virtgl.sh' +ExecStart=/bin/sh -c '/etc/emulator/virtgl.sh' [Install] WantedBy=emulator_preinit.target diff --git a/packaging/system-plugin-emulator.spec b/packaging/system-plugin-emulator.spec index 9e5f7b4..cc9e695 100644 --- a/packaging/system-plugin-emulator.spec +++ b/packaging/system-plugin-emulator.spec @@ -29,6 +29,12 @@ 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/emulator-opengl %{buildroot}/etc/rc.d/rc3.d/S01emulator-opengl +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 @@ -49,39 +55,6 @@ ln -s %{systemd_dir}/system/sdbd.service %{buildroot}/%{systemd_dir}/system/emul ln -s %{systemd_dir}/system/sshd.service %{buildroot}/%{systemd_dir}/system/emulator.target.wants/sshd.service %post -mkdir -p /opt/usr -if [ -d /opt/media ]; then - cp -aprf /opt/media/* /opt/usr/media/. - rm -rf /opt/media -else - mkdir -p /opt/usr/media -fi -if [ -d /opt/apps ]; then - cp -aprf /opt/apps/* /opt/usr/apps/. - rm -rf /opt/apps -else - mkdir -p /opt/usr/apps -fi -if [ -d /opt/live ]; then - cp -aprf /opt/live/* /opt/usr/live/. - rm -rf /opt/live -else - mkdir -p /opt/usr/live -fi -if [ -d /opt/ug ]; then - cp -aprf /opt/ug/* /opt/usr/ug/. - rm -rf /opt/ug -else - mkdir -p /opt/usr/ug -fi -mkdir -p /opt/osp -mkdir -p /opt/usr/dbspace -ln -sf /opt/usr/apps /opt/apps -ln -sf /opt/usr/media /opt/media -ln -sf /opt/usr/live /opt/live -ln -sf /opt/usr/osp/share /opt/osp/share -ln -sf /opt/usr/ug /opt/ug - #make fstab if [ -e /etc/fstab ]; then echo "/opt/var /var bind bind 0 0" >> /etc/fstab @@ -89,43 +62,26 @@ if [ -e /etc/fstab ]; then echo "/dev/vdb swap swap defaults 0 0" >> /etc/fstab fi -#make rtc1 device for alarm service -touch /dev/rtc1 - %files -/bin/change-booting-mode.sh -/bin/ifconfig -/bin/mdev -/bin/route -/bin/ubimnt.sh /etc/emulator/setup-audio-volume.sh /etc/emulator/mount-hostdir.sh -/etc/init.d/csa-tools +/etc/emulator/virtgl.sh +/etc/emulator/yagl.sh +/etc/init.d/emulator-opengl /etc/init.d/setup-audio-volume /etc/init.d/mount-hostdir /etc/inittab -/etc/mdev.conf -/etc/mtools.conf /etc/preconf.d/emulator_ns.preinit /etc/preconf.d/systemd_conf.preinit /etc/profile.d/proxy_setting.sh -/etc/profile.d/simulator-opengl.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/S01setup-audio-volume -/etc/rc.d/rc3.d/S02mount-hostdir -/etc/rc.d/rc3.d/S45vconf-menuscreen +/etc/rc.d/rc3.d/S01emulator-opengl +/etc/rc.d/rc3.d/S02setup-audio-volume +/etc/rc.d/rc3.d/S03mount-hostdir /etc/rc.d/rc3.d/S50ssh -/etc/virtgl.sh -/etc/yagl.sh -/lib/udev/rules.d/99-serial-console.rules -/opt/home/root/.launcher/launcher.exit -/opt/media/.emptydir -/usr/bin/mount_slp.sh -/usr/bin/save_blenv -/usr/bin/wlan.sh /usr/lib/systemd/system/emulator_preinit.target /usr/lib/systemd/system/emulator.target /usr/lib/systemd/system/basic.target.wants/emulator_preinit.target