diff --git a/projects/hi3516cv500_ultimate_caminos/general/package/all-patches/linux/0018-hi3516cv500-caminos-identity.patch b/projects/hi3516cv500_ultimate_caminos/general/package/all-patches/linux/0018-hi3516cv500-caminos-identity.patch new file mode 100644 index 0000000..107b91b --- /dev/null +++ b/projects/hi3516cv500_ultimate_caminos/general/package/all-patches/linux/0018-hi3516cv500-caminos-identity.patch @@ -0,0 +1,101 @@ +--- a/arch/arm/boot/dts/hi3516cv500.dtsi 2023-06-02 10:57:21.000000000 +0000 ++++ b/arch/arm/boot/dts/hi3516cv500.dtsi 2023-10-31 15:26:14.061254438 +0000 +@@ -198,6 +198,7 @@ + reg = <0x12051000 0x1000>; + clocks = <&clk_3m>,<&clk_apb>; + clock-names = "wdog_clk", "apb_pclk"; ++ ysctrltatus = "disabled"; + status = "disabled"; + }; + +@@ -229,7 +230,7 @@ + dmas = <&hiedmacv310_0 19 19>, <&hiedmacv310_0 18 18>; + dma-names = "tx","rx"; + #endif +- status = "disabled"; ++ status = "okay"; + }; + #endif + uart2: uart@120a2000 { +@@ -680,10 +681,18 @@ + + osal: osal { + compatible = "hisilicon,osal"; ++ anony = <1>; ++ setup_zones = "anonymous,0,0x88000000,384M"; ++ setup_allocator = "hisi"; ++ mmap_zones = [00]; + }; + + sys_config: sys_config { + compatible = "hisilicon,sys_config"; ++ g_online_flag = <0>; ++ g_cmos_yuv_flag = <0>; ++ sensor_list = "sns0=imx327,sns1=imx327"; ++ chip_list = "hi3516cv500"; + }; + + sys: sys@12010000 { +@@ -739,6 +748,9 @@ + reg-names = "vgs0"; + interrupts = <0 38 4>; + interrupt-names = "vgs0"; ++ max_vgs_job = <128>; ++ max_vgs_task = <200>; ++ max_vgs_node = <200>; + }; + + vo: vo@11440000 { +@@ -755,6 +767,7 @@ + reg-names = "hifb", "sys"; + interrupts = <0 59 4>, <0 51 4>; + interrupt-names = "hifb", "hifb_soft"; ++ video = "hifb:vram0_size:16200"; + }; + + tde: tde@11210000 { +@@ -775,6 +788,9 @@ + reg-names = "gdc", "nnie0"; + interrupts = <0 42 4>, <0 41 4>; + interrupt-names = "gdc", "nnie0"; ++ max_gdc_job = <32>; ++ max_gdc_task = <64>; ++ max_gdc_node = <64>; + }; + + gzip: gzip@11200000 { +@@ -803,6 +819,7 @@ + + venc: venc { + compatible = "hisilicon,hisi-venc"; ++ VencMaxChnNum = <16>; + }; + + scd: scd@10030000 { +@@ -833,6 +850,8 @@ + reg-names = "nnie0","gdc"; + interrupts = <0 41 4>,<0 42 4>; + interrupt-names = "nnie0","gdc"; ++ nnie_save_power = [01]; ++ nnie_max_tskbuf_num = [00 20]; + }; + + ive: ive@11230000 { +@@ -841,6 +860,8 @@ + reg-names = "ive"; + interrupts = <0 37 4>; + interrupt-names = "ive"; ++ save_power = [00]; ++ max_node_num = [02 00]; + }; + + adc: adc@120e0000 { +@@ -849,7 +870,7 @@ + interrupts = <0 65 4>; + resets = <&clock 0x1bc 2>; + reset-names = "lsadc-crg"; +- status = "disabled"; ++ status = "okay"; + }; + ir: ir@120f0000 { + compatible = "hisilicon,hi_ir"; diff --git a/projects/t31_lite_convoy/general/overlay/etc/TZ b/projects/t31_lite_convoy/general/overlay/etc/TZ new file mode 100644 index 0000000..ddc02b0 --- /dev/null +++ b/projects/t31_lite_convoy/general/overlay/etc/TZ @@ -0,0 +1 @@ +<+06>-6 \ No newline at end of file diff --git a/projects/t31_lite_convoy/general/overlay/etc/init.d/S94dn-monitor b/projects/t31_lite_convoy/general/overlay/etc/init.d/S94dn-monitor new file mode 100755 index 0000000..757ae84 --- /dev/null +++ b/projects/t31_lite_convoy/general/overlay/etc/init.d/S94dn-monitor @@ -0,0 +1,10 @@ +#!/bin/sh + + +if [ /usr/share/openipc/dn-monitor.sh ]; then + /usr/share/openipc/dn-monitor.sh > /dev/null 2>&1 & +else + echo "The day/night monitor DISABLED" +fi + +exit 0 diff --git a/projects/t31_lite_convoy/general/overlay/etc/majestic.yaml b/projects/t31_lite_convoy/general/overlay/etc/majestic.yaml new file mode 100644 index 0000000..4b0817f --- /dev/null +++ b/projects/t31_lite_convoy/general/overlay/etc/majestic.yaml @@ -0,0 +1,58 @@ +system: + webAdmin: enabled + buffer: 1024 + staticDir: /var/www/majestic +image: + mirror: false + flip: false + rotate: none + contrast: 50 + hue: 50 + saturation: 50 + luminance: 50 +osd: + enabled: false + template: "%a %e %B %Y %H:%M:%S %Z" +nightMode: + enabled: true + irCutPin1: 58 + irCutPin2: 57 +records: + enabled: false + path: /mnt/mmcblk0p1/%F/%H.mp4 + maxUsage: 95 +video0: + enabled: true + codec: h264 +video1: + enabled: false +jpeg: + enabled: true +mjpeg: + size: 640x360 + fps: 5 + bitrate: 1024 +audio: + enabled: false + volume: auto + srate: 8000 +rtsp: + enabled: true + port: 554 +hls: + enabled: false +youtube: + enabled: false +motionDetect: + enabled: true + visualize: true + debug: true +ipeye: + enabled: false +watchdog: + enabled: true + timeout: 10 +outgoing: + enabled: true + server: udp://172.19.32.18:5600 + diff --git a/projects/t31_lite_convoy/general/overlay/etc/timezone b/projects/t31_lite_convoy/general/overlay/etc/timezone new file mode 100644 index 0000000..1894fd1 --- /dev/null +++ b/projects/t31_lite_convoy/general/overlay/etc/timezone @@ -0,0 +1 @@ +Asia/Almaty \ No newline at end of file diff --git a/projects/t31_lite_faceter/general/overlay/usr/bin/dn-monitor.sh b/projects/t31_lite_convoy/general/overlay/usr/share/openipc/dn-monitor.sh similarity index 100% rename from projects/t31_lite_faceter/general/overlay/usr/bin/dn-monitor.sh rename to projects/t31_lite_convoy/general/overlay/usr/share/openipc/dn-monitor.sh diff --git a/projects/t31_lite_convoy/general/overlay/usr/share/openipc/motion_detect.sh b/projects/t31_lite_convoy/general/overlay/usr/share/openipc/motion_detect.sh new file mode 100755 index 0000000..3144a8b --- /dev/null +++ b/projects/t31_lite_convoy/general/overlay/usr/share/openipc/motion_detect.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +echo 0:[$0] 1:[$1] 2:[$2] 3:[$3] 4:[$4] 5:[$5] | logger -t motion diff --git a/projects/t31_lite_faceter/general/overlay/etc/init.d/S94dn-monitor b/projects/t31_lite_faceter/general/overlay/etc/init.d/S94dn-monitor index d892cf1..757ae84 100755 --- a/projects/t31_lite_faceter/general/overlay/etc/init.d/S94dn-monitor +++ b/projects/t31_lite_faceter/general/overlay/etc/init.d/S94dn-monitor @@ -1,8 +1,8 @@ #!/bin/sh -if [ /usr/bin/dn-monitor.sh ]; then - dn-monitor.sh > /dev/null 2>&1 & +if [ /usr/share/openipc/dn-monitor.sh ]; then + /usr/share/openipc/dn-monitor.sh > /dev/null 2>&1 & else echo "The day/night monitor DISABLED" fi diff --git a/projects/t31_lite_zftlab/general/overlay/usr/bin/dn-monitor.sh b/projects/t31_lite_faceter/general/overlay/usr/share/openipc/dn-monitor.sh similarity index 100% rename from projects/t31_lite_zftlab/general/overlay/usr/bin/dn-monitor.sh rename to projects/t31_lite_faceter/general/overlay/usr/share/openipc/dn-monitor.sh diff --git a/projects/t31_lite_faceter/general/overlay/usr/share/openipc/motion_detect.sh b/projects/t31_lite_faceter/general/overlay/usr/share/openipc/motion_detect.sh new file mode 100755 index 0000000..3144a8b --- /dev/null +++ b/projects/t31_lite_faceter/general/overlay/usr/share/openipc/motion_detect.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +echo 0:[$0] 1:[$1] 2:[$2] 3:[$3] 4:[$4] 5:[$5] | logger -t motion diff --git a/projects/t31_lite_zftlab/general/overlay/etc/init.d/S94dn-monitor b/projects/t31_lite_zftlab/general/overlay/etc/init.d/S94dn-monitor index d892cf1..757ae84 100755 --- a/projects/t31_lite_zftlab/general/overlay/etc/init.d/S94dn-monitor +++ b/projects/t31_lite_zftlab/general/overlay/etc/init.d/S94dn-monitor @@ -1,8 +1,8 @@ #!/bin/sh -if [ /usr/bin/dn-monitor.sh ]; then - dn-monitor.sh > /dev/null 2>&1 & +if [ /usr/share/openipc/dn-monitor.sh ]; then + /usr/share/openipc/dn-monitor.sh > /dev/null 2>&1 & else echo "The day/night monitor DISABLED" fi diff --git a/projects/t31_lite_zftlab/general/overlay/usr/share/openipc/dn-monitor.sh b/projects/t31_lite_zftlab/general/overlay/usr/share/openipc/dn-monitor.sh new file mode 100755 index 0000000..d83fe70 --- /dev/null +++ b/projects/t31_lite_zftlab/general/overlay/usr/share/openipc/dn-monitor.sh @@ -0,0 +1,50 @@ +#!/bin/sh + +again_high_target=120 +again_low_target=50 +pollingInterval=4 +led_state=0 +again_led=0 + +led_on(){ + curl http://localhost/night/on && \ + echo LIGHT IS ON +} + +led_off(){ + curl http://localhost/night/off && \ + echo LIGHT IS OFF +} + +main(){ + + echo "...................." + echo "Watching at isp_again > ${again_high_target} to LED ON" + echo "Watching at isp_again < ${again_low_target} to LED OFF" + echo "Polling interval: ${pollingInterval} sec" + echo "...................." + + sleep 10 + led_off + + while true; do + + led_state=$(curl -s http://localhost/metrics | grep ^night_enabled | cut -d' ' -f2) + again_led=$(curl -s http://localhost/metrics | grep ^isp_again | cut -d' ' -f2) + + echo "again_led: "$again_led + + if [ $again_led -lt $again_low_target -a $led_state -eq 1 ] ;then + led_off + fi + + if [ $again_led -gt $again_high_target -a $led_state -eq 0 ] ;then + led_on + fi + + sleep ${pollingInterval} + echo "...................." + done +} + +main diff --git a/projects/t31_lite_zftlab/general/overlay/usr/share/openipc/motion_detect.sh b/projects/t31_lite_zftlab/general/overlay/usr/share/openipc/motion_detect.sh new file mode 100755 index 0000000..3144a8b --- /dev/null +++ b/projects/t31_lite_zftlab/general/overlay/usr/share/openipc/motion_detect.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +echo 0:[$0] 1:[$1] 2:[$2] 3:[$3] 4:[$4] 5:[$5] | logger -t motion