From c59ee733197f5867e68edea71b390bc959f22ca8 Mon Sep 17 00:00:00 2001 From: Jan Koppe Date: Thu, 15 Feb 2024 22:07:44 +0100 Subject: [PATCH] rootfs_enc1v2_hi3520d_20230831 --- rootfs/etc/fw_env.config | 1 + rootfs/link/bin/Encoder | Bin 1851024 -> 1851024 bytes rootfs/link/config/rtty.json | 1 + rootfs/link/config/verLogs.json | 11 +++ rootfs/link/config/version.json | 2 +- rootfs/link/shell/dhcp_echo.sh | 13 ++++ rootfs/link/shell/init.sh | 1 + rootfs/link/shell/init/rtty.sh | 32 +++++++++ rootfs/link/shell/init/service.sh | 5 ++ rootfs/link/shell/update.sh | 7 ++ rootfs/link/web/func.php | 22 +++--- rootfs/link/web/link/api/overlay.php | 71 ++++++++++++------- rootfs/link/web/link/monitor.php | 8 --- rootfs/link/web/link/rpc/rpc_client.php | 7 ++ rootfs/link/web/mix.php | 34 ++++++++- rootfs/link/web/rproxy.php | 88 ++++++++++++++++++++++-- rootfs/usr/bin/fw_printenv | Bin 0 -> 10496 bytes rootfs/usr/bin/fw_setenv | Bin 0 -> 10496 bytes rootfs/usr/bin/rtty | Bin 0 -> 55340 bytes rootfs/usr/lib/libLinkBase.so.1.0.0 | Bin 254028 -> 254536 bytes rootfs/usr/lib/libLinkIO.so.1.0.0 | Bin 1049772 -> 1049892 bytes rootfs/usr/lib/libLinkNDI.so.1.0.0 | Bin 275788 -> 280168 bytes rootfs/usr/lib/libLinkRTLP.so.1.0.0 | Bin 610912 -> 636620 bytes rootfs/usr/lib/libavformat.so.58.23.100 | Bin 2818496 -> 2821152 bytes rootfs/usr/lib/libev.so | 1 + rootfs/usr/lib/libev.so.4 | 1 + rootfs/usr/lib/libev.so.4.0.0 | Bin 0 -> 168568 bytes rootfs/usr/lib/libubootenv.so | 1 + rootfs/usr/lib/libubootenv.so.0 | 1 + rootfs/usr/lib/libubootenv.so.0.3.3 | Bin 0 -> 24864 bytes rootfs/usr/php/etc/php-fpm.conf | 1 + 31 files changed, 261 insertions(+), 47 deletions(-) create mode 100644 rootfs/etc/fw_env.config create mode 100644 rootfs/link/config/rtty.json create mode 100644 rootfs/link/shell/dhcp_echo.sh create mode 100644 rootfs/link/shell/init/rtty.sh create mode 100644 rootfs/usr/bin/fw_printenv create mode 100644 rootfs/usr/bin/fw_setenv create mode 100644 rootfs/usr/bin/rtty create mode 120000 rootfs/usr/lib/libev.so create mode 120000 rootfs/usr/lib/libev.so.4 create mode 100644 rootfs/usr/lib/libev.so.4.0.0 create mode 120000 rootfs/usr/lib/libubootenv.so create mode 120000 rootfs/usr/lib/libubootenv.so.0 create mode 100644 rootfs/usr/lib/libubootenv.so.0.3.3 diff --git a/rootfs/etc/fw_env.config b/rootfs/etc/fw_env.config new file mode 100644 index 0000000..d7a234b --- /dev/null +++ b/rootfs/etc/fw_env.config @@ -0,0 +1 @@ +/dev/mtd0 0x0 0x80000 0x40000 diff --git a/rootfs/link/bin/Encoder b/rootfs/link/bin/Encoder index 3624b0a965206712507d7d23609faeffa433d4a1..44aaac71bb1ecd105b1ea530e9cd33b5e2f31336 100644 GIT binary patch delta 140 zcmWN=O$vfQ0D#eEbW%r6Ev@`HLIfp(px02!3dn}l{LJZFdYfsOWwNA>pm}kp^W%i zZ3HD9Dr%nT(&L3b1BQ$k^U8!NGu}3B?vJ1U?ms8=&zBu!&VnT?)@;~rgY2g90EU(# Avj6}9 diff --git a/rootfs/link/config/rtty.json b/rootfs/link/config/rtty.json new file mode 100644 index 0000000..89d9aa6 --- /dev/null +++ b/rootfs/link/config/rtty.json @@ -0,0 +1 @@ +{"enable":false,"ip":"191.80.63.50","id":"00000001","des":"编码板","token":""} diff --git a/rootfs/link/config/verLogs.json b/rootfs/link/config/verLogs.json index 30ee973..c75c59e 100644 --- a/rootfs/link/config/verLogs.json +++ b/rootfs/link/config/verLogs.json @@ -1,4 +1,15 @@ [ + { + "version": "2.5.0 build 20230831", + "logs": [ + "修正http接口获取/设置水印异常问题", + "修正srt输出,latency参数值不能大于1000的问题", + "优化ENC1V3与ENCSHV2机型的4K输出画质", + "ENC1V3、ENCSHV2、ENC5V2机型,HDMI输出增加水平镜像功能", + "高级设置下远程访问页面,新增Rtty访问设备方式", + "系统底层优化" + ] + }, { "version": "2.4.0 build 20230731", "logs": [ diff --git a/rootfs/link/config/version.json b/rootfs/link/config/version.json index 32d7550..63f4527 100644 --- a/rootfs/link/config/version.json +++ b/rootfs/link/config/version.json @@ -1,5 +1,5 @@ { "app": "2.0.0 build 20220512_869", "sdk": "2.0.0 build 20220518_20716", - "sys": "2.4.0 build 20230731" + "sys": "2.5.0 build 20230831" } diff --git a/rootfs/link/shell/dhcp_echo.sh b/rootfs/link/shell/dhcp_echo.sh new file mode 100644 index 0000000..ece648f --- /dev/null +++ b/rootfs/link/shell/dhcp_echo.sh @@ -0,0 +1,13 @@ +#!/bin/sh +if [ $1 != "bound" ]; then + exit 0 +fi +if [ "$ip" == "" ]; then + exit 0 +fi +echo "dhcp_result" +echo "dev:"$interface +echo "ip:"$ip +echo "mask:"$subnet +echo "gw:"$router +echo "dns:"$dns diff --git a/rootfs/link/shell/init.sh b/rootfs/link/shell/init.sh index 8e00209..dcd250a 100644 --- a/rootfs/link/shell/init.sh +++ b/rootfs/link/shell/init.sh @@ -14,6 +14,7 @@ else /link/shell/netManager.sh /link/shell/init/filesystem.sh /link/shell/init/service.sh +/link/shell/init/rtty.sh /link/shell/app.sh fi diff --git a/rootfs/link/shell/init/rtty.sh b/rootfs/link/shell/init/rtty.sh new file mode 100644 index 0000000..2f2f4cd --- /dev/null +++ b/rootfs/link/shell/init/rtty.sh @@ -0,0 +1,32 @@ +. /link/shell/util/hardware.sh +cfg=/link/config/rtty.json +ver=/link/config/version.json + +#model=${model:4} +sys=`jq -r .sys $ver` +build=`echo $sys | sed 's/\"//g' | awk '{split($1, arr, " "); print arr[1]}'` + +( + while [ true ] + do + enable=`jq -r .enable $cfg` + if [ "$enable" == "true" ] ;then + ip=`jq -r .ip $cfg` + id=`jq -r .id $cfg` + des=`jq -r .des $cfg` + token=`jq -r .token $cfg` + if [ "$des" == "" ];then + des=$model" build "$build + else + des=$des" ( "$model" build "$build" )" + fi + if [ "$token" == "" ] ;then + rtty -I "$id" -h $ip -p 5912 -a -v -d "$des" + else + rtty -I "$id" -h $ip -p 5912 -a -v -d "$des" -t $token + fi + fi + sleep 2 + done +) & + diff --git a/rootfs/link/shell/init/service.sh b/rootfs/link/shell/init/service.sh index cf9ab58..2f2af33 100644 --- a/rootfs/link/shell/init/service.sh +++ b/rootfs/link/shell/init/service.sh @@ -47,3 +47,8 @@ if [ `jget sls` == "true" ]; then fi /link/shell/ntp.sh & + +frp_enable=$(cat /link/config/rproxy/frp_enable |awk '{printf "%s",$1}') +if [ "$frp_enable" == "true" ]; then +/link/shell/frp.sh & +fi diff --git a/rootfs/link/shell/update.sh b/rootfs/link/shell/update.sh index e91a62c..a8bf1dc 100644 --- a/rootfs/link/shell/update.sh +++ b/rootfs/link/shell/update.sh @@ -40,6 +40,11 @@ if [ ! -z "$(ls -A /link/update)" ]; then rm -rf /tmp/history_config rm /link/config/auto/no_user_setting + + if [ -f "/link/config/uboot_env.txt" ]; then + fw_setenv -s /link/config/uboot_env.txt + rm /link/config/uboot_env.txt + fi if [ -f "/link/config/reboot" ]; then rm /link/config/reboot @@ -55,3 +60,5 @@ fi + + diff --git a/rootfs/link/web/func.php b/rootfs/link/web/func.php index 1367546..2156b82 100644 --- a/rootfs/link/web/func.php +++ b/rootfs/link/web/func.php @@ -453,19 +453,21 @@ function formatBytes($total) { function getDiskSpace() { global $result; $mountDir = '/root/usb'; - $output = shell_exec('df ' . $mountDir); + $output = shell_exec('df -h ' . $mountDir); if(strpos($output, $mountDir) != false) { - $totalSpace = disk_total_space($mountDir); - $freeSpace = disk_free_space($mountDir); - $usedSpace = $totalSpace - $freeSpace; +// $totalSpace = disk_total_space($mountDir); +// $freeSpace = disk_free_space($mountDir); +// $usedSpace = $totalSpace - $freeSpace; + $lines = explode("\n", trim($output)); + $dataLine = $lines[count($lines) - 1]; + $totalSpace = preg_split('/\s+/', $dataLine)[1]; + $usedSpace = preg_split('/\s+/', $dataLine)[2]; - $result->total = formatBytes($totalSpace); - $result->free = formatBytes($freeSpace); - $result->used = formatBytes($usedSpace); + $result->total = $totalSpace; + $result->used = $usedSpace; } else { $result->total = 0; - $result->free = 0; $result->used = 0; } } @@ -571,6 +573,10 @@ function getAliase() { $result->result = $ret["data"]; } +function reloadRtty() { + exec("pkill rtty"); +} + function send($url, $data = null){ global $result; $context = null; diff --git a/rootfs/link/web/link/api/overlay.php b/rootfs/link/web/link/api/overlay.php index 0cfe8db..59ffe05 100644 --- a/rootfs/link/web/link/api/overlay.php +++ b/rootfs/link/web/link/api/overlay.php @@ -14,20 +14,27 @@ class Overlay extends Verify $this->link_verify(); $conf = $this->load_conf('/link/config/config.json'); $result = []; - foreach ($conf as $item) { - if (!$item['type'] == 'file') - continue; + $overlayConf = []; + if(file_exists("/link/config/auto/overlay.json")) + $overlayConf = $this->load_conf('/link/config/auto/overlay.json'); + + for($i=0;$i $item['id'], 'name' => $item['name'], 'type' => $item['type'], 'enable'=> $item['enable'], 'enable2'=> $item['enable2'], - 'overlay' => $item['overlay'] ); + if(count($overlayConf) > 0) + $obj['overlay'] = $overlayConf[$i]; + else + $obj['overlay'] = $item['overlay']; array_push($result, $obj); } + return $this->handleRet($result, "success", "执行完成", "execution is completed"); } catch (Exception $ex) { return $this->handleRet('', 'error', $ex->getMessage(), $ex->getMessage()); @@ -42,31 +49,47 @@ class Overlay extends Verify $this->check_args($params); $conf = $this->load_conf('/link/config/config.json'); - for($i=0;$i -1) - $conf[$index] = $chn; + $client = new RpcClient(); + $client->update_overlay($overlayConf); } + else + { + for($i=0;$iupdate_enc($conf); + $id = $param['id']; + + $chn=null;$index=-1; + for($j=0;$j -1) + $conf[$index] = $chn; + } + $client = new RpcClient(); + $client->update_enc($conf); + } return $this->handleRet("","success","执行完成","execution is completed"); } diff --git a/rootfs/link/web/link/monitor.php b/rootfs/link/web/link/monitor.php index 6dabda2..19ed1a9 100644 --- a/rootfs/link/web/link/monitor.php +++ b/rootfs/link/web/link/monitor.php @@ -1,13 +1,5 @@ send(); return $ret; } + + public function update_overlay($param) + { + $client = new Client(self::enc_url); + $client->query('enc.updateOverlay',[json_encode($param,JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT)]); + $client->send(); + } } \ No newline at end of file diff --git a/rootfs/link/web/mix.php b/rootfs/link/web/mix.php index 3e38527..f895f49 100644 --- a/rootfs/link/web/mix.php +++ b/rootfs/link/web/mix.php @@ -174,6 +174,23 @@ include("head.php"); + + +
+ +
+ +
+
+ +
+ +
+ +
+ +
+
+