summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rwxr-xr-xetc/fstab15
-rw-r--r--etc/fta_version.txt2
-rwxr-xr-xetc/inittab28
-rwxr-xr-xetc/mtools.conf66
-rwxr-xr-xetc/rc.d/rc.firstboot26
-rwxr-xr-xetc/rc.d/rc.shutdown25
-rwxr-xr-xetc/rc.d/rc.sysinit193
7 files changed, 355 insertions, 0 deletions
diff --git a/etc/fstab b/etc/fstab
new file mode 100755
index 0000000..99cf69f
--- /dev/null
+++ b/etc/fstab
@@ -0,0 +1,15 @@
+#<file system> <mount point> <type> <options> <dump> <pass>
+none /proc proc defaults 0 0
+#none /dev/pts devpts mode=0622 0 0
+tmpfs /tmp tmpfs defaults 0 0
+/opt/var /var bind bind 0 0
+none /sys sysfs defaults 0 0
+
+# For new partition - 2012/08
+/dev/mmcblk0p1 /csa ext4 defaults 0 2
+/dev/mmcblk0p2 /boot ext4 defaults 0 2
+/dev/mmcblk0p4 /mnt/csc ext4 defaults,noauto 0 2
+/dev/mmcblk0p5 / ext4 defaults 0 1
+/dev/mmcblk0p6 /opt ext4 defaults 0 2
+/dev/mmcblk0p7 /opt/usr ext4 defaults 0 2
+/boot/modules.img /lib/modules ext4 loop 0 0
diff --git a/etc/fta_version.txt b/etc/fta_version.txt
new file mode 100644
index 0000000..0a7cc87
--- /dev/null
+++ b/etc/fta_version.txt
@@ -0,0 +1,2 @@
+FTA HW VERSION : REV0.0
+FTA SW VERSION : TRAST.001
diff --git a/etc/inittab b/etc/inittab
new file mode 100755
index 0000000..300c9e5
--- /dev/null
+++ b/etc/inittab
@@ -0,0 +1,28 @@
+#System startup
+si::sysinit:/etc/rc.d/rc.sysinit
+net::once:/etc/rc.d/rc.network
+
+id:1:initdefault:
+
+# Console
+#ttyS0::respawn:/bin/sh
+#command was changed from getty in busybox to agetty in coreutils
+con:12345:respawn:/sbin/agetty -L 115200 ttySAC2 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/rc.d/rc.firstboot b/etc/rc.d/rc.firstboot
new file mode 100755
index 0000000..6c7edc2
--- /dev/null
+++ b/etc/rc.d/rc.firstboot
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+#/sbin/ldconfig -f /opt/etc/ld.so.conf -C /opt/etc/ld.so.cache
+/sbin/ldconfig
+
+# for /etc/.info/system.info
+/bin/sysinfo
+
+#Check machine is SLP7_C210
+MACHINE=`grep Hardware /proc/cpuinfo|cut -d ":" -f 2|tr -d " "`
+if [ $MACHINE == "SLP7_C210" ];then
+ ln -s /opt/etc/X11/xorg.conf.d.slp7 /opt/etc/X11/xorg.conf.d
+else
+ #Check machine is SLP10_C210
+ if [ $MACHINE == "SLP10_C210" ];then
+ ln -s /opt/etc/X11/xorg.conf.d.slp10 /opt/etc/X11/xorg.conf.d
+ else
+ ln -s /opt/etc/X11/xorg.conf.d.default /opt/etc/X11/xorg.conf.d
+ fi
+fi
+
+
+if [ -e /opt/system/csc/.factoryreset ]; then
+ rm -f /opt/system/csc/.factoryreset
+fi
+sync
diff --git a/etc/rc.d/rc.shutdown b/etc/rc.d/rc.shutdown
new file mode 100755
index 0000000..274baa1
--- /dev/null
+++ b/etc/rc.d/rc.shutdown
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+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 " " --clear &
+sleep 1
+
+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
+
+
diff --git a/etc/rc.d/rc.sysinit b/etc/rc.d/rc.sysinit
new file mode 100755
index 0000000..ee2c286
--- /dev/null
+++ b/etc/rc.d/rc.sysinit
@@ -0,0 +1,193 @@
+#!/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
+mount -t sysfs none /sys
+mount -t tmpfs runfs /run
+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
+
+mknod /dev/null c 1 3
+mknod /dev/mmcblk0 b 179 0
+mknod /dev/mmcblk0p6 b 179 6
+
+# mount opt partition
+mount -t ext4 /dev/mmcblk0p6 /opt
+
+echo -e "[${_G}udev start${C_}]"
+/sbin/udevd --daemon
+/sbin/udevadm trigger
+
+if [ ! -e /opt/etc/.firstboot ]; then
+ umount /opt
+# find rootfs partition for resizing and remounting
+ for param in `cat /proc/cmdline`; do
+ if [ "${param:0:5}" = "root=" ]; then
+ rootfs_part=${param#root=}
+ break
+ fi
+ done
+ ext4_parts=`grep ext4 /etc/fstab | grep mmcblk0 | awk '{print $1};'`
+ for part in $ext4_parts; do
+# check all RW partitions in order to resize it withtout mounting excepting rootfs.
+ if [ "$part" != "$rootfs_part" ]; then
+ e2fsck -y -f $part
+ fi
+ echo "resize $part"
+ resize2fs $part
+ done
+
+ mount -t ext4 /dev/mmcblk0p6 /opt
+ echo -e "[${_Y}rc.firstboot${C_}]"
+ /etc/rc.d/rc.firstboot
+ touch /opt/etc/.firstboot
+ sync
+fi
+
+mount /var
+
+# check special booting mode.
+/bin/check-booting-mode.sh
+if [ $? -eq 0 ]; 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
+
+# mount all partitions
+mount -a
+mount --bind /run/ /var/run/
+
+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
+
+
+echo -e "[${_G}set device node perm & security${C_}]"
+# Set device node permissions for security
+chown 0:6501 /dev/video1
+chown 0:6501 /dev/s3c-jpg
+#chmod 666 /dev/pvrsrvkm
+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/pcmC0D2p
+chown :audio /dev/snd/pcmC0D3p
+chown :audio /dev/snd/timer
+chown 0:6508 /dev/snd/pcmC0D0c
+chown 0:6508 /dev/snd/pcmC0D1c
+chown 0:6508 /dev/snd/pcmC0D2c
+chown 0:6508 /dev/snd/pcmC0D3c
+chown 0:6510 /dev/s3c-mfc
+chown 0:6510 /dev/video5
+chown 0:6510 /dev/video6
+chmod 666 /dev/random
+chmod 666 /dev/urandom
+chown :video /dev/fb0
+chown :video /dev/video0
+chown :video /dev/video2
+chown :video /dev/video3
+chown :video /dev/s3c-mem
+chown :6512 /dev/radio0
+chown :6702 /sys/class/backlight/*/brightness
+# change node's owner for torch light
+chown :6703 /sys/class/leds/leds-torch/brightness
+chmod 664 /sys/class/backlight/*/brightness
+# change files permission for 3D application
+chmod 666 /dev/ump
+chmod 666 /dev/mali
+chmod 666 /dev/slp_global_lock
+
+# Set gst-openmax configure file
+export OMX_CONFIG=/opt/etc/gst-openmax.conf
+
+echo -e "[${_G}make gstreamer registery${C_}]"
+# Make gst registry
+export GST_REGISTRY=/opt/etc/.gstreamer-0.10/registry.bin.arm
+gst-inspect 1> /dev/null
+chmod 655 /opt/etc/.gstreamer-0.10
+chmod 644 /opt/etc/.gstreamer-0.10/registry.bin.arm
+
+# Modem power on
+echo -e "[${_Y}modem power on${C_}]"
+ln -s /boot/modem.bin /modem/modem.bin
+/usr/bin/xmm6262-boot &
+
+#touch sensor start
+echo 1 > /sys/class/i2c-adapter/i2c-2/2-004a/touchstart
+
+echo -e "[${_G}run profile${C_}]"
+# Run profile
+. /etc/profile
+
+if [ -e /opt/etc/.debugmode ]; then
+ echo "debug mode enabled"
+ # for bluescreen
+ export LD_PRELOAD=/usr/lib/libsys-assert.so
+ # enable coredump
+ echo "/opt/bs/core/core.%p" > /proc/sys/kernel/core_pattern
+ ulimit -c unlimited
+else
+ echo "debug mode disabled"
+fi
+
+/usr/bin/press 1 # wait input to stop running scripts
+if [ $? -eq 0 ]; then
+ echo "script is stopped"
+ # prepare usbnet before exit
+ insmod /usr/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
+else
+ # 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
+fi
+
+# change owner and group about /opt/media directory
+chown 5000:5000 /opt/media
+
+echo -e "[${_G}set cpufreq governor${C_}]"
+# Set default cpufreq governor
+echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+
+# 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
+