Skip to content

Commit 9f28bfb

Browse files
committed
Add apfpv-dev
1 parent e7af330 commit 9f28bfb

File tree

11 files changed

+353
-0
lines changed

11 files changed

+353
-0
lines changed

.github/workflows/master.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ jobs:
9090

9191
# APFPV
9292
- ssc338q_apfpv
93+
- ssc338q_apfpv-dev
9394

9495
# FPV
9596
- hi3516ev200_fpv
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Architecture
2+
BR2_arm=y
3+
BR2_cortex_a7=y
4+
BR2_ARM_FPU_NEON_VFPV4=y
5+
BR2_ARM_INSTRUCTIONS_THUMB2=y
6+
7+
# Toolchain
8+
BR2_TOOLCHAIN_EXTERNAL=y
9+
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
10+
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
11+
BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/openipc/firmware/releases/download/$(OPENIPC_TOOLCHAIN).tgz"
12+
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-openipc-linux-gnueabihf"
13+
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_9=y
14+
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
15+
# BR2_TOOLCHAIN_EXTERNAL_INET_RPC is not set
16+
BR2_TOOLCHAIN_EXTERNAL_CXX=y
17+
18+
# Kernel
19+
BR2_LINUX_KERNEL=y
20+
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
21+
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/openipc/linux/archive/$(OPENIPC_KERNEL).tar.gz"
22+
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
23+
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/infinity6e-ssc012b.config"
24+
BR2_LINUX_KERNEL_UIMAGE=y
25+
BR2_LINUX_KERNEL_XZ=y
26+
27+
# Filesystem
28+
BR2_PACKAGE_BUSYBOX_CONFIG="$(BR2_EXTERNAL)/package/busybox/busybox.config"
29+
BR2_PACKAGE_EXFATPROGS=y
30+
BR2_PACKAGE_UBOOT_TOOLS=y
31+
BR2_PACKAGE_ZLIB=y
32+
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
33+
BR2_PACKAGE_HOSTAPD=y
34+
BR2_PACKAGE_IW=y
35+
BR2_TARGET_ROOTFS_CPIO=y
36+
BR2_TARGET_ROOTFS_SQUASHFS=y
37+
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
38+
39+
# OpenIPC
40+
BR2_OPENIPC_SOC_VENDOR="sigmastar"
41+
BR2_OPENIPC_SOC_MODEL="ssc338q"
42+
BR2_OPENIPC_SOC_FAMILY="infinity6e"
43+
BR2_OPENIPC_VARIANT="fpv"
44+
BR2_OPENIPC_FLASH_SIZE="16"
45+
46+
# Packages
47+
BR2_PACKAGE_DROPBEAR_OPENIPC=y
48+
BR2_PACKAGE_EXFAT_OPENIPC=y
49+
BR2_PACKAGE_IPCTOOL=y
50+
BR2_PACKAGE_JSONFILTER=y
51+
BR2_PACKAGE_LIBCURL_OPENIPC=y
52+
BR2_PACKAGE_LIBCURL_OPENIPC_CURL=y
53+
# BR2_PACKAGE_LIBCURL_OPENIPC_PROXY_SUPPORT is not set
54+
# BR2_PACKAGE_LIBCURL_OPENIPC_COOKIES_SUPPORT is not set
55+
# BR2_PACKAGE_LIBCURL_OPENIPC_EXTRA_PROTOCOLS_FEATURES is not set
56+
BR2_PACKAGE_LIBEVENT_OPENIPC=y
57+
BR2_PACKAGE_LIBOGG_OPENIPC=y
58+
BR2_PACKAGE_MAJESTIC_FONTS=y
59+
BR2_PACKAGE_MAJESTIC_WEBUI=y
60+
BR2_PACKAGE_MAJESTIC=y
61+
BR2_PACKAGE_MBEDTLS_OPENIPC=y
62+
BR2_PACKAGE_MAVFWD=y
63+
BR2_PACKAGE_MSPOSD=y
64+
BR2_PACKAGE_OPUS_OPENIPC=y
65+
BR2_PACKAGE_OPUS_OPENIPC_FIXED_POINT=y
66+
BR2_PACKAGE_RTL8812AU_OPENIPC=y
67+
BR2_PACKAGE_RTL88X2EU_OPENIPC=y
68+
BR2_PACKAGE_RTL8733BU_OPENIPC=y
69+
BR2_PACKAGE_SIGMASTAR_OSDRV_INFINITY6E=y
70+
BR2_PACKAGE_VTUND_OPENIPC=y
71+
BR2_PACKAGE_YAML_CLI=y
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
3+
case "$1" in
4+
start)
5+
echo "Starting network..."
6+
ifup lo
7+
ifup eth0
8+
ifup wlan0
9+
;;
10+
11+
stop)
12+
echo "Stopping network..."
13+
ifdown lo
14+
ifdown -f eth0
15+
ifdown -f wlan0
16+
;;
17+
18+
*)
19+
echo "Usage: $0 {start|stop}"
20+
exit 1
21+
;;
22+
esac
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/sh
2+
3+
case "$1" in
4+
start)
5+
echo "Starting msposd..."
6+
devmem 0x1F207890 16 0x8
7+
sleep 1
8+
size=$(curl -s localhost/api/v1/config.json | jsonfilter -qe "@.video0.size")
9+
msposd -b 115200 -c 8 -r 20 -m /dev/ttyS2 -z "$size" > /dev/null &
10+
;;
11+
12+
stop)
13+
echo "Stopping msposd..."
14+
killall -q msposd
15+
;;
16+
17+
*)
18+
echo "Usage: $0 {start|stop}"
19+
exit 1
20+
;;
21+
esac
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
iface wlan0 inet static
2+
address 192.168.0.1
3+
gateway 192.168.0.1
4+
netmask 255.255.255.0
5+
pre-up adapter setup
6+
post-up adapter start
7+
post-down adapter stop
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
interface wlan0
2+
start 192.168.0.10
3+
end 192.168.0.20
4+
opt dns 192.168.0.1
5+
opt router 192.168.0.1
6+
opt subnet 255.255.255.0
7+
opt lease 10
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#!/bin/sh
2+
ssid=$(fw_printenv -n wlanssid || echo OpenIPC)
3+
pass=$(fw_printenv -n wlanpass || echo 12345678)
4+
chan=$(fw_printenv -n wlanchan || echo 1)
5+
[ "$chan" -le 13 ] && mode=g || mode=a
6+
7+
set_config() {
8+
cat << EOF > /tmp/hostapd.conf
9+
ctrl_interface=/var/run/hostapd
10+
interface=wlan0
11+
channel=$chan
12+
hw_mode=$mode
13+
ieee80211n=1
14+
ieee80211ac=1
15+
wmm_enabled=1
16+
rsn_pairwise=CCMP
17+
wpa=2
18+
ssid=$ssid
19+
wpa_passphrase=$pass
20+
EOF
21+
}
22+
23+
case "$1" in
24+
setup)
25+
for card in $(lsusb | awk '{print $6}' | uniq); do
26+
case "$card" in
27+
"0bda:8812" | "0bda:881a" | "0b05:17d2" | "2357:0101" | "2604:0012")
28+
driver=88XXau
29+
;;
30+
31+
"0bda:a81a")
32+
driver=8812eu
33+
;;
34+
35+
"0bda:f72b" | "0bda:b733")
36+
driver=8733bu
37+
;;
38+
esac
39+
done
40+
41+
if [ -z "$driver" ]; then
42+
echo "Wireless module not detected!"
43+
exit 1
44+
fi
45+
46+
echo "Detected driver: $driver"
47+
modprobe "$driver" rtw_tx_pwr_by_rate=0 rtw_tx_pwr_lmt_enable=0
48+
49+
[ "$chan" -le 13 ] && rate=0x8D || rate=0xB7
50+
echo "$rate" > $(ls /proc/net/*/wlan0/rate_ctl)
51+
;;
52+
53+
start)
54+
set_config
55+
hostapd /tmp/hostapd.conf -B
56+
udhcpd -S
57+
;;
58+
59+
stop)
60+
killall -q udhcpd wpa_supplicant
61+
;;
62+
63+
*)
64+
echo "Usage: $0 {setup|start|stop}"
65+
exit 1
66+
;;
67+
esac
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/sh
2+
#
3+
# Perform basic settings on a known IP camera
4+
#
5+
#
6+
# Set custom upgrade url
7+
#
8+
fw_setenv upgrade 'https://github.com/OpenIPC/builder/releases/download/latest/openipc.ssc338q-nor-apfpv-dev.tgz'
9+
#
10+
#
11+
# Set custom majestic settings
12+
#
13+
cli -s .isp.exposure 15
14+
cli -s .video0.fps 60
15+
cli -s .video0.bitrate 12000
16+
cli -s .video0.codec h265
17+
cli -s .video0.rcMode avbr
18+
cli -s .outgoing.enabled true
19+
cli -s .outgoing.server udp://224.0.0.1:5600
20+
cli -s .records.split 5
21+
cli -s .records.notime true
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
mj_audio=Audio
3+
mj_image=Image
4+
mj_isp=ISP
5+
mj_outgoing=Outgoing
6+
mj_records=Record
7+
mj_system=System
8+
mj_video0=Video0
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
#!/usr/bin/haserl
2+
Content-type: text/html; charset=UTF-8
3+
Cache-Control: no-store
4+
Pragma: no-cache
5+
6+
<!DOCTYPE html>
7+
<html lang="en" data-bs-theme="<%= ${webui_theme:=dark} %>">
8+
<head>
9+
<meta charset="utf-8">
10+
<meta name="viewport" content="width=device-width, initial-scale=1">
11+
<title><% html_title %></title>
12+
<link rel="stylesheet" href="/a/bootstrap.min.css">
13+
<link rel="stylesheet" href="/a/bootstrap.override.css">
14+
<script src="/a/bootstrap.bundle.min.js"></script>
15+
<script src="/a/main.js"></script>
16+
</head>
17+
18+
<body id="page-<%= $pagename %>" class="<%= $fw_variant %>">
19+
<nav class="navbar navbar-expand-lg bg-body-tertiary">
20+
<div class="container">
21+
<a class="navbar-brand" href="status.cgi"><img alt="Image: OpenIPC logo" height="32" src="/a/logo.svg"><span class="x-small ms-1"><%= $fw_variant %></span></a>
22+
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
23+
<span class="navbar-toggler-icon"></span>
24+
</button>
25+
<div class="collapse navbar-collapse justify-content-end" id="navbarNav">
26+
<ul class="navbar-nav">
27+
<li class="nav-item dropdown">
28+
<a aria-expanded="false" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" id="dropdownInformation" role="button">Information</a>
29+
<ul aria-labelledby="dropdownInformation" class="dropdown-menu">
30+
<li><a class="dropdown-item" href="status.cgi">Status</a></li>
31+
<li><hr class="dropdown-divider"></li>
32+
<li><a class="dropdown-item" href="info-majestic.cgi">Majestic</a></li>
33+
<li><a class="dropdown-item" href="info-kernel.cgi">Kernel</a></li>
34+
<li><a class="dropdown-item" href="info-overlay.cgi">Overlay</a></li>
35+
</ul>
36+
</li>
37+
<li class="nav-item dropdown">
38+
<a aria-expanded="false" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" id="dropdownMajestic" role="button">Majestic</a>
39+
<ul aria-labelledby="dropdownMajestic" class="dropdown-menu">
40+
<li><a class="dropdown-item" href="mj-settings.cgi">Settings</a></li>
41+
<li><hr class="dropdown-divider"></li>
42+
<li><a class="dropdown-item" href="mj-configuration.cgi">Configuration</a></li>
43+
<li><a class="dropdown-item" href="mj-endpoints.cgi">Endpoints</a></li>
44+
</ul>
45+
</li>
46+
<li class="nav-item dropdown">
47+
<a aria-expanded="false" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" id="dropdownSettings" role="button">Firmware</a>
48+
<ul aria-labelledby="dropdownSettings" class="dropdown-menu">
49+
<li><a class="dropdown-item" href="fw-time.cgi">Time</a></li>
50+
<li><a class="dropdown-item" href="fw-interface.cgi">Interface</a></li>
51+
<li><hr class="dropdown-divider"></li>
52+
<li><a class="dropdown-item" href="fw-update.cgi">Update</a></li>
53+
<li><a class="dropdown-item" href="fw-settings.cgi">Settings</a></li>
54+
</ul>
55+
</li>
56+
<li class="nav-item dropdown">
57+
<a aria-expanded="false" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" id="dropdownTools" role="button">Tools</a>
58+
<ul aria-labelledby="dropdownTools" class="dropdown-menu">
59+
<li><a class="dropdown-item" href="tool-files.cgi">Files</a></li>
60+
<% if [ -e /dev/mmcblk0 ]; then %>
61+
<li><a class="dropdown-item" href="tool-sdcard.cgi">SDcard</a></li>
62+
<% fi %>
63+
</ul>
64+
</li>
65+
<li class="nav-item"><a class="nav-link" href="preview.cgi">Preview</a></li>
66+
</ul>
67+
</div>
68+
</div>
69+
</nav>
70+
71+
<main class="pb-4">
72+
<div class="container" style="min-height: 85vh">
73+
<div class="row mt-1 x-small">
74+
<div class="col-lg-2">
75+
<div id="pb-memory" class="progress my-1" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"><div class="progress-bar"></div></div>
76+
<div id="pb-overlay" class="progress my-1" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"><div class="progress-bar"></div></div>
77+
</div>
78+
79+
<div class="col-md-6 mb-2">
80+
<%= $(signature) %>
81+
</div>
82+
83+
<div class="col-1" id="daynight_value"></div>
84+
<div class="col-md-4 col-lg-3 mb-2 text-end">
85+
<div id="time-now"></div>
86+
<div class="text-secondary" id="soc-temp"></div>
87+
</div>
88+
</div>
89+
90+
<% if [ -z "$network_gateway" ]; then %>
91+
<div class="alert alert-warning">
92+
<p class="mb-0">Internet connection not available, please <a href="fw-network.cgi">check your network settings</a>.</p>
93+
</div>
94+
<% fi %>
95+
96+
<% if [ ! -e $(get_config) ]; then %>
97+
<div class="alert alert-danger">
98+
<p class="mb-0">Majestic configuration not found, please <a href="mj-configuration.cgi">check your Majestic settings</a>.</p>
99+
</div>
100+
<% fi %>
101+
102+
<% if [ "$(cat /etc/TZ)" != "$TZ" ] || [ -e /tmp/system-reboot ]; then %>
103+
<div class="alert alert-danger">
104+
<h3>Warning.</h3>
105+
<p>System settings have been updated, restart to apply pending changes.</p>
106+
<span class="d-flex gap-3">
107+
<a class="btn btn-danger" href="fw-restart.cgi">Restart camera</a>
108+
</span>
109+
</div>
110+
<% fi %>
111+
112+
<h2><%= $page_title %></h2>
113+
<% log_read %>

0 commit comments

Comments
 (0)