
/etc/init.d/rcS
=> 
  /root/network-pre.sh
  => ## Run "network.sh", copy from SD. (mount/umount)
    cp /mnt/Net/networks.sh /root
    chmod a+x /root/network.sh
    /root/network.sh
  /etc/init.d/S??*

  /root/start.sh
  =>
  /root/step1.sh
  => ## Run "start-sub.sh", copy from SD. (mount/umount)
    cp /mnt/strart-sub.sh /tmp
    chmod a+x /tmp/start-sub.sh
    /tmp/start-sub.sh
    =>
      cp ********* ## copy HARK, BT, Driver, FPGA data
      cp /mnt/copy_files/usbrec/* /root  ## copy USB recording program
      cp /mnt/ster2.sh /root
      cp /mnt/step3.sh /root
      cp /mnt/copy_files/testdata/*.wav /root (or /tmp)
      cp /mnt/copy_files/scripts/* /root  ## copy hark start/stop scripts
      cp /mnt/vsserver/* /root            ## copy vehicle status server
      cp /mnt/copy_files/scripts/* /root  ## copy recording scripts
      cp /mnt/copy_files/scripts/tsync.sh ## copy time sync script
  /root/step2.sh
  => ## Run FPGA config and install kernel driver module from "step2.sh", copy from SD by "start-sub.sh".
    iw phy phy0 interface add uap0 type __ap
    cd /root
    ./fpga topmodule.bit
    sleep 3
    ./mw 0x0209c004 0x4
    ./mw 0x0209c000 0x0
    insmod ${drvdir}/drv.ko mic_mode=0 (or 1) ## drvdir=/root/dev
    maj=`cat /proc/devices|grep kt|awk '{print $1}'`
    mknod /dev/kt c ${maj} 0
  #/root/hci_up.sh
  /root/step3.sh
  => ## Run BT setup and install gadget driver module from "step3.sh", copy from SD by "start-sub.sh".
    hciconfig hci0 class 280404                ## BT headset
    hciconfig hci0 name 'hark headset'         ##
    hciconfig hci0 piscan                      ## BT scan
    #hcitool -i hci0 cmd 3f 1d 00 >& /dev/null ## voice path to HCI
    hcitool -i hci0 cmd 3f 1d 01 >& /dev/null  ## voice path to PCM (used)
    #hcitool -i hci0 cmd 3f 07 02 >& /dev/null ## PCM master
    hcitool -i hci0 cmd 3f 07 00 >& /dev/null  ## PCM slave (used)
    #./bt -d -r                                ## daemon 16k->8k downsampled
    ./bt -d -r -a                              ## daemon 16k->8k downsampled (always voice send)
    #./bt -d -r -w                             ## daemon 16k->8k downsampled (recognition start)
    modprobe g_raspmx mic_mode=0               ## Gadget RASP-MX enabled, Tablet mic mode
    #modprobe g_raspmx mic_mode=1              ## Gadget RASP-MX enabled, Cascade mic mode
    <USB host reset, host controller turn off/turn on> :: please don't touch.
    <Multi CPU enable> :: please don't touch.
    <LED control> :: please don't touch.
    #/hark/hark --daemon --config /hark/hark-wav.conf --standby ## for test daemon mode (order demo data)
