Experimental system for creating open source plugins for Majestic
- At the moment, examples of plugins have been implemented only for the most popular processors today.
- Nothing prevents everyone and enthusiasts from adding them to other processors and actively developing them.
- By default, the plugin system is disabled and does not contribute any actions to the main operation of the device.
- New functions can be added to
vendor/custom.c
- RETURN is a macro to simplify the plugin response output.
static void get_example(const char *value) {
RETURN("plugin get_example: %s", value);
}
static table custom[] = {
[...]
{ "example", &get_example },
};
root@openipc-ssc337de:~# echo example test123 | nc localhost 4000
plugin get_example: test123
git clone https://github.com/OpenIPC/firmware --depth 1
cd firmware
- Hisilicon:
make br-majestic-plugins-rebuild BOARD=hi3516ev300_lite
- Goke:
make br-majestic-plugins-rebuild BOARD=gk7202v300_lite
- Ingenic:
make br-majestic-plugins-rebuild BOARD=t31_lite
- Sigmastar:
make br-majestic-plugins-rebuild BOARD=ssc335_lite
scp -O output/build/majestic-plugins-master/*.so root@192.168.1.10:/usr/lib
ssh root@192.168.1.10
cli -s .system.plugins true
killall -1 majestic
echo brightness 100 | nc localhost 4000
echo -e '#!/usr/bin/haserl\nServer: $SERVER_SOFTWARE\nCache-Control: no-store\n\n<% echo $(echo $GET_cmd $GET_val | nc localhost 4000) %>' > /var/www/cgi-bin/plugins.cgi
chmod 755 /var/www/cgi-bin/plugins.cgi