--- /dev/null
+#!/bin/sh
+# Mount host directory on /mnt/host via virtio-9p
+
+if grep "virtio-9p" /proc/cmdline ; then
+ if mount -t 9p -o trans=virtio fileshare /mnt/host -oversion=9p2000.L -o msize=65536; then
+ echo -e "[${_Y}Mount.9pfs succeed${C_}]"
+ else
+ echo -e "[${_R}Mount.9pfs fail!!!!${C_}]"
+ fi
+fi
+
--- /dev/null
+#!/bin/sh
+/etc/emulator/mount-hostdir.sh
--- /dev/null
+#!/bin/sh
+/etc/emulator/setup-audio-volume.sh
#/usr/bin/vconftool set -t int memory/Battery/Level 5 -f
/usr/bin/vconftool set -t int memory/sysman/battery_status_low 4 -f
-#echo -e "[${_G}Mount SD card ${C_}]"
-#mount -o umask=000 /dev/mmcblk0 /mnt/mmc
-#chmod 777 /opt/storage/sdcard
-
-#MMC_MOUNT=`/bin/mount | grep mmc`
-#if [ -n "$MMC_MOUNT" ]; then
-# echo -e "[${_G}MMC storage detected ${C_}]"
-# /usr/bin/vconftool set -t memory/sysman/mmc 1 -f
-# /usr/bin/vconftool set -t int memory/filemanager/Mmc 2 -f
-#fi
-
-echo -e "[${_G}Mount host directory${C_}]"
-test -d "/mnt/host" || mkdir "/mnt/host"
-if grep "cifs=" /proc/cmdline ; then
- cifs=`sed 's/^.*cifs=\([^, ]*\).*$/\1/g' /proc/cmdline`
- opts=`sed 's/^.*cifs=\([^, ]*\),username=\([^, ]*\),password=\([^, ]*\).*$/username=\2,password=\3/g' /proc/cmdline`
- cifs=`echo $cifs | tr [a-z] [A-Z]`
- if mount -t cifs //10.0.2.2/$cifs /mnt/host -o $opts,file_mode=0777,dir_mode=0777; then
- echo -e "[${_Y}Mount.cifs succeed${C_}]"
- else
- echo -e "[${_R}Mount.cifs fail!!!!${C_}]"
- fi
-fi
-if grep "virtio-9p" /proc/cmdline ; then
- if mount -t 9p -o trans=virtio fileshare /mnt/host -oversion=9p2000.L -o msize=65536; then
- echo -e "[${_Y}Mount.9pfs succeed${C_}]"
- else
- echo -e "[${_R}Mount.9pfs fail!!!!${C_}]"
- fi
-fi
-
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_}]"
fi
fi
-echo -e "[${_G}to generate modules.dep and map files${C_}]"
-depmod -a
-
#--move to rc3.d/S30brgihtness
#echo -e "[${_G}to change brightness's group${C_}]"
#chgrp system_bklight /sys/class/backlight/emulator/brightness
--- /dev/null
+../../init.d/setup-audio-volume
\ No newline at end of file
+++ /dev/null
-../init.d/simulator-alsa
\ No newline at end of file
--- /dev/null
+../../init.d/mount-hostdir
\ No newline at end of file
--- /dev/null
+../../init.d/vmodemd
\ No newline at end of file
+++ /dev/null
-../init.d/csa-tools
\ No newline at end of file
[Unit]
-Description=ALSA setup
+Description=Mount host directory
DefaultDependencies=no
-Before=basic.target
[Service]
Type=oneshot
-ExecStart=/etc/init.d/emulator-alsa
+ExecStart=/etc/emulator/mount-hostdir.sh
[Install]
WantedBy=emulator_preinit.target
--- /dev/null
+[Unit]
+Description=Audio volume setup on emulator
+DefaultDependencies=no
+
+[Service]
+Type=oneshot
+ExecStart=/etc/emulator/setup-audio-volume.sh
+
+[Install]
+WantedBy=emulator_preinit.target
Name: system-plugin-emulator
-Version: 0.0.2
+Version: 0.0.3
Release: 1
%define systemd_dir /usr/lib/systemd
mkdir -p %{buildroot}/%{systemd_dir}/system/emulator_preinit.target.wants
ln -s %{systemd_dir}/system/emul-opengl-mode.service %{buildroot}/%{systemd_dir}/system/emulator_preinit.target.wants/emul-opengl-mode.service
ln -s %{systemd_dir}/system/emul-opengl-yagl.service %{buildroot}/%{systemd_dir}/system/emulator_preinit.target.wants/emul-opengl-yagl.service
-ln -s %{systemd_dir}/system/emul-alsa.service %{buildroot}/%{systemd_dir}/system/emulator_preinit.target.wants/emul-alsa.service
+ln -s %{systemd_dir}/system/emul-setup-audio-volume.service %{buildroot}/%{systemd_dir}/system/emulator_preinit.target.wants/emul-setup-audio-volume.service
+ln -s %{systemd_dir}/system/emul-mount-hostdir.service %{buildroot}/%{systemd_dir}/system/emulator_preinit.target.wants/emul-mount-hostdir.service
ln -s %{systemd_dir}/system/emul-legacy-start.service %{buildroot}/%{systemd_dir}/system/emulator_preinit.target.wants/emul-legacy-start.service
# for emulator.target
mkdir -p %{buildroot}/%{systemd_dir}/system/multi-user.target.wants
/bin/mdev
/bin/route
/bin/ubimnt.sh
-/etc/emulator/.emptydir
+/etc/emulator/setup-audio-volume.sh
+/etc/emulator/mount-hostdir.sh
/etc/init.d/csa-tools
+/etc/init.d/setup-audio-volume
+/etc/init.d/mount-hostdir
+/etc/init.d/vmodemd
/etc/inittab
/etc/mdev.conf
/etc/mtools.conf
/etc/profile.d/proxy_setting.sh
/etc/profile.d/sensord_setting.sh
/etc/profile.d/simulator-opengl.sh
-/etc/init.d/emulator-alsa
/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/S01simulator-alsa
-/etc/rc.d/rc3.d/S20vmodem
+/etc/rc.d/rc3.d/S01setup-audio-volume
+/etc/rc.d/rc3.d/S02mount-hostdir
+/etc/rc.d/rc3.d/S03vmodemd
/etc/rc.d/rc3.d/S45vconf-menuscreen
/etc/rc.d/rc3.d/S50ssh
/etc/rc.d/rc3.d/S96set_valperiod
-/etc/rc.d/rc5.d/S99zzzbackup_csa
/etc/virtgl.sh
/etc/yagl.sh
/lib/udev/rules.d/99-serial-console.rules
/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-alsa.service
+/usr/lib/systemd/system/emul-setup-audio-volume.service
+/usr/lib/systemd/system/emul-mount-hostdir.service
/usr/lib/systemd/system/emul-legacy-start.service
/usr/lib/systemd/system/emul-opengl-mode.service
/usr/lib/systemd/system/emul-opengl-yagl.service
-/usr/lib/systemd/system/emulator_preinit.target.wants/emul-alsa.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-legacy-start.service
/usr/lib/systemd/system/emulator_preinit.target.wants/emul-opengl-mode.service
/usr/lib/systemd/system/emulator_preinit.target.wants/emul-opengl-yagl.service