diff --git a/komod/cipher_drv.ko b/komod/cipher_drv.ko new file mode 100644 index 0000000..2f5966b Binary files /dev/null and b/komod/cipher_drv.ko differ diff --git a/komod/gfbg.ko b/komod/gfbg.ko new file mode 100644 index 0000000..c6382cf Binary files /dev/null and b/komod/gfbg.ko differ diff --git a/komod/gk7205v200_acodec.ko b/komod/gk7205v200_acodec.ko new file mode 100644 index 0000000..c764453 Binary files /dev/null and b/komod/gk7205v200_acodec.ko differ diff --git a/komod/gk7205v200_adc.ko b/komod/gk7205v200_adc.ko new file mode 100644 index 0000000..63de476 Binary files /dev/null and b/komod/gk7205v200_adc.ko differ diff --git a/komod/gk7205v200_adec.ko b/komod/gk7205v200_adec.ko new file mode 100644 index 0000000..d349240 Binary files /dev/null and b/komod/gk7205v200_adec.ko differ diff --git a/komod/gk7205v200_aenc.ko b/komod/gk7205v200_aenc.ko new file mode 100644 index 0000000..ba74de1 Binary files /dev/null and b/komod/gk7205v200_aenc.ko differ diff --git a/komod/gk7205v200_ai.ko b/komod/gk7205v200_ai.ko new file mode 100644 index 0000000..3945a3a Binary files /dev/null and b/komod/gk7205v200_ai.ko differ diff --git a/komod/gk7205v200_aio.ko b/komod/gk7205v200_aio.ko new file mode 100644 index 0000000..8070a29 Binary files /dev/null and b/komod/gk7205v200_aio.ko differ diff --git a/komod/gk7205v200_ao.ko b/komod/gk7205v200_ao.ko new file mode 100644 index 0000000..eae48bb Binary files /dev/null and b/komod/gk7205v200_ao.ko differ diff --git a/komod/gk7205v200_base.ko b/komod/gk7205v200_base.ko new file mode 100644 index 0000000..b14e06e Binary files /dev/null and b/komod/gk7205v200_base.ko differ diff --git a/komod/gk7205v200_chnl.ko b/komod/gk7205v200_chnl.ko new file mode 100644 index 0000000..c89bf19 Binary files /dev/null and b/komod/gk7205v200_chnl.ko differ diff --git a/komod/gk7205v200_h264e.ko b/komod/gk7205v200_h264e.ko new file mode 100644 index 0000000..543522e Binary files /dev/null and b/komod/gk7205v200_h264e.ko differ diff --git a/komod/gk7205v200_isp.ko b/komod/gk7205v200_isp.ko new file mode 100644 index 0000000..7778696 Binary files /dev/null and b/komod/gk7205v200_isp.ko differ diff --git a/komod/gk7205v200_ive.ko b/komod/gk7205v200_ive.ko new file mode 100644 index 0000000..1709352 Binary files /dev/null and b/komod/gk7205v200_ive.ko differ diff --git a/komod/gk7205v200_jpege.ko b/komod/gk7205v200_jpege.ko new file mode 100644 index 0000000..465bef1 Binary files /dev/null and b/komod/gk7205v200_jpege.ko differ diff --git a/komod/gk7205v200_rc.ko b/komod/gk7205v200_rc.ko new file mode 100644 index 0000000..bc55e15 Binary files /dev/null and b/komod/gk7205v200_rc.ko differ diff --git a/komod/gk7205v200_rgn.ko b/komod/gk7205v200_rgn.ko new file mode 100644 index 0000000..375c46d Binary files /dev/null and b/komod/gk7205v200_rgn.ko differ diff --git a/komod/gk7205v200_sys.ko b/komod/gk7205v200_sys.ko new file mode 100644 index 0000000..8334904 Binary files /dev/null and b/komod/gk7205v200_sys.ko differ diff --git a/komod/gk7205v200_tde.ko b/komod/gk7205v200_tde.ko new file mode 100644 index 0000000..0407421 Binary files /dev/null and b/komod/gk7205v200_tde.ko differ diff --git a/komod/gk7205v200_vedu.ko b/komod/gk7205v200_vedu.ko new file mode 100644 index 0000000..282da67 Binary files /dev/null and b/komod/gk7205v200_vedu.ko differ diff --git a/komod/gk7205v200_venc.ko b/komod/gk7205v200_venc.ko new file mode 100644 index 0000000..041100e Binary files /dev/null and b/komod/gk7205v200_venc.ko differ diff --git a/komod/gk7205v200_vgs.ko b/komod/gk7205v200_vgs.ko new file mode 100644 index 0000000..8904e5d Binary files /dev/null and b/komod/gk7205v200_vgs.ko differ diff --git a/komod/gk7205v200_vi.ko b/komod/gk7205v200_vi.ko new file mode 100644 index 0000000..cdcb58f Binary files /dev/null and b/komod/gk7205v200_vi.ko differ diff --git a/komod/gk7205v200_vpss.ko b/komod/gk7205v200_vpss.ko new file mode 100644 index 0000000..df24fc7 Binary files /dev/null and b/komod/gk7205v200_vpss.ko differ diff --git a/komod/gk7205v200_wdt.ko b/komod/gk7205v200_wdt.ko new file mode 100644 index 0000000..5a8779c Binary files /dev/null and b/komod/gk7205v200_wdt.ko differ diff --git a/komod/isp_piris.ko b/komod/isp_piris.ko new file mode 100644 index 0000000..aedb527 Binary files /dev/null and b/komod/isp_piris.ko differ diff --git a/komod/isp_pwm.ko b/komod/isp_pwm.ko new file mode 100644 index 0000000..cd7305f Binary files /dev/null and b/komod/isp_pwm.ko differ diff --git a/komod/isp_sample_ist.ko b/komod/isp_sample_ist.ko new file mode 100644 index 0000000..f9734f3 Binary files /dev/null and b/komod/isp_sample_ist.ko differ diff --git a/komod/isp_sensor_i2c.ko b/komod/isp_sensor_i2c.ko new file mode 100644 index 0000000..9c10b88 Binary files /dev/null and b/komod/isp_sensor_i2c.ko differ diff --git a/komod/isp_sensor_spi.ko b/komod/isp_sensor_spi.ko new file mode 100644 index 0000000..995db05 Binary files /dev/null and b/komod/isp_sensor_spi.ko differ diff --git a/komod/load b/komod/load new file mode 100644 index 0000000..928279b --- /dev/null +++ b/komod/load @@ -0,0 +1,303 @@ +#!/bin/sh +# Useage: ./loadgk7205v200 [ -r|-i|-a ] [ sensor ] +# -r : rmmod all modules +# -i : insmod all modules +# default : rmmod all moules and then insmod them +# e.g: ./loadgk7205v200 -i -sensor0 imx307 -osmem 32M + +cd /komod +####################Variables Definition########################## + + +SNS_TYPE0=gc2053; # sensor type +YUV_TYPE0=1; # 0 -- raw, 1 --DC, 3 --bt656 +CHIP_TYPE=gk7205v200; # chip type +BOARD=demo; + +#DDR start:0x40000000, kernel start:0x40000000, OS(32M); MMZ start:0x42000000 +mem_total=64 # 64M, total mem +mem_start=0x40000000 # phy mem start +os_mem_size=34 # 32M, os mem +mmz_start=0x42200000; # mmz start addr +mmz_size=30M; # 32M, mmz size +################################################################## + +report_error() +{ + echo "******* Error: There's something wrong, please check! *****" + exit 1 +} + +insert_audio() +{ + insmod gk7205v200_aio.ko + insmod gk7205v200_ai.ko + insmod gk7205v200_ao.ko + insmod gk7205v200_aenc.ko + insmod gk7205v200_adec.ko + insmod gk7205v200_acodec.ko + echo "insert audio" +} + +remove_audio() +{ + rmmod gk7205v200_acodec + rmmod gk7205v200_adec + rmmod gk7205v200_aenc + rmmod gk7205v200_ao + rmmod gk7205v200_ai + rmmod gk7205v200_aio + echo "remove audio" +} + +insert_isp() +{ + insmod gk7205v200_isp.ko +} + +insert_sil9024() +{ + i2c_sel=2 + if [ "$CHIP_TYPE" == "gk7205v300" ];then + i2c_sel=1 + fi + + if [ "$BOARD" == "sck" ];then + insmod sil9024.ko norm=12 i2c_num=$i2c_sel #1080P@30fps + fi +} + +insert_adv7179() +{ + i2c_sel=2 + if [ "$CHIP_TYPE" == "gk7205v300" ];then + i2c_sel=1 + fi + + if [ "$BOARD" == "sck" ];then + insmod adv7179.ko norm_mode=0 i2c_num=$i2c_sel # norm_mode = 0:PAL, 1:NTSC + fi +} + +insert_ko() +{ + + insmod sysconfig.ko chip=$CHIP_TYPE sensors=$SNS_TYPE0 g_cmos_yuv_flag=$YUV_TYPE0 board=$BOARD + insmod osal.ko anony=1 mmz_allocator=gk mmz=anonymous,0,$mmz_start,$mmz_size || report_error + insmod gk7205v200_base.ko + insmod gk7205v200_sys.ko + insmod gk7205v200_tde.ko + insmod gk7205v200_rgn.ko + insmod gk7205v200_vgs.ko + insmod gk7205v200_vi.ko + insert_isp; + insmod gk7205v200_vpss.ko + ###BT insmod gk7205v200_vo.ko + ###BT insmod gfbg.ko video="gfbg:vram0_size:1620" # default fb0:D1 + insmod gk7205v200_chnl.ko + insmod gk7205v200_vedu.ko + insmod gk7205v200_rc.ko + insmod gk7205v200_venc.ko + insmod gk7205v200_h264e.ko + insmod gk7205v200_h265e.ko + insmod gk7205v200_jpege.ko + insmod gk7205v200_ive.ko save_power=0 + insmod isp_pwm.ko + insmod isp_sensor_i2c.ko + insmod isp_sensor_spi.ko + insert_sil9024; # BT1120 + insert_audio + insmod mipi_rx.ko + #### RT + insmod extdrv/led.ko + insmod gk7205v200_wdt.ko + insmod extdrv/exfat.ko +} + +remove_ko() +{ + remove_audio + rmmod mipi_rx + rmmod sil9024 &> /dev/null + rmmod gk7205v200_ive + rmmod gk7205v200_rc + rmmod gk7205v200_jpege + rmmod gk7205v200_h264e + rmmod gk7205v200_h265e + rmmod gk7205v200_venc + rmmod gk7205v200_vedu + rmmod gk7205v200_chnl + rmmod gfbg + rmmod gk7205v200_vo + rmmod gk7205v200_vpss + rmmod gk7205v200_isp + rmmod gk7205v200_vi + rmmod gk7205v200_vgs + rmmod gk7205v200_rgn + rmmod gk7205v200_tde + rmmod isp_sensor_i2c &> /dev/null + rmmod isp_sensor_spi &> /dev/null + rmmod isp_pwm + rmmod gk7205v200_sys + rmmod gk7205v200_base + rmmod osal + rmmod sysconfig +} + + +load_usage() +{ + echo "Usage: ./loadgk7205v200 [-option] [sensor_name]" + echo "options:" + echo " -i insert modules" + echo " -r remove modules" + echo " -a remove modules first, then insert modules" + echo " -sensor sensor_name config sensor type [default: imx307]" + echo " -h help information" + echo -e "Available sensors: imx307 imx327 sc4236 sc3235 etc." + echo -e "for example: ./loadgk7205v200 -i -sensor imx307 -osmem 32M -board demo -yuv0 0\n" +} + +calc_mmz_info() +{ + # mmz_start=`echo "$mem_start $os_mem_size" | + # awk 'BEGIN { temp = 0; } + # { + # temp = $1/1024/1024 + $2; + # } + # END { printf("0x%x00000\n", temp); }'` + + # mmz_size=`echo "$mem_total $os_mem_size" | + # awk 'BEGIN { temp = 0; } + # { + # temp = $1 - $2; + # } + # END { printf("%dM\n", temp); }'` + echo "mmz_start: $mmz_start, mmz_size: $mmz_size" +} + +######################parse arg################################### +b_arg_sensor0=0 +b_arg_sensor1=0 +b_arg_yuv_type0=0 +b_arg_insmod=1 +b_arg_remove=0 +b_arg_os_mem=0 +b_arg_board=0 + +for arg in $@ +do + if [ $b_arg_sensor0 -eq 1 ] ; then + b_arg_sensor0=0; + SNS_TYPE0=$arg; + fi + + + if [ $b_arg_os_mem -eq 1 ] ; then + b_arg_os_mem=0; + os_mem_size=$arg; + + if [ -z $os_mem_size ]; then + echo "[error] os_mem_size is null" + exit; + fi + fi + + if [ $b_arg_yuv_type0 -eq 1 ] ; then + b_arg_yuv_type0=0; + YUV_TYPE0=$arg; + fi + + if [ $b_arg_board -eq 1 ] ; then + b_arg_board=0; + BOARD=$arg; + fi + + case $arg in + "-i") + b_arg_insmod=1; + ;; + "-r") + b_arg_remove=1; + ;; + "-a") + b_arg_insmod=1; + b_arg_remove=1; + ;; + "-h") + load_usage; + ;; + "-sensor0") + b_arg_sensor0=1; + ;; + "-sensor") + b_arg_sensor0=1; + ;; + "-osmem") + b_arg_os_mem=1; + ;; + "-yuv0") + b_arg_yuv_type0=1; + ;; + "-board") + b_arg_board=1; + ;; + esac +done +#######################parse arg end######################## +if [ $os_mem_size -ge $mem_total ] ; then + echo "[err] os_mem[$os_mem_size], over total_mem[$mem_total]" + exit; +fi + +calc_mmz_info; + +#######################Action############################### + +# if [ $# -lt 1 ]; then + # load_usage; + # exit 0; +# fi + + + +pinmux() +{ + ###通过sys_config.ko中发现需要操作这四个寄存器后才可以再i2c上读取到sensor + himm 0x112c0030 0x1d01 + himm 0x112c0034 0x1d01 + + himm 0x112c0028 0x1001 + himm 0x112c002c 0x1001 +} + +sys_config() +{ + echo "===sys_config===" + pinmux; + + ###配置SENSOR CLKOUT为27MHz (110),并将时钟打开 + himm 0x120100F0 0x19 +} + +#if [ "$1" = "AUTO" ] +#then +# sys_config +# /bin/sensordetect.sh +# . ${SENSOR_CONF} +# SensorType=$sensortype +# SNS_A=$sensortype +# SNS_TYPE=$sensortype +# sleep 1 +# echo "AAAA SensorType $sensortype AAAA" +#fi + + + +if [ $b_arg_remove -eq 1 ]; then + remove_ko; +fi + +if [ $b_arg_insmod -eq 1 ]; then + insert_ko; +fi diff --git a/komod/loadgk7205v200 b/komod/loadgk7205v200 new file mode 100644 index 0000000..8a7d50b --- /dev/null +++ b/komod/loadgk7205v200 @@ -0,0 +1,266 @@ +#!/bin/sh +# Useage: ./loadgk7205v200 [ -r|-i|-a ] [ sensor ] +# -r : rmmod all modules +# -i : insmod all modules +# default : rmmod all moules and then insmod them +# e.g: ./loadgk7205v200 -i -sensor0 imx307 -osmem 32M + + +####################Variables Definition########################## + + +SNS_TYPE0=imx307; # sensor type +YUV_TYPE0=0; # 0 -- raw, 1 --DC, 3 --bt656 +CHIP_TYPE=gk7205v200; # chip type +BOARD=demo; + +#DDR start:0x40000000, kernel start:0x40000000, OS(32M); MMZ start:0x42000000 +mem_total=64 # 64M, total mem +mem_start=0x40000000 # phy mem start +os_mem_size=32 # 32M, os mem +mmz_start=0x42000000; # mmz start addr +mmz_size=32M; # 32M, mmz size +################################################################## + +report_error() +{ + echo "******* Error: There's something wrong, please check! *****" + exit 1 +} + +insert_audio() +{ + insmod gk7205v200_aio.ko + insmod gk7205v200_ai.ko + insmod gk7205v200_ao.ko + insmod gk7205v200_aenc.ko + insmod gk7205v200_adec.ko + insmod gk7205v200_acodec.ko + echo "insert audio" +} + +remove_audio() +{ + rmmod gk7205v200_acodec + rmmod gk7205v200_adec + rmmod gk7205v200_aenc + rmmod gk7205v200_ao + rmmod gk7205v200_ai + rmmod gk7205v200_aio + echo "remove audio" +} + +insert_isp() +{ + insmod gk7205v200_isp.ko +} + +insert_sil9024() +{ + i2c_sel=2 + if [ "$CHIP_TYPE" == "gk7205v300" ];then + i2c_sel=1 + fi + + if [ "$BOARD" == "sck" ];then + insmod sil9024.ko norm=12 i2c_num=$i2c_sel #1080P@30fps + fi +} + +insert_adv7179() +{ + i2c_sel=2 + if [ "$CHIP_TYPE" == "gk7205v300" ];then + i2c_sel=1 + fi + + if [ "$BOARD" == "sck" ];then + insmod adv7179.ko norm_mode=0 i2c_num=$i2c_sel # norm_mode = 0:PAL, 1:NTSC + fi +} + +insert_ko() +{ + + insmod sysconfig.ko chip=$CHIP_TYPE sensors=$SNS_TYPE0 g_cmos_yuv_flag=$YUV_TYPE0 board=$BOARD + insmod osal.ko anony=1 mmz_allocator=gk mmz=anonymous,0,$mmz_start,$mmz_size || report_error + insmod gk7205v200_base.ko + insmod gk7205v200_sys.ko + insmod gk7205v200_tde.ko + insmod gk7205v200_rgn.ko + insmod gk7205v200_vgs.ko + insmod gk7205v200_vi.ko + insert_isp; + insmod gk7205v200_vpss.ko + insmod gk7205v200_vo.ko + insmod gfbg.ko video="gfbg:vram0_size:1620" # default fb0:D1 + insmod gk7205v200_chnl.ko + insmod gk7205v200_vedu.ko + insmod gk7205v200_rc.ko + insmod gk7205v200_venc.ko + insmod gk7205v200_h264e.ko + insmod gk7205v200_h265e.ko + insmod gk7205v200_jpege.ko + insmod gk7205v200_ive.ko save_power=0 + insmod isp_pwm.ko + insmod isp_sensor_i2c.ko + insmod isp_sensor_spi.ko + insert_sil9024; # BT1120 + insert_audio + insmod mipi_rx.ko +} + +remove_ko() +{ + remove_audio + rmmod mipi_rx + rmmod sil9024 &> /dev/null + rmmod gk7205v200_ive + rmmod gk7205v200_rc + rmmod gk7205v200_jpege + rmmod gk7205v200_h264e + rmmod gk7205v200_h265e + rmmod gk7205v200_venc + rmmod gk7205v200_vedu + rmmod gk7205v200_chnl + rmmod gfbg + rmmod gk7205v200_vo + rmmod gk7205v200_vpss + rmmod gk7205v200_isp + rmmod gk7205v200_vi + rmmod gk7205v200_vgs + rmmod gk7205v200_rgn + rmmod gk7205v200_tde + rmmod isp_sensor_i2c &> /dev/null + rmmod isp_sensor_spi &> /dev/null + rmmod isp_pwm + rmmod gk7205v200_sys + rmmod gk7205v200_base + rmmod osal + rmmod sysconfig +} + + +load_usage() +{ + echo "Usage: ./loadgk7205v200 [-option] [sensor_name]" + echo "options:" + echo " -i insert modules" + echo " -r remove modules" + echo " -a remove modules first, then insert modules" + echo " -sensor sensor_name config sensor type [default: imx307]" + echo " -h help information" + echo -e "Available sensors: imx307 imx327 sc4236 sc3235 etc." + echo -e "for example: ./loadgk7205v200 -i -sensor imx307 -osmem 32M -board demo -yuv0 0\n" +} + +calc_mmz_info() +{ + mmz_start=`echo "$mem_start $os_mem_size" | + awk 'BEGIN { temp = 0; } + { + temp = $1/1024/1024 + $2; + } + END { printf("0x%x00000\n", temp); }'` + + mmz_size=`echo "$mem_total $os_mem_size" | + awk 'BEGIN { temp = 0; } + { + temp = $1 - $2; + } + END { printf("%dM\n", temp); }'` + echo "mmz_start: $mmz_start, mmz_size: $mmz_size" +} + +######################parse arg################################### +b_arg_sensor0=0 +b_arg_sensor1=0 +b_arg_yuv_type0=0 +b_arg_insmod=0 +b_arg_remove=0 +b_arg_os_mem=0 +b_arg_board=0 + +for arg in $@ +do + if [ $b_arg_sensor0 -eq 1 ] ; then + b_arg_sensor0=0; + SNS_TYPE0=$arg; + fi + + + if [ $b_arg_os_mem -eq 1 ] ; then + b_arg_os_mem=0; + os_mem_size=$arg; + + if [ -z $os_mem_size ]; then + echo "[error] os_mem_size is null" + exit; + fi + fi + + if [ $b_arg_yuv_type0 -eq 1 ] ; then + b_arg_yuv_type0=0; + YUV_TYPE0=$arg; + fi + + if [ $b_arg_board -eq 1 ] ; then + b_arg_board=0; + BOARD=$arg; + fi + + case $arg in + "-i") + b_arg_insmod=1; + ;; + "-r") + b_arg_remove=1; + ;; + "-a") + b_arg_insmod=1; + b_arg_remove=1; + ;; + "-h") + load_usage; + ;; + "-sensor0") + b_arg_sensor0=1; + ;; + "-sensor") + b_arg_sensor0=1; + ;; + "-osmem") + b_arg_os_mem=1; + ;; + "-yuv0") + b_arg_yuv_type0=1; + ;; + "-board") + b_arg_board=1; + ;; + esac +done +#######################parse arg end######################## +if [ $os_mem_size -ge $mem_total ] ; then + echo "[err] os_mem[$os_mem_size], over total_mem[$mem_total]" + exit; +fi + +calc_mmz_info; + +#######################Action############################### + +if [ $# -lt 1 ]; then + load_usage; + exit 0; +fi + + +if [ $b_arg_remove -eq 1 ]; then + remove_ko; +fi + +if [ $b_arg_insmod -eq 1 ]; then + insert_ko; +fi + diff --git a/komod/mipi_rx.ko b/komod/mipi_rx.ko new file mode 100644 index 0000000..76ceb79 Binary files /dev/null and b/komod/mipi_rx.ko differ diff --git a/komod/mt7601Usta.ko b/komod/mt7601Usta.ko new file mode 100644 index 0000000..e81aa12 Binary files /dev/null and b/komod/mt7601Usta.ko differ diff --git a/komod/mtprealloc.ko b/komod/mtprealloc.ko new file mode 100644 index 0000000..20c2e1e Binary files /dev/null and b/komod/mtprealloc.ko differ diff --git a/komod/osal.ko b/komod/osal.ko new file mode 100644 index 0000000..0d381a0 Binary files /dev/null and b/komod/osal.ko differ diff --git a/komod/ssp_ota5182_ex.ko b/komod/ssp_ota5182_ex.ko new file mode 100644 index 0000000..6d58494 Binary files /dev/null and b/komod/ssp_ota5182_ex.ko differ diff --git a/komod/ssp_st7789_ex.ko b/komod/ssp_st7789_ex.ko new file mode 100644 index 0000000..163da17 Binary files /dev/null and b/komod/ssp_st7789_ex.ko differ diff --git a/komod/ssp_st7796_ex.ko b/komod/ssp_st7796_ex.ko new file mode 100644 index 0000000..f604ab6 Binary files /dev/null and b/komod/ssp_st7796_ex.ko differ diff --git a/komod/sysconfig.ko b/komod/sysconfig.ko new file mode 100644 index 0000000..49649a4 Binary files /dev/null and b/komod/sysconfig.ko differ diff --git a/komod/wifiapko.sh b/komod/wifiapko.sh new file mode 100644 index 0000000..0b6e3bf --- /dev/null +++ b/komod/wifiapko.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +#wifi driver load and unload +KOPATH=/komod + +if [ "$1" == "load" ] || [ "$1" == "" ] +then + echo LOAD wifiap >&2 + cd $KOPATH + #insmod cfg80211.ko + insmod mtprealloc.ko + insmod mt7601Usta.ko + +elif [ "$1" == "unload" ] +then + echo UNLOAD wifiap >&2 + rmmod mt7601Usta + rmmod mtprealloc + #rmmod cfg80211 +fi diff --git a/komod/wifiko.sh b/komod/wifiko.sh new file mode 100644 index 0000000..35b32e0 --- /dev/null +++ b/komod/wifiko.sh @@ -0,0 +1,21 @@ +#!/bin/sh +#wifi driver load and unload + +KOPATH=/komod + +if [ "$1" == "load" ] || [ "$1" == "" ] +then + echo LOAD wifi >&2 + cd $KOPATH + #insmod cfg80211.ko + insmod mtprealloc.ko + insmod mt7601Usta.ko +elif [ "$1" == "unload" ] +then + echo UNLOAD wifi >&2 + wpa_cli -i ra0 terminate >/dev/null 2>&1 + rmmod mt7601Usta + rmmod mtprealloc + #rmmod cfg80211 + +fi