echo 1 > /sys/power/cp

export NVM_ROOT_DIR="/Linux/Marvell/NVM"
if [ ! -e $NVM_ROOT_DIR ]; then
	mkdir -p $NVM_ROOT_DIR
fi

echo 0 > /proc/sys/kernel/hung_task_timeout_secs
insmod osadev.ko
insmod seh.ko
insmod mslbddk.ko use_dma_tx=0,1,1,1,1,0,0 use_dma_rx=0,1,1,1,1,0,0
insmod cci_datastub.ko
sleep 1
insmod gs_modem.ko
insmod /lib/modules/g_serial.ko

insmod citty.ko
insmod ccinetdev.ko
insmod cidatatty.ko
./hw.sh

#The Diag driver works with /mnt/mmc
#Therefore it is linked to /mnt/SD1
ln -s /mnt/SD1 /mnt/mmc


# delay 1 second to get udevd notified about the devices creation
# in the modules above, before atcmdsrv and audioserver start
sleep 1
# The below fail if run before this point (cannot open /dev/null)
/sbin/syslogd&
/sbin/klogd&

./mtsd &

# Start polling for CI init complete indication. 
# Important: do not delay the eeh startup, otherwise an EEH message triggered by SEH_IOCTL_ATC_OK to seh.ko (sent from telatci.c)
# would clobber any assert messages in seh.ko queue waiting for eeh, thus any asserts during init would not be recorded.
./wait.sh &

./audioserver -D yes&
./eeh -D yes -M yes&
./mtil_rawci_atcmd -q 1 &

