forked from OpenIPC/wiki
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
48 changed files
with
639 additions
and
443 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,37 @@ | ||
# The OpenIPC Wiki | ||
OpenIPC Wiki | ||
============ | ||
|
||
[English](en/index.md) | [Русский](ru/about.md) | ||
|
||
|
||
> "Improving the world, one patch at a time." | ||
|
||
### This is an open project, so you can help, too. | ||
|
||
We try to collect, organize and share as much information regarding different | ||
aspects of the project as we can. But sometimes we overlook things that seem | ||
obvious to us, developers, but are not so obvious to end-users, people who are | ||
less familiar with nuts and bolts behind the scene. That is why we set up this | ||
wiki and let anyone having a GitHub account to make additions and improvements | ||
to the knowledgebase. | ||
|
||
### How to contribute. | ||
|
||
Sign in into your GitHub account, or [get yourself one][gh-signup] if you don't | ||
have it yet. It's free. | ||
|
||
Go to [the wiki repository](https://github.com/openIPC/wiki/) and fork it. | ||
|
||
![GitHub Fork](images/gh-fork.png) | ||
|
||
Make changes (correct a typo, add another record into a table, or write a new | ||
article) and commit them to your own fork of the repository. | ||
|
||
From your repository, create a pull request, so we could review and incorporate | ||
your changes into our version of the wiki. | ||
|
||
![GitHub Contribute](images/gh-contribute.png) | ||
|
||
|
||
[gh-signup]: https://github.com/signup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# OpenIPC Wiki | ||
[Table of Content](index.md) | ||
|
||
FFMPEG, RTSP and SRT examples | ||
----------------------------- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# OpenIPC Wiki | ||
[Table of Content](index.md) | ||
|
||
Boot device with NFS | ||
-------------------- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
# OpenIPC Wiki | ||
[Table of Content](index.md) | ||
|
||
Interesting tricks | ||
------------------ | ||
|
||
### Sharing output of a command via web | ||
``` | ||
<command> | nc seashells.io 1337 | ||
``` | ||
|
||
### Adapting syslogd to work with time zones other than GMT | ||
|
||
Some `syslog()` implementations like musl's always send timestamps in UTC. | ||
The following code adds a new option to `syslogd`, `-Z`, to assume incoming | ||
timestamps are always UTC, and to adjust them to the local timezone | ||
(of the syslogd) before logging. | ||
|
||
```diff | ||
Signed-off-by: Shiz <hi at shiz.me> | ||
--- | ||
sysklogd/syslogd.c | 23 +++++++++++++++++++---- | ||
1 file changed, 19 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c | ||
index d64ff27..159336e 100644 | ||
--- a/sysklogd/syslogd.c | ||
+++ b/sysklogd/syslogd.c | ||
@@ -122,6 +122,7 @@ | ||
//usage: "(this version of syslogd ignores /etc/syslog.conf)\n" | ||
//usage: ) | ||
//usage: "\n -n Run in foreground" | ||
+//usage: "\n -Z Adjust incoming UTC times to local time" | ||
//usage: IF_FEATURE_REMOTE_LOG( | ||
//usage: "\n -R HOST[:PORT] Log to HOST:PORT (default PORT:514)" | ||
//usage: "\n -L Log locally and via network (default is network only if -R)" | ||
@@ -233,6 +234,8 @@ typedef struct logRule_t { | ||
/*int markInterval;*/ \ | ||
/* level of messages to be logged */ \ | ||
int logLevel; \ | ||
+ /* whether to adjust message timezone */\ | ||
+ int adjustTimezone; \ | ||
IF_FEATURE_ROTATE_LOGFILE( \ | ||
/* max size of file before rotation */ \ | ||
unsigned logFileSize; \ | ||
@@ -316,6 +319,7 @@ enum { | ||
OPTBIT_outfile, // -O | ||
OPTBIT_loglevel, // -l | ||
OPTBIT_small, // -S | ||
+ OPTBIT_adjusttz, // -Z | ||
IF_FEATURE_ROTATE_LOGFILE(OPTBIT_filesize ,) // -s | ||
IF_FEATURE_ROTATE_LOGFILE(OPTBIT_rotatecnt ,) // -b | ||
IF_FEATURE_REMOTE_LOG( OPTBIT_remotelog ,) // -R | ||
@@ -330,6 +334,7 @@ enum { | ||
OPT_outfile = 1 << OPTBIT_outfile , | ||
OPT_loglevel = 1 << OPTBIT_loglevel, | ||
OPT_small = 1 << OPTBIT_small , | ||
+ OPT_adjusttz = 1 << OPTBIT_adjusttz, | ||
OPT_filesize = IF_FEATURE_ROTATE_LOGFILE((1 << OPTBIT_filesize )) + 0, | ||
OPT_rotatecnt = IF_FEATURE_ROTATE_LOGFILE((1 << OPTBIT_rotatecnt )) + 0, | ||
OPT_remotelog = IF_FEATURE_REMOTE_LOG( (1 << OPTBIT_remotelog )) + 0, | ||
@@ -339,7 +344,7 @@ enum { | ||
OPT_cfg = IF_FEATURE_SYSLOGD_CFG( (1 << OPTBIT_cfg )) + 0, | ||
OPT_kmsg = IF_FEATURE_KMSG_SYSLOG( (1 << OPTBIT_kmsg )) + 0, | ||
}; | ||
-#define OPTION_STR "m:nO:l:S" \ | ||
+#define OPTION_STR "m:nO:l:SZ" \ | ||
IF_FEATURE_ROTATE_LOGFILE("s:" ) \ | ||
IF_FEATURE_ROTATE_LOGFILE("b:" ) \ | ||
IF_FEATURE_REMOTE_LOG( "R:*") \ | ||
@@ -815,17 +820,23 @@ static void timestamp_and_log(int pri, char *msg, int len) | ||
{ | ||
char *timestamp; | ||
time_t now; | ||
+ struct tm nowtm = { .tm_isdst = 0 }; | ||
|
||
/* Jan 18 00:11:22 msg... */ | ||
/* 01234567890123456 */ | ||
if (len < 16 || msg[3] != ' ' || msg[6] != ' ' | ||
|| msg[9] != ':' || msg[12] != ':' || msg[15] != ' ' | ||
) { | ||
- time(&now); | ||
+ now = time(NULL); | ||
timestamp = ctime(&now) + 4; /* skip day of week */ | ||
} else { | ||
- now = 0; | ||
- timestamp = msg; | ||
+ if (G.adjustTimezone && strptime(msg, "%b %e %T", &nowtm)) { | ||
+ now = mktime(&nowtm) - timezone; | ||
+ timestamp = ctime(&now) + 4; /* skip day of week */ | ||
+ } else { | ||
+ now = 0; | ||
+ timestamp = msg; | ||
+ } | ||
msg += 16; | ||
} | ||
timestamp[15] = '\0'; | ||
@@ -1130,6 +1141,10 @@ int syslogd_main(int argc UNUSED_PARAM, char **argv) | ||
if (opts & OPT_loglevel) // -l | ||
G.logLevel = xatou_range(opt_l, 1, 8); | ||
//if (opts & OPT_small) // -S | ||
+ if (opts & OPT_adjusttz) { // -Z | ||
+ G.adjustTimezone = 1; | ||
+ tzset(); | ||
+ } | ||
#if ENABLE_FEATURE_ROTATE_LOGFILE | ||
if (opts & OPT_filesize) // -s | ||
G.logFileSize = xatou_range(opt_s, 0, INT_MAX/1024) * 1024; | ||
-- | ||
``` | ||
_from [sysklogd: add -Z option to adjust message timezones](http://lists.busybox.net/pipermail/busybox/2017-May/085437.html)_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# OpenIPC Wiki | ||
[Table of Content](index.md) | ||
|
||
Run ipctool | ||
----------- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# OpenIPC Wiki | ||
[Table of Content](index.md) | ||
|
||
GPIO Settings | ||
------------- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
en/transfer-image-quality-tuning.md → en/image-quality-tuning.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# OpenIPC Wiki | ||
[Table of Content](index.md) | ||
|
||
Overview | ||
-------- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,67 @@ | ||
![OpenIPC logo][logo] | ||
|
||
Wiki | ||
==== | ||
# OpenIPC Wiki | ||
[Table of Content](index.md) | ||
|
||
## Introduction | ||
* [About project](transfer-menu-index.md) | ||
* [Supported devices](https://openipc.org/wiki/en/guide-supported-devices) | ||
* [Show changelog](transfer-show-changelog.md) | ||
- [About project](menu-index.md) | ||
- [Supported devices](https://openipc.org/wiki/en/guide-supported-devices) | ||
- [Show changelog](show-changelog.md) | ||
|
||
## Available subprojects | ||
* [coupler](https://openipc.org/coupler) | ||
* [firmware](https://openipc.org/firmware) | ||
* [ipctool](https://openipc.org/ipctool) | ||
* [telemetry](https://openipc.org/telemetry) | ||
* [Firmware Partitions Calculation](https://themactep.com/tools/firmware-partitions-calculation) | ||
## Subprojects | ||
- [coupler](https://openipc.org/coupler) | ||
- [firmware](https://openipc.org/firmware) | ||
- [ipctool](https://openipc.org/ipctool) | ||
- [telemetry](https://openipc.org/telemetry) | ||
- [Firmware Partitions Calculation](https://themactep.com/tools/firmware-partitions-calculation) | ||
|
||
## Installation | ||
* [Goke based boards](transfer-install-goke.md) | ||
* [HiSilicon based boards](transfer-install-hisi.md) | ||
* [Novatek based boards](transfer-install-novatek.md) | ||
* [SigmaStar based boards](transfer-install-ssc335.md) | ||
* [XM510 based boards](transfer-install-xm510.md) | ||
* [XM530 based boards](transfer-install-xm530.md) | ||
* [Veryld full manual](transfer-old-manual.md) | ||
- [Installation on Goke based boards](install-goke.md) | ||
- [Installation on HiSilicon based boards](install-hisi.md) | ||
- [Installation on Novatek based boards](install-novatek.md) | ||
- [Installation on SigmaStar based boards](install-ssc335.md) | ||
- [Installation on XM510 based boards](install-xm510.md) | ||
- [Installation on XM530 based boards](install-xm530.md) | ||
- [Veryld full manual](old-manual.md) | ||
|
||
## Usage | ||
* [System features](transfer-system-features.md) | ||
* [Majestic streamer](transfer-majestic-streamer.md) | ||
* [Microbe WEB interface](transfer-microbe-web.md) | ||
* [Upgrade firmware](transfer-sysupgrade.md) | ||
* [Image quality tuning](transfer-image-quality-tuning.md) | ||
* [Memory tuning](transfer-memory-tuning.md) | ||
* [Using ipctool](transfer-example-ipctool.md) | ||
* [GPIO settings](transfer-gpio-settings.md) | ||
* [ACMEv2](transfer-acmev2.md) | ||
* [YouTube streaming](transfer-youtube-streaming.md) | ||
* [WiFi XM530](transfer-wifi-xm530.md) | ||
- [System features](system-features.md) | ||
- [Majestic streamer](majestic-streamer.md) | ||
- [Microbe web interface](microbe-web.md) | ||
- [Upgrade firmware](sysupgrade.md) | ||
- [Image quality tuning](image-quality-tuning.md) | ||
- [Memory tuning](memory-tuning.md) | ||
- [Using ipctool](transfer-example-ipctool.md) | ||
- [GPIO settings](gpio-settings.md) | ||
- [ACMEv2](acme-v2.md) | ||
- [YouTube streaming](youtube-streaming.md) | ||
- [WiFi XM530](wifi-xm530.md) | ||
|
||
## Firmware | ||
* [Releases in GitHub](https://github.com/OpenIPC/firmware/releases/tag/latest) | ||
* [Releases in Telegram](https://t.me/s/openipc_dev) | ||
* [Source code](transfer-source-code.md) | ||
- [Releases in GitHub](https://github.com/OpenIPC/firmware/releases/tag/latest) | ||
- [Releases in Telegram](https://t.me/s/openipc_dev) | ||
- [Source code](source-code.md) | ||
|
||
## Development | ||
* [Interesting tricks](transfer-dev-tricks.md) | ||
* [Boot device with NFS](transfer-dev-nfs-boot.md) | ||
* [FFMPEG usage](transfer-dev-ffmpeg-usage.md) | ||
* [Kernel configuration for adding new platforms](transfer-integration-kernel.md) | ||
- [Interesting tricks](dev-tricks.md) | ||
- [Boot device with NFS](dev-nfs-boot.md) | ||
- [FFMPEG usage](dev-ffmpeg-usage.md) | ||
- [Kernel configuration for adding new platforms](integration-kernel.md) | ||
|
||
## Contacts | ||
* [Bug reports](https://github.com/OpenIPC/firmware/issues) | ||
- [Bug reports](https://github.com/OpenIPC/firmware/issues) | ||
|
||
## Our resources | ||
- [OpenIPC](https://openipc.org/) | ||
- [OpenCollective](https://opencollective.com/openipc) | ||
- [Twitter](https://twitter.com/OpenIPC) | ||
- [Telegram](https://t.me/openipc) | ||
|
||
## Roadmap | ||
* [ToDo](transfer-todo-all.md) | ||
* [Developers](transfer-developers.md) | ||
* [Notes from old sources](transfer-notes-for-resorting.md) | ||
- [ToDo](todo-all.md) | ||
- [Developers](developers.md) | ||
- [Notes from old sources](notes-for-resorting.md) | ||
|
||
## Resources for recycling and integration | ||
* <https://github.com/OpenIPC/camerasrnd> | ||
* <https://openwrt.org/docs/techref/hardware/soc/soc.hisilicon.hi35xx> | ||
- <https://github.com/OpenIPC/camerasrnd> | ||
- <https://openwrt.org/docs/techref/hardware/soc/soc.hisilicon.hi35xx> | ||
|
||
[logo]: ../images/logo_openipc.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# OpenIPC Wiki | ||
[Table of Content](index.md) | ||
|
||
Additional requirements for kernel configuration | ||
------------------------------------------------ | ||
|
||
``` | ||
CONFIG_BLK_DEV=y | ||
CONFIG_BLK_DEV_LOOP=y | ||
``` | ||
|
||
``` | ||
CONFIG_IP_MULTICAST=y | ||
``` | ||
|
||
``` | ||
CONFIG_IP_PNP=y | ||
CONFIG_IP_PNP_DHCP=y | ||
CONFIG_ROOT_NFS=y | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
Majestic streamer | ||
# OpenIPC Wiki | ||
[Table of Content](index.md) | ||
|
||
Majestic Streamer | ||
----------------- | ||
|
||
### Preamble | ||
|
Oops, something went wrong.