rootfs_enc1v2_hi3520d_20230831

This commit is contained in:
Jan Koppe 2024-02-15 22:07:44 +01:00
parent 79baf85443
commit c59ee73319
Signed by: thunfisch
GPG Key ID: BE935B0735A2129B
31 changed files with 261 additions and 47 deletions

1
rootfs/etc/fw_env.config Normal file
View File

@ -0,0 +1 @@
/dev/mtd0 0x0 0x80000 0x40000

Binary file not shown.

View File

@ -0,0 +1 @@
{"enable":false,"ip":"191.80.63.50","id":"00000001","des":"编码板","token":""}

View File

@ -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", "version": "2.4.0 build 20230731",
"logs": [ "logs": [

View File

@ -1,5 +1,5 @@
{ {
"app": "2.0.0 build 20220512_869", "app": "2.0.0 build 20220512_869",
"sdk": "2.0.0 build 20220518_20716", "sdk": "2.0.0 build 20220518_20716",
"sys": "2.4.0 build 20230731" "sys": "2.5.0 build 20230831"
} }

View File

@ -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

View File

@ -14,6 +14,7 @@ else
/link/shell/netManager.sh /link/shell/netManager.sh
/link/shell/init/filesystem.sh /link/shell/init/filesystem.sh
/link/shell/init/service.sh /link/shell/init/service.sh
/link/shell/init/rtty.sh
/link/shell/app.sh /link/shell/app.sh
fi fi

View File

@ -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
) &

View File

@ -47,3 +47,8 @@ if [ `jget sls` == "true" ]; then
fi fi
/link/shell/ntp.sh & /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

View File

@ -41,6 +41,11 @@ if [ ! -z "$(ls -A /link/update)" ]; then
rm -rf /tmp/history_config rm -rf /tmp/history_config
rm /link/config/auto/no_user_setting 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 if [ -f "/link/config/reboot" ]; then
rm /link/config/reboot rm /link/config/reboot
reboot reboot
@ -55,3 +60,5 @@ fi

View File

@ -453,19 +453,21 @@ function formatBytes($total) {
function getDiskSpace() { function getDiskSpace() {
global $result; global $result;
$mountDir = '/root/usb'; $mountDir = '/root/usb';
$output = shell_exec('df ' . $mountDir); $output = shell_exec('df -h ' . $mountDir);
if(strpos($output, $mountDir) != false) { if(strpos($output, $mountDir) != false) {
$totalSpace = disk_total_space($mountDir); // $totalSpace = disk_total_space($mountDir);
$freeSpace = disk_free_space($mountDir); // $freeSpace = disk_free_space($mountDir);
$usedSpace = $totalSpace - $freeSpace; // $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->total = $totalSpace;
$result->free = formatBytes($freeSpace); $result->used = $usedSpace;
$result->used = formatBytes($usedSpace);
} else { } else {
$result->total = 0; $result->total = 0;
$result->free = 0;
$result->used = 0; $result->used = 0;
} }
} }
@ -571,6 +573,10 @@ function getAliase() {
$result->result = $ret["data"]; $result->result = $ret["data"];
} }
function reloadRtty() {
exec("pkill rtty");
}
function send($url, $data = null){ function send($url, $data = null){
global $result; global $result;
$context = null; $context = null;

View File

@ -14,20 +14,27 @@ class Overlay extends Verify
$this->link_verify(); $this->link_verify();
$conf = $this->load_conf('/link/config/config.json'); $conf = $this->load_conf('/link/config/config.json');
$result = []; $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<count($conf);$i++) {
$item = $conf[$i];
$obj = array( $obj = array(
'id' => $item['id'], 'id' => $item['id'],
'name' => $item['name'], 'name' => $item['name'],
'type' => $item['type'], 'type' => $item['type'],
'enable'=> $item['enable'], 'enable'=> $item['enable'],
'enable2'=> $item['enable2'], 'enable2'=> $item['enable2'],
'overlay' => $item['overlay']
); );
if(count($overlayConf) > 0)
$obj['overlay'] = $overlayConf[$i];
else
$obj['overlay'] = $item['overlay'];
array_push($result, $obj); array_push($result, $obj);
} }
return $this->handleRet($result, "success", "执行完成", "execution is completed"); return $this->handleRet($result, "success", "执行完成", "execution is completed");
} catch (Exception $ex) { } catch (Exception $ex) {
return $this->handleRet('', 'error', $ex->getMessage(), $ex->getMessage()); return $this->handleRet('', 'error', $ex->getMessage(), $ex->getMessage());
@ -42,9 +49,25 @@ class Overlay extends Verify
$this->check_args($params); $this->check_args($params);
$conf = $this->load_conf('/link/config/config.json'); $conf = $this->load_conf('/link/config/config.json');
$mark = file_exists("/link/config/auto/overlay.json");
if($mark)
{
$overlayConf = [];
for($i=0;$i<count($params);$i++) for($i=0;$i<count($params);$i++)
{ {
$param = $params[$i]; $param = $params[$i];
$overlayConf[] = $param['overlay'];
}
$client = new RpcClient();
$client->update_overlay($overlayConf);
}
else
{
for($i=0;$i<count($params);$i++)
{
$param = $params[$i];
$id = $param['id']; $id = $param['id'];
$chn=null;$index=-1; $chn=null;$index=-1;
@ -64,9 +87,9 @@ class Overlay extends Verify
if($index > -1) if($index > -1)
$conf[$index] = $chn; $conf[$index] = $chn;
} }
$client = new RpcClient(); $client = new RpcClient();
$client->update_enc($conf); $client->update_enc($conf);
}
return $this->handleRet("","success","执行完成","execution is completed"); return $this->handleRet("","success","执行完成","execution is completed");
} }

View File

@ -1,13 +1,5 @@
<?php <?php
// +----------------------------------------------------------------------
// | LPH协议 应用程序入口
// +----------------------------------------------------------------------
// | 码云https://gitee.com/LinkPi/
// +----------------------------------------------------------------------
// | 广州灵派科技有限公司 (www.linkpi.cn)
// +----------------------------------------------------------------------
require __DIR__ . '/autoload.php'; require __DIR__ . '/autoload.php';
use Link\App; use Link\App;

View File

@ -87,4 +87,11 @@ class RpcClient
$client->send(); $client->send();
return $ret; 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();
}
} }

View File

@ -174,6 +174,23 @@ include("head.php");
</select> </select>
</div> </div>
</div> </div>
<?php
if ($hardware["chip"]=="SS524V100" || $hardware["chip"]=="SS528V100" || $hardware["chip"]=="HI3531DV200") {
?>
<div class="form-group">
<label class="col-sm-4 control-label">
<cn>左右镜像</cn>
<en>mirror</en>
</label>
<div class="col-sm-6">
<input type="checkbox" zcfg="output.mirror" class="switch form-control">
</div>
</div>
<?php
}
?>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label"> <label class="col-sm-4 control-label">
<cn>视频源</cn> <cn>视频源</cn>
@ -289,6 +306,21 @@ include("head.php");
</select> </select>
</div> </div>
</div> </div>
<?php
if ($hardware["chip"]=="SS524V100" || $hardware["chip"]=="SS528V100" || $hardware["chip"]=="HI3531DV200") {
?>
<div class="form-group">
<label class="col-sm-4 control-label">
<cn>左右镜像</cn>
<en>mirror</en>
</label>
<div class="col-sm-6">
<input type="checkbox" zcfg="output2.mirror" class="switch form-control">
</div>
</div>
<?php
}
?>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label"> <label class="col-sm-4 control-label">
<cn>视频源</cn> <cn>视频源</cn>
@ -433,10 +465,10 @@ include("head.php");
if (config[i].type != "mix") if (config[i].type != "mix")
continue; continue;
mixV = config[i].srcV; mixV = config[i].srcV;
$("#channels").append('<option value="' + config[i].id + '">' + config[i].name + '</option>'); $("#channels").append('<option value="' + config[i].id + '">' + config[i].name + '</option>');
zcfg("#output", config[i]); zcfg("#output", config[i]);
} }
setInterval(show, 300); setInterval(show, 300);

View File

@ -5,7 +5,7 @@ include( "head.php" );
<div class="row"> <div class="row">
<div class="col-md-8 col-md-offset-2"> <div class="col-md-8 col-md-offset-2">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="title"> <div class="panel-heading">
<h3 class="panel-title"> <h3 class="panel-title">
<cn>远程访问</cn> <cn>远程访问</cn>
<en>Reverse Proxy</en> <en>Reverse Proxy</en>
@ -96,13 +96,70 @@ include( "head.php" );
</div> </div>
</div> </div>
--> -->
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
Rtty
</h3>
</div>
<div class="panel-body">
<form class="form-horizontal" id="rtty" role="form">
<div class="form-group">
<label class="col-sm-2 control-label">
<cn>启用</cn>
<en>Enable</en>
</label>
<div class="col-sm-2">
<input type="checkbox" zcfg="enable" class="switch form-control">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">
<cn>描述</cn>
<en>Des</en>
</label>
<div class="col-sm-6">
<input type="text" zcfg="des" class="form-control"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">IP</label>
<div class="col-sm-6">
<input type="text" zcfg="ip" class="form-control"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">ID</label>
<div class="col-sm-6">
<input type="text" zcfg="id" class="form-control" readonly disabled />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Token</label>
<div class="col-sm-6">
<input type="text" zcfg="token" class="form-control"/>
</div>
</div>
<hr>
<div class="form-group">
<button type="button" id="save_rtty" class=" save btn btn-warning col-sm-4 col-sm-offset-4">
<cn>保存</cn><en>Save</en>
</button>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="row"> <div class="row">
<div class="col-md-8 col-md-offset-2"> <div class="col-md-8 col-md-offset-2">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h3 class="panel-title"> <h3 class="panel-title">
frp Frp
</h3> </h3>
</div> </div>
<div class="panel-body"> <div class="panel-body">
@ -127,7 +184,7 @@ include( "head.php" );
</div> </div>
<hr> <hr>
<div class="form-group"> <div class="form-group">
<button type="button" id="save_frp" class=" save btn btn-warning col-sm-6 col-sm-offset-3"> <button type="button" id="save_frp" class=" save btn btn-warning col-sm-4 col-sm-offset-4">
<cn>保存</cn><en>Save</en> <cn>保存</cn><en>Save</en>
</button> </button>
</div> </div>
@ -137,6 +194,7 @@ include( "head.php" );
</div> </div>
</div> </div>
<div class="modal fade" id="bindModal" tabindex="-1" role="dialog"> <div class="modal fade" id="bindModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content"> <div class="modal-content">
@ -177,6 +235,17 @@ include( "head.php" );
} }
initMqtt(); initMqtt();
var rttyCfg;
function initRtty() {
$.getJSON( "config/rtty.json", function (resutl) {
rttyCfg = resutl;
rpc("enc.getSN",[],function (sn) {
rttyCfg.id = sn;
zcfg( "#rtty",rttyCfg );
})
})
}
initRtty();
//$( '#bindModal' ).modal( 'show' ); //$( '#bindModal' ).modal( 'show' );
@ -259,7 +328,6 @@ include( "head.php" );
} }
} ).responseText; } ).responseText;
/* /*
$( "#save_ngrok" ).click( function ( e ) { $( "#save_ngrok" ).click( function ( e ) {
func( "setNgrok", $( "#ngrok" ).serialize(), function ( res ) { func( "setNgrok", $( "#ngrok" ).serialize(), function ( res ) {
@ -284,6 +352,16 @@ include( "head.php" );
} ); } );
} ); } );
$("#save_rtty").click(function () {
func("saveConfigFile",{path: "config/rtty.json",data:JSON.stringify(rttyCfg,null,2)},function (res) {
if(res.result == "OK") {
func("reloadRtty");
htmlAlert( "#alert", "success", "<cn>保存成功</cn><en>Saved successfully!</en>", "", 2000 );
} else {
htmlAlert( "#alert", "danger", "<cn>保存设置失败</cn><en>Save config failed</en>", "", 2000 );
}
});
});
} ); } );
</script> </script>
<?php <?php

BIN
rootfs/usr/bin/fw_printenv Normal file

Binary file not shown.

BIN
rootfs/usr/bin/fw_setenv Normal file

Binary file not shown.

BIN
rootfs/usr/bin/rtty Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

1
rootfs/usr/lib/libev.so Symbolic link
View File

@ -0,0 +1 @@
libev.so.4.0.0

1
rootfs/usr/lib/libev.so.4 Symbolic link
View File

@ -0,0 +1 @@
libev.so.4.0.0

Binary file not shown.

View File

@ -0,0 +1 @@
libubootenv.so.0

View File

@ -0,0 +1 @@
libubootenv.so.0.3.3

Binary file not shown.

View File

@ -502,6 +502,7 @@ catch_workers_output = yes
; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
; the current environment. ; the current environment.
; Default Value: clean env ; Default Value: clean env
env[LD_LIBRARY_PATH] = /lib:/usr/lib:/usr/local/lib
;env[HOSTNAME] = $HOSTNAME ;env[HOSTNAME] = $HOSTNAME
;env[PATH] = /usr/local/bin:/usr/bin:/bin ;env[PATH] = /usr/local/bin:/usr/bin:/bin
;env[TMP] = /tmp ;env[TMP] = /tmp