#!/bin/sh

drvdir=/root/drv
#wifidir=/root/wifi
nand=2

############################
#echo "Mount NAND Device (MTD$nand)"

############################
echo "Set WiFi/LAN Setting"

echo "Add interface uap0"
iw phy phy0 interface add uap0 type __ap

############################
echo "FPGA Config"

cd /root
./fpga top_module.bit

#sleep 1
sleep 3

# FPGA Reset
./mw 0x0209c004 0x4
./mw 0x0209c000 0x0

############################
echo "RASP Driver Load"

# Tablet Mic Mode
#insmod ${drvdir}/drv.ko mic_mode=0

# Cascade Mic Mode
insmod ${drvdir}/drv.ko mic_mode=1

# Tablet Mic 8ch + Cascade Mic 8ch
#insmod ${drvdir}/drv.ko mic_mode=2

maj=`cat /proc/devices|grep kt|awk '{print $1}'`
mknod /dev/kt c ${maj} 0

