#!/bin/sh

if [ -f i2c-algo-ks.o ]; then
	/sbin/modprobe i2c-core i2c_debug=0
	/sbin/insmod i2c-algo-ks.o i2c_debug=0 bit_scan=1
else
	if ! ( /sbin/modprobe i2c-core scan=1) ; then
		if ! ( /sbin/modprobe i2c scan=1) ; then
		  echo Please check that the kernel configuration
		  echo has I2C included as modules.
		fi
	fi
fi

d_i2c=0
d_core=0
d_mjpg=0
d_dvd=0
d_i34=0
d_mw=0

if [ -f ks0127.o ]; then
/sbin/insmod msp3400.o debug=$d_i2c simple=0
/sbin/insmod maven.o   debug=$d_i2c
/sbin/insmod ks0127.o  debug=$d_i2c
/sbin/insmod tuner
fi

/sbin/insmod videodev

/sbin/insmod mga_core.o vdo_enable=1 bes_brightness=31 mgacore_debug=$d_core mgai2c_debug=$d_i2c mgaclk_debug=$d_core mgabus_debug=$d_core
/sbin/insmod mgagrab.o debug=$d_mw
/sbin/insmod mgacap.o  debug=$d_mw
/sbin/insmod mgavideo.o default_norm=0 debug=$d_mw

if [ -f zr36060.o ]; then
	/sbin/insmod zr36060.o debug=$d_mjpg
	/sbin/insmod i33.o     debug=$d_mjpg
	/sbin/insmod mgajpg.o  debug=$d_mjpg
fi

if [ -f i34.o ]; then
	/sbin/insmod i34.o     debug=$d_i34
	/sbin/insmod mgadvd.o  debug=$d_dvd
fi


#/sbin/insmod mgayuv.o

