From 82aa6235d8cca7e56a13b3e868f83803ec790caf Mon Sep 17 00:00:00 2001 From: HyungKyu Song Date: Sat, 16 Feb 2013 01:00:52 +0900 Subject: [PATCH] Tizen 2.0 Release --- etc/fstab | 15 ++ etc/inittab | 33 +++++ etc/mtools.conf | 66 +++++++++ etc/profile.d/fonts.sh | 1 + etc/profile.d/system.sh | 2 + etc/rc.d/rc.emul | 42 ++++++ etc/rc.d/rc.entersleep | 20 +++ etc/rc.d/rc.firstboot | 41 ++++++ etc/rc.d/rc.leavesleep | 5 + etc/rc.d/rc.shutdown | 31 +++++ etc/rc.d/rc.sysinit | 206 ++++++++++++++++++++++++++++ packaging/system-plugin-ia-generic.changes | 52 +++++++ packaging/system-plugin-ia-generic.manifest | 5 + packaging/system-plugin-ia-generic.spec | 51 +++++++ scripts/bt-dev-end.sh | 11 ++ scripts/bt-dev-start.sh | 18 +++ scripts/bt-set-addr.sh | 6 + usr/bin/wlan.sh | 1 + 18 files changed, 606 insertions(+) create mode 100644 etc/fstab create mode 100755 etc/inittab create mode 100755 etc/mtools.conf create mode 100755 etc/profile.d/fonts.sh create mode 100755 etc/profile.d/system.sh create mode 100755 etc/rc.d/rc.emul create mode 100755 etc/rc.d/rc.entersleep create mode 100755 etc/rc.d/rc.firstboot create mode 100755 etc/rc.d/rc.leavesleep create mode 100755 etc/rc.d/rc.shutdown create mode 100755 etc/rc.d/rc.sysinit create mode 100644 packaging/system-plugin-ia-generic.changes create mode 100644 packaging/system-plugin-ia-generic.manifest create mode 100644 packaging/system-plugin-ia-generic.spec create mode 100755 scripts/bt-dev-end.sh create mode 100755 scripts/bt-dev-start.sh create mode 100755 scripts/bt-set-addr.sh create mode 100755 usr/bin/wlan.sh diff --git a/etc/fstab b/etc/fstab new file mode 100644 index 0000000..841dbf0 --- /dev/null +++ b/etc/fstab @@ -0,0 +1,15 @@ +# +none /proc proc defaults 0 0 +none /dev/pts devpts mode=0622 0 0 +tmpfs /tmp tmpfs defaults 0 0 +#tmpfs /var tmpfs defaults 0 0 +none /sys sysfs defaults 0 0 + +#/dev/mmcblk0p2 /boot vfat defaults 0 0 +#/dev/mmcblk0p5 / ext4 defaults 0 0 +LABEL=platform / auto defaults 0 0 +LABEL=boot /boot auto defaults 0 0 +LABEL=opt /opt auto defaults 0 0 +#/dev/mmcblk0p6 /opt ext4 defaults 0 0 +#/dev/mmcblk0p7 /mnt/csc ext4 defaults 0 0 +#/dev/mmcblk0p8 /mnt/ums vfat uid=0,gid=0,dmask=0000,fmask=0000,iocharset=iso8859-1,utf8,shortname=mixed 0 0 diff --git a/etc/inittab b/etc/inittab new file mode 100755 index 0000000..ae0e8a7 --- /dev/null +++ b/etc/inittab @@ -0,0 +1,33 @@ +#System startup +si::sysinit:/etc/rc.d/rc.sysinit +net::once:/etc/rc.d/rc.network + +id:1:initdefault: + +# tty +# don't start login tty because there is no way to login there currently +# but just tains the charging animation. TZSP-3539 +#1:12345:respawn:/sbin/mingetty --noclear tty1 +#2:12345:respawn:/sbin/mingetty tty2 + +# serial console +#ttyS0::respawn:/bin/sh +#s1:12345:respawn:/sbin/getty -L 115200 ttyS0 vt100 +#::askfirst:/bin/sh + +#Logging , move to rc.sysinit +#::sysinit:/bin/cp -rf /var/log/messages /var/log/messages.prev +#::sysinit:/bin/cp -rf /var/log/messages.0 /var/log/messages.0.prev +#::sysinit:/bin/touch /var/log/messages +#::once:/sbin/syslogd +#::once:/sbin/klogd + +#System shutdown +#ca:12345:ctrlaltdel:/sbin/reboot +bye:06:wait:/etc/rc.d/rc.shutdown +rebt:6:wait:/sbin/reboot -d -f -i + +# Frambuffer Console +#ttyS1::respawn:/bin/sh +#tty1::respawn:/bin/sh +#tty2::respawn:/bin/sh diff --git a/etc/mtools.conf b/etc/mtools.conf new file mode 100755 index 0000000..3cf0aa7 --- /dev/null +++ b/etc/mtools.conf @@ -0,0 +1,66 @@ +# 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/etc/profile.d/fonts.sh b/etc/profile.d/fonts.sh new file mode 100755 index 0000000..01caeb5 --- /dev/null +++ b/etc/profile.d/fonts.sh @@ -0,0 +1 @@ +export ELM_SCALE="0.7" diff --git a/etc/profile.d/system.sh b/etc/profile.d/system.sh new file mode 100755 index 0000000..642717f --- /dev/null +++ b/etc/profile.d/system.sh @@ -0,0 +1,2 @@ + +export PWROFF_DUR=3 diff --git a/etc/rc.d/rc.emul b/etc/rc.d/rc.emul new file mode 100755 index 0000000..304bf22 --- /dev/null +++ b/etc/rc.d/rc.emul @@ -0,0 +1,42 @@ +#!/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_}]" + +echo -e "[${_G}chmod +x /opt/media for various apps ${C_}]" +chmod -R 777 /opt/media + +echo -e "[${_G}make symbolic link ${C_}]" +ln -sf /mnt/mmc /sdcard +ln -sf /proc/mounts /etc/mtab + +echo -e "[${_G}Setting power manager state value ${C_}]" +/usr/bin/vconftool set -t int memory/pwrmgr/state 1 + +echo -e "[${_G}Initialize battery level ${C_}]" +/usr/bin/vconftool set -t int memory/Battery/Level 5 +/usr/bin/vconftool set -t int memory/Battery/Status/Low 4 + +echo -e "[${_G}Mount SD card ${C_}]" +mount /dev/mmcblk0 /mnt/mmc + +MMC_MOUNT=`/bin/mount | grep mmc` +if [ -n "$MMC_MOUNT" ]; then + echo -e "[${_G}MMC storage detected ${C_}]" + /usr/bin/vconftool set -t int memory/Device/Mmc 1 + /usr/bin/vconftool set -t int memory/filemanager/Mmc 2 +fi + +echo -e "[${_G}Initialize display setting value${C_}]" +/usr/bin/vconftool set -t int db/setting/Brightness "24" +/usr/bin/vconftool set -t int db/MainLCD/Backlight/Normal "600" + +echo -e "[${_G}For menu_screen booting..${C_}]" +/usr/bin/vconftool set -t int memory/startapps/sequence 1 + +echo -e "[${_G}rc.emul : script end ${C_}]" diff --git a/etc/rc.d/rc.entersleep b/etc/rc.d/rc.entersleep new file mode 100755 index 0000000..2d92be8 --- /dev/null +++ b/etc/rc.d/rc.entersleep @@ -0,0 +1,20 @@ +export DISPLAY=:0 + +echo "Kill all running applications" +/usr/bin/enter_deepsleep + +echo "Reload Menuscreen" +vconftool -t int set memory/menuscreen/reload 3 + +echo "Stoppping Boot animation..." +nice -n -15 /usr/bin/boot-animation --off & + +CHK_ANI=0 +while [ "$CHK_ANI" != "1" ]; do + echo "waiting animation finished.." + sleep 0.5 + CHK_ANI=`vconftool get memory/boot-animation/finished | awk '{print $4}'` +done + +#echo 4 > /sys/class/graphics/fb0/blank + diff --git a/etc/rc.d/rc.firstboot b/etc/rc.d/rc.firstboot new file mode 100755 index 0000000..21808d3 --- /dev/null +++ b/etc/rc.d/rc.firstboot @@ -0,0 +1,41 @@ +#!/bin/sh + +#/sbin/ldconfig -f /opt/etc/ld.so.conf -C /opt/etc/ld.so.cache +/sbin/ldconfig + +# Check 3-touchkey firmware +/lib/firmware/firmware_upgrade_touchkey.sh + +#Check machine is P1P2 +MACHINE=`grep Hardware /proc/cpuinfo|cut -d ":" -f 2|tr -d " "` +if [ $MACHINE == "P1P2" ];then + ln -s /opt/etc/X11/xorg.conf.d.p1p2 /opt/etc/X11/xorg.conf.d + # motor sensor has not been implemented yet + rm -f /usr/driver/tspdrv.ko +else + ln -s /opt/etc/X11/xorg.conf.d.default /opt/etc/X11/xorg.conf.d +fi + +# Copy alsa scenario file for sound temporary +if [ ! -e /opt/etc/sound ]; then + mkdir -p /opt/etc/sound +fi + +if [ $MACHINE == "F1" ]; then + cp -r /usr/share/ascenario/mc1n2 /opt/etc/sound/default + cp -r /usr/share/ascenario/mc1n2.conf /opt/etc/sound/default.conf +else + cp -r /usr/share/ascenario/wm8994 /opt/etc/sound/default + cp -r /usr/share/ascenario/wm8994.conf /opt/etc/sound/default.conf +fi + +chown root:soundpath /opt/etc/sound/default.conf +chown -R root:soundpath /opt/etc/sound/default + +# Generate new wifi mac address +/usr/sbin/wlan_prov + +if [ -e /opt/system/csc/.factoryreset ]; then + rm -f /opt/system/csc/.factoryreset +fi +sync diff --git a/etc/rc.d/rc.leavesleep b/etc/rc.d/rc.leavesleep new file mode 100755 index 0000000..c781c87 --- /dev/null +++ b/etc/rc.d/rc.leavesleep @@ -0,0 +1,5 @@ +export DISPLAY=:0 + +echo "Stoppping Boot animation..." +vconftool set -t string memory/boot-animation/restart start:restart + diff --git a/etc/rc.d/rc.shutdown b/etc/rc.d/rc.shutdown new file mode 100755 index 0000000..f8c3987 --- /dev/null +++ b/etc/rc.d/rc.shutdown @@ -0,0 +1,31 @@ +export DISPLAY=:0 +killall -9 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 + + +# 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/etc/rc.d/rc.sysinit b/etc/rc.d/rc.sysinit new file mode 100755 index 0000000..f6e5859 --- /dev/null +++ b/etc/rc.d/rc.sysinit @@ -0,0 +1,206 @@ +#!/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 -n -t proc none /proc +mount -n -t tmpfs tmpfs /tmp +mount -n -t sysfs none /sys +mkdir -p /dev/shm +mount -n -t tmpfs none /dev/shm + +touch /dev/.in_sysinit >/dev/null 2>&1 + +[ -d /dev/pts ] || mkdir /dev/pts +mount -n /dev/pts >/dev/null 2>&1 + +remount_needed() { + local state oldifs + state=`LC_ALL=C awk '/ \/ / && ($3 !~ /rootfs/) { print $4 }' /proc/mounts` + oldifs=$IFS + IFS="," + for opt in $state ; do + if [ "$opt" = "rw" ]; then + IFS=$oldifs + return 1 + fi + done + IFS=$oldifs + return 0 +} + +# Remount the root filesystem read-write. +if remount_needed ; then + if which ionice; then + ionice -t -c 1 -n 0 mount -n -o remount,rw / + else + mount -n -o remount,rw / + fi +fi + + + +# Clear mtab +(> /etc/mtab) &> /dev/null + +# Remove stale backups +rm -f /etc/mtab~ /etc/mtab~~ + + +# Clean up various /tmp bits +rm -f /tmp/.X*-lock /tmp/.lock.* /tmp/.gdm_socket /tmp/.s.PGSQL.* +rm -rf /tmp/.X*-unix /tmp/.ICE-unix /tmp/.font-unix /tmp/hsperfdata_* \ + /tmp/kde-* /tmp/ksocket-* /tmp/mc-* /tmp/mcop-* /tmp/orbit-* \ + /tmp/scrollkeeper-* /tmp/ssh-* + +# Enter mounted filesystems into /etc/mtab +mount -f / +mount -f /proc >/dev/null 2>&1 +mount -f /sys >/dev/null 2>&1 +mount -f /dev/pts >/dev/null 2>&1 +mount -f /proc/bus/usb >/dev/null 2>&1 + +# /var/{lock,run} +mount -t tmpfs tmpfs /var/lock -o size=4m +mount -t tmpfs tmpfs /var/run -o size=4m +mkdir /var/run/console +mkdir -p /var/lock/subsys + +# Mount all other filesystems (except for NFS and /proc, which is already +# mounted). Contrary to standard usage, +# filesystems are NOT unmounted in single user mode. +mount -a -t nonfs,nfs4,smbfs,cifs -O no_netdev +mount -t debugfs none /sys/kernel/debug/ + + +echo -e "[${_G}create base directory in /opt, /var${C_}]" +#ln -s /opt/var/log /var/log +mkdir -p /opt/var/lib +#ln -s /opt/var/lib /var/lib # for apt +mkdir -p /opt/var/cache +#ln -s /opt/var/cache /var/cache # for apt +#mkdir -p /var/run + +# start udev +/sbin/udevd --daemon +/sbin/udevadm trigger + +if [ ! -e /opt/etc/.firstboot ]; then + echo -e "[${_Y}rc.firstboot${C_}]" + /etc/rc.d/rc.firstboot + touch /opt/etc/.firstboot + + if [ -e /etc/rc.d/rc.run_hibernation ]; then + touch /opt/etc/.hib_capturing + fi +fi + +# check special booting mode. +if grep -sq "androidboot.mode=charger" /proc/cmdline; then + echo -e "${_R}[ Special Booting mode ]${C_}" + for i in /etc/rc.d/rc2.d/*; do + echo -e "${_G}[${i} start]${C_}" + $i start + done + exit 0 +fi + +echo -e "[${_G}set device node perm & security${C_}]" +# Set device node permissions for security +test -c /dev/video0 && chown 0:6501 /dev/video0 +test -c /dev/s3c-jpg && chown 0:6501 /dev/s3c-jpg +test -c /dev/pvrsrvkm && chmod 666 /dev/pvrsrvkm +test -c /dev/log_main && chown 0:6509 /dev/log_main +test -c /dev/log_events && chown 0:6509 /dev/log_events +test -c /dev/log_radio && chown 0:6509 /dev/log_radio +test -c /dev/snd/ && chown :audio /dev/snd/ +test -c /dev/snd/ && chmod 775 /dev/snd/ +test -c /dev/snd/controlC0 && chown :audio /dev/snd/controlC0 +test -c /dev/snd/pcmC0D0p && chown :audio /dev/snd/pcmC0D0p +test -c /dev/snd/pcmC0D1p && chown :audio /dev/snd/pcmC0D1p +test -c /dev/snd/pcmC0D2p && chown :audio /dev/snd/pcmC0D2p +test -c /dev/snd/pcmC0D3p && chown :audio /dev/snd/pcmC0D3p +test -c /dev/snd/timer && chown :audio /dev/snd/timer +test -c /dev/snd/pcmC0D0c && chown 0:6508 /dev/snd/pcmC0D0c +test -c /dev/snd/pcmC0D1c && chown 0:6508 /dev/snd/pcmC0D1c +test -c /dev/snd/pcmC0D2c && chown 0:6508 /dev/snd/pcmC0D2c +test -c /dev/snd/pcmC0D3c && chown 0:6508 /dev/snd/pcmC0D3c +test -c /dev/s3c-mfc && chown 0:6510 /dev/s3c-mfc +test -c /dev/random && chmod 666 /dev/random +test -c /dev/urandom && chmod 666 /dev/urandom +test -c /dev/fb0 && chown :video /dev/fb0 +test -c /dev/video1 && chown :video /dev/video1 +test -c /dev/video2 && chown :video /dev/video2 +test -c /dev/radio0 && chown :6512 /dev/radio0 +chown :6702 /sys/class/backlight/*/brightness +chmod 664 /sys/class/backlight/*/brightness + +ln -sf /dev/rtc0 /dev/rtc1 + +# Modem power on +if [ ! -f /opt/etc/.hib_capturing ]; then + echo -e "[${_Y}modem power on${C_}]" + echo on > /sys/devices/platform/modemctl/exec_util +else + echo "dont execute util in fastboot..." +fi + +#touch sensor start +echo 1 > /sys/class/i2c-adapter/i2c-2/2-004a/touchstart + +#disable fb console cursor blinking +echo 0 >/sys/devices/virtual/graphics/fbcon/cursor_blink + +echo -e "[${_G}run profile${C_}]" +# Run profile +. /etc/profile + +if [ -e /opt/etc/.debugmode ]; then + echo "debug mode enabled" + # enable coredump + echo "/var/lib/corewatcher/core_%e_%t" > /proc/sys/kernel/core_pattern + echo 1 > /proc/sys/kernel/core_uses_pid + ulimit -c unlimited +else + echo "debug mode disabled" +fi + +# 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 + + export LAUNCHER_ENGINE=opengl_x11 + + # Run all rc3 scripts + echo -e "[${_G}run all rc3 scripts${C_}]" + echo "normal boot" + for i in /etc/rc.d/rc3.d/*; do + echo -e "[${_G}${i} start${C_}]" + $i start + done + + echo -e "[${_G}set cpufreq governor${C_}]" + # Set default cpufreq governor + echo slp > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor + if [ $? -ne 0 ];then + echo -e "\t[${_Y}slp not exits, set default ondemand${C_}]" + echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor + fi + +# symbolic link +if [ ! -e /opt/apps ]; then + echo -e "[${_G}link /opt/apps -> /mnt/ums/apps${C_}]" + ln -s /mnt/ums/apps /opt/apps +fi + + +/etc/rc.d/rc.emul diff --git a/packaging/system-plugin-ia-generic.changes b/packaging/system-plugin-ia-generic.changes new file mode 100644 index 0000000..06dbc31 --- /dev/null +++ b/packaging/system-plugin-ia-generic.changes @@ -0,0 +1,52 @@ +* Fri Dec 14 2012 Chengwei Yang +- Mount /dev/shm + +* Thu Oct 25 2012 zheng, wu +- Keep uim and not rmmod bluetooth driver + +* Thu Sept 27 2012 zheng, wu +- Modify bluetooth end script to remove bluetooth from system. + +* Tue Sept 13 2012 Yong Wang +- Disable fb console cursor blinking + +* Tue Sept 11 2012 zheng, wu +- Add bluetooth port scripts, due to we remove bluetooth-firmware-bcm +- Keep bluetooth scripts, up and down bluetooth device. + +* Tue Sep 11 2012 Yan Yin submit/2.0_beta/20120905.114943@18095dc +- fix license in spec file +- Fix doesn't remount / as rw when bootup + +* Thu Aug 09 2012 Arron +- Add Tizen wifi port script, due to we don't need load/unload wifi +- driver in the script, we just keep it empty + +* Tue Jul 17 2012 Brad Peters +- Updating /etc/fstab to mount LABEL=platform rather than hard-coded partition + +* Mon Jul 16 2012 Brad Peters +- Removing explicit dependency on sysvinit + +* Mon Jul 02 2012 Prajwal Mohan +- Trigger OBS build + +* Thu Jun 28 2012 Chengwei Yang aade7f9 +- mount devpts correctly at system boot up + +* Wed Jun 06 2012 Yan Yin fb5c815 +- add changes file to trigger build + +* Wed May 30 2012 Anas Nashif b9e66b5 +- add missing fonts.sh file to spec +[ Yan Yin ] +- set fonts size for IA platform +[ Ryan Ware ] +- Add default Smack manifest for system-plugin-ia-generic.spec + +* Fri May 18 2012 Zhang Qiang 865cf1e +- Initial code release + +* Fri Apr 27 2012 eunmee moon 8994a0c +- Initial empty repository + diff --git a/packaging/system-plugin-ia-generic.manifest b/packaging/system-plugin-ia-generic.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/system-plugin-ia-generic.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/system-plugin-ia-generic.spec b/packaging/system-plugin-ia-generic.spec new file mode 100644 index 0000000..adb96ac --- /dev/null +++ b/packaging/system-plugin-ia-generic.spec @@ -0,0 +1,51 @@ +Summary: The inittab file and the /etc/init.d scripts +Name: system-plugin-ia-generic +Version: 0.0.10 +License: Apache v2.0 +Group: System/Base +Release: 1 +Source: %{name}-%{version}.tar.bz2 +Source1001: packaging/system-plugin-ia-generic.manifest +# >> gbp-patch-tags # auto-added by gbp +# << gbp-patch-tags # auto-added by gbp +Requires: udev +Requires: corewatcher +ExclusiveArch: %ix86 x86_64 + + +%description +Startup files + +%prep +%setup -q +# >> gbp-apply-patches # auto-added by gbp +# << gbp-apply-patches # auto-added by gbp + +%build +cp %{SOURCE1001} . + +%install +cp -a etc %{buildroot} +cp -a usr %{buildroot} +mkdir -p %{buildroot}%{_prefix}/etc/bluetooth/ +install -m 0755 scripts/bt-dev-end.sh %{buildroot}%{_prefix}/etc/bluetooth/ +install -m 0755 scripts/bt-dev-start.sh %{buildroot}%{_prefix}/etc/bluetooth/ +install -m 0755 scripts/bt-set-addr.sh %{buildroot}%{_prefix}/etc/bluetooth/ + +%files +%manifest system-plugin-ia-generic.manifest +/etc/fstab +%config(noreplace) /etc/inittab +%exclude %config(noreplace) /etc/mtools.conf +/etc/profile.d/system.sh +/etc/profile.d/fonts.sh +/etc/rc.d/rc.entersleep +/etc/rc.d/rc.firstboot +/etc/rc.d/rc.leavesleep +/etc/rc.d/rc.shutdown +/etc/rc.d/rc.sysinit +/etc/rc.d/rc.* +/usr/bin/wlan.sh +%attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh +%attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start.sh +%attr(755,-,-) %{_prefix}/etc/bluetooth/bt-set-addr.sh diff --git a/scripts/bt-dev-end.sh b/scripts/bt-dev-end.sh new file mode 100755 index 0000000..b399288 --- /dev/null +++ b/scripts/bt-dev-end.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# +# Script for stopping Broadcom UART Bluetooth stack +# + +# Device down +/usr/sbin/hciconfig hci0 down + +# Turn off Bluetooth Chip +rfkill block bluetooth diff --git a/scripts/bt-dev-start.sh b/scripts/bt-dev-start.sh new file mode 100755 index 0000000..9493217 --- /dev/null +++ b/scripts/bt-dev-start.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +# +# Script for registering Broadcom UART BT device +# +if !(/sbin/lsmod | grep btwilink); then + modprobe btwilink + /bin/uim & +fi + +# Trun-on Bluetooth Chip +rfkill unblock bluetooth + +echo "Check for Bluetooth device status" +if (/usr/sbin/hciconfig | grep hci); then + echo "Bluetooth device is UP" + /usr/sbin/hciconfig hci0 up +fi diff --git a/scripts/bt-set-addr.sh b/scripts/bt-set-addr.sh new file mode 100755 index 0000000..110c184 --- /dev/null +++ b/scripts/bt-set-addr.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# +# Script for setting Bluetooth Address +# + diff --git a/usr/bin/wlan.sh b/usr/bin/wlan.sh new file mode 100755 index 0000000..1a24852 --- /dev/null +++ b/usr/bin/wlan.sh @@ -0,0 +1 @@ +#!/bin/sh -- 2.7.4