sync(system): update front board system configuration.

This commit is contained in:
kangjun
2024-05-14 11:30:40 +08:00
parent 643879bc1e
commit 47b4c1d7b2
57 changed files with 19610 additions and 3891 deletions

View File

@@ -0,0 +1,50 @@
#!/bin/sh
#
# udev This is a minimal non-LSB version of a UDEV startup script. It
# was derived by stripping down the udev-058 LSB version for use
# with buildroot on embedded hardware using Linux 2.6.34+ kernels.
#
# You may need to customize this for your system's resource limits
# (including startup time!) and administration. For example, if
# your early userspace has a custom initramfs or initrd you might
# need /dev much earlier; or without hotpluggable busses (like USB,
# PCMCIA, MMC/SD, and so on) your /dev might be static after boot.
#
# This script assumes your system boots right into the eventual root
# filesystem, and that init runs this udev script before any programs
# needing more device nodes than the bare-bones set -- /dev/console,
# /dev/zero, /dev/null -- that's needed to boot and run this script.
#
# Check for missing binaries
UDEV_BIN=/sbin/udevd
test -x $UDEV_BIN || exit 5
# Check for config file and read it
UDEV_CONFIG=/etc/udev/udev.conf
test -r $UDEV_CONFIG || exit 6
. $UDEV_CONFIG
case "$1" in
start)
printf "Populating ${udev_root:-/dev} using udev: "
printf '\000\000\000\000' > /proc/sys/kernel/hotplug
$UDEV_BIN -d || (echo "FAIL" && exit 1)
udevadm trigger --type=subsystems --action=add
udevadm trigger --type=devices --action=add
udevadm settle --timeout=30 || echo "udevadm settle failed"
echo "done"
;;
stop)
# Stop execution of events
udevadm control --stop-exec-queue
killall udevd
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
exit 0

View File

@@ -0,0 +1,34 @@
#!/bin/sh
#
# Start wifi_deamon....
#
start() {
printf "Starting wifi_deamon....: "
#wifi_daemon
#sleep 0.2
#wifi -o sta
#wifi -a enable
}
stop() {
printf "Stopping wifi_deamon: "
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?

View File

@@ -0,0 +1,36 @@
#!/bin/sh
#
# Load fat modules....
#
MODULES_DIR="/lib/modules/`uname -r`"
start() {
printf "Load fat modules\n"
insmod $MODULES_DIR/fat.ko
insmod $MODULES_DIR/vfat.ko
}
stop() {
printf "Unload fat modules\n"
rmmod $MODULES_DIR/fat.ko
rmmod $MODULES_DIR/vfat.ko
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?

View File

@@ -0,0 +1,38 @@
#!/bin/sh
#
# Load mmc modules....
#
MODULES_DIR="/lib/modules/`uname -r`"
start() {
printf "Load mmc modules\n"
#insmod $MODULES_DIR/mmc_core.ko
#insmod $MODULES_DIR/mmc_block.ko
#insmod $MODULES_DIR/sunxi_mmc_host.ko
}
stop() {
printf "Unload mmc modules\n"
#rmmod $MODULES_DIR/mmc_core.ko
#rmmod $MODULES_DIR/block.ko
#rmmod $MODULES_DIR/sunxi_mmc_host.ko
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?

View File

@@ -0,0 +1,117 @@
#!/bin/sh
echo "------run rc.final file-----"
#echo "insmod wifi modules"
#insmod /lib/modules/3.4.39/8723ds.ko
#insmod /lib/modules/3.4.39/bcmdhd.ko
#insmod /lib/modules/3.4.39/xradio_mac.ko
#insmod /lib/modules/3.4.39/xradio_core.ko
#insmod /lib/modules/3.4.39/xradio_wlan.ko
export LD_LIBRARY_PATH=/usr/lib/eyesee-mpp:${LD_LIBRARY_PATH}
ulimit -c unlimited
echo /mnt/extsd/coredump-%e-%p-%s-%t > /proc/sys/kernel/core_pattern
for i in /etc/init.d/S??* ;do
# Ignore dangling symlinks (if any).
[ ! -f "$i" ] && continue
case "$i" in
*.sh)
# Source shell script for speed.
(
trap - INT QUIT TSTP
set start
. $i
)
;;
*)
# No sh extension, so fork subprocess.
$i start
;;
esac
done
LOOP_CNT=0
SD_DEV=
while [ 1 ];do
if [ $LOOP_CNT -eq 3 ];then
echo wait SD Card ready timeout
break;
fi
if [ -b /dev/mmcblk1p1 ];then
SD_DEV=/dev/mmcblk1p1
break;
elif [ -b /dev/mmcblk1 ];then
SD_DEV=/dev/mmcblk1
break;
elif [ -b /dev/mmcblk0p1 ];then
SD_DEV=/dev/mmcblk0p1
break;
elif [ -b /dev/mmcblk0 ];then
SD_DEV=/dev/mmcblk0
break;
else
echo SD Card not ready, wait
fi
LOOP_CNT=$(($LOOP_CNT+1))
sleep 1
done
# repair sd card file
if [ "x$SD_DEV" != "x" ]; then
echo SD Card is ready
if [ -f /usr/bin/fsck_msdos ]; then
/usr/bin/fsck_msdos -pfS $SD_DEV
fi
fi
if [ -z "$(grep '\<vfat\>' /proc/mounts)" ]; then
! /bin/mount -t vfat /dev/mmcblk0 /mnt/extsd 2>/dev/null &&
/bin/mount -t vfat /dev/mmcblk0p1 /mnt/extsd
fi
sleep 1
if [ -n "$(grep '/mnt/extsd' /proc/mounts)" ]; then
echo "start mv stream..."
ls /tmp/
rm -rf /mnt/extsd/stream*.h264
rm -rf /mnt/extsd/data*.jpg
mv /tmp/stream*.h264 /mnt/extsd/
mv /tmp/data*.jpg /mnt/extsd/
echo "---/mnt/extsd/---"
ls /mnt/extsd/
fi
echo "run_usb_adb start!"
run_usb_adb
#echo "sample_virvi2vo start!"
#/usr/bin/sample_virvi2vo -path /usr/bin/sample_virvi2vo_v851s_sc1721v_dual.conf &
#catch jpg 0
#demo_video_in -n 40 -s0 800x608 -f0 0 -pf 4 -trd 1 -snd 1 -s1 800x608 -f1 0 -pf1 4 -vn1 1
#catch jpg 1
#demo_video_in -n 40 -s0 800x608 -f0 0 -pf 4 -snd 1 -s1 800x608 -f1 0 -pf1 4 -trd 1 -vn1 1 -vn2 5
#set ir
echo 6 > /sys/class/pwm/pwmchip0/export
echo 50000 > /sys/class/pwm/pwmchip0/pwm6/period
echo 30000 > /sys/class/pwm/pwmchip0/pwm6/duty_cycle
#disable ir
echo 0 > /sys/class/pwm/pwmchip0/pwm6/enable
#enable ir
#echo 1 > /sys/class/pwm/pwmchip0/pwm6/enable
#/usr/bin/rt_media-uvc -D 0 -b 0 -d 2 &
#run_otg
#sleep 2
#/usr/bin/rt_media-uvc -D 0 -d 2 &

View File

@@ -0,0 +1,97 @@
#!/bin/sh
echo "------run rc.final file-----"
#echo "insmod wifi modules"
#insmod /lib/modules/3.4.39/8723ds.ko
#insmod /lib/modules/3.4.39/bcmdhd.ko
#insmod /lib/modules/3.4.39/xradio_mac.ko
#insmod /lib/modules/3.4.39/xradio_core.ko
#insmod /lib/modules/3.4.39/xradio_wlan.ko
export LD_LIBRARY_PATH=/usr/lib/eyesee-mpp:${LD_LIBRARY_PATH}
ulimit -c unlimited
echo /mnt/extsd/coredump-%e-%p-%s-%t > /proc/sys/kernel/core_pattern
for i in /etc/init.d/S??* ;do
# Ignore dangling symlinks (if any).
[ ! -f "$i" ] && continue
case "$i" in
*.sh)
# Source shell script for speed.
(
trap - INT QUIT TSTP
set start
. $i
)
;;
*)
# No sh extension, so fork subprocess.
$i start
;;
esac
done
#LOOP_CNT=0
#SD_DEV=
#while [ 1 ];do
# if [ $LOOP_CNT -eq 3 ];then
# echo wait SD Card ready timeout
# break;
# fi
# if [ -b /dev/mmcblk1p1 ];then
# SD_DEV=/dev/mmcblk1p1
# break;
# elif [ -b /dev/mmcblk1 ];then
# SD_DEV=/dev/mmcblk1
# break;
# elif [ -b /dev/mmcblk0p1 ];then
# SD_DEV=/dev/mmcblk0p1
# break;
# elif [ -b /dev/mmcblk0 ];then
# SD_DEV=/dev/mmcblk0
# break;
# else
# echo SD Card not ready, wait
# fi
# LOOP_CNT=$(($LOOP_CNT+1))
# sleep 1
#done
#
# repair sd card file
#if [ "x$SD_DEV" != "x" ]; then
# echo SD Card is ready
#
# if [ -f /usr/bin/fsck_msdos ]; then
# /usr/bin/fsck_msdos -pfS $SD_DEV
# fi
#fi
#if [ -z "$(grep '\<vfat\>' /proc/mounts)" ]; then
# ! /bin/mount -t vfat /dev/mmcblk0 /mnt/extsd 2>/dev/null &&
# /bin/mount -t vfat /dev/mmcblk0p1 /mnt/extsd
#fi
#sleep 1
#echo "start mv stream..."
#ls /tmp/
#rm -rf /mnt/extsd/stream*.h264
#rm -rf /mnt/extsd/data*.jpg
#mv /tmp/stream*.h264 /mnt/extsd/
#mv /tmp/data*.jpg /mnt/extsd/
#echo "---/mnt/extsd/---"
#ls /mnt/extsd/
echo 160 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio160/direction
echo 0 > /sys/class/gpio/gpio160/value
echo 0 > /sys/class/pwm/pwmchip0/export
echo 1000000 > /sys/class/pwm/pwmchip0/pwm0/period
echo 350000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable
echo 1 > /sys/class/gpio/gpio160/value
run_usb_adb

View File

@@ -0,0 +1,43 @@
#!/bin/sh
echo "------run rc.modules file-----"
MODULES_DIR="/lib/modules/`uname -r`"
#disp
#echo "------insmod display modules start-----"
#insmod /lib/modules/4.9.191/fb.ko
#insmod /lib/modules/4.9.191/disp.ko
#wifi
#echo "------insmod wifi modules xr806 start-----"
#insmod /lib/modules/4.9.191/xr806.ko
#insmod /lib/modules/4.9.191/vipcore.ko
#input
#echo "------insmod input modules start-----"
#insmod /lib/modules/4.9.191/input-core.ko
#insmod /lib/modules/4.9.191/evdev.ko
#audio
echo "------insmod audio modules start-----"
insmod $MODULES_DIR/soundcore.ko
insmod $MODULES_DIR/snd.ko
insmod $MODULES_DIR/snd-timer.ko
insmod $MODULES_DIR/snd-pcm.ko
insmod $MODULES_DIR/snd-pcm-dmaengine.ko
insmod $MODULES_DIR/snd-soc-core.ko
insmod $MODULES_DIR/snd_soc_sunxi_pcm.ko
insmod $MODULES_DIR/snd_soc_sunxi_component_rxsync.ko
insmod $MODULES_DIR/snd_soc_sunxi_aaudio.ko
insmod $MODULES_DIR/snd_soc_sunxi_daudio.ko
insmod $MODULES_DIR/snd_soc_sunxi_internal_codec.ko
insmod $MODULES_DIR/snd_soc_sunxi_machine.ko
echo "------insmod audio modules end-----"
insmod $MODULES_DIR/rt-media.ko
insmod $MODULES_DIR/cst9220.ko
#ctp
#echo "------insmod ctp modules gslx680 start-----"
#insmod /lib/modules/4.9.191/gslX680new.ko
#l-sen
#echo "------insmod l-sen modules gpadc start-----"
#insmod /lib/modules/4.9.191/sunxi_gpadc.ko

View File

@@ -0,0 +1,4 @@
#!/bin/sh
echo "------run rc.preboot file-----"

View File

@@ -0,0 +1,28 @@
#!/bin/sh
# Stop all init scripts in /etc/init.d
# executing them in reversed numerical order.
#
for i in $(ls -r /etc/init.d/S??*) ;do
# Ignore dangling symlinks (if any).
[ ! -f "$i" ] && continue
case "$i" in
*.sh)
# Source shell script for speed.
(
trap - INT QUIT TSTP
set stop
. $i
)
;;
*)
# No sh extension, so fork subprocess.
$i stop
;;
esac
done

View File

@@ -0,0 +1,3 @@
KERNEL=="mmcblk[0-9]p[0-9]", RUN+="/etc/udev/hotplug-tf.sh %k $env{ACTION}"
ACTION=="add", KERNEL=="mmc0:*", RUN+="/etc/udev/hotplug-tf.sh %k $env{ACTION}"
ACTION=="remove", KERNEL=="mmc0:*", RUN+="/etc/udev/hotplug-tf.sh %k $env{ACTION}"

View File

@@ -0,0 +1,3 @@
KERNEL=="sda[0-9]", SUBSYSTEM=="block", SUBSYSTEM=="usb", RUN+="/etc/udev/usb_handle %k $env{ACTION}"
ACTION=="add|change", KERNEL=="sd*", RUN+="/etc/udev/usb_handle %k $env{ACTION}"
ACTION=="remove", KERNEL=="sd*", RUN+="/etc/udev/usb_handle %k $env{ACTION}"

View File

@@ -2,11 +2,12 @@
# Values shown are defaults
# The start and end of the IP lease block
start 192.168.10.100
end 192.168.10.254
start 172.168.10.100
end 172.168.10.254
# The interface that udhcpd will use
interface wlan0
#interface wlan0
interface usb0
# The maximum number of leases (includes addresses reserved
# by OFFER's, DECLINE's, and ARP conflicts). Will be corrected
@@ -61,10 +62,10 @@ interface wlan0
# as the dns option, they can be listed on the same line, or multiple
# lines.
# Examples:
opt dns 192.168.10.2 192.168.10.10
opt dns 172.168.10.2 172.168.10.10
option subnet 255.255.255.0
opt router 192.168.10.2
opt wins 192.168.10.10
opt router 172.168.10.1
opt wins 172.168.10.1
option dns 129.219.13.81 # appended to above DNS servers for a total of 3
option domain local
option lease 864000 # default: 10 days

View File

@@ -495,7 +495,45 @@ check_update_system_state() {
/bin/mount -t tmpfs tmpfs /tmp
/bin/mount -t sysfs sys /sys
# /bin/mount -t devtmpfs none /dev
#demo_video_in -n 40 -s0 1920x1088 -f0 0 -pf 4 -trd 1 -pf2 0
#/bin/mount -t jffs2 /dev/mtdblock3 /home
#/bin/mount -t jffs2 /dev/mtdblock6 /home
# /bin/mount -t jffs2 /dev/mtdblock4 /home
# cur_time=`cat /proc/uptime`
# echo "mount /data partition [${cur_time}]"
# cur_time=`cat /proc/uptime`
#echo "initialization led pwm [${cur_time}]"
#echo 6 > /sys/class/pwm/pwmchip0/export
#echo 50000 > /sys/class/pwm/pwmchip0/pwm6/period
#echo 30000 > /sys/class/pwm/pwmchip0/pwm6/duty_cycle
# echo "initialization led gpio [${cur_time}]"
#echo 134 > /sys/class/gpio/export
#echo out > /sys/class/gpio/gpio134/direction
# cur_time=`cat /proc/uptime`
# echo "enable ir led [${cur_time}]"
#echo 1 > /sys/class/pwm/pwmchip0/pwm6/enable
#echo 0 > /sys/class/gpio/gpio134/value
# cur_time=`cat /proc/uptime`
# echo "start demo_video_in [${cur_time}]"
#demo_video_in -n 40 -s0 800x600 -f0 0 -pf 4 -trd 1 -snd 1 -s1 800x600 -f1 0 -pf1 4 -vn1 1
#demo_video_in -n 40 -s0 800x600 -f0 0 -pf 4 -snd 1 -s1 800x600 -f1 0 -pf1 4 -trd 1 -vn1 1 -vn2 5
# cur_time=`cat /proc/uptime`
# echo "start uvc out [${cur_time}]"
# /bin/setusbconfig uvc
#/bin/setusbconfig uvc
# /usr/bin/setusbconfig uvc
#/usr/bin/rt_media-uvc -D 0 -d 2 -B 10 &
#sleep 2
#/bin/rt_media-uvc -D 1 -d 2 -B 10 &
# sleep 3
fgrep -sq pstore /proc/filesystems && {
/bin/mount -t pstore pstore /sys/fs/pstore
}

View File

@@ -1,4 +1,5 @@
#!/bin/sh
: <<'COMMENTBLOCK'
# remove
if [ "${ACTION}" == "remove" ]; then
MOUNTPOINT="$(grep -w "^/dev/${MDEV}" /proc/mounts | awk '{print $2}')"
@@ -37,4 +38,5 @@ if [ "${ACTION}" == "add" ]; then
[ ! -b "/dev/${MDEV}" -a -f "/sys/block/${MDEV%p*}/${MDEV}/uevent" ] \
&& echo add > /sys/block/${MDEV%p*}/${MDEV}/uevent
fi
COMMENTBLOCK
exit 0

View File

@@ -0,0 +1,68 @@
#!/bin/sh
MODULES_DIR="/lib/modules/`uname -r`"
#insmod $MODULES_DIR/sunxi_usb_udc.ko
#insmod $MODULES_DIR/sunxi_usbc.ko
mount -t configfs none /sys/kernel/config
mkdir /sys/kernel/config/usb_gadget/g1
echo "0x1f3a" > /sys/kernel/config/usb_gadget/g1/idVendor
echo "0x100f" > /sys/kernel/config/usb_gadget/g1/idProduct
mkdir /sys/kernel/config/usb_gadget/g1/strings/0x409
echo "20080411" > /sys/kernel/config/usb_gadget/g1/strings/0x409/serialnumber
echo "Android" > /sys/kernel/config/usb_gadget/g1/strings/0x409/manufacturer
mkdir /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0
mkdir -p /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/mjpeg/m/720p
echo 1280 > /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/mjpeg/m/720p/wWidth
echo 720 > /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/mjpeg/m/720p/wHeight
echo 333333 > /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/mjpeg/m/720p/dwFrameInterval
echo 333333 > /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/mjpeg/m/720p/dwDefaultFrameInterval
echo 442368000 > /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/mjpeg/m/720p/dwMinBitRate
echo 442368000 > /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/mjpeg/m/720p/dwMaxBitRate
echo 1843200 > /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/mjpeg/m/720p/dwMaxVideoFrameBufferSize
mkdir /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/header/h
ln -s /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/mjpeg/m/ /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/header/h/
ln -s /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/header/h/ /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/class/fs
ln -s /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/header/h/ /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/streaming/class/hs
mkdir /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/control/header/h
ln -s /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/control/header/h/ /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/control/class/fs/
ln -s /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/control/header/h/ /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/control/class/ss/
mkdir /sys/kernel/config/usb_gadget/g1/functions/ffs.adb
mkdir /sys/kernel/config/usb_gadget/g1/configs/c.1
echo 0xc0 > /sys/kernel/config/usb_gadget/g1/configs/c.1/bmAttributes
echo 500 > /sys/kernel/config/usb_gadget/g1/configs/c.1/MaxPower
mkdir /sys/kernel/config/usb_gadget/g1/configs/c.1/strings/0x409
mkdir /sys/kernel/config/usb_gadget/g1/functions/mass_storage.usb0
ln -s /sys/kernel/config/usb_gadget/g1/functions/mass_storage.usb0/ /sys/kernel/config/usb_gadget/g1/configs/c.1/mass_storage.usb0
mkdir /dev/usb-ffs
mkdir /dev/usb-ffs/adb
mount -o uid=2000,gid=2000 -t functionfs adb /dev/usb-ffs/adb/
udc=`ls /sys/class/udc`
isudc=0
start(){
while [ 1 ]
do
sleep 1
otg_role=`cat /sys/devices/platform/soc/usbc0/otg_role`
if [ "$otg_role" = "usb_device" ]
then
if [ $isudc == 0 ]
then
echo $udc > /sys/kernel/config/usb_gadget/g1/UDC
isudc=1
fi
else
isudc=0
fi
done
}
start &
echo > /sys/kernel/config/usb_gadget/g1/UDC
echo 0x100d > /sys/kernel/config/usb_gadget/g1/idProduct
rm /sys/kernel/config/usb_gadget/g1/configs/c.1/mass_storage.usb0
rm /sys/kernel/config/usb_gadget/g1/configs/c.1/uvc.usb0
ln -s /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/ /sys/kernel/config/usb_gadget/g1/configs/c.1/uvc.usb0
ls /sys/class/udc | xargs echo > /sys/kernel/config/usb_gadget/g1/UDC

View File

@@ -3,6 +3,7 @@
MODULES_DIR="/lib/modules/`uname -r`"
insmod $MODULES_DIR/configfs.ko
insmod $MODULES_DIR/videobuf2-vmalloc.ko
insmod $MODULES_DIR/usb-common.ko
insmod $MODULES_DIR/usbcore.ko
insmod $MODULES_DIR/sunxi_hci.ko
@@ -14,6 +15,7 @@ insmod $MODULES_DIR/sunxi_usb_udc.ko
insmod $MODULES_DIR/usb_f_fs.ko
insmod $MODULES_DIR/usb_f_mass_storage.ko
insmod $MODULES_DIR/usb_f_hid.ko
insmod $MODULES_DIR/usb_f_uvc.ko
insmod $MODULES_DIR/sunxi_usbc.ko
if [ -f /lib/modules/4.9.191/videobuf2-vmalloc.ko ];then

View File

@@ -1,15 +0,0 @@
########### paramter (ref to tulip_cedarx.conf)############
[parameter]
pcm_file_path = "/mnt/SDCARD/sample_ai_pcm.wav"
pcm_sample_rate = 44100
mic_num = 1 #1 or 2
pcm_channel_cnt = 2
pcm_bit_width = 16
pcm_frame_size = 1024
pcm_cap_duration = 30
pcm_ai_gain = 100
ans_en = 0
ans_mode = 3
agc_en = 0
agc_target_db = 0
agc_max_gain_db = 30

View File

@@ -1,10 +0,0 @@
########### paramter (ref to tulip_cedarx.conf)############
[parameter]
pcm_file_path = "/usr/share/startup.wav"
pcm_sample_rate = 44100
pcm_channel_cnt = 2
pcm_bit_width = 16
pcm_frame_size = 1024
ao_volume = 80
log_level = 0
ao_softvolume = 0 #[0,100]

View File

@@ -1,10 +0,0 @@
########### paramter (ref to tulip_cedarx.conf)############
[parameter]
pcm_file_path = "/mnt/SDCARD/sample_ai_pcm.wav"
pcm_sample_rate = 44100
pcm_channel_cnt = 2
pcm_bit_width = 16
pcm_frame_size = 1024
ao_volume = 80
log_level = 0
ao_softvolume = 0 #[0,100]

View File

@@ -0,0 +1,73 @@
########### paramter (ref to tulip_cedarx.conf)############
[parameter]
main_isp = 1
main_vipp = 1
main_src_width = 800
main_src_height = 600
main_pixel_format = "aw_lbc_2_0x" #nv21,nv12,yu12,yv12;aw_lbc_2_5x,aw_lbc_2_0x,aw_lbc_1_5x,aw_lbc_1_0x
main_wdr_enable = 0
main_vi_buf_num = 3
main_src_frame_rate = 30 #fps
main_viChn = 1 #-1:disale main stream
main_venc_chn = 4 #-1:disale main stream
main_encode_type = "H.265"
main_encode_width = 800 #1280x720->720p, 1920x1080->1080p, 2304x1296->3M, 2560×1440->2k, 3840x2160->4k, 7680x4320->8k
main_encode_height = 600
main_encode_frame_rate = 30 #fps
main_encode_bitrate = 1572864 #5M:5242880, 2M:2097152, 1.5M:1572864, 1M:1048576
main_file_path = #"/mnt/extsd/mainStream.raw" #if no path is specified, it will not be saved.
main_online_en = 0
main_online_share_buf_num = 2
main_encpp_enable = 1
sub_isp = 1
sub_vipp = 5
sub_src_width = 640
sub_src_height = 360
sub_pixel_format = "aw_lbc_2_0x" #nv21,nv12,yu12,yv12;aw_lbc_2_5x,aw_lbc_2_0x,aw_lbc_1_5x,aw_lbc_1_0x
sub_wdr_enable = 0
sub_vi_buf_num = 3
sub_src_frame_rate = 20 #fps
sub_vipp_crop_en = 1
sub_vipp_crop_rect_x = 0
sub_vipp_crop_rect_y = 0
sub_vipp_crop_rect_w = 1888
sub_vipp_crop_rect_h = 1072
sub_viChn = -1 #-1:disale sub stream
sub_venc_chn = -1 #-1:disale sub stream
sub_encode_type = "H.264"
sub_encode_width = 640 #1280x720->720p, 1920x1080->1080p, 2560×1440->2k, 3840x2160->4k, 7680x4320->8k
sub_encode_height = 360
sub_encode_frame_rate = 20 #fps
sub_encode_bitrate = 256000 #5M:5242880, 2M:2097152, 1M:1048576, 0.5M:512000
sub_file_path = #"/mnt/extsd/subStream.raw" #if no path is specified, it will not be saved.
sub_encpp_enable = 1
sub_lapse_viChn = -1 #-1:disale sub lapse stream
sub_lapse_venc_chn = -1 #-1:disale sub lapse stream
sub_lapse_encode_type = "H.264"
sub_lapse_encode_width = 640 #1280x720->720p, 1920x1080->1080p, 2560×1440->2k, 3840x2160->4k, 7680x4320->8k
sub_lapse_encode_height = 360
sub_lapse_encode_frame_rate = 20 #fps
sub_lapse_encode_bitrate = 256000 #5M:5242880, 2M:2097152, 1M:1048576, 0.5M:512000
sub_lapse_file_path = #"/mnt/extsd/subLapseStream.raw" #if no path is specified, it will not be saved.
sub_lapse_time = 1000000 #unit:us
sub_lapse_encpp_enable = 1
isp_ve_linkage_enable = 1
isp_ve_linkage_stream_channel = 0 #0:main stream, 1:sub stream, 2:sub lapse stream
wb_yuv_enable = 0
wb_yuv_buf_num = 20
wb_yuv_start_index = 0
wb_yuv_total_cnt = 100
wb_yuv_stream_channel = 0 #0:main stream, 1:sub stream, 2:sub lapse stream
wb_yuv_file_path = "/mnt/extsd/wb_yuv.yuv"
rtsp_net_type = 4 #RTSP Network type, 0: "lo", 1: "eth0", 2: "br0", 3: "wlan0" 4: "usb0"
test_duration = 0 #unit:s, 0:Infinite duration.

View File

@@ -2,19 +2,19 @@
[parameter]
main_isp = 0
main_vipp = 4
main_src_width = 1280
main_src_height = 720
main_vipp = 0
main_src_width = 800
main_src_height = 600
main_pixel_format = "aw_lbc_2_0x" #nv21,nv12,yu12,yv12;aw_lbc_2_5x,aw_lbc_2_0x,aw_lbc_1_5x,aw_lbc_1_0x
main_wdr_enable = 0
main_vi_buf_num = 3
main_src_frame_rate = 20 #fps
main_src_frame_rate = 30 #fps
main_viChn = 0 #-1:disale main stream
main_venc_chn = 0 #-1:disale main stream
main_encode_type = "H.265"
main_encode_width = 1280 #1280x720->720p, 1920x1080->1080p, 2304x1296->3M, 2560×1440->2k, 3840x2160->4k, 7680x4320->8k
main_encode_height = 720
main_encode_frame_rate = 20 #fps
main_encode_width = 800 #1280x720->720p, 1920x1080->1080p, 2304x1296->3M, 2560×1440->2k, 3840x2160->4k, 7680x4320->8k
main_encode_height = 600
main_encode_frame_rate = 30 #fps
main_encode_bitrate = 1572864 #5M:5242880, 2M:2097152, 1.5M:1572864, 1M:1048576
main_file_path = #"/mnt/extsd/mainStream.raw" #if no path is specified, it will not be saved.
main_online_en = 0
@@ -67,7 +67,7 @@ wb_yuv_total_cnt = 100
wb_yuv_stream_channel = 0 #0:main stream, 1:sub stream, 2:sub lapse stream
wb_yuv_file_path = "/mnt/extsd/wb_yuv.yuv"
rtsp_net_type = 3 #RTSP Network type, 0: "lo", 1: "eth0", 2: "br0", 3: "wlan0"
rtsp_net_type = 4 #RTSP Network type, 0: "lo", 1: "eth0", 2: "br0", 3: "wlan0" 4: "usb0"
test_duration = 0 #unit:s, 0:Infinite duration.

View File

@@ -1,44 +0,0 @@
########### paramter (ref to tulip_cedarx.conf)############
[parameter]
capture_width = 1920
capture_height = 1080
display_x = 0
display_y = 0
display_width = 1280
display_height = 800
layer_num = 0
isp_dev = 0
vipp_dev = 0
capture_width2 = 0
capture_height2 = 640
display_x2 = 0
display_y2 = 0
display_width2 = 0
display_height2 = 640
layer_num2 = 4
isp_dev2 = 0
vipp_dev2 = 4
capture_width3 = 0
capture_height3 = 360
display_x3 = 240
display_y3 = 320
display_width3 = 0
display_height3 = 320
layer_num3 = 5
isp_dev3 = 0
vipp_dev3 = 0
add_ui_layer = 0
ui_test_layer = 9
ui_display_width = 480
ui_display_height = 640
# disp_type is lcd, hdmi, cvbs
disp_type = "lcd"
# pic_format is yu12, yv12, nv21, nv12, nv21s
pic_format = nv21
frame_rate = 20
test_duration = 0 #unit:s

View File

@@ -10,6 +10,7 @@ usage() {
echo " adb, support adb function"
echo " uvc, support uvc function"
echo " uvc,uac1 support uvc and uac1 function"
echo " rndis support rndis function"
echo "example:"
echo "$name uvc"
echo ""
@@ -242,6 +243,22 @@ set_usb_function() {
enable_adb
echo "Tina ADB&UAC1" > /sys/kernel/config/usb_gadget/g1/strings/0x409/product
elif [ $1 == "rndis" ]; then
mkdir /sys/kernel/config/usb_gadget/g1/functions/rndis.usb0
echo "Tina RNDIS" > /sys/kernel/config/usb_gadget/g1/strings/0x409/product
ln -s /sys/kernel/config/usb_gadget/g1/functions/rndis.usb0/ /sys/kernel/config/usb_gadget/g1/configs/c.1/rndis.usb0
ls /sys/class/udc/ | xargs echo > /sys/kernel/config/usb_gadget/g1/UDC
elif [ $1 == "adb,rndis" ]; then
[ -d /sys/kernel/config/usb_gadget/g1/functions/rndis.usb0] || {
mkdir /sys/kernel/config/usb_gadget/g1/functions/rndis.usb0
}
ln -s /sys/kernel/config/usb_gadget/g1/functions/rndis.usb0/ /sys/kernel/config/usb_gadget/g1/configs/c.1/rndis.usb0
ls /sys/class/udc/ | xargs echo > /sys/kernel/config/usb_gadget/g1/UDC
enable_adb
echo 0xef > /sys/kernel/config/usb_gadget/g1/bDeviceClass
echo 0x02 > /sys/kernel/config/usb_gadget/g1/bDeviceSubClass
echo 0x01 > /sys/kernel/config/usb_gadget/g1/bDeviceProtocol
echo "Tina ADB,RNDIS" > /sys/kernel/config/usb_gadget/g1/strings/0x409/product
fi
echo $udc_controller > /sys/kernel/config/usb_gadget/g1/UDC
@@ -308,3 +325,21 @@ if [ $1 == "adb,uac1" -o $1 == "uac1,adb" ]; then
fi
return
fi
if [ $1 == "rndis" ]; then
# MODULES_DIR="/lib/modules/`uname -r`"
# insmod $MODULES_DIR/sunxi_usb_udc.ko
if [ $# == 3 ]; then
set_usb_function rndis $2 $3
else
set_usb_function rndis 0x0525 0xa4a2
fi
fi
if [ $1 == "adb,rndis" ]; then
# MODULES_DIR="/lib/modules/`uname -r`"
# insmod $MODULES_DIR/sunxi_usb_udc.ko
if [ $# == 3 ]; then
set_usb_function adb,rndis $2 $3
else
set_usb_function adb,rndis 0x0525 0xa4a2
fi
fi