mirror of
https://github.com/LuckfoxTECH/luckfox-pico.git
synced 2026-01-18 03:28:19 +01:00
Pullrequest mis5001 clear patch 0305 (#242)
* project/app : Add uvc_app_tiny application Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * project/cfg/BoardConfig_IPC/overlay : Add Ubuntu system support for Rockit and RKNN libraries Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * sysdrv/source/kernel/drivers/of : Add support for dynamic device tree Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/source/kernel/drivers/usb/serial : Add CH343 driver support Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/source/kernel/drivers/staging : Disable partial logging of fbtft Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/source/kernel/drivers/pinctrl/pinctrl-rockchip.h : Fix pinctrl configuration failure issue Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/source/kernel/include/dt-bindings/soc/rockchip,boot-mode.h : Add support for the reboot U-Boot command in the BusyBox system Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/source/kernel/drivers/video : Add logo display support for LF40-480480-ARK and LF40-720720-ARK Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/source/kernel/arch/arm/boot/dts : Add device tree files for the Luckfox RV1103/RV1106 series boards Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/source/kernel/arch/arm/configs : Add device tree files for the Luckfox RV1103/RV1106 series boards Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/source/uboot/u-boot/drivers/mmc/mmc.c : Fix the issue where some Micro SD cards fail to boot Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/source/uboot/u-boot/common/image-fit.c : Add U-Boot support for luckfox-config Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/source/uboot/rkbin/bin/rv11 : Add firmware with a serial baud rate of 115200 and back up the original firmware Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/source/uboot/u-boot/arch/arm/dts : Add device tree files for the Luckfox RV1103/RV1106 series boards Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/source/uboot/u-boot/configs : Add defconfig files for the Luckfox RV1103/RV1106 series boards Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/source/uboot/u-boot : Add support for the reboot U-Boot command in the BusyBox system Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/source/kernel/drivers/media/i2c : Add MIS5001 driver support Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/source/kernel/arch/arm : Add default support for MIS5001 on Luckfox RV1106 series boards Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/tools/board : Delete irrelevant overwrite files and patch files Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/drv_ko/insmod_ko.sh : Register mis5001 driver during boot process Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * media/isp/release_camera_engine_rkaiq_rv1106_arm-rockchip830-linux-uclibcgnueabihf/isp_iqfiles : Add mis5001 iqfile Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * project/app/rkipc/rkipc/src/rv1106_ipc : Add rkipc application support for mis5001 sensor Signed-off-by: eng29 <eng29@luckfox.com> * project/cfg/BoardConfig_IPC : Enable default retrieval of mis5001 iqfile and include ROCKIT and RKNN libraries of RV1106 series board Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * project/build.sh : Remove operations related to applying and deleting patches Signed-off-by: eng29 <eng29@luckfox.com> * project/build.sh : Modify build system menu description; Apply lightweight system processing only during Buildroot and BusyBox system compilation Signed-off-by: eng29 <eng29@luckfox.com> * sysdrv/tools/board/buildroot/luckfox_pico_w_defconfig : Add pppd and pgrep for 4G module Signed-off-by: luckfox-eng29 <eng29@luckfox.com> * sysdrv/tools/board/kernel/rv1106-luckfox-pico-ultra-ipc.dtsi : Add uart4m1 support for lastest luckfox-config tool Signed-off-by: eng29 <eng29@luckfox.com> --------- Signed-off-by: luckfox-eng29 <eng29@luckfox.com> Signed-off-by: eng29 <eng29@luckfox.com>
This commit is contained in:
105
project/app/uvc_app_tiny/uvc_app/RkLunch.sh
Executable file
105
project/app/uvc_app_tiny/uvc_app/RkLunch.sh
Executable file
@@ -0,0 +1,105 @@
|
||||
#!/bin/sh
|
||||
check_usb_state()
|
||||
{
|
||||
if [[ ! -f "/oem/usr/bin/rk_mpi_uvc" && ! -f "/usr/bin/rk_mpi_uvc" ]]; then
|
||||
return 1
|
||||
fi
|
||||
PID=`ps |grep rk_mpi_uvc |grep -v grep | wc -l`
|
||||
if [ $PID -le 0 ];then
|
||||
echo " exit rk_mpi_uvc ,restart it for uvc recovery..."
|
||||
killall adbd
|
||||
sleep 1
|
||||
killall -9 adbd
|
||||
rm -rf /sys/kernel/config/usb_gadget/rockchip/configs/b.1/f*
|
||||
echo none > /sys/kernel/config/usb_gadget/rockchip/UDC
|
||||
rmdir /sys/kernel/config/usb_gadget/rockchip/functions/ffs.adb
|
||||
rmdir /sys/kernel/config/usb_gadget/rockchip/functions/uac*
|
||||
UDC=`ls /sys/class/udc/| awk '{print $1}'`
|
||||
echo $UDC > /sys/bus/platform/drivers/dwc3/unbind
|
||||
echo $UDC > /sys/bus/platform/drivers/dwc3/bind
|
||||
/oem/usr/bin/usb_config.sh uac1 #off #disable adb
|
||||
if [ -d "/oem/usr/share/iqfiles" ];then
|
||||
rk_mpi_uvc -c /tmp/rkuvc.ini -a /oem/usr/share/iqfiles &
|
||||
else
|
||||
rk_mpi_uvc &
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
post_chk()
|
||||
{
|
||||
#TODO: ensure /userdata mount done
|
||||
cnt=0
|
||||
while [ $cnt -lt 30 ];
|
||||
do
|
||||
cnt=$(( cnt + 1 ))
|
||||
if mount | grep -w userdata; then
|
||||
break
|
||||
fi
|
||||
sleep .1
|
||||
done
|
||||
|
||||
# if ko exist, install ko first
|
||||
default_ko_dir=/ko
|
||||
if [ -f "/oem/usr/ko/insmod_ko.sh" ];then
|
||||
default_ko_dir=/oem/usr/ko
|
||||
fi
|
||||
if [ -f "$default_ko_dir/insmod_ko.sh" ];then
|
||||
cd $default_ko_dir && sh insmod_ko.sh && cd -
|
||||
fi
|
||||
|
||||
# if /data/rkuvc not exist, cp /usr/share
|
||||
rkuvc_ini=/tmp/rkuvc.ini
|
||||
default_rkuvc_ini=/usr/share/rkuvc.ini
|
||||
if [ ! -f "$default_rkuvc_ini" ];then
|
||||
default_rkuvc_ini=/oem/usr/share/rkuvc.ini
|
||||
fi
|
||||
if [ ! -f "$default_rkuvc_ini" ];then
|
||||
echo "Error: not found rkuvc.ini !!!"
|
||||
exit -1
|
||||
fi
|
||||
if [ ! -f "$rkuvc_ini" ]; then
|
||||
cp $default_rkuvc_ini $rkuvc_ini -f
|
||||
fi
|
||||
|
||||
export rt_log_level=3
|
||||
export rk_mpi_uvc_log_level=2
|
||||
export uac_app_log_level=2
|
||||
|
||||
touch /tmp/uvc_no_timeout
|
||||
/oem/usr/bin/usb_config.sh uac1
|
||||
ifconfig lo 127.0.0.1
|
||||
|
||||
if [ -d "/oem/usr/share/iqfiles" ];then
|
||||
rk_mpi_uvc -c /tmp/rkuvc.ini -a /oem/usr/share/iqfiles &
|
||||
else
|
||||
rk_mpi_uvc &
|
||||
fi
|
||||
|
||||
while true
|
||||
do
|
||||
sleep 2
|
||||
if [ -f "/tmp/uvc_stop_check" ]; then
|
||||
echo " stop check usb state sh " && break
|
||||
else
|
||||
check_usb_state
|
||||
fi
|
||||
|
||||
if [ -f "/tmp/reboot_loader" ]; then
|
||||
echo "exec reboot loader cmd..."
|
||||
reboot loader &
|
||||
fi
|
||||
done
|
||||
}
|
||||
start_app()
|
||||
{
|
||||
if [ -f "/etc/init.d/S50usbdevice" ];then
|
||||
mv /etc/init.d/S50usbdevice /etc/S50usbdevice -f
|
||||
fi
|
||||
echo "##### start uvc app ..."
|
||||
post_chk &
|
||||
}
|
||||
ulimit -c unlimited
|
||||
echo "/data/core-%p-%e" > /proc/sys/kernel/core_pattern
|
||||
|
||||
start_app
|
||||
Reference in New Issue
Block a user