Merge branch 'master' of github2:OpenIPC/firmware

pull/1513/head
Signor Pellegrino (from Citadel PC) 2024-08-03 15:52:05 +03:00
commit e7767bdc14
35 changed files with 798 additions and 16 deletions

View File

@ -150,6 +150,7 @@ jobs:
- {"platform": "fh8852v200", "release": "lite"}
# Grainmedia
- {"platform": "gm8135", "release": "lite"}
- {"platform": "gm8136", "release": "lite"}
# Novatek

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
buildroot-*/
output/
buildroot-*
.DS_Store

View File

@ -97,7 +97,7 @@ BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y
BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y
BR2_PACKAGE_LINUX_FIRMWARE_OPENIPC=y
# BR2_PACKAGE_LINUX_FIRMWARE_OPENIPC_MEDIATEK_MT7601U is not set
# BR2_PACKAGE_RTL8188EU is not set
# BR2_PACKAGE_RTL8188EUS_OPENIPC is not set
BR2_PACKAGE_LINUX_FIRMWARE_OPENIPC_ATHEROS_9271=y
BR2_PACKAGE_RTL8812AU_OPENIPC=y

View File

@ -306,7 +306,7 @@ CONFIG_ARCH_MULTI_V6_V7=y
# CONFIG_PLAT_SPEAR is not set
CONFIG_ARCH_SSTAR=y
# CONFIG_SS_DUALOS is not set
# CONFIG_SS_CLK_IGNORE_UNUSED is not set
CONFIG_SS_CLK_IGNORE_UNUSED=y
CONFIG_CNTVOFF_INITED=y
CONFIG_MODULES_AREA_SIZE=0x00800000

View File

@ -55,6 +55,13 @@ if [ "$1" = "rtl8733bu-gk7205v200-camhi" ]; then
exit 0
fi
# GK7205V200 Kafei
if [ "$1" = "8188fu-gk7205v200-kafei" ]; then
set_gpio 57 0
modprobe 8188fu
exit 0
fi
# GK7205V300 CamHi
if [ "$1" = "rtl8733bu-gk7205v300-camhi" ]; then
set_gpio 7 0
@ -62,10 +69,11 @@ if [ "$1" = "rtl8733bu-gk7205v300-camhi" ]; then
exit 0
fi
# GK7205V200 Kafei
if [ "$1" = "8188fu-gk7205v200-kafei" ]; then
set_gpio 57 0
modprobe 8188fu
# GK7205V300 XM IVG-G6S
if [ "$1" = "atbm603x-gk7205v300-xm-g6s" ]; then
devmem 0x100C0080 32 0x530
set_gpio 7 0
modprobe atbm603x_wifi_usb
exit 0
fi

View File

@ -58,6 +58,7 @@ source "$BR2_EXTERNAL_GENERAL_PATH/package/libwebsockets-openipc/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/linux-firmware-openipc/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/linux-patcher/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/logcat/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/lshell/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/majestic-fonts/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/majestic-plugins/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/majestic-webui/Config.in"
@ -108,6 +109,7 @@ source "$BR2_EXTERNAL_GENERAL_PATH/package/vdec-openipc/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/venc-openipc/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/vtund-openipc/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/webui/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/webrtc-audio-processing-openipc/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/wifibroadcast/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/xiongmai-opensdk-xm510/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/xiongmai-osdrv-xm510/Config.in"

View File

@ -2,7 +2,7 @@ config BR2_PACKAGE_BARESIP_OPENIPC
bool "baresip-openipc"
help
Baresip is a portable and modular SIP User-Agent with audio
and video support. Copyright (c) 2010 - 2022 Alfred E. Heggestad
and video support. Copyright (c) 2010 - 2024 Alfred E. Heggestad
and Contributors Distributed under BSD license.
https://github.com/baresip/baresip

View File

@ -5,13 +5,43 @@
#############################################################
BARESIP_OPENIPC_SITE = $(call github,baresip,baresip,$(BARESIP_OPENIPC_VERSION))
BARESIP_OPENIPC_VERSION = v3.12.0
BARESIP_OPENIPC_VERSION = v3.14.0
BARESIP_OPENIPC_DEPENDENCIES = libre-openipc
BARESIP_OPENIPC_DEPENDENCIES = libre-openipc webrtc-audio-processing-openipc mosquitto
BARESIP_OPENIPC_CONF_OPTS = \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS_RELEASE="-DNDEBUG -s" \
-DUSE_MBEDTLS=ON
-DUSE_MBEDTLS=ON \
-DWEBRTC_AEC_INCLUDE_DIR=$(WEBRTC_AUDIO_PROCESSING_OPENIPC_DIR) \
-DMOSQUITTO_INCLUDE_DIR=$(MOSQUITTO_DIR)
define BARESIP_OPENIPC_INSTALL_CONF
$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/init.d
$(INSTALL) -m 755 -t $(TARGET_DIR)/etc/init.d $(BARESIP_OPENIPC_PKGDIR)/files/S97baresip
# $(INSTALL) -m 755 -d $(TARGET_DIR)/etc/baresip
# $(INSTALL) -m 644 -t $(TARGET_DIR)/etc/baresip $(BARESIP_OPENIPC_PKGDIR)/files/accounts
# $(INSTALL) -m 644 -t $(TARGET_DIR)/etc/baresip $(BARESIP_OPENIPC_PKGDIR)/files/config
# $(INSTALL) -m 644 -t $(TARGET_DIR)/etc/baresip $(BARESIP_OPENIPC_PKGDIR)/files/contacts
cp $(@D)/docs/examples/accounts $(TARGET_DIR)/etc/baresip/accounts.orig
cp $(@D)/docs/examples/config $(TARGET_DIR)/etc/baresip/config.orig
cp $(@D)/docs/examples/contacts $(TARGET_DIR)/etc/baresip/contacts.orig
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(BARESIP_OPENIPC_PKGDIR)/files/dtmf_0.sh
ln -sf dtmf_0.sh $(TARGET_DIR)/usr/bin/dtmf_1.sh
ln -sf dtmf_0.sh $(TARGET_DIR)/usr/bin/dtmf_2.sh
ln -sf dtmf_0.sh $(TARGET_DIR)/usr/bin/dtmf_3.sh
# $(INSTALL) -m 755 -d $(TARGET_DIR)/usr/lib/sounds
# $(INSTALL) -m 755 -t $(TARGET_DIR)/usr/lib/sounds $(BARESIP_OPENIPC_PKGDIR)/files/ok_8k.pcm
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/share/baresip
cp $(@D)/share/*.wav $(TARGET_DIR)/usr/share/baresip
endef
BARESIP_OPENIPC_POST_INSTALL_TARGET_HOOKS += BARESIP_OPENIPC_INSTALL_CONF
$(eval $(cmake-package))

View File

@ -0,0 +1,47 @@
#!/bin/sh
DAEMON="baresip"
PIDFILE="/var/run/$DAEMON.pid"
DAEMON_ARGS="-f /etc/baresip"
start() {
printf 'Starting %s: ' "$DAEMON"
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "$DAEMON" -- $DAEMON_ARGS
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
stop() {
printf 'Stopping %s: ' "$DAEMON"
start-stop-daemon -K -q -p "$PIDFILE"
status=$?
if [ "$status" -eq 0 ]; then
rm -f "$PIDFILE"
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
restart() {
stop
sleep 1
start
}
case "$1" in
start|stop|restart)
"$1";;
reload)
restart;;
*)
echo "Usage: $0 {start|stop|restart|reload}"
exit 1
esac

View File

@ -0,0 +1,3 @@
#
#<sip:000001-XXX@pbx.zadarma.com;transport=udp>;auth_pass=MyPass;answermode=auto
#

View File

@ -0,0 +1,108 @@
# Core
poll_method epoll # poll, select, epoll ..
# SIP
sip_listen 0.0.0.0:5060
#sip_certificate cert.pem
sip_cafile /etc/ssl/certs/ca-certificates.crt
#sip_transports udp,tcp,tls,ws,wss
#sip_trans_def udp
#sip_verify_server yes
sip_tos 160
# Call
call_local_timeout 120
call_max_calls 1
call_hold_other_calls yes
# Audio
#audio_path /usr/share/baresip
#audio_player none
#audio_source none
#audio_alert alsa,default
#ausrc_srate 48000
#auplay_srate 48000
#ausrc_channels 0
#auplay_channels 0
#audio_txmode poll # poll, thread
audio_level no
ausrc_format s16 # s16, float, ..
auplay_format s16 # s16, float, ..
auenc_format s16 # s16, float, ..
audec_format s16 # s16, float, ..
audio_buffer 20-160 # ms
audio_telev_pt 101 # payload type for telephone-event
# Video
#video_source v4l2,/dev/video0
#video_source fakevideo,nil
#video_display x11,nil
video_size 640x480
video_bitrate 1000000
video_fps 30.00
video_fullscreen no
videnc_format yuv420p
# AVT - Audio/Video Transport
rtp_tos 184
rtp_video_tos 136
#rtp_ports 10000-20000
#rtp_bandwidth 512-1024 # [kbit/s]
rtcp_mux no
audio_itter_buffer_type fixed # off, fixed, adaptive
audio_jitter_buffer_delay 5-10 # frames
#jitter_buffer_wish 6 # frames for start
rtp_stats no
rtp_timeout 4
module_path /usr/lib/baresip/modules
# UI Modules
module stdio.so
module g711.so
#module avformat.so
module_app account.so
module_app contact.so
module_app debug_cmd.so
module_app syslog.so
module_app ctrl_tcp.so
#
module_app menu.so
#module_app mwi.so
#module_app presence.so
#module_app serreg.so
module_app netroam.so
# UI Modules parameters
cons_listen 0.0.0.0:3000 # cons - Console UI UDP/TCP sockets
ctrl_tcp_listen 0.0.0.0:2000 # ctrl_tcp - TCP interface JSON
evdev_device /dev/input/event0
# Opus codec parameters
opus_bitrate 28000 # 6000-510000
vumeter_stderr yes
# Selfview
video_selfview window # {window,pip}
#selfview_size 64x64
############################################################
# WebControl
module_app httpd.so
http_listen 0.0.0.0:5500
# OpenIPC integration
module openipc_audio.so
module openipc_video.so
module_app relay.so
# Other UI Modules
module webrtc_aec.so
module fakevideo.so
# module mqtt.so

View File

@ -0,0 +1,3 @@
#
"OpenIPC Support" <sip:support@openipc.org>;access=allow
#

View File

@ -0,0 +1,4 @@
#!/bin/sh
# timeout 2 curl -s --data-binary @/usr/lib/sounds/dog-many_48k.pcm http://localhost/play_audio

View File

@ -207,6 +207,19 @@ case "$video_frontend" in
insmod fisp_imx136.ko sensor_w=1920 sensor_h=1080 fps=25
fi
;;
"soih61")
codec_max_width=1280
codec_max_height=720
if [ "$video_system" == "NTSC" ]; then
insmod fisp328.ko cfg_path=/etc/sensors/isp328_soih61.cfg
insmod fisp_algorithm.ko pwr_freq=0
insmod fisp_soih61.ko sensor_w=1280 sensor_h=720 fps=30
elif [ "$video_system" == "PAL" ]; then
insmod fisp328.ko cfg_path=/etc/sensors/isp328_soih61.cfg
insmod fisp_algorithm.ko pwr_freq=1
insmod fisp_soih61.ko sensor_w=1280 sensor_h=720 fps=25
fi
;;
*)
echo "Invalid argument for video frontend: $video_frontend"
exit

View File

@ -1,6 +1,6 @@
sensor:
name: gc4023
address: 0x21
address: 0x29
width: 2560
height: 1440
bus: i2c

View File

@ -0,0 +1,7 @@
config BR2_PACKAGE_LSHELL
bool "lshell"
default n
help
Miniature Shell for limited commands
https://github.com/ystinia/sandbox/tree/main/lshell

View File

@ -0,0 +1,23 @@
################################################################################
#
# lshell | updated 2024.07.13
#
################################################################################
LSHELL_LICENSE = GPL
LSHELL_LICENSE_FILES = LICENSE
define LSHELL_EXTRACT_CMDS
cp -a $(LSHELL_PKGDIR)/* $(@D)/
endef
define LSHELL_BUILD_CMDS
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/src
endef
define LSHELL_INSTALL_TARGET_CMDS
$(INSTALL) -m 755 -d $(TARGET_DIR)/bin
$(INSTALL) -m 755 -D $(@D)/src/lshell $(TARGET_DIR)/bin/lshell
endef
$(eval $(generic-package))

View File

@ -0,0 +1,4 @@
lshell: lshell.c
$(CC) $(CFLAGS) -o lshell lshell.c -Wall -g
# $(CC) $(CFLAGS) -o lshell lshell.c -Wall -fsanitize=address -fsanitize=leak -g

View File

@ -0,0 +1,419 @@
/**
* Based on a project from @conorbros
*/
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <stdbool.h>
#include <string.h>
#include <sys/wait.h>
#define DEFAULT_PATH "/usr/share/openipc"
char **paths;
size_t paths_c = 0;
/**
* @brief Adds a path to the list of paths to look for executables in
*
* @param path
*/
void add_path(char *path)
{
paths[paths_c] = (char *)malloc(sizeof(char) * strlen(path) + 1);
strcpy(paths[paths_c++], path);
paths = realloc(paths, (paths_c + 1) * sizeof(char *));
}
/**
* @brief Initializes the list of paths and adds the DEFAULT_PATH
*
*/
void init_paths()
{
paths = (char **)malloc(sizeof(char *) * 2);
paths[paths_c] = (char *)malloc(sizeof(char) * strlen(DEFAULT_PATH) + 1);
strcpy(paths[paths_c++], DEFAULT_PATH);
}
/**
* @brief Empties the list of paths and frees memory
*
*/
void clear_paths()
{
paths = realloc(paths, sizeof(char *));
paths_c = 0;
}
void free_paths()
{
for (int i = 0; i < paths_c; i++)
{
free(paths[i]);
}
free(paths);
}
/**
* @brief Frees all memory in a heap allocated char array
*
* @param arr array to free
* @param c count of elements in array
*/
void free_char_arr(char **arr, size_t c)
{
for (size_t i = 0; i < c; i++)
{
free(arr[i]);
}
free(arr);
}
/**
* @brief Prints an error msg to stderr
*
*/
void print_err()
{
char error_message[30] = "Sorry, unknown command\n";
write(STDERR_FILENO, error_message, strlen(error_message));
}
/**
* @brief Searches the shell's current paths for an executable matching the cmd
*
* @param cmd
* @return char* full path of the executable
*/
char *search_paths(char *cmd)
{
char *res = NULL;
for (size_t i = 0; i < paths_c; i++)
{
size_t len = strlen(cmd) + strlen(paths[i]) + 3;
char *full_path = (char *)malloc(sizeof(char) * len);
sprintf(full_path, "%s/%s", paths[i], cmd);
if (access(full_path, X_OK) == 0)
{
res = (char *)malloc(sizeof(char) * (strlen(full_path) + 1));
strcpy(res, full_path);
free(full_path);
break;
}
free(full_path);
}
return res;
}
/**
* @brief Executes the command with arguments
*
* @param cmd name of binary to execute
* @param args arguments to pass to executed program
* @param arg_c count of argument array
* @param redirect file to redirect stdout and stderr to (can be NULL)
* @return pid_t pid of process running the command
*/
pid_t exec_cmd(char *cmd, char **args, int arg_c, char *redirect)
{
char *path = search_paths(cmd);
if (path == NULL)
{
print_err();
return 0;
}
pid_t pid = fork();
if (pid == -1)
{
perror("fork");
exit(1);
}
if (pid == 0)
{
if (redirect != NULL)
{
FILE *redirect_file;
redirect_file = fopen(redirect, "w");
if (redirect_file == NULL)
{
print_err();
exit(1);
}
dup2(fileno(redirect_file), STDOUT_FILENO);
dup2(fileno(redirect_file), STDERR_FILENO);
}
if (execv(path, args) == -1)
{
perror("execv");
exit(1);
}
}
free(path);
return pid;
}
/**
* @brief Gets the path to redirect output to. Will assign NULL to char array if no redirect specified. Function will return 0 for no errors, 1 if there is errors;
*
* @param str
* @param redirect
* @return int 0 for fine, 1 for errors
*/
int get_redirect_file(char *str, char **redirect)
{
size_t o = 0;
int res = 0;
size_t len = strlen(str) + 1;
bool has_output = false;
int token_index = -1;
for (int i = 0; i < len; i++)
{
if (str[i] == '>' && i == 0)
{
return 1;
}
else if (str[i] == '>')
{
token_index = i;
has_output = true;
*redirect = (char *)malloc(sizeof(char) * (len));
if (str[i + 1] == ' ') // If user has put a space in between '>' and the filename, move to first char in filename
{
i++;
}
continue;
}
if (has_output && o > 1 && str[i] == ' ')
{
free(*redirect);
*redirect = NULL;
print_err();
exit(0);
}
else if (has_output)
{
(*redirect)[o] = str[i];
o++;
}
}
if (token_index != -1)
{
str[token_index] = 0;
}
return res;
}
/**
* @brief Parses and runs a string containing a cmd and optional parameters
*
* @param cmd_str
* @return pid_t pid of process running command
*/
pid_t handle_cmd(char *cmd_str)
{
pid_t res = 0;
char *redirect = NULL;
if (get_redirect_file(cmd_str, &redirect) != 0)
{
print_err();
return 1;
}
char *cmd = NULL;
cmd = strtok(cmd_str, " ");
if (cmd == NULL)
{
return res;
}
char **args = (char **)malloc(sizeof(char *) * 2);
args[0] = strdup(cmd);
size_t args_n = 1;
char *token = NULL;
token = strtok(NULL, " ");
while (token != NULL)
{
args[args_n] = (char *)malloc(sizeof(char) * strlen(token) + 1);
strcpy(args[args_n++], token);
args = (char **)realloc(args, (args_n + 1) * sizeof(char *));
token = strtok(NULL, " ");
}
// null terminate the arg array
args = realloc(args, (args_n + 1) * sizeof(char *));
args[args_n++] = NULL;
if (strcmp(cmd, "cd") == 0) // Check if commands are built-in commands
{
if (args_n != 3) // If there is less 2 args (program name[0] and directory[1]) cannot run
{
print_err();
res = 0;
}
else
{
if (chdir(args[1]) == -1)
{
print_err();
}
res = 0;
}
}
else if (strcmp(cmd, "path") == 0)
{
clear_paths();
for (size_t i = 1; i < args_n - 1; i++) // -1 because arg array is null terminated
{
add_path(args[i]);
}
res = 0;
}
else // Else the command is a standard one
{
res = exec_cmd(cmd, args, args_n, redirect);
}
free_char_arr(args, args_n);
free(token);
return res;
}
int handle_line(char *line)
{
if (strcmp(line, "exit") == 0)
{
return 1;
}
char *buffer = NULL;
char **cmds = (char **)malloc(sizeof(char *) * 2);
buffer = strtok(line, "&");
size_t cmds_c = 0;
while (buffer != NULL)
{
if (buffer[strlen(buffer) - 1] == ' ') // If last char is a space remove it
{
buffer[strlen(buffer) - 1] = 0;
}
if (buffer[0] == ' ') // If first char is a space remove it
{
buffer++;
}
// Put string containing cmd and parameters into array
cmds[cmds_c] = (char *)malloc(sizeof(char) * strlen(buffer) + 1);
strcpy(cmds[cmds_c++], buffer);
cmds = (char **)realloc(cmds, (cmds_c + 1) * sizeof(char *));
buffer = strtok(NULL, "&");
}
// Start all processes with `handle_cmd` function
for (size_t i = 0; i < cmds_c; i++)
{
handle_cmd(cmds[i]);
}
int status;
pid_t wpid;
while ((wpid = wait(&status)) > 0) // Wait for all child processes to finish before continuing
{
}
free_char_arr(cmds, cmds_c);
return 0;
}
void interactive_mode()
{
char *buffer = NULL;
size_t len = 0;
while (1)
{
printf("keychain:~/jail> ");
fflush(stdout);
getline(&buffer, &len, stdin);
if (strcmp(buffer, "exit\n") == 0)
{
break;
}
if (buffer[strlen(buffer) - 1] == '\n') // Replace the newline with a null char
{
buffer[strlen(buffer) - 1] = 0;
}
if (handle_line(buffer) == 1)
{
break;
}
}
free(buffer);
}
void batch_mode(FILE *fp)
{
char *buffer = NULL;
size_t len = 0;
while (getline(&buffer, &len, fp) > 0)
{
if (buffer[strlen(buffer) - 1] == '\n') // Replace the newline with a null char
{
buffer[strlen(buffer) - 1] = 0;
}
if (handle_line(buffer) == 1)
{
break;
}
}
free(buffer);
}
int main(int argc, char *argv[])
{
FILE *input;
// Init the array of paths that
// the shell with look for executables in
init_paths();
if (argc > 1) // If arg is supplied use batch mode
{
input = fopen(argv[1], "r");
if (input == NULL || argc > 2) // If the input file doesn't exist or multiple input file arguments were given
{
print_err();
exit(1);
}
batch_mode(input);
}
else // else use interactive mode
{
interactive_mode();
}
free_paths();
exit(0);
}

View File

@ -1,6 +1,6 @@
RUBYFPV_SITE_METHOD = git
RUBYFPV_SITE = https://github.com/PetruSoroaga/RubyFPV
RUBYFPV_VERSION = 824279342ad5aeb173a1b67227e28f984b9c0e11
RUBYFPV_VERSION = 3befef3fd0042bd37d1dd8bccff6d72cddeeb879
RUBYFPV_DEPENDENCIES += libpcap iw

View File

@ -18,7 +18,7 @@ detect_sensor() {
set_sensor() {
case $SENSOR in
imx335|imx415|sc401ai|sc501ai|sc830ai)
gc4653|imx335|imx415|os04a10|sc401ai|sc501ai|sc830ai)
insmod $MODULE/sensor_${SENSOR}_mipi.ko chmap=1
;;
*)
@ -35,8 +35,9 @@ insert_ko() {
insmod $MODULE/mi_isp.ko
insmod $MODULE/mi_rgn.ko
insmod $MODULE/mi_scl.ko
insmod $MODULE/mi_ao.ko
insmod $MODULE/mi_aio.ko
insmod $MODULE/mi_ai.ko
insmod $MODULE/mi_ao.ko
insmod $MODULE/mi_vcodec.ko drv_codec40_common.fw_load_path=/etc/firmware/chagall.bin
insmod $MODULE/mi_venc.ko
insmod $MODULE/mi_shadow.ko

View File

@ -18,7 +18,7 @@ detect_sensor() {
set_sensor() {
case $SENSOR in
gc2053|gc4653|imx274|imx307|imx335|imx347|imx415|sc501ai|sc8235)
gc2053|gc4653|imx274|imx307|imx335|imx347|imx415|sc501ai|sc8235|os04a10|os04c10)
insmod $MODULE/sensor_${SENSOR}_mipi.ko chmap=1
;;
*)

View File

@ -0,0 +1,63 @@
From b7a166acaddc4c78afa2b653e25114d9114699f3 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Sat, 6 Aug 2016 11:24:50 +0200
Subject: [PATCH] Proper detection of cxxabi.h and execinfo.h
The current code in webrtc/base/checks.cc assumes that if __GLIBCXX__ is
defined and __UCLIBC__ is not defined, then both cxxabi.h and execinfo.h
will be available.
Unfortunately, this is not correct with the musl C library:
- It defines __GLIBCXX__
- It does not define __UCLIBC__ (it's not uClibc after all!)
- But it also doesn't provide execinfo.h
Therefore, in order to make things work properly, we switch to proper
autoconf checks for cxxabi.h and execinfo.h, and only use the backtrace
functionality if both are provided.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
configure.ac | 2 ++
webrtc/base/checks.cc | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index acbb3e2..ff4c752 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,6 +45,8 @@ AC_SUBST(GNUSTL_CFLAGS)
# Borrowed from gst-plugins-bad
AC_CHECK_HEADER(MobileCoreServices/MobileCoreServices.h, HAVE_IOS="yes", HAVE_IOS="no", [-])
+AC_CHECK_HEADERS([cxxabi.h execinfo.h])
+
# Based on gst-plugins-bad configure.ac and defines in
# <chromium source>/build/config/BUILDCONFIG.gn and
# webrtc/BUILD.gn
diff --git a/webrtc/base/checks.cc b/webrtc/base/checks.cc
index 49a31f2..05d23a6 100644
--- a/webrtc/base/checks.cc
+++ b/webrtc/base/checks.cc
@@ -16,7 +16,7 @@
#include <cstdio>
#include <cstdlib>
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
+#if defined(HAVE_CXX_ABI_H) && defined(HAVE_EXECINFO_H)
#include <cxxabi.h>
#include <execinfo.h>
#endif
@@ -55,7 +55,7 @@ void PrintError(const char* format, ...) {
// to get usable symbols on Linux. This is copied from V8. Chromium has a more
// advanced stace trace system; also more difficult to copy.
void DumpBacktrace() {
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
+#if defined(HAVE_CXX_ABI_H) && defined(HAVE_EXECINFO_H)
void* trace[100];
int size = backtrace(trace, sizeof(trace) / sizeof(*trace));
char** symbols = backtrace_symbols(trace, size);
--
2.7.4

View File

@ -0,0 +1,21 @@
config BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING_OPENIPC_ARCH_SUPPORTS
bool
default y if BR2_aarch64 || BR2_arm || BR2_i386 || BR2_x86_64
config BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING_OPENIPC
bool "webrtc-audio-processing-openipc"
depends on BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING_OPENIPC_ARCH_SUPPORTS
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
# pthread_condattr_setclock
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
help
AudioProcessing library based on Google's implementation of
WebRTC.
http://freedesktop.org/software/pulseaudio/webrtc-audio-processing/
comment "webrtc-audio-processing-openipc needs a toolchain w/ C++, NPTL, gcc >= 4.8"
depends on BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING_OPENIPC_ARCH_SUPPORTS
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS_NPTL \
|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8

View File

@ -0,0 +1,3 @@
# Locally calculated
sha256 a0fdd938fd85272d67e81572c5a4d9e200a0c104753cb3c209ded175ce3c5dbf webrtc-audio-processing-0.3.1.tar.xz
sha256 9b79539028e216e813e152d45f5c1ed5fdd0554426ad50270fb03134e7082dac COPYING

View File

@ -0,0 +1,21 @@
################################################################################
#
# webrtc-audio-processing-openipc
#
################################################################################
WEBRTC_AUDIO_PROCESSING_OPENIPC_VERSION = 0.3.1
WEBRTC_AUDIO_PROCESSING_OPENIPC_SOURCE = webrtc-audio-processing-$(WEBRTC_AUDIO_PROCESSING_OPENIPC_VERSION).tar.xz
WEBRTC_AUDIO_PROCESSING_OPENIPC_SITE = http://freedesktop.org/software/pulseaudio/webrtc-audio-processing
WEBRTC_AUDIO_PROCESSING_OPENIPC_INSTALL_STAGING = YES
WEBRTC_AUDIO_PROCESSING_OPENIPC_LICENSE = BSD-3-Clause
WEBRTC_AUDIO_PROCESSING_OPENIPC_LICENSE_FILES = COPYING
WEBRTC_AUDIO_PROCESSING_OPENIPC_DEPENDENCIES = host-pkgconf
# 0001-Proper-detection-of-cxxabi.h-and-execinfo.h.patch
WEBRTC_AUDIO_PROCESSING_OPENIPC_AUTORECONF = YES
ifeq ($(BR2_SOFT_FLOAT),y)
WEBRTC_AUDIO_PROCESSING_OPENIPC_CONF_OPTS += --with-ns-mode=fixed
endif
$(eval $(autotools-package))

View File

@ -7,7 +7,7 @@ date +GITHUB_VERSION="\"${GIT_BRANCH-local}+${GIT_HASH-build}, %Y-%m-%d"\" >> ${
echo BUILD_OPTION=${OPENIPC_VARIANT} >> ${FILE}
date +TIME_STAMP=%s >> ${FILE}
CONF="USES_GLIBC=y|INGENIC_OSDRV_T30=y|LIBV4L=y|MAVLINK_ROUTER=y|RUBYFPV=y|WEBRTC_AUDIO_PROCESSING=y|WIFIBROADCAST=y"
CONF="USES_GLIBC=y|INGENIC_OSDRV_T30=y|LIBV4L=y|MAVLINK_ROUTER=y|RUBYFPV=y|WEBRTC_AUDIO_PROCESSING_OPENIPC=y|WIFIBROADCAST=y"
if ! grep -qP ${CONF} ${BR2_CONFIG}; then
rm -f ${TARGET_DIR}/usr/lib/libstdc++*
fi