Merge pull request #3578 from MilhouseVH/le9.2-drop_aml_3.14

Goodbye Amlogic 3.14 [backport]
This commit is contained in:
Christian Hewitt 2019-06-19 22:50:02 +04:00 committed by GitHub
commit 97c44d6185
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
184 changed files with 17 additions and 11299 deletions

View File

@ -14,9 +14,6 @@ image:
noobs:
./scripts/image noobs
amlpkg:
./scripts/image amlpkg
clean:
rm -rf $(BUILD_DIRS)/* $(BUILD_DIRS)/.stamps

View File

@ -10,14 +10,6 @@ PKG_URL="https://github.com/mighty-p/t2scan/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="A small channel scan tool which generates DVB-T/T2 channels.conf files."
# aml 3.14 hack
pre_configure_target() {
if [ "$LINUX" = "amlogic-3.14" -o "$LINUX" = "amlogic-3.10" ]; then
sed -i 's/DVB_HEADER=0/DVB_HEADER=1/g' $PKG_BUILD/configure*
sed -i 's/HAS_DVB_API5=0/HAS_DVB_API5=1/g' $PKG_BUILD/configure*
fi
}
makeinstall_target() {
:
}

View File

@ -11,14 +11,6 @@ PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="A channel scan tool which generates ATSC, DVB-C, DVB-S/S2 and DVB-T channels.conf files."
PKG_TOOLCHAIN="autotools"
# aml 3.14 hack
pre_configure_target() {
if [ "$LINUX" = "amlogic-3.14" -o "$LINUX" = "amlogic-3.10" ]; then
sed -i 's/DVB_HEADER=0/DVB_HEADER=1/g' $PKG_BUILD/configure*
sed -i 's/HAS_DVB_API5=0/HAS_DVB_API5=1/g' $PKG_BUILD/configure*
fi
}
makeinstall_target() {
:
}

View File

@ -48,7 +48,6 @@ addon() {
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
cp -P $PKG_BUILD/.$TARGET_NAME/src/boblightd $ADDON_BUILD/$PKG_ADDON_ID/bin
cp -P $PKG_BUILD/.$TARGET_NAME/src/boblight-constant $ADDON_BUILD/$PKG_ADDON_ID/bin
cp -P $PKG_BUILD/.$TARGET_NAME/src/boblight-aml $ADDON_BUILD/$PKG_ADDON_ID/bin
if [ "$DISPLAYSERVER" = "x11" ] ; then
cp -P $PKG_BUILD/.$TARGET_NAME/src/boblight-X11 $ADDON_BUILD/$PKG_ADDON_ID/bin
fi

View File

@ -1,632 +0,0 @@
diff --git a/src/Makefile.am b/src/Makefile.am
index 9ba5381..c5a4dc6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -7,6 +7,7 @@ AM_CFLAGS =\
-g
bin_PROGRAMS = boblightd \
+ boblight-aml \
boblight-constant
@@ -19,6 +20,11 @@ endif
endif
+boblight_aml_SOURCES = clients/boblight-aml/boblight-aml.cpp
+boblight_aml_SOURCES += clients/boblight-aml/flagmanager-aml.cpp
+boblight_aml_SOURCES += clients/flagmanager.cpp
+boblight_aml_SOURCES += util/misc.cpp
+
boblight_v4l_SOURCES = \
clients/boblight-v4l/boblight-v4l.cpp \
clients/boblight-v4l/flagmanager-v4l.cpp \
diff -urPp src/clients/boblight-aml.cpp src/clients/boblight-aml/boblight-aml.cpp
--- /dev/null Thu Jan 1 00:00:00 1970
+++ b/src/clients/boblight-aml/boblight-aml.cpp Thu Jan 15 10:24:16 2015
@@ -0,0 +1,491 @@
+/*
+ * boblight
+ * Copyright (C) Bob 2009
+ *
+ * boblight is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * boblight is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define BOBLIGHT_DLOPEN
+#include "lib/boblight.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <signal.h>
+#include <algorithm>
+
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/poll.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/ioctl.h>
+
+#include "config.h"
+#include "util/misc.h"
+#include "util/timeutils.h"
+#include "flagmanager-aml.h"
+
+using namespace std;
+
+//from linux/amlogic/amports/amvideocap.h
+#define AMVIDEOCAP_IOC_MAGIC 'V'
+#define AMVIDEOCAP_IOW_SET_WANTFRAME_WIDTH _IOW(AMVIDEOCAP_IOC_MAGIC, 0x02, int)
+#define AMVIDEOCAP_IOW_SET_WANTFRAME_HEIGHT _IOW(AMVIDEOCAP_IOC_MAGIC, 0x03, int)
+
+
+// helper class - tries to load the "movie" settings from the script.xbmc.boblight addon
+// and pass them to the boblight-aml client
+class CBoblightAddonSettings
+{
+ public:
+ CBoblightAddonSettings() : m_bobdisable(false), m_settingsLoaded(false)
+ {
+ m_settingsLoaded = loadBoblightAddonSettings();
+ }
+
+ std::string getBoblightClientCmdLine()
+ {
+ std::string cmdLine = "";
+ //convert bool string to lowercase
+ transform(m_interpolation.begin(), m_interpolation.end(), m_interpolation.begin(), ::tolower);
+
+ cmdLine += "-s " + m_ip + ":" + m_port;
+ cmdLine += " -o autospeed=" + m_autospeed;
+ cmdLine += " -o interpolation=" + m_interpolation;
+ cmdLine += " -o saturation=" + m_saturation;
+ cmdLine += " -o speed=" + m_speed;
+ cmdLine += " -o threshold=" + m_threshold;
+ cmdLine += " -o value=" + m_value;
+ return cmdLine;
+ }
+
+ bool m_bobdisable;
+ bool m_settingsLoaded;
+ std::string m_ip;
+ std::string m_port;
+ std::string m_autospeed;
+ std::string m_interpolation;
+ std::string m_saturation;
+ std::string m_speed;
+ std::string m_threshold;
+ std::string m_value;
+
+ private:
+ #define SETTINGS_ATTR_BOBDISABLE "bobdisable"
+ #define SETTINGS_ATTR_IP "hostip"
+ #define SETTINGS_ATTR_PORT "hostport"
+ #define SETTINGS_ATTR_AUTOSPEED "movie_autospeed"
+ #define SETTINGS_ATTR_INTERPOLATION "movie_interpolation"
+ #define SETTINGS_ATTR_SATURATION "movie_saturation"
+ #define SETTINGS_ATTR_SPEED "movie_speed"
+ #define SETTINGS_ATTR_THRESHOLD "movie_threshold"
+ #define SETTINGS_ATTR_VALUE "movie_value"
+ #define KODI_HOME_ENV_VAR "HOME"
+
+ bool loadBoblightAddonSettings()
+ {
+ bool ret = false;
+ char *kodiHome = getenv(KODI_HOME_ENV_VAR);
+ //fallback to custom settings file in case boblight addon is not installed
+ std::string settingsFile = "/storage/boblight-aml.xml";
+
+ if (kodiHome != NULL)
+ {
+ settingsFile = std::string(kodiHome) + "/.kodi/userdata/addon_data/script.xbmc.boblight/settings.xml";
+ }
+
+ FILE *fd = fopen(settingsFile.c_str(), "r");
+
+ if (fd != NULL)
+ {
+ fseek(fd, 0, SEEK_END);
+ size_t fileSize = ftell(fd);
+ fseek(fd, 0, SEEK_SET);
+ if (fileSize > 0)
+ {
+ if (fileSize > 32000)//read 16k max - there shouldn't be a bigger settings.xml from boblight [tm]
+ fileSize = 32000;
+ char *xmlBuffer = new char[fileSize];
+ size_t readCount = fread(xmlBuffer, fileSize, 1, fd);
+ fclose(fd);
+
+ if (readCount == 1)
+ {
+ parseBoblightSettings(std::string(xmlBuffer));
+ ret = true;
+ }
+ else
+ {
+ fprintf(stderr, "Failed reading boblight addon settings.xml");
+ }
+ delete[] xmlBuffer;
+ }
+ }
+ return ret;
+ }
+
+ void parseBoblightSettings(std::string xmlBuffer)
+ {
+ std::string settings_bobdisable_str;
+ settings_bobdisable_str = getValueFromXmlBuffer(xmlBuffer, SETTINGS_ATTR_BOBDISABLE);
+ if (settings_bobdisable_str == "true" || settings_bobdisable_str == "True")
+ m_bobdisable = true;
+
+ m_ip = getValueFromXmlBuffer(xmlBuffer, SETTINGS_ATTR_IP);
+ m_port = getValueFromXmlBuffer(xmlBuffer, SETTINGS_ATTR_PORT);
+ m_autospeed = getValueFromXmlBuffer(xmlBuffer, SETTINGS_ATTR_AUTOSPEED);
+ m_interpolation = getValueFromXmlBuffer(xmlBuffer, SETTINGS_ATTR_INTERPOLATION);
+ m_saturation = getValueFromXmlBuffer(xmlBuffer, SETTINGS_ATTR_SATURATION);
+ m_speed = getValueFromXmlBuffer(xmlBuffer, SETTINGS_ATTR_SPEED);
+ m_threshold = getValueFromXmlBuffer(xmlBuffer, SETTINGS_ATTR_THRESHOLD);
+ m_value = getValueFromXmlBuffer(xmlBuffer, SETTINGS_ATTR_VALUE);
+ }
+
+ std::string getValueFromXmlBuffer(const std::string &xmlBuffer, const char* xmlAttribute)
+ {
+ size_t strPos = 0;
+ std::string valueStr;
+
+ // each line in the xml looks like this:
+ // <setting id="movie_value" value="1.000006" />
+ // find the attribute
+ if ((strPos = xmlBuffer.find(xmlAttribute)) != std::string::npos)
+ {
+ size_t strPos2 = 0;
+ // from movie_value" value="1.000006" /> look for "value"
+ if ((strPos2 = xmlBuffer.find("value", strPos)) != std::string::npos)
+ {
+ size_t strPos3 = 0;
+ // from value="1.000006" /> look for "="
+ if ((strPos3 = xmlBuffer.find("=", strPos2)) != std::string::npos)
+ {
+ //extract the value - strPos3 points to ="1.000006"
+ int valueOffset = 1; //skip the "="
+ if (xmlBuffer[strPos3 + valueOffset] == '"')
+ valueOffset++;//skip " if needed
+ int strLen = 0;
+ do
+ {
+ // value stops with " or space
+ if (xmlBuffer[strPos3 + valueOffset + strLen] == '"' ||
+ xmlBuffer[strPos3 + valueOffset + strLen] == ' ')
+ break;
+ strLen++;
+ } while (strLen < 20);// no insane xml garbage ...
+
+ valueStr = xmlBuffer.substr(strPos3 + valueOffset, strLen);
+ }
+ }
+ }
+ return valueStr;
+ }
+};
+
+struct aml_snapshot_t {
+ unsigned int dst_width;
+ unsigned int dst_height;
+ unsigned int dst_stride;
+ unsigned int dst_size;
+ void *dst_vaddr;
+};
+
+volatile bool g_stop = false;
+CFlagManagerAML g_flagmanager;
+/*********************************************************
+ *********************************************************/
+static void SignalHandler(int signum)
+{
+ if (signum == SIGTERM)
+ {
+ fprintf(stderr, "caught SIGTERM\n");
+ g_stop = true;
+ }
+ else if (signum == SIGINT)
+ {
+ fprintf(stderr, "caught SIGTERM\n");
+ g_stop = true;
+ }
+}
+
+#define VIDEO_PATH "/dev/amvideo"
+#define AMSTREAM_IOC_MAGIC 'S'
+#define AMSTREAM_IOC_GET_VIDEO_DISABLE _IOR(AMSTREAM_IOC_MAGIC, 0x48, unsigned long)
+static int amvideo_utils_video_playing()
+{
+ int video_fd;
+ int video_disable;
+
+ video_fd = open(VIDEO_PATH, O_RDWR);
+ if (video_fd < 0) {
+ return -1;
+ }
+
+ ioctl(video_fd, AMSTREAM_IOC_GET_VIDEO_DISABLE, &video_disable);
+ if (video_disable)
+ {
+ close(video_fd);
+ return 1;
+ }
+
+ close(video_fd);
+
+// fprintf(stderr, "pos x %d y %d w %d h %d\n",snapshot.src_x, snapshot.src_y,snapshot.src_width,snapshot.src_height);
+ return 0;
+}
+
+static int capture_frame(int fd, aml_snapshot_t &snapshot)
+{
+ int ret = 0;
+
+ ssize_t readResult = pread(fd, snapshot.dst_vaddr, snapshot.dst_size, 0);
+
+ if (readResult < snapshot.dst_size)
+ {
+ fprintf(stderr, "frame read returned %d\n", readResult);
+ }
+ //fprintf(stderr, "requ: %d read %d \n", snapshot.dst_size, readResult);
+ fprintf(stderr, ".");
+ return ret;
+}
+
+static int configure_capture(int fd, aml_snapshot_t &snapshot)
+{
+ int ret = 0;
+ int ioctlret = 0;
+
+ if ((ioctlret = ioctl(fd, AMVIDEOCAP_IOW_SET_WANTFRAME_WIDTH, snapshot.dst_width)) != 0)
+ {
+ ret = 2;
+ fprintf(stderr, "Error setting frame width (ret: %d errno: %d)\n", ioctlret, errno);
+ }
+
+
+ if ((ioctlret = ioctl(fd, AMVIDEOCAP_IOW_SET_WANTFRAME_HEIGHT, snapshot.dst_height)) != 0)
+ {
+ ret = 3;
+ fprintf(stderr, "Error setting frame height (ret: %d errno: %d)\n", ioctlret, errno);
+ }
+
+ return ret;
+}
+
+static void frameToboblight(void *boblight, uint8_t* outputptr, int w, int h, int stride)
+{
+ if (!boblight)
+ {
+ fprintf(stderr, "no boblight\n");
+ return;
+ }
+ if (!outputptr)
+ {
+ fprintf(stderr, "no outputptr\n");
+ return;
+ }
+ //read out pixels and hand them to libboblight
+ uint8_t* buffptr;
+ for (int y = h; y > 0; y--) {
+ buffptr = outputptr + stride * y;
+ for (int x = 0; x < w; x++) {
+ int rgb[3];
+ rgb[2] = *(buffptr++);
+ rgb[1] = *(buffptr++);
+ rgb[0] = *(buffptr++);
+
+ //fprintf(stdout, "frameToboblight: x(%d), y(%d)\n", x, y);
+
+ boblight_addpixelxy(boblight, x, y, rgb);
+ }
+ }
+}
+
+static int Run(void* boblight)
+{
+ int snapshot_fd = -1;
+ aml_snapshot_t aml_snapshot = {0};
+ int lastPriority = 255;
+
+ aml_snapshot.dst_width = 160;
+ aml_snapshot.dst_height = 160;
+
+ // calc stride, size and alloc mem
+ aml_snapshot.dst_stride = aml_snapshot.dst_width * 3;
+ aml_snapshot.dst_size = aml_snapshot.dst_stride * aml_snapshot.dst_height;
+ aml_snapshot.dst_vaddr = calloc(aml_snapshot.dst_size, 1);
+
+ fprintf(stdout, "Connection to boblightd config: width(%d), height(%d)\n",
+ aml_snapshot.dst_width, aml_snapshot.dst_height);
+ //tell libboblight how big our image is
+ boblight_setscanrange(boblight, (int)aml_snapshot.dst_width, (int)aml_snapshot.dst_height);
+
+ while(!g_stop)
+ {
+ int64_t bgn = GetTimeUs();
+
+ if (snapshot_fd == -1) {
+ snapshot_fd = open(g_flagmanager.m_device.c_str(), O_RDWR, 0);
+
+ if (snapshot_fd == -1) {
+ sleep(1);
+ continue;
+ } else {
+ fprintf(stdout, "snapshot_fd(%d) \n", snapshot_fd);
+ }
+ }
+
+ // match source ratio if possible
+ if (amvideo_utils_video_playing() != 0) {
+ if ( lastPriority != 255)
+ {
+ boblight_setpriority(boblight, 255);
+ lastPriority = 255;
+ }
+ sleep(1);
+ continue;
+ }
+
+ if (configure_capture(snapshot_fd, aml_snapshot) == 0)
+ {
+ if (capture_frame(snapshot_fd, aml_snapshot) == 0)
+ {
+ // image to boblight convert.
+ frameToboblight(boblight, (uint8_t*)aml_snapshot.dst_vaddr,
+ aml_snapshot.dst_width, aml_snapshot.dst_height, aml_snapshot.dst_stride);
+
+ if (lastPriority != g_flagmanager.m_priority)
+ {
+ boblight_setpriority(boblight, g_flagmanager.m_priority);
+ lastPriority = g_flagmanager.m_priority;
+ }
+ if (!boblight_sendrgb(boblight, 1, NULL))
+ {
+ // some error happened, probably connection broken, so bitch and try again
+ PrintError(boblight_geterror(boblight));
+ boblight_destroy(boblight);
+ continue;
+ }
+ }
+ else
+ {
+ fprintf(stdout, "nap time\n");
+ sleep(1);
+ }
+ }
+ int64_t end = GetTimeUs();
+ float calc_time_ms = (float)(end - bgn) / 1000.0;
+ // throttle to 100ms max cycle rate
+ calc_time_ms -= 100.0;
+ if ((int)calc_time_ms < 0)
+ usleep((int)(-calc_time_ms * 1000));
+ }
+
+ // last image is black
+ boblight_setpriority(boblight, 255);
+ boblight_destroy(boblight);
+ close(snapshot_fd);
+ return 0;
+}
+
+/*********************************************************
+ *********************************************************/
+int main(int argc, char *argv[])
+{
+ //load the boblight lib, if it fails we get a char* from dlerror()
+ const char* boblight_error = boblight_loadlibrary(NULL);
+ if (boblight_error)
+ {
+ PrintError(boblight_error);
+ return 1;
+ }
+
+ //try to parse the flags and bitch to stderr if there's an error
+ try {
+ g_flagmanager.ParseFlags(argc, argv);
+ }
+ catch (string error) {
+ PrintError(error);
+ g_flagmanager.PrintHelpMessage();
+ return 1;
+ }
+
+ if (g_flagmanager.m_printhelp) {
+ g_flagmanager.PrintHelpMessage();
+ return 1;
+ }
+
+ if (g_flagmanager.m_printboblightoptions) {
+ g_flagmanager.PrintBoblightOptions();
+ return 1;
+ }
+
+ // check if we only should generate a cmdline based
+ // on settings from possible found boblight addon
+ if (g_flagmanager.generateCmdLine)
+ {
+ CBoblightAddonSettings settings;
+ string cmdLine = "-p 100"; //default cmdline just contains priority 100
+
+ if (settings.m_settingsLoaded)
+ cmdLine += " " + settings.getBoblightClientCmdLine();
+ fprintf(stdout, "%s", cmdLine.c_str());
+ return 0;//exit
+ }
+
+ fprintf(stderr, "Using device: %s \n", g_flagmanager.m_device.c_str());
+
+ //set up signal handlers
+ signal(SIGINT, SignalHandler);
+ signal(SIGTERM, SignalHandler);
+
+ //keep running until we want to quit
+ while(!g_stop) {
+ //init boblight
+ void* boblight = boblight_init();
+
+ fprintf(stdout, "Connecting to boblightd(%p)\n", boblight);
+
+ //try to connect, if we can't then bitch to stderr and destroy boblight
+ if (!boblight_connect(boblight, g_flagmanager.m_address, g_flagmanager.m_port, 5000000) ||
+ !boblight_setpriority(boblight, 255)) {
+ PrintError(boblight_geterror(boblight));
+ fprintf(stdout, "Waiting 10 seconds before trying again\n");
+ boblight_destroy(boblight);
+ sleep(2);
+ continue;
+ }
+
+ fprintf(stdout, "Connection to boblightd opened\n");
+
+ //try to parse the boblight flags and bitch to stderr if we can't
+ try {
+ g_flagmanager.ParseBoblightOptions(boblight);
+ }
+ catch (string error) {
+ PrintError(error);
+ return 1;
+ }
+
+ try {
+ Run(boblight);
+ }
+ catch (string error) {
+ PrintError(error);
+ boblight_destroy(boblight);
+ return 1;
+ }
+ }
+ fprintf(stdout, "Exiting\n");
+}
diff -urPp src/clients/flagmanager-aml.cpp src/clients/boblight-aml/flagmanager-aml.cpp
--- /dev/null Thu Jan 1 00:00:00 1970
+++ b/src/clients/boblight-aml/flagmanager-aml.cpp Thu Jan 15 10:21:40 2015
@@ -0,0 +1,68 @@
+/*
+ * boblight
+ * Copyright (C) Bob 2009
+ *
+ * boblight is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * boblight is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <iostream>
+
+#include "flagmanager-aml.h"
+#include "util/misc.h"
+#include "config.h"
+
+#define DEFAULT_CAPTURE_DEVICE "/dev/amvideocap0"
+
+using namespace std;
+
+CFlagManagerAML::CFlagManagerAML()
+{
+ // extend the flags -d -> device
+ // -g -> only generate cmdline from possible found boblight addon settings.xml
+ m_flags += "d:g";
+ m_device = DEFAULT_CAPTURE_DEVICE;
+ generateCmdLine = false;
+}
+
+void CFlagManagerAML::ParseFlagsExtended(int& argc, char**& argv, int& c, char*& optarg)
+{
+ if (c == 'd') //devicename
+ {
+ if (optarg) //optional device
+ {
+ m_device = optarg;
+ }
+ }
+
+ if (c == 'g') //generate cmdline
+ {
+ generateCmdLine = true;
+ }
+}
+
+void CFlagManagerAML::PrintHelpMessage()
+{
+ cout << "Usage: boblight-aml\n";
+ cout << "\n";
+ cout << " options:\n";
+ cout << "\n";
+ cout << " -p priority, from 0 to 255, default is 128\n";
+ cout << " -s address[:port], set the address and optional port to connect to\n";
+ cout << " -o add libboblight option, syntax: [light:]option=value\n";
+ cout << " -l list libboblight options\n";
+ cout << " -f fork\n";
+ cout << " -d <device> (defaults to " << m_device << ")\n";
+ cout << " -g try to find the settings.xml file from boblight addon and return the cmdline to use its options\n";
+ cout << "\n";
+}
diff -urPp src/clients/flagmanager-aml.h src/clients/boblight-aml/flagmanager-aml.h
--- /dev/null Thu Jan 1 00:00:00 1970
+++ b/src/clients/boblight-aml/flagmanager-aml.h Thu Jan 15 10:20:15 2015
@@ -0,0 +1,36 @@
+/*
+ * boblight
+ * Copyright (C) Bob 2009
+ *
+ * boblight is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * boblight is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef FLAGMANAGERAML
+#define FLAGMANAGERAML
+
+#include "clients/flagmanager.h"
+
+class CFlagManagerAML : public CFlagManager
+{
+ public:
+ CFlagManagerAML();
+ void ParseFlagsExtended(int& argc, char**& argv, int& c, char*& optarg);
+
+ void PrintHelpMessage();
+ std::string m_device; //device to open for amvideocap
+ bool generateCmdLine;
+
+};
+
+#endif //FLAGMANAGERAML
\ No newline at end of file

View File

@ -18,10 +18,4 @@ if [ -x $ADDON_DIR/bin/boblight-X11 -a -e $ADDON_HOME/boblight.X11 ] ; then
boblight-X11 -f >/dev/null 2>&1
fi
if [ -x $ADDON_DIR/bin/boblight-aml -a -e /dev/amvideocap0 ] ; then
#generates cmdline from boblight addon settings
CMDLINE=`boblight-aml -g`
boblight-aml $CMDLINE >/dev/null 2>&1 &
fi
exec boblightd -c $ADDON_HOME/boblight.conf > $ADDON_LOG_FILE 2>&1

View File

@ -1,13 +0,0 @@
110
- Rewrite add-on from scratch
- Add support for APPS, SETUP, CVBS (X92) and POWER (A1 Max) indicators.
- Add a configuration dialog:
* Adjust display brightness.
* Storage access indication.
* Advanced hardware configuration of the display.
- Fix crash if aml_fd628 module is not loaded (led_on, led_off files don't exist)
- Fix disable add-on from Kodi UI.
- Turn off indicators when add-on is disabled.
100
- Initial add-on

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

View File

@ -1,30 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="fd628"
PKG_VERSION="1.1"
PKG_REV="100"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://libreelec.tv"
PKG_URL=""
PKG_DEPENDS_TARGET="toolchain"
PKG_SECTION="service"
PKG_SHORTDESC="fd628: Kodi service to light up additional icons on devices with FD628 display"
PKG_LONGDESC="fd628: Kodi service to light up additional icons on devices with FD628 display"
PKG_TOOLCHAIN="manual"
PKG_IS_ADDON="yes"
PKG_ADDON_NAME="service.fd628"
PKG_ADDON_PROJECTS="S905 S912"
PKG_ADDON_TYPE="xbmc.service"
make_target() {
sed -e "s|@PKG_VERSION@|$PKG_VERSION|g" \
-i addon.xml
}
addon() {
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID
cp -R $PKG_BUILD/* $ADDON_BUILD/$PKG_ADDON_ID
}

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="service.fd628"
name="FD628 Display"
version="@PKG_VERSION@"
provider-name="Team LibreELEC">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
</requires>
<extension point="xbmc.service"
library="resources/lib/service.py"
start="startup">
</extension>
<extension point="xbmc.addon.metadata">
<summary>Service for controlling FD628 VFD display icons</summary>
<description>Service for controlling FD628 VFD display icons, e.g. Ethernet/WiFi connection status and Time</description>
<platform>all</platform>
<assets>
<icon>resources/icon.png</icon>
</assets>
</extension>
</addon>

View File

@ -1,136 +0,0 @@
# Kodi Media Center language file
# Addon Name: FD628 Display
# Addon id: service.fd628
# Addon Provider: Team LibreELEC
msgid ""
msgstr ""
"Project-Id-Version: XBMC-Addons\n"
"Report-Msgid-Bugs-To: alanwww1@xbmc.org\n"
"POT-Creation-Date: 2018-02-12 17:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: en_GB\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
# Kodi Settings
msgctxt "#30000"
msgid "General"
msgstr ""
msgctxt "#30001"
msgid "Turn on display"
msgstr ""
msgctxt "#30002"
msgid "Display brightness"
msgstr ""
msgctxt "#30003"
msgid "Advanced settings"
msgstr ""
msgctxt "#30004"
msgid "Display type"
msgstr ""
msgctxt "#30026"
msgid "Common anode display (transposed ram)"
msgstr ""
msgctxt "#30013"
msgid "Enable storage access (RW) indicator"
msgstr ""
msgctxt "#30014"
msgid "Select which icon is to be used as the access indicator"
msgstr ""
msgctxt "#30028"
msgid "Clock colon (:) always on"
msgstr ""
msgctxt "#30015"
msgid "play"
msgstr ""
msgctxt "#30016"
msgid "pause"
msgstr ""
msgctxt "#30017"
msgid "hdmi"
msgstr ""
msgctxt "#30018"
msgid "cvbs"
msgstr ""
msgctxt "#30019"
msgid "eth"
msgstr ""
msgctxt "#30020"
msgid "wifi"
msgstr ""
msgctxt "#30021"
msgid "setup"
msgstr ""
msgctxt "#30022"
msgid "apps"
msgstr ""
msgctxt "#30023"
msgid "usb"
msgstr ""
msgctxt "#30024"
msgid "sd"
msgstr ""
msgctxt "#30025"
msgid "alarm"
msgstr ""
msgctxt "#30027"
msgid "power"
msgstr ""
msgctxt "#30012"
msgid "Reorder character indexes"
msgstr ""
msgctxt "#30005"
msgid "Index 0"
msgstr ""
msgctxt "#30006"
msgid "Index 1"
msgstr ""
msgctxt "#30007"
msgid "Index 2"
msgstr ""
msgctxt "#30008"
msgid "Index 3"
msgstr ""
msgctxt "#30009"
msgid "Index 4"
msgstr ""
msgctxt "#30010"
msgid "Index 5"
msgstr ""
msgctxt "#30011"
msgid "Index 6"
msgstr ""
# Max index 30028

View File

@ -1,78 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
import os
import struct
from fd628utils import *
_led_cmd = '/sys/class/leds/le-vfd/led_cmd'
class fd628Dev:
def __init__(self):
import ioctl
import ctypes
size = ctypes.sizeof(ctypes.c_int(0))
self._FD628_IOC_MAGIC = ord('M')
self._FD628_IOC_SMODE = ioctl.IOW(self._FD628_IOC_MAGIC, 1, size)
self._FD628_IOC_GMODE = ioctl.IOR(self._FD628_IOC_MAGIC, 2, size)
self._FD628_IOC_SBRIGHT = ioctl.IOW(self._FD628_IOC_MAGIC, 3, size)
self._FD628_IOC_GBRIGHT = ioctl.IOR(self._FD628_IOC_MAGIC, 4, size)
self._FD628_IOC_POWER = ioctl.IOW(self._FD628_IOC_MAGIC, 5, size)
self._FD628_IOC_GVER = ioctl.IOR(self._FD628_IOC_MAGIC, 6, size)
self._FD628_IOC_STATUS_LED = ioctl.IOW(self._FD628_IOC_MAGIC, 7, size)
self._FD628_IOC_GDISPLAY_TYPE = ioctl.IOR(self._FD628_IOC_MAGIC, 8, size)
self._FD628_IOC_SDISPLAY_TYPE = ioctl.IOW(self._FD628_IOC_MAGIC, 9, size)
self._FD628_IOC_SCHARS_ORDER = ioctl.IOW(self._FD628_IOC_MAGIC, 10, 7)
self._FD628_IOC_USE_DTB_CONFIG = ioctl.IOW(self._FD628_IOC_MAGIC, 11, size)
self._FD628_IOC_MAXNR = 12
def enableDisplay(self, value):
self.__writeFD628(self._FD628_IOC_POWER, int(value))
def getBrightness(self):
return self.__readFD628(self._FD628_IOC_GBRIGHT)
def setBrightness(self, value):
self.__writeFD628(self._FD628_IOC_SBRIGHT, value)
def getDisplayType(self):
return self.__readFD628(self._FD628_IOC_GDISPLAY_TYPE)
def setDisplayType(self, value):
self.__writeFD628(self._FD628_IOC_SDISPLAY_TYPE, value)
def setCharacterOrder(self, value):
pack = struct.pack('BBBBBBB', value[0], value[1], value[2], value[3], value[4], value[5], value[6])
self.__writeFD628(self._FD628_IOC_SCHARS_ORDER, pack, True)
def useDtbConfig(self):
self.__writeFD628(self._FD628_IOC_USE_DTB_CONFIG, 0)
def __readFD628(self, cmd, isBuf = False):
import ioctl
ret = None
if (ioctl.DIR(cmd) == ioctl.READ and self.__writeFD628(cmd, 0)):
with open(_led_cmd, "rb") as vfd:
ret = vfd.read()
if (ret == ''):
ret = None
if (not isBuf and ret != None):
ret = int(ret, 0)
kodiLog('fd628Dev.__readFD628: value = {0}'.format(str(ret)))
return ret
def __writeFD628(self, cmd, value, isBuf = False):
ret = False
if (os.path.isfile(_led_cmd)):
if isBuf:
value = ''.join([struct.pack('I', cmd), value])
else:
value = struct.pack('Ii', cmd, value)
kodiLog('fd628Dev.__writeFD628: value = {0}'.format(repr(value)))
try:
with open(_led_cmd, "wb") as vfd:
vfd.write(value)
ret = True
except Exception as inst:
kodiLogError(inst)
return ret

View File

@ -1,95 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
import xbmcaddon
addon = xbmcaddon.Addon(id='service.fd628')
def getSetting(id):
return addon.getSetting(id)
def getSettingBool(id):
value = getSetting(id).lower()
if (value == 'true'):
value = True
else:
value = False
return value
def getSettingInt(id):
return int(getSetting(id))
def getSettingNumber(id):
return float(getSetting(id))
class fd628Settings:
def __init__(self):
self.readValues()
def isDisplayOn(self):
return self._displayOn
def isAdvancedSettings(self):
return self._displayAdvanced
def getBrightness(self):
return self._displayBrightness
def getDisplayType(self):
return self._displayType
def isCommonAnode(self):
return self._commonAnode
def getDisplay(self):
value = self.getDisplayType()
if (self.isCommonAnode()):
value = value + (1 << 16)
return value
def getCharacterIndex(self, i):
return self._characterIndexes[i]
def getCharacterIndexes(self):
return self._characterIndexes
def isStorageIndicator(self):
return self._storageIndicator
def getStorageIndicatorIcon(self):
return self._storageIndicatorIcon
def isColonOn(self):
return self._colonOn
def readValues(self):
self._displayAdvanced = False
self._displayOn = getSettingBool('display.on')
if (self._displayOn):
self._displayBrightness = getSettingInt('display.brightness')
self._storageIndicator = getSettingBool('display.storage.indicator')
self._storageIndicatorIcon = getSetting('display.storage.indicator.icon')
self._colonOn = getSettingBool('display.colon.on')
self._displayAdvanced = getSettingBool('display.advanced')
if (self._displayAdvanced):
self._displayType = getSettingInt('display.type')
self._commonAnode = getSettingBool('display.common.anode')
self._characterIndexes = []
for i in range(7):
self._characterIndexes.append(getSettingInt('display.char.index{0}'.format(i)))
else:
self.__initDefaultValues()
else:
self.__initDefaultValues()
def __initDefaultValues(self):
if not (self._displayOn):
self._displayBrightness = 7
self._storageIndicator = False
self._storageIndicatorIcon = ''
self._colonOn = False
self._displayAdvanced = False
if not (self._displayAdvanced):
self._displayType = 0
self._commonAnode = False
self._characterIndexes = range(0, 7)

View File

@ -1,187 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
import xbmc
import os
from fd628utils import *
class fd628State(object):
def __init__(self, ledName):
self._value = False
self._hasChanged = False
self._ledName = ledName
def _getStr(self, className):
return '{0} ({1})'.format(className, self._ledName)
def update(self):
raise NotImplementedError
def getValue(self):
return self._value
def hasChanged(self):
return self._hasChanged
def getLedName(self):
return self._ledName
def _update(self, value):
if (value != self._value):
self._hasChanged = True
self._value = value
else:
self._hasChanged = False
class fd628IconIndicator(fd628State):
def __init__(self, on, ledName):
super(fd628IconIndicator, self).__init__(ledName)
self._on = on
def __str__(self):
return self._getStr('fd628IconIndicator')
def turnOn(self):
self._on = True
def turnOff(self):
self._on = False
def toggle(self):
self._on = not self._on
def update(self):
self._update(self._on)
class fd628CondVisibility(fd628State):
def __init__(self, ledName, cmd):
super(fd628CondVisibility, self).__init__(ledName)
self._cmd = cmd
def __str__(self):
return self._getStr('fd628CondVisibility')
def update(self):
value = xbmc.getCondVisibility(self._cmd)
self._update(value)
class fd628FileContains(fd628State):
def __init__(self, ledName, path, strings):
super(fd628FileContains, self).__init__(ledName)
self._path = path
self._strings = strings
def __str__(self):
return self._getStr('fd628FileContains')
def update(self):
if (os.path.isfile(self._path)):
with open(self._path, 'rb') as state:
content = state.read()
value = self.__checkContent(content)
self._update(value)
else:
self._update(False)
def __checkContent(self, content):
ret = False
for s in self._strings:
if (s in content):
ret = True
break
return ret
class fd628WindowChecker(fd628State):
def __init__(self, ledName, windows):
super(fd628WindowChecker, self).__init__(ledName)
self._windows = windows
def __str__(self):
return self._getStr('fd628WindowChecker')
def update(self):
value = False
for id in self._windows:
if (xbmc.getCondVisibility('Window.IsVisible({0})'.format(id))):
value = True
break
self._update(value)
class fd628ExtStorageChecker(fd628State):
def __init__(self, ledName, path):
super(fd628ExtStorageChecker, self).__init__(ledName)
self._path = path
def __str__(self):
return self._getStr('fd628ExtStorageChecker')
def update(self):
value = False
for folder, subs, files in os.walk('/dev/disk/by-uuid'):
for filename in files:
path = os.path.realpath(os.path.join(folder, filename))
if (path.startswith(self._path)):
value = True
break
self._update(value)
class fd628ExtStorageCount(fd628State):
def __init__(self, ledName, drives, type):
super(fd628ExtStorageCount, self).__init__(ledName)
if (drives == None): # Monitor all drives
self._drives = None
drives = self.__getAllDrives()
else: # Monitor listed drives
self._drives = drives
drives = self.__getSelectedDrives()
self._driveStats = {key: self.__readStatus(key) for key in drives}
kodiLogNotice('fd628ExtStorageCount.__init__: Drive stats ' + str(self._driveStats))
self._read = False
self._write = False
if (type == 'r'):
self._read = True
elif (type == 'w'):
self._write = True
elif (type == 'rw'):
self._read = True
self._write = True
else:
raise Exception('\'type\' must be \'r\', \'w\' or \'rw\'.')
def update(self):
value = False
if (self._drives == None):
drives = self.__getAllDrives()
else:
drives = self.__getSelectedDrives()
for drive in drives:
if (not drive in self._driveStats):
self._driveStats[drive] = None
kodiLogNotice('fd628ExtStorageCount.update: New drive found \'{0}\''.format(drive))
for path, stats in self._driveStats.iteritems():
newStats = self.__readStatus(path)
if (stats != None and newStats != None):
if (self._read):
value = value or stats[0] != newStats[0]
if (self._write):
value = value or stats[1] != newStats[1]
self._driveStats[path] = newStats
self._update(value)
def __readStatus(self, path):
path = os.path.join('/sys/block', path, 'stat')
if (os.path.isfile(path)):
with open(path, 'rb') as status:
values = status.read().split()
return (values[2], values[6])
else:
return None
def __getAllDrives(self):
drives = []
for folder, subs, files in os.walk('/sys/block'):
drives = [sub for sub in subs if (not sub.startswith('loop'))]
return drives
def __getSelectedDrives(self):
return [drive for drive in self.__getAllDrives() if ([d for d in self._drives if drive.startswith(d)])]

View File

@ -1,19 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
import xbmc
import xbmcaddon
addonName = xbmcaddon.Addon(id='service.fd628').getAddonInfo('name')
def kodiLog(message, level = xbmc.LOGDEBUG):
xbmc.log('{0} -> {1}'.format(addonName, str(message)), level)
def kodiLogError(message):
kodiLog(message, xbmc.LOGERROR)
def kodiLogWarning(message):
kodiLog(message, xbmc.LOGWARNING)
def kodiLogNotice(message):
kodiLog(message, xbmc.LOGNOTICE)

View File

@ -1,89 +0,0 @@
#!/usr/bin/python
"""
Author: SpliFF
License: Public Domain
Python ioctl constants and functions module
Mostly follows specifications in asm-generic/ioctl.h from linux 2.5.36
Notable differences:
* no architecture dependant stuff
* size parameters are all passed as bytes, not types (ie pass 4, not int)
!! WARNING EXPERIMENTAL SOFTWARE !!
Make sure the values returned by these functions are properly tested before using fcntl on anything remotely valuable!
"""
NRBITS = 8
TYPEBITS = 8
# may be arch dependent
SIZEBITS = 14
DIRBITS = 2
NRMASK = (1 << NRBITS) - 1
TYPEMASK = (1 << TYPEBITS) - 1
SIZEMASK = (1 << SIZEBITS) - 1
DIRMASK = (1 << DIRBITS) - 1
NRSHIFT = 0
TYPESHIFT = NRSHIFT + NRBITS
SIZESHIFT = TYPESHIFT + TYPEBITS
DIRSHIFT = SIZESHIFT + SIZEBITS
# may be arch dependent
NONE = 0x0
WRITE = 0x1
READ = 0x2
# for the drivers/sound files...
IN = WRITE << DIRSHIFT
OUT = READ << DIRSHIFT
INOUT = (WRITE | READ) << DIRSHIFT
IOCSIZE_MASK = SIZEMASK << SIZESHIFT
IOCSIZE_SHIFT = SIZESHIFT
# used to create numbers ...
def IO( _type, nr):
return IOC(NONE, _type, nr, 0)
def IOC(direction, _type, nr, size):
return (direction << DIRSHIFT) | (_type << TYPESHIFT) | (nr << NRSHIFT) | (size << SIZESHIFT)
def IOR( _type, nr, size):
return IOC(READ, _type, nr, size)
def IOW(_type, nr, size):
return IOC(WRITE, _type, nr, size)
def IOWR(_type, nr, size):
return IOC(READ|WRITE, _type, nr, size)
def IOR_BAD(_type, nr, size):
return IOC(READ, _type, nr, size)
def IOW_BAD(_type, nr, size):
return IOC(WRITE, _type, nr, size)
def IOWR_BAD(_type, nr, size):
return IOC(READ|WRITE, _type, nr, size)
# used to decode ioctl numbers..
def DIR(nr):
return (nr >> DIRSHIFT) & DIRMASK
def TYPE(nr):
return (nr >> TYPESHIFT) & TYPEMASK
def NR(nr):
return (nr >> NRSHIFT) & NRMASK
def SIZE(nr):
return (nr >> SIZESHIFT) & SIZEMASK

View File

@ -1,143 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
import xbmcaddon
import threading
import os
import fd628states
import fd628dev
import fd628settings
from fd628utils import *
addon = xbmcaddon.Addon(id='service.fd628')
class fd628Monitor(xbmc.Monitor):
def __init__(self):
super(fd628Monitor, self).__init__()
self._settingsChangedCallback = None
def setSettingsChangedCallback(self, callbackObject):
self._settingsChangedCallback = callbackObject
def onSettingsChanged(self):
kodiLog('Enter fd628Monitor.onSettingsChanged')
if (self._settingsChangedCallback != None):
self._settingsChangedCallback.onSettingsChanged()
class fd628Addon():
def __init__(self, monitor):
self._fd628 = fd628dev.fd628Dev()
self._states = []
self._monitor = monitor
self._monitor.setSettingsChangedCallback(self)
self._settings = fd628settings.fd628Settings()
self._vfdon = '/sys/class/leds/le-vfd/led_on'
self._vfdoff = '/sys/class/leds/le-vfd/led_off'
self._rlock = threading.RLock()
def run(self):
firstLoop = True
while not self._monitor.abortRequested():
if self._monitor.waitForAbort(0.5):
break
if (not os.path.isfile(self._vfdon) or not os.path.isfile(self._vfdoff)):
firstLoop = True
continue
if (firstLoop):
self.onSettingsChanged()
firstLoop = False
self.__updateIndicators()
self.__cleanUp()
def __updateIndicators(self):
ledon = []
ledoff = []
if (self._rlock.acquire()):
for state in self._states:
state.update()
if (state.hasChanged()):
if (state.getValue()):
ledon.append(state.getLedName())
else:
ledoff.append(state.getLedName())
self.__writeFile(self._vfdon, ledon)
self.__writeFile(self._vfdoff, ledoff)
self._rlock.release()
def __cleanUp(self):
self.__turnOffIndicators()
self._monitor = None
def __turnOffIndicators(self):
if (self._rlock.acquire()):
ledoff = [state.getLedName() for state in self._states]
self.__writeFile(self._vfdoff, ledoff)
self._rlock.release()
def __writeFile(self, path, values):
if (os.path.isfile(path)):
with open(path, "wb") as vfd:
for j in values:
vfd.write(j)
vfd.flush()
def onSettingsChanged(self):
kodiLog('Enter fd628Addon.onSettingsChanged')
self._settings.readValues()
if (self._rlock.acquire()):
self.__createStates()
self._fd628.enableDisplay(self._settings.isDisplayOn())
if (self._settings.isDisplayOn()):
self._fd628.setBrightness(self._settings.getBrightness())
if (self._settings.isAdvancedSettings()):
self._fd628.setDisplayType(self._settings.getDisplay())
self._fd628.setCharacterOrder(self._settings.getCharacterIndexes())
else:
self._fd628.useDtbConfig()
if (self._colonIcon != None and self._settings.isColonOn()):
self._colonIcon.turnOn()
self.__updateIndicators()
self._rlock.release()
kodiLog('isDisplayOn = {0}'.format(self._settings.isDisplayOn()))
kodiLog('getBrightness = {0}'.format(self._settings.getBrightness()))
kodiLog('isAdvancedSettings = {0}'.format(self._settings.isAdvancedSettings()))
kodiLog('getDisplayType = {0}'.format(self._settings.getDisplayType()))
kodiLog('isCommonAnode = {0}'.format(self._settings.isCommonAnode()))
kodiLog('getCharacterIndexex = {0}'.format(self._settings.getCharacterIndexes()))
def __createStates(self):
settingsWindows = ['settings', 'systeminfo', 'systemsettings', 'servicesettings', 'pvrsettings', \
'playersettings', 'mediasettings', 'interfacesettings', 'profiles', 'skinsettings', 'videossettings', \
'musicsettings', 'appearancesettings', 'picturessettings', 'weathersettings', 'gamesettings', \
'service-LibreELEC-Settings-mainWindow.xml', 'service-LibreELEC-Settings-wizard.xml', \
'service-LibreELEC-Settings-getPasskey.xml']
appsWindows = ['addonbrowser', 'addonsettings', 'addoninformation', 'addon', 'programs']
states = []
states.append(fd628states.fd628IconIndicator(True, 'power'))
states.append(fd628states.fd628CondVisibility('play', 'Player.Playing'))
states.append(fd628states.fd628CondVisibility('pause', 'Player.Paused'))
states.append(fd628states.fd628FileContains('hdmi', '/sys/class/amhdmitx/amhdmitx0/hpd_state', ['1']))
states.append(fd628states.fd628FileContains('cvbs', '/sys/class/display/mode', ['cvbs']))
states.append(fd628states.fd628FileContains('eth', '/sys/class/net/eth0/operstate', ['up', 'unknown']))
states.append(fd628states.fd628FileContains('wifi', '/sys/class/net/wlan0/operstate', ['up']))
states.append(fd628states.fd628WindowChecker('setup', settingsWindows))
states.append(fd628states.fd628WindowChecker('apps', appsWindows))
states.append(fd628states.fd628ExtStorageChecker('usb', '/dev/sd'))
states.append(fd628states.fd628ExtStorageChecker('sd', '/dev/mmcblk'))
self._colonIcon = fd628states.fd628IconIndicator(False, 'colon')
states.append(self._colonIcon)
if (self._settings.isStorageIndicator()):
for state in states:
if (state.getLedName() == self._settings.getStorageIndicatorIcon()):
states.remove(state)
break
states.append(fd628states.fd628ExtStorageCount(self._settings.getStorageIndicatorIcon(), None, 'rw'))
kodiLog('Active states: ' + str([str(state) for state in states]))
self.__turnOffIndicators()
self._states = states
monitor = fd628Monitor()
fd628 = fd628Addon(monitor)
kodiLog('Service start.')
fd628.run()
kodiLog('Service stop.')

View File

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
<category label="30000">
<setting label="30001" type="bool" id="display.on" default="true" />
<setting label="30002" type="slider" id="display.brightness" default="7" range="0,7" option="int" visible="eq(-1,true)" />
<setting label="30013" type="bool" id="display.storage.indicator" default="false" visible="eq(-2,true)" />
<setting label="30014" type="labelenum" id="display.storage.indicator.icon" lvalues="30025|30015|30016|30017|30018|30019|30020|30021|30022|30023|30024|30027" default="30025" visible="eq(-3,true) + eq(-1,true)" subsetting="true" />
<setting label="30028" type="bool" id="display.colon.on" default="false" visible="eq(-4,true)" />
<setting label="30003" type="bool" id="display.advanced" default="false" visible="eq(-5,true)" />
<setting label="30004" type="enum" id="display.type" values="0|1|2|3|4|5|6" default="1" visible="eq(-6,true) + eq(-1,true)" subsetting="true" />
<setting label="30026" type="bool" id="display.common.anode" default="false" visible="eq(-7,true) + eq(-2,true)" subsetting="true" />
<setting type="lsep" label="30012" visible="eq(-8,true) + eq(-3,true)" />
<setting label="30005" type="enum" id="display.char.index0" values="0|1|2|3|4|5|6" default="0" visible="eq(-9 ,true) + eq(-4,true)" subsetting="true" />
<setting label="30006" type="enum" id="display.char.index1" values="0|1|2|3|4|5|6" default="1" visible="eq(-10,true) + eq(-5,true)" subsetting="true" />
<setting label="30007" type="enum" id="display.char.index2" values="0|1|2|3|4|5|6" default="2" visible="eq(-11,true) + eq(-6,true)" subsetting="true" />
<setting label="30008" type="enum" id="display.char.index3" values="0|1|2|3|4|5|6" default="3" visible="eq(-12,true) + eq(-7,true)" subsetting="true" />
<setting label="30009" type="enum" id="display.char.index4" values="0|1|2|3|4|5|6" default="4" visible="eq(-13,true) + eq(-8,true)" subsetting="true" />
<setting label="30010" type="enum" id="display.char.index5" values="0|1|2|3|4|5|6" default="5" visible="false" subsetting="true" />
<setting label="30011" type="enum" id="display.char.index6" values="0|1|2|3|4|5|6" default="6" visible="false" subsetting="true" />
</category>
</settings>

View File

@ -25,10 +25,7 @@ PKG_DISPMANX_SUPPORT="-DENABLE_DISPMANX=0"
PKG_FB_SUPPORT="-DENABLE_FB=1"
PKG_X11_SUPPORT="-DENABLE_X11=0"
if [ "$KODIPLAYER_DRIVER" = "libamcodec" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libamcodec"
PKG_AMLOGIC_SUPPORT="-DENABLE_AMLOGIC=1"
elif [ "$KODIPLAYER_DRIVER" = "bcm2835-driver" ]; then
if [ "$KODIPLAYER_DRIVER" = "bcm2835-driver" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET bcm2835-driver"
PKG_DISPMANX_SUPPORT="-DENABLE_DISPMANX=1"
PKG_FB_SUPPORT="-DENABLE_FB=0"

View File

@ -1,59 +0,0 @@
From 49f9c51f5519d48bae601c174914f82e8e71e093 Mon Sep 17 00:00:00 2001
From: redpanther <redpanther@spooky-online.de>
Date: Wed, 31 Aug 2016 14:39:14 +0200
Subject: [PATCH] fix amlogic for newer kernels crosscompile stay on 32bit aml
with kernel 3.10
backport 58a8e22 from hyperion.ng
---
libsrc/grabber/amlogic/AmlogicGrabber.cpp | 10 +++++++---
libsrc/grabber/amlogic/CMakeLists.txt | 7 +++++++
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/libsrc/grabber/amlogic/AmlogicGrabber.cpp b/libsrc/grabber/amlogic/AmlogicGrabber.cpp
index 11cd280..5f39883 100644
--- a/libsrc/grabber/amlogic/AmlogicGrabber.cpp
+++ b/libsrc/grabber/amlogic/AmlogicGrabber.cpp
@@ -20,9 +20,13 @@
#define AMVIDEOCAP_IOW_SET_WANTFRAME_WIDTH _IOW(AMVIDEOCAP_IOC_MAGIC, 0x02, int)
#define AMVIDEOCAP_IOW_SET_WANTFRAME_HEIGHT _IOW(AMVIDEOCAP_IOC_MAGIC, 0x03, int)
-// Flags copied from 'include/linux/amlogic/amports/amvstream.h' at https://github.com/codesnake/linux-amlogic
-#define AMSTREAM_IOC_MAGIC 'S'
-#define AMSTREAM_IOC_GET_VIDEO_DISABLE _IOR(AMSTREAM_IOC_MAGIC, 0x48, unsigned long)
+#if HAVE_AML_HEADER
+ #include <amcodec/amports/amstream.h>
+#else
+ // Flags copied from 'include/linux/amlogic/amports/amvstream.h' at https://github.com/codesnake/linux-amlogic
+ #define AMSTREAM_IOC_MAGIC 'S'
+ #define AMSTREAM_IOC_GET_VIDEO_DISABLE _IOR(AMSTREAM_IOC_MAGIC, 0x48, unsigned long)
+#endif
AmlogicGrabber::AmlogicGrabber(const unsigned width, const unsigned height) :
// Minimum required width or height is 160
diff --git a/libsrc/grabber/amlogic/CMakeLists.txt b/libsrc/grabber/amlogic/CMakeLists.txt
index cf8844b..326f7c7 100644
--- a/libsrc/grabber/amlogic/CMakeLists.txt
+++ b/libsrc/grabber/amlogic/CMakeLists.txt
@@ -1,3 +1,4 @@
+INCLUDE (CheckIncludeFiles)
# Define the current source locations
SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/grabber)
@@ -21,6 +22,12 @@ else(ENABLE_QT5)
QT4_WRAP_CPP(AmlogicHEADERS_MOC ${AmlogicQT_HEADERS})
endif(ENABLE_QT5)
+CHECK_INCLUDE_FILES ("amcodec/amports/amstream.h" HAVE_AML_HEADER)
+IF (${HAVE_AML_HEADER})
+ ADD_DEFINITIONS( -DHAVE_AML_HEADER )
+ENDIF()
+
+
add_library(amlogic-grabber
${AmlogicHEADERS}
${AmlogicQT_HEADERS}
--
2.9.3

View File

@ -5,7 +5,7 @@ PKG_NAME="touchscreen"
PKG_VERSION="1.0"
PKG_REV="101"
PKG_ARCH="any"
PKG_ADDON_PROJECTS="Generic RPi Amlogic"
PKG_ADDON_PROJECTS="Generic RPi"
PKG_LICENSE="GPL"
PKG_SITE=""
PKG_URL=""

View File

@ -16,22 +16,13 @@ PKG_CMAKE_OPTS_TARGET="-DBUILD_SHARED_LIBS=1 \
-DCMAKE_INSTALL_LIBDIR_NOARCH:STRING=lib \
-DSKIP_PYTHON_WRAPPER=1 \
-DHAVE_IMX_API=0 \
-DHAVE_AOCEC_API=0 -DHAVE_AMLOGIC_API=0 \
-DHAVE_GIT_BIN=0"
if [ "$KODIPLAYER_DRIVER" = "bcm2835-driver" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET bcm2835-driver"
fi
if [ "$KODIPLAYER_DRIVER" = "libamcodec" ]; then
if [ "$TARGET_KERNEL_ARCH" = "arm64" ]; then
PKG_CMAKE_OPTS_TARGET="$PKG_CMAKE_OPTS_TARGET -DHAVE_AOCEC_API=1"
else
PKG_CMAKE_OPTS_TARGET="$PKG_CMAKE_OPTS_TARGET -DHAVE_AMLOGIC_API=1"
fi
else
PKG_CMAKE_OPTS_TARGET="$PKG_CMAKE_OPTS_TARGET -DHAVE_AOCEC_API=0 -DHAVE_AMLOGIC_API=0"
fi
# libX11 and xrandr to read the sink's EDID, used to determine the PC's HDMI physical address
if [ "$DISPLAYSERVER" = "x11" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libX11 libXrandr"

View File

@ -15,16 +15,12 @@ PKG_LIBNAME="ppsspp_libretro.so"
PKG_LIBPATH="lib/$PKG_LIBNAME"
PKG_LIBVAR="PPSSPP_LIB"
if [ "$PROJECT" = "Amlogic" ] || [ "$PROJECT" = "RPi" ]; then
case $DEVICE in
KVIM|RPi2|S905|Odroid_C2)
PKG_ARCH_ARM="-DARMV7=ON \
if target_has_feature neon; then
PKG_ARCH_ARM="-DARMV7=ON \
-DUSING_FBDEV=ON \
-DUSING_EGL=ON \
-DUSING_GLES2=ON \
-DUSING_X11_VULKAN=OFF"
;;
esac
fi
PKG_CMAKE_OPTS_TARGET="-DLIBRETRO=ON \

View File

@ -1,68 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
PKG_NAME="opengl-meson"
PKG_ARCH="arm aarch64"
PKG_LICENSE="nonfree"
PKG_SITE="http://openlinux.amlogic.com:8000/download/ARM/filesystem/"
case $MESON_FAMILY in
8)
PKG_VERSION="8-r5p1-02rel0-armhf"
PKG_SHA256="717739c9f65f6782e3185aad09d01f228873315f70f9a58c0526b9e63a6e386f"
;;
6)
PKG_VERSION="6-r5p1-02rel0-armhf"
PKG_SHA256="de38a1fa23191bd5de5c85c66627d4537775ee4634b71baa8d0e241b8b9d4ba2"
;;
gxbb)
if [ "$TARGET_ARCH" = "arm" ]; then
PKG_VERSION="8-r5p1-02rel0-armhf"
PKG_SHA256="717739c9f65f6782e3185aad09d01f228873315f70f9a58c0526b9e63a6e386f"
else
PKG_VERSION="gxbb-r5p1-01rel0"
fi
;;
esac
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="OpenGL ES pre-compiled libraries for Mali GPUs found in Amlogic Meson SoCs."
PKG_TOOLCHAIN="manual"
makeinstall_target() {
mkdir -p $SYSROOT_PREFIX/usr/include
cp -PR usr/include/* $SYSROOT_PREFIX/usr/include
mkdir -p $SYSROOT_PREFIX/usr/lib
cp -PR usr/lib/libMali.so $SYSROOT_PREFIX/usr/lib
ln -sf libMali.so $SYSROOT_PREFIX/usr/lib/libEGL.so.1.4
ln -sf libEGL.so.1.4 $SYSROOT_PREFIX/usr/lib/libEGL.so.1
ln -sf libEGL.so.1 $SYSROOT_PREFIX/usr/lib/libEGL.so
ln -sf libMali.so $SYSROOT_PREFIX/usr/lib/libGLESv1_CM.so.1.1
ln -sf libGLESv1_CM.so.1.1 $SYSROOT_PREFIX/usr/lib/libGLESv1_CM.so.1
ln -sf libGLESv1_CM.so.1 $SYSROOT_PREFIX/usr/lib/libGLESv1_CM.so
ln -sf libMali.so $SYSROOT_PREFIX/usr/lib/libGLESv2.so.2.0
ln -sf libGLESv2.so.2.0 $SYSROOT_PREFIX/usr/lib/libGLESv2.so.2
ln -sf libGLESv2.so.2 $SYSROOT_PREFIX/usr/lib/libGLESv2.so
mkdir -p $INSTALL/usr/lib
cp -PR usr/lib/libMali.so $INSTALL/usr/lib
ln -sf libMali.so $INSTALL/usr/lib/libEGL.so.1.4
ln -sf libEGL.so.1.4 $INSTALL/usr/lib/libEGL.so.1
ln -sf libEGL.so.1 $INSTALL/usr/lib/libEGL.so
ln -sf libMali.so $INSTALL/usr/lib/libGLESv1_CM.so.1.1
ln -sf libGLESv1_CM.so.1.1 $INSTALL/usr/lib/libGLESv1_CM.so.1
ln -sf libGLESv1_CM.so.1 $INSTALL/usr/lib/libGLESv1_CM.so
ln -sf libMali.so $INSTALL/usr/lib/libGLESv2.so.2.0
ln -sf libGLESv2.so.2.0 $INSTALL/usr/lib/libGLESv2.so.2
ln -sf libGLESv2.so.2 $INSTALL/usr/lib/libGLESv2.so
}
post_install() {
enable_service unbind-console.service
}

View File

@ -1,11 +0,0 @@
[Unit]
Description=Unbind framebuffer console
ConditionPathExists=/sys/class/vtconsole/vtcon1/bind
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'echo 0 > /sys/class/vtconsole/vtcon1/bind'
[Install]
WantedBy=graphical.target

View File

@ -1,2 +0,0 @@
100
- Initial add-on

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

View File

@ -1,51 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="crazycat_aml"
PKG_VERSION="835dc72da3ee63df7f4057bd0507887454c005d1"
PKG_SHA256="3d68d368a9eda15688c6686caa854a045a753740ec93553d80a4bcfc14c2950a"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://bitbucket.org/CrazyCat/media_build"
PKG_URL="https://bitbucket.org/CrazyCat/media_build/get/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain linux media_tree_cc_aml"
PKG_NEED_UNPACK="$LINUX_DEPENDS media_tree_cc_aml"
PKG_SECTION="driver.dvb"
PKG_LONGDESC="DVB drivers from the latest kernel"
PKG_IS_ADDON="embedded"
PKG_IS_KERNEL_PKG="yes"
PKG_ADDON_IS_STANDALONE="yes"
PKG_ADDON_NAME="DVB drivers from the latest kernel"
PKG_ADDON_TYPE="xbmc.service"
PKG_ADDON_VERSION="${ADDON_VERSION}.${PKG_REV}"
pre_make_target() {
export KERNEL_VER=$(get_module_dir)
export LDFLAGS=""
}
make_target() {
cp -RP $(get_build_dir media_tree_cc_aml)/* $PKG_BUILD/linux
# compile modules
echo "obj-y += video_dev/" >> "$PKG_BUILD/linux/drivers/media/platform/meson/Makefile"
echo "obj-y += wetek/" >> "$PKG_BUILD/linux/drivers/media/platform/meson/Makefile"
# make config all
kernel_make VER=$KERNEL_VER SRCDIR=$(kernel_path) allyesconfig
# deactivate several build options
sed '/CONFIG_VIDEO_S5C73M3=m/d' -i $PKG_BUILD/v4l/.config
# enable AML drivers
echo "CONFIG_IR_MESON=m" >> $PKG_BUILD/v4l/.config
echo "CONFIG_V4L_AMLOGIC_VIDEO=m" >> $PKG_BUILD/v4l/.config
echo "CONFIG_VIDEOBUF_RESOURCE=m" >> $PKG_BUILD/v4l/.config
kernel_make VER=$KERNEL_VER SRCDIR=$(kernel_path)
}
makeinstall_target() {
install_driver_addon_files "$PKG_BUILD/v4l/"
}

View File

@ -1,13 +0,0 @@
[Patch] without this patch you need to install libproc-processtable-perl at host system
--- a/v4l/Makefile
+++ b/v4l/Makefile
@@ -51,7 +51,7 @@
@echo Kernel build directory is $(OUTDIR)
$(MAKE) -C ../linux apply_patches
$(MAKE) -C $(OUTDIR) SUBDIRS=$(PWD) $(MYCFLAGS) modules
- ./scripts/rmmod.pl check
+# ./scripts/rmmod.pl check
# $(MAKE) checkpatch
mismatch:: prepare firmware

View File

@ -1,13 +0,0 @@
--- a/v4l/scripts/make_kconfig.pl
+++ b/v4l/scripts/make_kconfig.pl
@@ -626,6 +626,10 @@ ($$)
close OUT;
# These options should default to off
+disable_config('MEDIA_ANALOG_TV_SUPPORT');
+disable_config('MEDIA_CAMERA_SUPPORT');
+disable_config('MEDIA_CEC_SUPPORT');
+disable_config('SOC_CAMERA');
disable_config('DVB_AV7110_FIRMWARE');
disable_config('DVB_CINERGYT2_TUNING');
disable_config('VIDEO_HELPER_CHIPS_AUTO');

View File

@ -1,7 +0,0 @@
--- /dev/null
+++ b/v4l/config-mycompat.h
@@ -0,0 +1,3 @@
+#undef NEED_PFN_TO_PHYS
+#undef NEED_WRITEL_RELAXED
+#undef NEED_PM_RUNTIME_GET
--

View File

@ -1,2 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)

View File

@ -1,26 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="media_tree_cc_aml"
PKG_VERSION="2018-09-23"
PKG_SHA256="3b0cf3699317c04d9184b7e25056065fd374b20b851ee86a63ea2c70e219ee9e"
PKG_LICENSE="GPL"
PKG_SITE="https://bitbucket.org/CrazyCat/media_build/downloads/"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain"
PKG_NEED_UNPACK="$LINUX_DEPENDS"
PKG_LONGDESC="Source of Linux Kernel media_tree subsystem to build with media_build."
PKG_TOOLCHAIN="manual"
unpack() {
mkdir -p $PKG_BUILD/
tar -xf $SOURCES/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.xz -C $PKG_BUILD/
# hack/workaround for borked upstream kernel/media_build
# without removing atomisp there a lot additional includes that
# slowdown build process after modpost from 3min to 6min
# even if atomisp is disabled via kernel.conf
rm -rf $PKG_BUILD/drivers/staging/media/atomisp
sed -i 's|^.*drivers/staging/media/atomisp.*$||' \
$PKG_BUILD/drivers/staging/media/Kconfig
}

View File

@ -1,52 +0,0 @@
From 3f1f8303b6e0be751d7a7c55031c8ab840ed5c1a Mon Sep 17 00:00:00 2001
From: Matthias Reichl <hias@horus.com>
Date: Fri, 24 Aug 2018 23:31:51 +0200
Subject: [PATCH] media: rc: ir-rc6-decoder: enable toggle bit for Kathrein
RCU-676 remote
The Kathrein RCU-676 remote uses the 32-bit rc6 protocol and toggles
bit 15 (0x8000) on repeated button presses, like MCE remotes.
Add it's customer code 0x80460000 to the 32-bit rc6 toggle
handling code to get proper scancodes and toggle reports.
Signed-off-by: Matthias Reichl <hias@horus.com>
---
drivers/media/rc/ir-rc6-decoder.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/media/rc/ir-rc6-decoder.c b/drivers/media/rc/ir-rc6-decoder.c
index 68487ce9f79b..d96aed1343e4 100644
--- a/drivers/media/rc/ir-rc6-decoder.c
+++ b/drivers/media/rc/ir-rc6-decoder.c
@@ -40,6 +40,7 @@
#define RC6_6A_MCE_TOGGLE_MASK 0x8000 /* for the body bits */
#define RC6_6A_LCC_MASK 0xffff0000 /* RC6-6A-32 long customer code mask */
#define RC6_6A_MCE_CC 0x800f0000 /* MCE customer code */
+#define RC6_6A_KATHREIN_CC 0x80460000 /* Kathrein RCU-676 customer code */
#ifndef CHAR_BIT
#define CHAR_BIT 8 /* Normally in <limits.h> */
#endif
@@ -242,13 +243,17 @@ static int ir_rc6_decode(struct rc_dev *dev, struct ir_raw_event ev)
toggle = 0;
break;
case 32:
- if ((scancode & RC6_6A_LCC_MASK) == RC6_6A_MCE_CC) {
+ switch (scancode & RC6_6A_LCC_MASK) {
+ case RC6_6A_MCE_CC:
+ case RC6_6A_KATHREIN_CC:
protocol = RC_PROTO_RC6_MCE;
toggle = !!(scancode & RC6_6A_MCE_TOGGLE_MASK);
scancode &= ~RC6_6A_MCE_TOGGLE_MASK;
- } else {
+ break;
+ default:
protocol = RC_PROTO_RC6_6A_32;
toggle = 0;
+ break;
}
break;
default:
--
2.11.0

View File

@ -1,41 +0,0 @@
From ae1ccaa3587c0bd3d6d01841fa2e668cdf738f1e Mon Sep 17 00:00:00 2001
From: Matthias Reichl <hias@horus.com>
Date: Sun, 3 Feb 2019 14:24:00 +0100
Subject: [PATCH] media: rc: ir-rc6-decoder: enable toggle bit for Zotac
remotes
The Zotac RC2604323/01G and RC2604329/02BG remotes use the 32-bit
rc6 protocol and toggle bit 15 (0x8000) on repeated button presses,
like MCE remotes.
Add the customer code 0x80340000 to the 32-bit rc6 toggle
handling code to get proper scancodes and toggle reports.
Signed-off-by: Matthias Reichl <hias@horus.com>
---
drivers/media/rc/ir-rc6-decoder.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/rc/ir-rc6-decoder.c b/drivers/media/rc/ir-rc6-decoder.c
index d96aed1343e4..5cc302fa4daa 100644
--- a/drivers/media/rc/ir-rc6-decoder.c
+++ b/drivers/media/rc/ir-rc6-decoder.c
@@ -40,6 +40,7 @@
#define RC6_6A_MCE_TOGGLE_MASK 0x8000 /* for the body bits */
#define RC6_6A_LCC_MASK 0xffff0000 /* RC6-6A-32 long customer code mask */
#define RC6_6A_MCE_CC 0x800f0000 /* MCE customer code */
+#define RC6_6A_ZOTAC_CC 0x80340000 /* Zotac customer code */
#define RC6_6A_KATHREIN_CC 0x80460000 /* Kathrein RCU-676 customer code */
#ifndef CHAR_BIT
#define CHAR_BIT 8 /* Normally in <limits.h> */
@@ -246,6 +247,7 @@ static int ir_rc6_decode(struct rc_dev *dev, struct ir_raw_event ev)
switch (scancode & RC6_6A_LCC_MASK) {
case RC6_6A_MCE_CC:
case RC6_6A_KATHREIN_CC:
+ case RC6_6A_ZOTAC_CC:
protocol = RC_PROTO_RC6_MCE;
toggle = !!(scancode & RC6_6A_MCE_TOGGLE_MASK);
scancode &= ~RC6_6A_MCE_TOGGLE_MASK;
--
2.20.1

View File

@ -1,22 +0,0 @@
https://bitbucket.org/CrazyCat/linux_media/commits/ebd9c45524383e09d993563f4bd3cc765796b38a/raw
https://forum.libreelec.tv/thread/14405-dual-tbs-5520se-libreelec-9-0-0-intel-generic/?postID=110926#post110926
fixes TBS5520se scanning of frequencies
From: CrazyCat
Date: Mon, 12 Nov 2018 19:49:55 +0200
Subject: [PATCH] si2183: Fixed minimal frequency for DVB-C.
diff --git a/drivers/media/dvb-frontends/si2183.c b/drivers/media/dvb-frontends/si2183.c
index f1cc0da..333abd0 100644
--- a/drivers/media/dvb-frontends/si2183.c
+++ b/drivers/media/dvb-frontends/si2183.c
@@ -1335,7 +1335,7 @@ static int si2183_set_property(struct dvb_frontend *fe,
break;
case SYS_DVBC_ANNEX_A:
case SYS_DVBC_ANNEX_B:
- fe->ops.info.frequency_min_hz = 470 * MHz;
+ fe->ops.info.frequency_min_hz = 47 * MHz;
fe->ops.info.frequency_max_hz = 862 * MHz;
fe->ops.info.frequency_stepsize_hz = 62500;
break;

View File

@ -1,29 +0,0 @@
--- a/os_dep/linux/os_intfs.c 2013-09-11 05:56:55.000000000 +0200
+++ b/os_dep/linux/os_intfs.c 2013-11-12 00:30:41.158248277 +0100
@@ -277,6 +277,18 @@
#define RTW_PROC_NAME DRV_NAME
+#ifndef create_proc_entry
+/* dummy routines */
+void rtw_proc_remove_one(struct net_device *dev)
+{
+}
+
+void rtw_proc_init_one(struct net_device *dev)
+{
+}
+
+#else /* create_proc_entry not defined */
+
void rtw_proc_init_one(struct net_device *dev)
{
struct proc_dir_entry *dir_dev = NULL;
@@ -751,6 +763,7 @@
}
}
}
+#endif /* create_proc_entry not defined */
#endif
uint loadparam( _adapter *padapter, _nic_hdl pnetdev);

View File

@ -1,22 +0,0 @@
diff -Naur RTL8192CU-v4.0.2_9000.20130911/os_dep/linux/pci_intf.c RTL8192CU-v4.0.2_9000.20130911.patch/os_dep/linux/pci_intf.c
--- RTL8192CU-v4.0.2_9000.20130911/os_dep/linux/pci_intf.c 2013-09-11 05:56:55.000000000 +0200
+++ RTL8192CU-v4.0.2_9000.20130911.patch/os_dep/linux/pci_intf.c 2014-04-22 23:25:02.082908033 +0200
@@ -1963,7 +1963,6 @@
RT_TRACE(_module_hci_intfs_c_,_drv_err_,("+rtw_drv_entry\n"));
DBG_871X("rtw driver version=%s\n", DRIVERVERSION);
- DBG_871X("Build at: %s %s\n", __DATE__, __TIME__);
pci_drvpriv.drv_registered = _TRUE;
rtw_suspend_lock_init();
diff -Naur RTL8192CU-v4.0.2_9000.20130911/os_dep/linux/usb_intf.c RTL8192CU-v4.0.2_9000.20130911.patch/os_dep/linux/usb_intf.c
--- RTL8192CU-v4.0.2_9000.20130911/os_dep/linux/usb_intf.c 2013-09-11 05:56:55.000000000 +0200
+++ RTL8192CU-v4.0.2_9000.20130911.patch/os_dep/linux/usb_intf.c 2014-04-22 23:25:21.337862827 +0200
@@ -1577,7 +1577,6 @@
RT_TRACE(_module_hci_intfs_c_,_drv_err_,("+rtw_drv_entry\n"));
DBG_871X(DRV_NAME " driver version=%s\n", DRIVERVERSION);
- DBG_871X("build time: %s %s\n", __DATE__, __TIME__);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
//console_suspend_enabled=0;

View File

@ -1,25 +0,0 @@
diff -Naur RTL8192CU-v4.0.2_9000.20130911/include/ieee80211.h RTL8192CU-v4.0.2_9000.20130911.patch/include/ieee80211.h
--- RTL8192CU-v4.0.2_9000.20130911/include/ieee80211.h 2013-09-11 05:56:55.000000000 +0200
+++ RTL8192CU-v4.0.2_9000.20130911.patch/include/ieee80211.h 2015-11-03 14:05:03.789280151 +0100
@@ -1194,18 +1194,18 @@
(((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
(((Addr[5]) & 0xff) == 0xff))
#else
-extern __inline int is_multicast_mac_addr(const u8 *addr)
+static __inline int is_multicast_mac_addr(const u8 *addr)
{
return ((addr[0] != 0xff) && (0x01 & addr[0]));
}
-extern __inline int is_broadcast_mac_addr(const u8 *addr)
+static __inline int is_broadcast_mac_addr(const u8 *addr)
{
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
}
-extern __inline int is_zero_mac_addr(const u8 *addr)
+static __inline int is_zero_mac_addr(const u8 *addr)
{
return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \
(addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));

View File

@ -1,25 +0,0 @@
diff -Naur a/include/ieee80211.h b/include/ieee80211.h
--- a/include/ieee80211.h
+++ b/include/ieee80211.h
@@ -1314,18 +1314,18 @@
(((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
(((Addr[5]) & 0xff) == 0xff))
#else
-extern __inline int is_multicast_mac_addr(const u8 *addr)
+static __inline int is_multicast_mac_addr(const u8 *addr)
{
return ((addr[0] != 0xff) && (0x01 & addr[0]));
}
-extern __inline int is_broadcast_mac_addr(const u8 *addr)
+static __inline int is_broadcast_mac_addr(const u8 *addr)
{
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
}
-extern __inline int is_zero_mac_addr(const u8 *addr)
+static __inline int is_zero_mac_addr(const u8 *addr)
{
return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \
(addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));

View File

@ -1,34 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="RTL8188EU-aml"
PKG_VERSION="2d358c5"
PKG_SHA256="adf31d56d3a94bca814f1bd0de24af61fae85d25a259124b5d16c1d23cc72c91"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8188eu"
PKG_URL="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8188eu/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain linux"
PKG_NEED_UNPACK="$LINUX_DEPENDS"
PKG_LONGDESC="Realtek RTL8188EU Linux driver"
PKG_IS_KERNEL_PKG="yes"
PKG_TOOLCHAIN="manual"
post_unpack() {
sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g; s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/g' $PKG_BUILD/*/Makefile
sed -i 's/^#define CONFIG_DEBUG.*//g' $PKG_BUILD/*/include/autoconf.h
sed -i 's/#define DEFAULT_RANDOM_MACADDR.*1/#define DEFAULT_RANDOM_MACADDR 0/g' $PKG_BUILD/*/core/rtw_ieee80211.c
}
make_target() {
LDFLAGS="" make -C $(kernel_path) M=$PKG_BUILD/rtl8xxx_EU \
ARCH=$TARGET_KERNEL_ARCH \
KSRC=$(kernel_path) \
CROSS_COMPILE=$TARGET_KERNEL_PREFIX \
USER_EXTRA_CFLAGS="-fgnu89-inline"
}
makeinstall_target() {
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
}

View File

@ -1,29 +0,0 @@
From b67364bd4236f890238fb44df1bbba228b42ffe1 Mon Sep 17 00:00:00 2001
From: kszaq <kszaquitto@gmail.com>
Date: Mon, 2 Oct 2017 11:13:42 +0200
Subject: [PATCH] Add support for a few USB dongles
---
rtl8xxx_EU/os_dep/linux/usb_intf.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/rtl8xxx_EU/os_dep/linux/usb_intf.c b/rtl8xxx_EU/os_dep/linux/usb_intf.c
index 2fbffd6..4892838 100755
--- a/rtl8xxx_EU/os_dep/linux/usb_intf.c
+++ b/rtl8xxx_EU/os_dep/linux/usb_intf.c
@@ -138,6 +138,12 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
/*=== Customer ID ===*/
/****** 8188EUS ********/
{USB_DEVICE(0x07B8, 0x8179), .driver_info = RTL8188E}, /* Abocom - Abocom */
+ {USB_DEVICE(0x0DF6, 0x0076), .driver_info = RTL8188E}, /* Sitecom N150 v2 */
+ {USB_DEVICE(0x2001, 0x330F), .driver_info = RTL8188E}, /* DLink DWA-125 REV D1 */
+ {USB_DEVICE(0x2001, 0x3310), .driver_info = RTL8188E}, /* Dlink DWA-123 REV D1 */
+ {USB_DEVICE(0x2001, 0x3311), .driver_info = RTL8188E}, /* DLink GO-USB-N150 REV B1 */
+ {USB_DEVICE(0x056E, 0x4008), .driver_info = RTL8188E}, /* Elecom WDC-150SU2M */
+ {USB_DEVICE(0x2357, 0x010c), .driver_info = RTL8188E}, /* TP-Link TL-WN722N v2 */
#endif
#ifdef CONFIG_RTL8812A
--
2.7.4

View File

@ -1,38 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="RTL8189ES-aml"
PKG_VERSION="f971e4b"
PKG_SHA256="a87d891e3a42d70429b39f01216775dee95b0dc9093f9576ca7417e74f21ee2b"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8189es"
PKG_URL="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8189es/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain linux"
PKG_NEED_UNPACK="$LINUX_DEPENDS"
PKG_LONGDESC="Realtek RTL8189ES Linux driver"
PKG_IS_KERNEL_PKG="yes"
PKG_TOOLCHAIN="manual"
post_unpack() {
sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g; s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/g' $PKG_BUILD/*/Makefile
sed -i 's/^#define CONFIG_DEBUG.*//g' $PKG_BUILD/*/include/autoconf.h
sed -i 's/#define DEFAULT_RANDOM_MACADDR.*1/#define DEFAULT_RANDOM_MACADDR 0/g' $PKG_BUILD/*/core/rtw_ieee80211.c
}
pre_make_target() {
unset LDFLAGS
}
make_target() {
make -C $(kernel_path) M=$PKG_BUILD/rtl8189ES \
ARCH=$TARGET_KERNEL_ARCH \
KSRC=$(kernel_path) \
CROSS_COMPILE=$TARGET_KERNEL_PREFIX \
USER_EXTRA_CFLAGS="-fgnu89-inline"
}
makeinstall_target() {
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
}

View File

@ -1,38 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="RTL8189FS-aml"
PKG_VERSION="538ba58"
PKG_SHA256="3dc7602481096b8890d48915e16bf0eb1554ca1b7a3dfec6450486468aadb826"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8189ftv"
PKG_URL="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8189ftv/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain linux"
PKG_NEED_UNPACK="$LINUX_DEPENDS"
PKG_LONGDESC="Realtek RTL8189FS Linux driver"
PKG_IS_KERNEL_PKG="yes"
PKG_TOOLCHAIN="manual"
post_unpack() {
sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g; s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/g' $PKG_BUILD/*/Makefile
sed -i 's/^#define CONFIG_DEBUG.*//g' $PKG_BUILD/*/include/autoconf.h
sed -i 's/#define DEFAULT_RANDOM_MACADDR.*1/#define DEFAULT_RANDOM_MACADDR 0/g' $PKG_BUILD/*/core/rtw_ieee80211.c
}
pre_make_target() {
unset LDFLAGS
}
make_target() {
make -C $(kernel_path) M=$PKG_BUILD/rtl8189FS \
ARCH=$TARGET_KERNEL_ARCH \
KSRC=$(kernel_path) \
CROSS_COMPILE=$TARGET_KERNEL_PREFIX \
USER_EXTRA_CFLAGS="-fgnu89-inline"
}
makeinstall_target() {
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
}

View File

@ -1,38 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="RTL8723BS-aml"
PKG_VERSION="ee9d86a"
PKG_SHA256="4d1c5fe0d05edbf5eab96dfe5ff99b7d56c098f4d4d317351fa25e75606de094"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8723bs"
PKG_URL="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8723bs/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain linux"
PKG_NEED_UNPACK="$LINUX_DEPENDS"
PKG_LONGDESC="Realtek RTL8723BS Linux driver"
PKG_IS_KERNEL_PKG="yes"
PKG_TOOLCHAIN="manual"
post_unpack() {
sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g; s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/g' $PKG_BUILD/*/Makefile
sed -i 's/^#define CONFIG_DEBUG.*//g' $PKG_BUILD/*/include/autoconf.h
sed -i 's/#define DEFAULT_RANDOM_MACADDR.*1/#define DEFAULT_RANDOM_MACADDR 0/g' $PKG_BUILD/*/core/rtw_ieee80211.c
}
pre_make_target() {
unset LDFLAGS
}
make_target() {
make -C $(kernel_path) M=$PKG_BUILD/rtl8723BS \
ARCH=$TARGET_KERNEL_ARCH \
KSRC=$(kernel_path) \
CROSS_COMPILE=$TARGET_KERNEL_PREFIX \
USER_EXTRA_CFLAGS="-fgnu89-inline"
}
makeinstall_target() {
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
}

View File

@ -1,38 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="RTL8723DS-aml"
PKG_VERSION="fb4adf7"
PKG_SHA256="00da0a7773286df38e8785be2891025e4fa6c4ff5ace9450e54cae85f143847e"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8723ds"
PKG_URL="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8723ds/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain linux"
PKG_NEED_UNPACK="$LINUX_DEPENDS"
PKG_LONGDESC="Realtek RTL8723DS Linux driver"
PKG_IS_KERNEL_PKG="yes"
PKG_TOOLCHAIN="manual"
post_unpack() {
sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g; s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/g' $PKG_BUILD/*/Makefile
sed -i 's/^#define CONFIG_DEBUG.*//g' $PKG_BUILD/*/include/autoconf.h
sed -i 's/#define DEFAULT_RANDOM_MACADDR.*1/#define DEFAULT_RANDOM_MACADDR 0/g' $PKG_BUILD/*/core/rtw_ieee80211.c
}
pre_make_target() {
unset LDFLAGS
}
make_target() {
make -C $(kernel_path) M=$PKG_BUILD/rtl8723DS \
ARCH=$TARGET_KERNEL_ARCH \
KSRC=$(kernel_path) \
CROSS_COMPILE=$TARGET_KERNEL_PREFIX \
USER_EXTRA_CFLAGS="-fgnu89-inline"
}
makeinstall_target() {
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
}

View File

@ -1,38 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="RTL8822BU-aml"
PKG_VERSION="9df3607"
PKG_SHA256="d7005150d0737f81475437e55430b2cef780664db6948f5a17fecc32c915d317"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8822bu"
PKG_URL="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8822bu/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain linux"
PKG_NEED_UNPACK="$LINUX_DEPENDS"
PKG_LONGDESC="Realtek RTL8822BU Linux driver"
PKG_IS_KERNEL_PKG="yes"
PKG_TOOLCHAIN="manual"
post_unpack() {
sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g; s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/g' $PKG_BUILD/*/Makefile
sed -i 's/^#define CONFIG_DEBUG.*//g' $PKG_BUILD/*/include/autoconf.h
sed -i 's/#define DEFAULT_RANDOM_MACADDR.*1/#define DEFAULT_RANDOM_MACADDR 0/g' $PKG_BUILD/*/core/rtw_ieee80211.c
}
pre_make_target() {
unset LDFLAGS
}
make_target() {
make -C $(kernel_path) M=$PKG_BUILD/rtl8822BU \
ARCH=$TARGET_KERNEL_ARCH \
KSRC=$(kernel_path) \
CROSS_COMPILE=$TARGET_KERNEL_PREFIX \
USER_EXTRA_CFLAGS="-fgnu89-inline"
}
makeinstall_target() {
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
}

View File

@ -1 +0,0 @@
options dhd firmware_path=/usr/lib/firmware/brcm/ nvram_path=/usr/lib/firmware/brcm/

View File

@ -1,31 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="ap6xxx-aml"
PKG_VERSION="99b3459"
PKG_SHA256="5f2bfc29616d869ad5fb41e0782887d73cafe0bae8a13e7e945bb32b2a2c0877"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/khadas/android_hardware_wifi_broadcom_drivers_ap6xxx"
PKG_URL="https://github.com/khadas/android_hardware_wifi_broadcom_drivers_ap6xxx/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain linux"
PKG_NEED_UNPACK="$LINUX_DEPENDS"
PKG_LONGDESC="ap6xxx: Linux drivers for AP6xxx WLAN chips used in some devices based on Amlogic SoCs"
PKG_IS_KERNEL_PKG="yes"
PKG_TOOLCHAIN="manual"
pre_make_target() {
unset LDFLAGS
}
make_target() {
make -C $(kernel_path) M=$PKG_BUILD/bcmdhd.1.363.59.144.x.cn \
ARCH=$TARGET_KERNEL_ARCH \
CROSS_COMPILE=$TARGET_KERNEL_PREFIX \
CONFIG_BCMDHD_DISABLE_WOWLAN=y
}
makeinstall_target() {
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
}

View File

@ -1,34 +0,0 @@
From fb537b584b78c0407c663ed4076e4ff79b36a14c Mon Sep 17 00:00:00 2001
From: kszaq <kszaquitto@gmail.com>
Date: Thu, 14 Sep 2017 21:20:18 +0200
Subject: [PATCH 1/4] bcmdhd: Add new SDIO vendor/device ID for AP6212
---
bcmdhd.1.363.59.144.x.cn/bcmsdh_sdmmc_linux.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/bcmdhd.1.363.59.144.x.cn/bcmsdh_sdmmc_linux.c b/bcmdhd.1.363.59.144.x.cn/bcmsdh_sdmmc_linux.c
index af321a6..f7d9a09 100644
--- a/bcmdhd.1.363.59.144.x.cn/bcmsdh_sdmmc_linux.c
+++ b/bcmdhd.1.363.59.144.x.cn/bcmsdh_sdmmc_linux.c
@@ -74,6 +74,9 @@
#if !defined(SDIO_DEVICE_ID_BROADCOM_43239)
#define SDIO_DEVICE_ID_BROADCOM_43239 43239
#endif /* !defined(SDIO_DEVICE_ID_BROADCOM_43239) */
+#if !defined(SDIO_DEVICE_ID_BROADCOM_4343)
+#define SDIO_DEVICE_ID_BROADCOM_4343 0xa9a6
+#endif /* !defined(SDIO_DEVICE_ID_BROADCOM_4343) */
extern void wl_cfg80211_set_parent_dev(void *dev);
extern void sdioh_sdmmc_devintr_off(sdioh_info_t *sd);
@@ -217,6 +220,7 @@ static void bcmsdh_sdmmc_remove(struct sdio_func *func)
/* devices we support, null terminated */
static const struct sdio_device_id bcmsdh_sdmmc_ids[] = {
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_DEFAULT) },
+ { SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4343) },
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4325_SDGWB) },
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4325) },
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4329) },
--
2.7.4

View File

@ -1,53 +0,0 @@
From cd000f263d8433f2a1a29d7e722cd57e47b30fc5 Mon Sep 17 00:00:00 2001
From: kszaq <kszaquitto@gmail.com>
Date: Thu, 14 Sep 2017 21:20:55 +0200
Subject: [PATCH 2/4] bcmdhd: add BCM4335 firmware loading support
---
bcmdhd.1.363.59.144.x.cn/dhd_config.c | 10 ++++++++++
bcmdhd.1.363.59.144.x.cn/dhd_config.h | 1 +
2 files changed, 11 insertions(+)
diff --git a/bcmdhd.1.363.59.144.x.cn/dhd_config.c b/bcmdhd.1.363.59.144.x.cn/dhd_config.c
index ff07d18..b668400 100644
--- a/bcmdhd.1.363.59.144.x.cn/dhd_config.c
+++ b/bcmdhd.1.363.59.144.x.cn/dhd_config.c
@@ -141,6 +141,14 @@ const static char *bcm43241b4_ag_fw_name[] = {
"fw_bcm43241b4_ag_mfg.bin"
};
+const static char *bcm4335b0_ag_fw_name[] = {
+ "fw_bcm4335b0_ag.bin",
+ "fw_bcm4335b0_ag_apsta.bin",
+ "fw_bcm4335b0_ag_p2p.bin",
+ "fw_bcm4335b0_ag_es.bin",
+ "fw_bcm4335b0_ag_mfg.bin"
+};
+
const static char *bcm4339a0_ag_fw_name[] = {
"fw_bcm4339a0_ag.bin",
"fw_bcm4339a0_ag_apsta.bin",
@@ -529,6 +537,8 @@ dhd_conf_set_fw_name_by_chip(dhd_pub_t *dhd, char *fw_path)
case BCM4335_CHIP_ID:
if (chiprev == BCM4335A0_CHIP_REV)
strcpy(&fw_path[i+1], bcm4339a0_ag_fw_name[fw_type]);
+ else if (chiprev == BCM4335B0_CHIP_REV)
+ strcpy(&fw_path[i+1], bcm4335b0_ag_fw_name[fw_type]);
break;
case BCM4345_CHIP_ID:
case BCM43454_CHIP_ID:
diff --git a/bcmdhd.1.363.59.144.x.cn/dhd_config.h b/bcmdhd.1.363.59.144.x.cn/dhd_config.h
index cc76e8b..450df56 100644
--- a/bcmdhd.1.363.59.144.x.cn/dhd_config.h
+++ b/bcmdhd.1.363.59.144.x.cn/dhd_config.h
@@ -28,6 +28,7 @@ extern uint dhd_slpauto;
#define BCM43341B0_CHIP_REV 2
#define BCM43241B4_CHIP_REV 5
#define BCM4335A0_CHIP_REV 2
+#define BCM4335B0_CHIP_REV 1
#define BCM4339A0_CHIP_REV 1
#define BCM43455C0_CHIP_REV 6
#define BCM4354A1_CHIP_REV 1
--
2.7.4

View File

@ -1,25 +0,0 @@
From 24affe6bf59dfd6fd9b62b3118e4b2b9e555181a Mon Sep 17 00:00:00 2001
From: kszaq <kszaquitto@gmail.com>
Date: Thu, 14 Sep 2017 21:21:18 +0200
Subject: [PATCH 3/4] bcmdhd: match only Broadcom SDIO devices
---
bcmdhd.1.363.59.144.x.cn/bcmsdh_sdmmc_linux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bcmdhd.1.363.59.144.x.cn/bcmsdh_sdmmc_linux.c b/bcmdhd.1.363.59.144.x.cn/bcmsdh_sdmmc_linux.c
index f7d9a09..47ca535 100644
--- a/bcmdhd.1.363.59.144.x.cn/bcmsdh_sdmmc_linux.c
+++ b/bcmdhd.1.363.59.144.x.cn/bcmsdh_sdmmc_linux.c
@@ -229,7 +229,7 @@ static const struct sdio_device_id bcmsdh_sdmmc_ids[] = {
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4334) },
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4324) },
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_43239) },
- { SDIO_DEVICE_CLASS(SDIO_CLASS_NONE) },
+ { SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_ANY_ID) },
{ /* end: all zeroes */ },
};
--
2.7.4

View File

@ -1,37 +0,0 @@
From b9edf37b14f64a8bed5586898e3503322a5b8bfc Mon Sep 17 00:00:00 2001
From: kszaq <kszaquitto@gmail.com>
Date: Thu, 5 Oct 2017 22:04:11 +0200
Subject: [PATCH 4/4] bcmdhd: if driver is not yet initialized, wait and retry
---
bcmdhd.1.363.59.144.x.cn/dhd_linux.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/bcmdhd.1.363.59.144.x.cn/dhd_linux.c b/bcmdhd.1.363.59.144.x.cn/dhd_linux.c
index c64f851..1754fb7 100644
--- a/bcmdhd.1.363.59.144.x.cn/dhd_linux.c
+++ b/bcmdhd.1.363.59.144.x.cn/dhd_linux.c
@@ -6127,9 +6127,17 @@ dhd_open(struct net_device *net)
int ifidx;
int32 ret = 0;
- if (!dhd_download_fw_on_driverload && !dhd_driver_init_done) {
- DHD_ERROR(("%s: WLAN driver is not initialized\n", __FUNCTION__));
- return -1;
+ for (int retry = 0; ++retry; ) {
+ if (!dhd_download_fw_on_driverload && !dhd_driver_init_done) {
+ DHD_ERROR(("%s: WLAN driver is not initialized\n", __FUNCTION__));
+ if (retry > 1) {
+ return -1;
+ } else {
+ OSL_SLEEP(1000);
+ }
+ } else {
+ break;
+ }
}
printf("%s: Enter %p\n", __FUNCTION__, net);
--
2.7.4

View File

@ -1,16 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="avl6862-aml"
PKG_VERSION="1.0"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPL"
PKG_SITE="https://libreelec.tv"
PKG_URL=""
PKG_DEPENDS_TARGET="toolchain"
PKG_SECTION="virtual"
PKG_LONGDESC="avl6862-aml: Internal DVB tuner driver for Amlogic devices developed by afl1"
post_install() {
enable_service amlogic-dvb.service
}

View File

@ -1,11 +0,0 @@
[Unit]
Description=Amlogic DVB module loader
ConditionPathExists=/proc/device-tree/dvbfe/dtv_demod0
After=kernel-overlays.service
[Service]
Type=simple
ExecStart=/bin/sh -c '[ `cat /proc/device-tree/dvbfe/dtv_demod0` = "Avl6211" ] && /sbin/modprobe aml_fe'
[Install]
WantedBy=basic.target

View File

@ -1,37 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="fd628-aml"
PKG_VERSION="8047f2e"
PKG_SHA256="168b9ae9df56834462a68654fb204468a4c8df31ce2b88d654fdff378e5eacda"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/arthur-liberman/linux_fd628"
PKG_URL="https://github.com/arthur-liberman/linux_fd628/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain linux"
PKG_NEED_UNPACK="$LINUX_DEPENDS"
PKG_LONGDESC="fd628-aml: Driver for Amlogic FD628 display"
PKG_TOOLCHAIN="manual"
pre_make_target() {
unset LDFLAGS
}
make_target() {
kernel_make -C "$(kernel_path)" M="$PKG_BUILD/driver"
make FD628Service
}
makeinstall_target() {
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
mkdir -p $INSTALL/usr/sbin
cp -P FD628Service $INSTALL/usr/sbin
}
post_install() {
enable_service fd628.service
}

View File

@ -1,6 +0,0 @@
default:
obj-m += driver/aml_fd628.o
$(MAKE) modules
FD628Service: FD628Service.c
$(CC) $(CFLAGS) -Wall -w -o $@ $^ -lm -lpthread

View File

@ -1,15 +0,0 @@
[Unit]
Description=Amlogic FD628 Service
ConditionPathExists=/proc/device-tree/le-vfd/
ConditionPathExists=/storage/.config/vfd.conf
[Service]
Type=oneshot
EnvironmentFile=/storage/.config/vfd.conf
ExecStart=/bin/sh -c '[ `cat /proc/device-tree/le-vfd/compatible` = "le,vfd" ] && /sbin/modprobe aml_fd628 vfd_gpio_clk=${vfd_gpio_clk} vfd_gpio_dat=${vfd_gpio_dat} vfd_gpio_stb=${vfd_gpio_stb} vfd_chars=${vfd_chars} vfd_dot_bits=${vfd_dot_bits} vfd_display_type=${vfd_display_type}'
ExecStart=/bin/sh -c '[ `cat /proc/device-tree/le-vfd/compatible` = "le,vfd" ] && /usr/sbin/FD628Service'
RemainAfterExit=yes
[Install]
WantedBy=basic.target

View File

@ -1,33 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="mt7601u-aml"
PKG_VERSION="4e61a61"
PKG_SHA256="814a63d8654f87a76cc06425ad2120daa32646f5220341a26296e4a6643b013a"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/khadas/android_hardware_wifi_mtk_drivers_mt7601"
PKG_URL="https://github.com/khadas/android_hardware_wifi_mtk_drivers_mt7601/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain linux"
PKG_NEED_UNPACK="$LINUX_DEPENDS"
PKG_LONGDESC="mt7601u Linux driver"
PKG_IS_KERNEL_PKG="yes"
PKG_TOOLCHAIN="manual"
pre_make_target() {
unset LDFLAGS
}
make_target() {
make -C $(kernel_path) M=$PKG_BUILD \
ARCH=$TARGET_KERNEL_ARCH \
CROSS_COMPILE=$TARGET_KERNEL_PREFIX
}
makeinstall_target() {
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
mkdir -p $INSTALL/$(get_full_firmware_dir)
cp $PKG_BUILD/RT2870STA_7601.dat $INSTALL/$(get_full_firmware_dir)
}

View File

@ -1,13 +0,0 @@
diff --git a/include/os/rt_linux.h b/include/os/rt_linux.h
index 0303698..36dd603 100755
--- a/include/os/rt_linux.h
+++ b/include/os/rt_linux.h
@@ -159,7 +159,7 @@ typedef struct usb_ctrlrequest devctrlrequest;
#ifdef ALLWINNER
#define STA_PROFILE_PATH "/system/vendor/modules/RT2870STA_7601.dat"
#else
-#define STA_PROFILE_PATH "/system/etc/wifi/RT2870STA_7601.dat"
+#define STA_PROFILE_PATH "/lib/firmware/RT2870STA_7601.dat"
#endif
#define STA_DRIVER_VERSION "JEDI.L0.MP1.mt7601u.v1.2"
#define DRIVER_ROLE "STA"

View File

@ -1,35 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="mt7603u-aml"
PKG_VERSION="0c53dfb"
PKG_SHA256="9e3eab02f3c3dd7de373c5d631c2069771e6ad783ecda36a484030ab4ec0ccec"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/khadas/android_hardware_wifi_mtk_drivers_mt7603"
PKG_URL="https://github.com/khadas/android_hardware_wifi_mtk_drivers_mt7603/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain linux"
PKG_NEED_UNPACK="$LINUX_DEPENDS"
PKG_LONGDESC="mt7603u Linux driver"
PKG_IS_KERNEL_PKG="yes"
PKG_TOOLCHAIN="manual"
pre_make_target() {
unset LDFLAGS
}
make_target() {
make LINUX_SRC=$(kernel_path) \
ARCH=$TARGET_KERNEL_ARCH \
CROSS_COMPILE=$TARGET_KERNEL_PREFIX \
RT28xx_DIR=$PKG_BUILD \
-f $PKG_BUILD/Makefile
}
makeinstall_target() {
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
mkdir -p $INSTALL/$(get_full_firmware_dir)
cp $PKG_BUILD/conf/MT7603USTA.dat $INSTALL/$(get_full_firmware_dir)
}

View File

@ -1,38 +0,0 @@
diff --git a/include/os/rt_linux.h b/include/os/rt_linux.h
index 9ddc4ea..258907a 100755
--- a/include/os/rt_linux.h
+++ b/include/os/rt_linux.h
@@ -201,7 +201,7 @@ typedef struct usb_ctrlrequest devctrlrequest;
#ifdef CONFIG_STA_SUPPORT
#ifdef RTMP_MAC_PCI
-#define STA_PROFILE_PATH "/system/etc/wifi/RT2870STA_7603.dat"
+#define STA_PROFILE_PATH "/lib/firmware/RT2870STA_7603.dat"
#define STA_DRIVER_VERSION "3.0.0.0"
#ifdef MULTIPLE_CARD_SUPPORT
#define CARD_INFO_PATH "/etc/Wireless/RT2860STA/RT2860STACard.dat"
@@ -210,12 +210,12 @@ typedef struct usb_ctrlrequest devctrlrequest;
#ifdef RTMP_MAC_USB
#ifdef HE_BD_CFG80211_SUPPORT
-#define STA_PROFILE_PATH "/system/etc/wifi/RT2870STA_7603.dat"
+#define STA_PROFILE_PATH "/lib/firmware/RT2870STA_7603.dat"
#else
#ifdef USE_CHIP_DEPENDENT_PROFILE_NAME
-#define STA_PROFILE_PATH "/system/etc/wifi/RT2870STA_7603.dat"
+#define STA_PROFILE_PATH "/lib/firmware/RT2870STA_7603.dat"
#else
-#define STA_PROFILE_PATH "/system/etc/wifi/RT2870STA_7603.dat"
+#define STA_PROFILE_PATH "/lib/firmware/RT2870STA_7603.dat"
#endif /* USE_CHIP_DEPENDENT_PROFILE_NAME */
#endif /* HE_BD_CFG80211_SUPPORT */
#define STA_DRIVER_VERSION "JEDI.L0.MP1.mt7603u.v1.8"
@@ -227,7 +227,7 @@ typedef struct usb_ctrlrequest devctrlrequest;
#ifdef RTMP_MAC_SDIO
-#define STA_PROFILE_PATH "/system/etc/wifi/RT2870STA_7603.dat"
+#define STA_PROFILE_PATH "/lib/firmware/RT2870STA_7603.dat"
#define STA_DRIVER_VERSION "3.0.0.0"
#ifdef MULTIPLE_CARD_SUPPORT
#define CARD_INFO_PATH "/etc/Wireless/RT2870STA/RT2870STACard.dat"

View File

@ -1,13 +0,0 @@
diff --git a/Makefile b/Makefile
index 65d0a5c..7fc16f4 100755
--- a/Makefile
+++ b/Makefile
@@ -234,7 +234,7 @@ endif
ifeq ($(PREALLOC), YES)
#build prealloc.ko
cp -f $(RT28xx_DIR)/os/linux/Makefile.6.prealloc $(RT28xx_DIR)/os/linux/Makefile
- $(MAKE) ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
+ $(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
endif
cp -f $(RT28xx_DIR)/os/linux/Makefile.6 $(RT28xx_DIR)/os/linux/Makefile
ifeq ($(PLATFORM),DM6446)

View File

@ -1,37 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="qca9377-aml"
PKG_VERSION="0cc65f9"
PKG_SHA256="336f6e95fc16874a81daf5289c656688a90c5df566ffeaea708f7ac2f5198b9e"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPL"
PKG_SITE="https://boundarydevices.com/new-silex-wifi-802-11ac-bt4-1-module/"
PKG_URL="https://github.com/boundarydevices/qcacld-2.0/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain linux"
PKG_NEED_UNPACK="$LINUX_DEPENDS"
PKG_LONGDESC="qca9377 Linux Driver"
PKG_IS_KERNEL_PKG="yes"
PKG_TOOLCHAIN="manual"
post_unpack() {
sed -i 's,-Wall,,g; s,-Werror,,g' $PKG_BUILD/Kbuild
sed -i 's,CDEFINES :=,CDEFINES := -Wno-misleading-indentation -Wno-unused-variable -Wno-unused-function,g' $PKG_BUILD/Kbuild
}
pre_make_target() {
unset LDFLAGS
unset CFLAGS
}
make_target() {
make KERNEL_SRC="$(kernel_path)" \
ARCH=$TARGET_KERNEL_ARCH \
CROSS_COMPILE=$TARGET_KERNEL_PREFIX \
CONFIG_CLD_HL_SDIO_CORE=y
}
makeinstall_target() {
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
}

View File

@ -1,538 +0,0 @@
From 7d4ee23fb20cc5e17d8d79db20a0d6704ac3df6c Mon Sep 17 00:00:00 2001
From: kszaq <kszaquitto@gmail.com>
Date: Tue, 10 Jan 2017 22:43:12 +0100
Subject: [PATCH] Modify SDIO and firmware handling to support chips used in
Amlogic devices
---
CORE/HDD/src/wlan_hdd_cfg.c | 10 +-
CORE/HDD/src/wlan_hdd_main.c | 180 ++++++++++++++++++++-
CORE/SERVICES/BMI/ol_fw.c | 8 +-
CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c | 6 -
.../sdio/linux/native_sdio/include/hif_internal.h | 2 +-
CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c | 62 +++----
6 files changed, 209 insertions(+), 59 deletions(-)
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index af7f399..5eedfcb 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -60,6 +60,8 @@
#include <pmcApi.h>
#include <wlan_hdd_misc.h>
+extern int qca_request_firmware(const struct firmware **firmware_p, const char *name,struct device *device);
+
static char *mac_param;
module_param_named(mac, mac_param, charp, S_IRUGO);
MODULE_PARM_DESC(mac, "mac address override");
@@ -4411,11 +4413,11 @@ VOS_STATUS hdd_parse_config_ini(hdd_context_t* pHddCtx)
memset(cfgIniTable, 0, sizeof(cfgIniTable));
- status = request_firmware(&fw, WLAN_INI_FILE, pHddCtx->parent_dev);
+ status = qca_request_firmware(&fw, WLAN_INI_FILE, pHddCtx->parent_dev);
if(status)
{
- hddLog(VOS_TRACE_LEVEL_FATAL, "%s: request_firmware failed %d",__func__, status);
+ hddLog(VOS_TRACE_LEVEL_FATAL, "%s: qca_request_firmware failed %d",__func__, status);
vos_status = VOS_STATUS_E_FAILURE;
goto config_exit;
}
@@ -5104,11 +5106,11 @@ VOS_STATUS hdd_update_mac_config(hdd_context_t *pHddCtx)
}
memset(macTable, 0, sizeof(macTable));
- status = request_firmware(&fw, WLAN_MAC_FILE, pHddCtx->parent_dev);
+ status = qca_request_firmware(&fw, WLAN_MAC_FILE, pHddCtx->parent_dev);
if (status)
{
- hddLog(VOS_TRACE_LEVEL_WARN, "%s: request_firmware failed %d",
+ hddLog(VOS_TRACE_LEVEL_WARN, "%s: qca_request_firmware failed %d",
__func__, status);
vos_status = VOS_STATUS_E_FAILURE;
return vos_status;
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 1919627..3bcc6b0 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -239,6 +239,163 @@ static VOS_STATUS hdd_parse_ese_beacon_req(tANI_U8 *pValue,
/*
* Android DRIVER command structures
*/
+//tkun add
+ typedef char A_CHAR;
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
+ #define GET_INODE_FROM_FILEP(filp) \
+ (filp)->f_path.dentry->d_inode
+ #else
+ #define GET_INODE_FROM_FILEP(filp) \
+ (filp)->f_dentry->d_inode
+ #endif
+// #define A_MALLOC(size) kmalloc((size), GFP_KERNEL)
+ #define A_MALLOC_NOWAIT(size) kmalloc((size), GFP_ATOMIC)
+// #define A_FREE(addr) kfree(addr);addr=NULL;
+//#define A_MEMCPY(dst, src, len) memcpy((dst), (src), (len))
+// #define A_MEMZERO(addr, len) memset((addr), 0, (len))
+ #define A_MEMCMP(addr1, addr2, len) memcmp((addr1), (addr2), (len))
+ #define A_ROUND_UP(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
+
+ char qcafwpath[256] = "/lib/firmware";
+
+ int android_readwrite_file(const A_CHAR *filename, A_CHAR *rbuf, const A_CHAR *wbuf, size_t length)
+ {
+ int ret = 0;
+ struct file *filp = (struct file *)-ENOENT;
+ mm_segment_t oldfs;
+ oldfs = get_fs();
+ set_fs(KERNEL_DS);
+
+ // printk("%s: filename %s \n",__func__,filename);
+ do {
+ int mode = (wbuf) ? O_RDWR : O_RDONLY;
+ filp = filp_open(filename, mode, S_IRUSR);
+ if (IS_ERR(filp) || !filp->f_op) {
+ printk("%s: file %s filp_open error\n", __FUNCTION__, filename);
+ ret = -ENOENT;
+ break;
+ }
+
+ if (length==0) {
+ /* Read the length of the file only */
+ struct inode *inode;
+
+ inode = GET_INODE_FROM_FILEP(filp);
+ if (!inode) {
+ // printk("%s: Get inode from %s failed\n", __FUNCTION__, filen ame);
+ ret = -ENOENT;
+ break;
+ }
+ ret = i_size_read(inode->i_mapping->host);
+ break;
+ }
+
+ if (wbuf) {
+ if ( (ret=filp->f_op->write(filp, wbuf, length, &filp->f_pos)) < 0) {
+// printk("%s: Write %u bytes to file %s error %d\n", __FUNCTION__,
+ // length, filename, ret);
+ break;
+ }
+ } else {
+ if ( (ret=filp->f_op->read(filp, rbuf, length, &filp->f_pos)) < 0) {
+// printk ("%s: Read %u bytes from file %s error %d\n", __FUNCTION__,
+ // length, filename, ret);
+ break;
+ }
+ }
+ } while (0);
+
+ if (!IS_ERR(filp)) {
+ filp_close(filp, NULL);
+ }
+ set_fs(oldfs);
+
+ return ret;
+ }
+
+
+ int android_request_firmware(const struct firmware **firmware_p, const char *name,struct device *device)
+ {
+ int ret = 0;
+ struct firmware *firmware;
+ char filename[256];
+ const char *raw_filename = name;
+ *firmware_p = firmware = A_MALLOC(sizeof(*firmware));
+ if (!firmware)
+ return -ENOMEM;
+ A_MEMZERO(firmware, sizeof(*firmware));
+ do {
+ size_t length, bufsize, bmisize;
+
+ if (snprintf(filename, sizeof(filename), "%s/%s", qcafwpath,
+ raw_filename) >= sizeof(filename)) {
+ printk("snprintf: %s/%s\n", qcafwpath, raw_filename);
+ ret = -1;
+ break;
+ }
+ if ( (ret=android_readwrite_file(filename, NULL, NULL, 0)) < 0) {
+ break;
+ } else {
+ length = ret;
+ }
+
+ if (strcmp(raw_filename, "softmac") == 0) {
+ bufsize = length = 17;
+ } else {
+ bufsize = ALIGN(length, PAGE_SIZE);
+ bmisize = A_ROUND_UP(length, 4);
+ bufsize = max(bmisize, bufsize);
+ }
+ firmware->data = vmalloc(bufsize);
+ firmware->size = length;
+
+ // printk("AR6K: %s(): raw_filename=%s, bufsize=%d\n", __FUNCTION__, ra w_filename, bufsize);
+
+ if (!firmware->data) {
+ printk("%s: Cannot allocate buffer for firmware\n", __FUNCTION__);
+ ret = -ENOMEM;
+ break;
+ }
+
+ if ( (ret=android_readwrite_file(filename, (char*)firmware->data, NULL, length)) != length) {
+// printk("%s: file read error, ret %d request %d\n", __FUNCTION__,ret,length);
+// ret = -1;
+ break;
+ }
+
+ } while (0);
+
+ if (ret<0) {
+ if (firmware) {
+ if (firmware->data)
+ vfree(firmware->data);
+ A_FREE(firmware);
+ }
+ *firmware_p = NULL;
+ } else {
+ ret = 0;
+ }
+ return ret;
+ }
+
+ void android_release_firmware(const struct firmware *firmware)
+ {
+ if (firmware) {
+ if (firmware->data)
+ vfree(firmware->data);
+ kfree(firmware);
+ }
+ }
+extern int qca_request_firmware(const struct firmware **firmware_p,const char *name,struct device *device)
+ {
+ // int uevent = 1;
+
+ //return _request_firmware(firmware_p, name, device, uevent, false);
+
+ return android_request_firmware(firmware_p, name,device);
+
+
+ }
struct android_wifi_reassoc_params {
unsigned char bssid[18];
int channel;
@@ -7778,7 +7935,7 @@ VOS_STATUS hdd_get_cfg_file_size(v_VOID_t *pCtx, char *pFileName, v_SIZE_t *pBuf
ENTER();
- status = request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);
+ status = qca_request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);
if(status || !pHddCtx->fw || !pHddCtx->fw->data) {
hddLog(VOS_TRACE_LEVEL_FATAL,"%s: CFG download failed",__func__);
@@ -7819,7 +7976,7 @@ VOS_STATUS hdd_read_cfg_file(v_VOID_t *pCtx, char *pFileName,
ENTER();
- status = request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);
+ status = qca_request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);
if(status || !pHddCtx->fw || !pHddCtx->fw->data) {
hddLog(VOS_TRACE_LEVEL_FATAL,"%s: CFG download failed",__func__);
@@ -12860,15 +13017,34 @@ static int hdd_driver_init( void)
\return - 0 for success, non zero for failure
--------------------------------------------------------------------------*/
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0))
+extern int wifi_setup_dt(void);
+extern void wifi_teardown_dt(void);
+#endif
+extern void extern_wifi_set_enable(int is_on);
+extern void sdio_reinit(void);
+
#ifdef MODULE
static int __init hdd_module_init ( void)
{
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0))
+ wifi_setup_dt();
+#endif
+ extern_wifi_set_enable(0);
+ mdelay(200);
+ extern_wifi_set_enable(1);
+ mdelay(200);
+sdio_reinit();
+
return hdd_driver_init();
}
#else /* #ifdef MODULE */
static int __init hdd_module_init ( void)
{
/* Driver initialization is delayed to fwpath_changed_handler */
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0))
+wifi_teardown_dt();
+#endif
return 0;
}
#endif /* #ifdef MODULE */
diff --git a/CORE/SERVICES/BMI/ol_fw.c b/CORE/SERVICES/BMI/ol_fw.c
index 66d741e..6e0e8d8 100644
--- a/CORE/SERVICES/BMI/ol_fw.c
+++ b/CORE/SERVICES/BMI/ol_fw.c
@@ -118,7 +118,7 @@ static int ol_get_fw_files_for_target(struct ol_fw_files *pfw_files,
return 0;
}
#endif
-
+extern int qca_request_firmware(const struct firmware **firmware_p, const char *name,struct device *device);
#ifdef HIF_USB
static A_STATUS ol_usb_extra_initialization(struct ol_softc *scn);
#endif
@@ -164,7 +164,7 @@ static int ol_transfer_single_bin_file(struct ol_softc *scn,
__func__));
}
- if (request_firmware(&fw_entry, filename, scn->sc_osdev->device) != 0)
+ if (qca_request_firmware(&fw_entry, filename, scn->sc_osdev->device) != 0)
{
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
("%s: Failed to get %s\n",
@@ -492,7 +492,7 @@ static int ol_transfer_bin_file(struct ol_softc *scn, ATH_BIN_FILE file,
break;
}
- if (request_firmware(&fw_entry, filename, scn->sc_osdev->device) != 0)
+ if (qca_request_firmware(&fw_entry, filename, scn->sc_osdev->device) != 0)
{
printk("%s: Failed to get %s\n", __func__, filename);
@@ -506,7 +506,7 @@ static int ol_transfer_bin_file(struct ol_softc *scn, ATH_BIN_FILE file,
filename = scn->fw_files.board_data;
printk("%s: Trying to load default %s\n",
__func__, filename);
- if (request_firmware(&fw_entry, filename,
+ if (qca_request_firmware(&fw_entry, filename,
scn->sc_osdev->device) != 0) {
printk("%s: Failed to get %s\n",
__func__, filename);
diff --git a/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c b/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c
index c99020e..6bafed8 100644
--- a/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c
+++ b/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c
@@ -234,12 +234,6 @@ ath_hif_sdio_remove(void *context, void *hif_handle)
{
ENTER();
- if (!sc) {
- VOS_TRACE(VOS_MODULE_ID_HIF, VOS_TRACE_LEVEL_ERROR,
- "Global SDIO context is NULL");
- return A_ERROR;
- }
-
athdiag_procfs_remove();
#ifndef TARGET_DUMP_FOR_NON_QC_PLATFORM
diff --git a/CORE/SERVICES/HIF/sdio/linux/native_sdio/include/hif_internal.h b/CORE/SERVICES/HIF/sdio/linux/native_sdio/include/hif_internal.h
index 382e38c..234bc09 100644
--- a/CORE/SERVICES/HIF/sdio/linux/native_sdio/include/hif_internal.h
+++ b/CORE/SERVICES/HIF/sdio/linux/native_sdio/include/hif_internal.h
@@ -112,7 +112,7 @@ struct hif_device {
A_BOOL swap_mailbox;
};
-#define HIF_DMA_BUFFER_SIZE (4 * 1024)
+#define HIF_DMA_BUFFER_SIZE (56 * 1024)
#define CMD53_FIXED_ADDRESS 1
#define CMD53_INCR_ADDRESS 2
diff --git a/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c b/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c
index d45ebd9..9fb1057 100644
--- a/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c
+++ b/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c
@@ -64,7 +64,8 @@
((request->request & HIF_WRITE)&& \
(request->address >= 0x1000 && request->address < 0x1FFFF))
#endif
-unsigned int mmcbusmode = 0;
+//unsigned int mmcbusmode = 0;
+unsigned int mmcbusmode = 5;
module_param(mmcbusmode, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(mmcbusmode, "Set MMC driver Bus Mode: 1-SDR12, 2-SDR25, 3-SDR50, 4-DDR50, 5-SDR104");
EXPORT_SYMBOL(mmcbusmode);
@@ -74,7 +75,9 @@ module_param(mmcbuswidth, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(mmcbuswidth, "Set MMC driver Bus Width: 1-1Bit, 4-4Bit, 8-8Bit");
EXPORT_SYMBOL(mmcbuswidth);
-unsigned int mmcclock = 0;
+//unsigned int mmcclock = 0;
+//unsigned int mmcclock = 166666666;
+unsigned int mmcclock = 200000000;
module_param(mmcclock, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(mmcclock, "Set MMC driver Clock value");
EXPORT_SYMBOL(mmcclock);
@@ -95,7 +98,7 @@ unsigned int asyncintdelay = 2;
module_param(asyncintdelay, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(asyncintdelay, "Delay clock count for aysnc interrupt, 2 is default, vaild values are 1 and 2");
#else
-unsigned int asyncintdelay = 0;
+unsigned int asyncintdelay = 2;
module_param(asyncintdelay, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(asyncintdelay, "Delay clock count for aysnc interrupt, 0 is default, vaild values are 1 and 2");
#endif
@@ -412,12 +415,6 @@ __HIFReadWrite(HIF_DEVICE *device,
tbuffer = device->dma_buffer;
/* copy the write data to the dma buffer */
AR_DEBUG_ASSERT(length <= HIF_DMA_BUFFER_SIZE);
- if (length > HIF_DMA_BUFFER_SIZE) {
- AR_DEBUG_PRINTF(ATH_DEBUG_ERROR,
- ("AR6000: Invalid write length: %d\n", length));
- status = A_EINVAL;
- break;
- }
memcpy(tbuffer, buffer, length);
bounced = TRUE;
} else {
@@ -440,12 +437,6 @@ __HIFReadWrite(HIF_DEVICE *device,
if (BUFFER_NEEDS_BOUNCE(buffer)) {
AR_DEBUG_ASSERT(device->dma_buffer != NULL);
AR_DEBUG_ASSERT(length <= HIF_DMA_BUFFER_SIZE);
- if (length > HIF_DMA_BUFFER_SIZE) {
- AR_DEBUG_PRINTF(ATH_DEBUG_ERROR,
- ("AR6000: Invalid read length: %d\n", length));
- status = A_EINVAL;
- break;
- }
tbuffer = device->dma_buffer;
bounced = TRUE;
} else {
@@ -695,7 +686,7 @@ static int async_task(void *param)
complete_and_exit(&device->async_completion, 0);
return 0;
}
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32))
+#if 1
static A_INT32 IssueSDCommand(HIF_DEVICE *device, A_UINT32 opcode, A_UINT32 arg, A_UINT32 flags, A_UINT32 *resp)
{
struct mmc_command cmd;
@@ -719,6 +710,7 @@ static A_INT32 IssueSDCommand(HIF_DEVICE *device, A_UINT32 opcode, A_UINT32 arg,
return err;
}
#endif
+//extern int sdio_reset_comm(struct mmc_card *card);
A_STATUS ReinitSDIO(HIF_DEVICE *device)
{
A_INT32 err = 0;
@@ -733,10 +725,12 @@ A_STATUS ReinitSDIO(HIF_DEVICE *device)
host = card->host;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +ReinitSDIO \n"));
+
+// err = sdio_reset_comm(card);
+#if 1
sdio_claim_host(func);
do {
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32))
/* 2.6.32 kernel does part of the SDIO initalization upon resume */
A_BOOL lt_2_6_32 = (LINUX_VERSION_CODE<KERNEL_VERSION(2,6,32));
if (lt_2_6_32) {
@@ -783,19 +777,10 @@ A_STATUS ReinitSDIO(HIF_DEVICE *device)
break;
}
- if (!host->ocr) {
- /* Issue CMD5, arg = 0 */
- err = IssueSDCommand(device, SD_IO_SEND_OP_COND, 0, (MMC_RSP_R4 | MMC_CMD_BCR), &resp);
- if (err) {
- AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("ReinitSDIO: CMD5 failed : %d \n",err));
- break;
- }
- host->ocr = resp;
- }
/* Issue CMD5, arg = ocr. Wait till card is ready */
for (i=0;i<100;i++) {
- err = IssueSDCommand(device, SD_IO_SEND_OP_COND, host->ocr, (MMC_RSP_R4 | MMC_CMD_BCR), &resp);
+ err = IssueSDCommand(device, SD_IO_SEND_OP_COND, 0, (MMC_RSP_R4 | MMC_CMD_BCR), &resp);
if (err) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("ReinitSDIO: CMD5 failed : %d \n",err));
break;
@@ -828,7 +813,7 @@ A_STATUS ReinitSDIO(HIF_DEVICE *device)
break;
}
}
-#endif
+
/* Enable high speed */
if (card->host->caps & MMC_CAP_SD_HIGHSPEED) {
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("ReinitSDIO: Set high speed mode\n"));
@@ -891,7 +876,7 @@ A_STATUS ReinitSDIO(HIF_DEVICE *device)
sdio_release_host(func);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -ReinitSDIO \n"));
-
+#endif
return (err) ? A_ERROR : A_OK;
}
@@ -1320,6 +1305,7 @@ static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id
/*
TODO: MMC SDIO3.0 Setting should also be modified in ReInit() function when Power Manage work.
*/
+#if 1
{
A_UINT32 clock, clock_set = 12500000;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
@@ -1578,7 +1564,7 @@ TODO: MMC SDIO3.0 Setting should also be modified in ReInit() function when Powe
sdio_release_host(func);
}
-
+#endif
spin_lock_init(&device->lock);
spin_lock_init(&device->asynclock);
@@ -2070,12 +2056,10 @@ static int hifDeviceSuspend(struct device *dev)
return -1;
}
} else {
- if (wma_suspend_target(temp_module, 0)) {
- AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("PDEV Suspend Failed\n"));
- return -1;
- }
+ if (wma_suspend_target(temp_module, 0)) {
+ printk(KERN_ERR "wma_suspend_target failed.\n");
+ }
}
-
if (pm_flag & MMC_PM_WAKE_SDIO_IRQ){
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("hifDeviceSuspend: wow enter\n"));
config = HIF_DEVICE_POWER_DOWN;
@@ -2295,9 +2279,7 @@ static HIF_DEVICE *
addHifDevice(struct sdio_func *func)
{
HIF_DEVICE *hifdevice = NULL;
-#if(LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)) && !defined(WITH_BACKPORTS)
int ret = 0;
-#endif
ENTER();
AR_DEBUG_ASSERT(func != NULL);
hifdevice = (HIF_DEVICE *)A_MALLOC(sizeof(HIF_DEVICE));
@@ -2310,13 +2292,9 @@ addHifDevice(struct sdio_func *func)
hifdevice->func = func;
hifdevice->powerConfig = HIF_DEVICE_POWER_UP;
hifdevice->DeviceState = HIF_DEVICE_STATE_ON;
-#if(LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)) && !defined(WITH_BACKPORTS)
ret = sdio_set_drvdata(func, hifdevice);
+
EXIT("status %d", ret);
-#else
- sdio_set_drvdata(func, hifdevice);
- EXIT();
-#endif
return hifdevice;
}
--
2.7.4

View File

@ -1 +0,0 @@
ACTION=="add|change", SUBSYSTEM=="net", ENV{INTERFACE}=="wlan*", ATTRS{vendor}=="0x0271", RUN+="/usr/bin/systemctl restart connman.service"

View File

@ -1,47 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="ssv6xxx-aml"
PKG_VERSION="1041e7d"
PKG_SHA256="1d96db8eec06c8a2c43f2c8024cc573e2bbce08fb0504fd9b6671224335e7d5f"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPL"
PKG_SITE="http://libreelec.tv"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain linux"
PKG_NEED_UNPACK="$LINUX_DEPENDS"
PKG_LONGDESC="ssv6xxx Linux driver"
PKG_IS_KERNEL_PKG="yes"
PKG_TOOLCHAIN="manual"
pre_configure_target() {
sed -i 's,hw_cap_p2p = on,hw_cap_p2p = off,g' firmware/ssv6051-wifi.cfg
}
pre_make_target() {
unset LDFLAGS
}
make_target() {
if [ "$TARGET_KERNEL_ARCH" = "arm64" ]; then
PLATFORM="aml-s905"
else
PLATFORM="aml-s805"
fi
cd $PKG_BUILD
./ver_info.pl include/ssv_version.h
cp Makefile.android Makefile
sed -i 's,PLATFORMS =,PLATFORMS = '"$PLATFORM"',g' Makefile
make module SSV_ARCH="$TARGET_KERNEL_ARCH" \
SSV_CROSS="$TARGET_KERNEL_PREFIX" \
SSV_KERNEL_PATH="$(kernel_path)"
}
makeinstall_target() {
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
mkdir -p $INSTALL/$(get_full_firmware_dir)/ssv6051
cp $PKG_BUILD/firmware/* $INSTALL/$(get_full_firmware_dir)/ssv6051
}

View File

@ -1,86 +0,0 @@
diff --git a/Makefile.android b/Makefile.android
index 82211e1..0deeee5 100755
--- a/Makefile.android
+++ b/Makefile.android
@@ -2,10 +2,8 @@ PLATFORMS =
KBUILD_TOP := $(PWD)
-SSV_PATH=$(ANDROID_BUILD_TOP)/hardware/wifi/icomm/ssv6xxx/ssv6051/
-
-include $(SSV_PATH)/ssv6051.cfg
-include $(SSV_PATH)/platform-config.mak
+include ${KBUILD_TOP}/ssv6051.cfg
+include ${KBUILD_TOP}/platform-config.mak
PWD := $(shell pwd)
@@ -69,7 +67,7 @@ obj-$(CONFIG_SSV6200_CORE) += $(KMODULE_NAME).o
all:module strip
module:
- make -C $(SSV_KERNEL_PATH) ARCH=$(SSV_ARCH) CROSS_COMPILE=$(SSV_CROSS) \
+ $(MAKE) -C $(SSV_KERNEL_PATH) ARCH=$(SSV_ARCH) CROSS_COMPILE=$(SSV_CROSS) \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" M=$(PWD) modules
install:
@@ -92,6 +90,6 @@ ifneq ($(SSV_STRIP),)
endif
clean:
- make -C $(SSV_KERNEL_PATH) ARCH=$(SSV_ARCH) CROSS_COMPILE=$(SSV_CROSS) \
+ $(MAKE) -C $(SSV_KERNEL_PATH) ARCH=$(SSV_ARCH) CROSS_COMPILE=$(SSV_CROSS) \
M=$(PWD) clean
rm $(DEF_PARSER_H)
diff --git a/firmware/ssv6051-wifi.cfg b/firmware/ssv6051-wifi.cfg
index 6c3a823..9c623a0 100755
--- a/firmware/ssv6051-wifi.cfg
+++ b/firmware/ssv6051-wifi.cfg
@@ -11,7 +11,7 @@
# Priority.3 default firmware
##################################################
-firmware_path = /system/etc/wifi/ssv6051/
+firmware_path = /usr/lib/firmware/ssv6051/
############################################################
# MAC address
diff --git a/platform-config.mak b/platform-config.mak
index bf35b70..f02e2b5 100755
--- a/platform-config.mak
+++ b/platform-config.mak
@@ -5,7 +5,7 @@ CONFIG_SSV6200_CORE=m
###########################################################################
# Compiler options #
###########################################################################
-ccflags-y += -Werror
+# ccflags-y += -Werror
# Enable -g to help debug. Deassembly from .o to .S would help to track to
# the problomatic line from call stack dump.
diff --git a/ssv6051.cfg b/ssv6051.cfg
index 7cf12c2..a6960fa 100755
--- a/ssv6051.cfg
+++ b/ssv6051.cfg
@@ -16,6 +16,6 @@ ccflags-y += -DCONFIG_SSV_RSSI
#SSV_CROSS = $(ANDROID_BUILD_TOP)/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-
#SSV_KERNEL_PATH = $(ANDROID_BUILD_TOP)/out/target/product/p201/obj/KERNEL_OBJ/
-SSV_ARCH = arm64
+#SSV_ARCH = arm64
#KMODDESTDIR = $(MODDESTDIR)
diff --git a/ssvdevice/ssvdevice.c b/ssvdevice/ssvdevice.c
index ff4305e..375827f 100755
--- a/ssvdevice/ssvdevice.c
+++ b/ssvdevice/ssvdevice.c
@@ -35,7 +35,7 @@
MODULE_AUTHOR("iComm Semiconductor Co., Ltd");
MODULE_DESCRIPTION("Shared library for SSV wireless LAN cards.");
MODULE_LICENSE("Dual BSD/GPL");
-static char *stacfgpath = NULL;
+static char *stacfgpath = "/usr/lib/firmware/ssv6051/ssv6051-wifi.cfg";
EXPORT_SYMBOL(stacfgpath);
module_param(stacfgpath, charp, 0000);
MODULE_PARM_DESC(stacfgpath, "Get path of sta cfg");

View File

@ -1,9 +0,0 @@
kso_enable=0
ccode=CN
regrev=38
mimo_bw_cap=1
PM=0
nv_by_chip=3 \
17221 6 nvram_ap6255.txt \
17200 4 nvram_ap6330.txt \
17209 1 nvram_ap6335.txt

View File

@ -1 +0,0 @@
options dhd firmware_path=/lib/firmware/brcm/ nvram_path=/lib/firmware/brcm/

View File

@ -1,32 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="brcmap6xxx-aml"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPL"
PKG_SITE="http://openlinux.amlogic.com:8000/download/ARM/wifi/"
PKG_VERSION="de3f5c5"
PKG_SHA256="5d109f630aa8c92b6c4ab8622d405dcbc2a7c4f07f1e5a8834358be230d2c35b"
PKG_URL="https://github.com/openwetek/brcmap6xxx-aml/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain linux wlan-firmware-aml"
PKG_NEED_UNPACK="$LINUX_DEPENDS"
PKG_LONGDESC="brcmap6xxx-aml: Linux drivers for AP6xxx WLAN chips used in some devices based on Amlogic SoCs"
PKG_TOOLCHAIN="manual"
PKG_IS_KERNEL_PKG="yes"
make_target() {
cd bcmdhd_1_201_59_x
LDFLAGS="" make V=1 \
-C $(kernel_path) M=$PKG_BUILD/bcmdhd_1_201_59_x \
ARCH=$TARGET_KERNEL_ARCH \
CROSS_COMPILE=$TARGET_KERNEL_PREFIX
}
makeinstall_target() {
mkdir -p $INSTALL/$(get_full_module_dir)/bcmdhd
cp *.ko $INSTALL/$(get_full_module_dir)/bcmdhd
mkdir -p $INSTALL/$(get_full_firmware_dir)/brcm
cp $PKG_DIR/config/config.txt $INSTALL/$(get_full_firmware_dir)/brcm
}

View File

@ -1,56 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="gpu-aml"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPL"
PKG_SITE="http://openlinux.amlogic.com:8000/download/ARM/gpu/"
PKG_VERSION="fe7a4d8"
PKG_SHA256="518f855a2b191e50d09c2d0b3e671b5ed4b5e4db06aa3a718e29ef30cc0d9a57"
PKG_URL="https://github.com/khadas/android_hardware_arm_gpu/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain linux"
PKG_NEED_UNPACK="$LINUX_DEPENDS"
PKG_LONGDESC="gpu-aml: Linux drivers for Mali GPUs found in Amlogic Meson SoCs"
PKG_TOOLCHAIN="manual"
PKG_IS_KERNEL_PKG="yes"
configure_package() {
PKG_UTGARD_VERSION="r5p1"
PKG_UTGARD_BUILD_DIR="$PKG_BUILD/utgard/$PKG_UTGARD_VERSION"
PKG_MIDGARD_VERSION="r16p0"
PKG_MIDGARD_BUILD_DIR="$PKG_BUILD/midgard/$PKG_MIDGARD_VERSION/kernel/drivers/gpu/arm/midgard"
}
pre_configure_target() {
sed -e "s|shell date|shell date -R|g" -i $PKG_BUILD/utgard/*/Kbuild
sed -e "s|USING_GPU_UTILIZATION=1|USING_GPU_UTILIZATION=0|g" -i $PKG_BUILD/utgard/platform/Kbuild.amlogic
}
pre_make_target() {
ln -s $PKG_BUILD/utgard/platform $PKG_UTGARD_BUILD_DIR/platform
}
make_target() {
if [ "$MESON_FAMILY" = "gxm" ] ; then
kernel_make -C $(kernel_path) M=$PKG_MIDGARD_BUILD_DIR \
EXTRA_CFLAGS="-DCONFIG_MALI_PLATFORM_DEVICETREE -DCONFIG_MALI_BACKEND=gpu" \
CONFIG_MALI_MIDGARD=m CONFIG_MALI_PLATFORM_DEVICETREE=y CONFIG_MALI_BACKEND=gpu modules
else
kernel_make -C $(kernel_path) M=$PKG_UTGARD_BUILD_DIR \
EXTRA_CFLAGS="-DCONFIG_MALI450=y" \
CONFIG_MALI400=m CONFIG_MALI450=y
fi
}
makeinstall_target() {
if [ "$MESON_FAMILY" = "gxm" ] ; then
kernel_make -C $(kernel_path) M=$PKG_MIDGARD_BUILD_DIR \
INSTALL_MOD_PATH=$INSTALL/$(get_kernel_overlay_dir) INSTALL_MOD_STRIP=1 DEPMOD=: \
modules_install
else
kernel_make -C $(kernel_path) M=$PKG_UTGARD_BUILD_DIR \
INSTALL_MOD_PATH=$INSTALL/$(get_kernel_overlay_dir) INSTALL_MOD_STRIP=1 DEPMOD=: \
modules_install
fi
}

View File

@ -1,32 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
PKG_NAME="wetekdvb"
PKG_VERSION="20180222"
PKG_SHA256="9deb42ede05082279da971edf1ec0133c0f5da6edcae9d69c04f022fc91c7d6c"
PKG_ARCH="arm aarch64"
PKG_LICENSE="nonfree"
PKG_SITE="http://www.wetek.com/"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain linux"
PKG_NEED_UNPACK="$LINUX_DEPENDS"
PKG_LONGDESC="Wetek's DVB driver "
PKG_IS_KERNEL_PKG="yes"
PKG_TOOLCHAIN="manual"
makeinstall_target() {
device=${DEVICE:-$PROJECT}
[ $device = "S905" ] && device=WeTek_Play_2
for overlay_dir in driver/$device/*/; do
overlay_dir=`basename $overlay_dir`
mkdir -p $INSTALL/$(get_full_module_dir $overlay_dir)/$PKG_NAME
cp driver/$device/$overlay_dir/wetekdvb.ko $INSTALL/$(get_full_module_dir $overlay_dir)/$PKG_NAME
done
mkdir -p $INSTALL/$(get_full_firmware_dir)
cp firmware/* $INSTALL/$(get_full_firmware_dir)
}
post_install() {
enable_service wetekdvb.service
}

View File

@ -1,11 +0,0 @@
[Unit]
Description=WeTek DVB module loader
ConditionPathExists=/proc/device-tree/dvb/dev_name
After=kernel-overlays.service
[Service]
Type=simple
ExecStart=/bin/sh -c '[ `cat /proc/device-tree/dvb/dev_name` = "wetek-dvb" ] && /sbin/modprobe wetekdvb'
[Install]
WantedBy=basic.target

View File

@ -1,22 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="brcmfmac_sdio-firmware-all-aml"
PKG_VERSION="02b8502"
PKG_SHA256="899f1da77994d337cfe57ec3f38cc13247769d8df6c56b2541f5b8fea6438f16"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/kszaq/brcmfmac_sdio-firmware-aml"
PKG_URL="https://github.com/kszaq/brcmfmac_sdio-firmware-aml/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="Firmware for brcm bluetooth chips used in some Amlogic based devices."
post_makeinstall_target() {
cd $INSTALL/$(get_full_firmware_dir)/brcm
for f in *.hcd; do
ln -sr $f $(grep --text -o 'BCM\S*' $f).hcd 2>/dev/null || true
ln -sr $f $(grep --text -o 'BCM\S*' $f | cut -c4-).hcd 2>/dev/null || true
ln -sr $f $(echo $f | sed -r 's/[^.]*/\U&/') 2>/dev/null || true
ln -sr bcm4335_V0343.0353.hcd BCM4335A0.hcd 2>/dev/null || true
done
}

View File

@ -1,14 +0,0 @@
diff -Naur a/Makefile b/Makefile
--- a/Makefile 2014-10-07 14:00:34.000000000 -0700
+++ b/Makefile 2016-12-06 11:24:34.855522455 -0800
@@ -15,8 +15,8 @@
install:
mkdir -p $(DESTDIR)/usr/bin
cp -P $(PROG) $(DESTDIR)/usr/bin
- mkdir -p $(DESTDIR)/lib/firmware
- cp -PR firmware/brcm $(DESTDIR)/lib/firmware/
+ mkdir -p $(DESTDIR)/usr/lib/kernel-overlays/base/lib/firmware
+ cp -PR firmware/brcm $(DESTDIR)/usr/lib/kernel-overlays/base/lib/firmware/
clean:
rm -f $(PROG)

View File

@ -1,8 +0,0 @@
[Unit]
Description=Broadcom sdio firmware update
[Service]
Type=simple
RemainAfterExit=yes
EnvironmentFile=/usr/share/bttty.conf
ExecStart=/usr/bin/hciattach -n -s 115200 ${BTTTY} bcm43xx 2000000

View File

@ -1,8 +0,0 @@
[Unit]
Description=Broadcom sdio firmware update for %I
[Service]
Type=simple
RemainAfterExit=yes
EnvironmentFile=/usr/share/bttty.conf
ExecStart=/usr/bin/brcm_patchram_plus --patchram /usr/lib/kernel-overlays/base/lib/firmware/brcm/%I.hcd --baudrate 2000000 --use_baudrate_for_download ${BTTTY} --enable_hci --no2bytes --tosleep=50000

View File

@ -1,12 +0,0 @@
################################################################################
# udev rules file for loading brcmfmac_sdio-firmware
################################################################################
### Broadcom bcm43362/bcm20710a1 bluetooth device
SUBSYSTEMS=="sdio", ATTRS{vendor}=="0x02d0", ATTRS{device}=="0xa962", ACTION=="add", \
TAG+="systemd", ENV{SYSTEMD_WANTS}+="brcmfmac_sdio-firmware@bcm20710a1.service", GOTO="end"
SUBSYSTEMS=="sdio", ATTRS{vendor}=="0x02d0", ACTION=="add", \
TAG+="systemd", ENV{SYSTEMD_WANTS}+="brcmfmac_sdio-firmware-aml.service"
LABEL="end"

View File

@ -1,15 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
PKG_NAME="brcmfmac_sdio-firmware-aml"
PKG_VERSION="0.1"
PKG_SHA256="37e19eb005882793d26d0def8704417b21beb1c24d2b4489715e4ed7e7818776"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/LibreELEC/LibreELEC.tv"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="Firmware for brcm bluetooth chips used in some Amlogic based devices."
makeinstall_target() {
DESTDIR=$INSTALL FWDIR=$INSTALL/$(get_kernel_overlay_dir) make install
}

View File

@ -1,14 +0,0 @@
diff -Naur brcmfmac_sdio-firmware-aml-0.1.orig/Makefile brcmfmac_sdio-firmware-aml-0.1/Makefile
--- brcmfmac_sdio-firmware-aml-0.1.orig/Makefile 2014-10-07 23:00:34.000000000 +0200
+++ brcmfmac_sdio-firmware-aml-0.1/Makefile 2017-11-09 11:52:47.102781882 +0100
@@ -15,8 +15,8 @@
install:
mkdir -p $(DESTDIR)/usr/bin
cp -P $(PROG) $(DESTDIR)/usr/bin
- mkdir -p $(DESTDIR)/lib/firmware
- cp -PR firmware/brcm $(DESTDIR)/lib/firmware/
+ mkdir -p $(FWDIR)/lib/firmware
+ cp -PR firmware/brcm $(FWDIR)/lib/firmware/
clean:
rm -f $(PROG)

View File

@ -1,8 +0,0 @@
[Unit]
Description=Broadcom sdio firmware update for %I
ConditionPathExists=/dev/ttyS1
[Service]
Type=simple
RemainAfterExit=yes
ExecStart=/usr/bin/brcm_patchram_plus --patchram /lib/firmware/brcm/%I.hcd --baudrate 2000000 --use_baudrate_for_download /dev/ttyS1 --enable_hci --no2bytes --tosleep=50000

View File

@ -1,30 +0,0 @@
################################################################################
# udev rules file for loading brcmfmac_sdio-firmware
################################################################################
ACTION!="add", GOTO="end"
SUBSYSTEMS=="sdio", ATTRS{vendor}=="0x02d0", ATTRS{device}=="0xa962", GOTO="begin"
SUBSYSTEMS=="sdio", ATTRS{vendor}=="0x02d0", ATTRS{device}=="0x4330", GOTO="begin"
SUBSYSTEMS=="sdio", ATTRS{vendor}=="0x02d0", ATTRS{device}=="0x4335", GOTO="begin"
SUBSYSTEMS=="sdio", ATTRS{vendor}=="0x02d0", ATTRS{device}=="0xa9bf", GOTO="begin"
GOTO="end"
LABEL="begin"
### Broadcom bcm43362/bcm20710a1 bluetooth device
ATTRS{vendor}=="0x02d0", ATTRS{device}=="0xa962", \
ENV{brcm_device}="bcm20710a1"
### Broadcom bcm4330/bcm40183b2 bluetooth device
ATTRS{vendor}=="0x02d0", ATTRS{device}=="0x4330", \
ENV{brcm_device}="bcm40183b2"
### Broadcom bcm4335/bcm4335c0 bluetooth device
ATTRS{vendor}=="0x02d0", ATTRS{device}=="0x4335", \
ENV{brcm_device}="bcm4335c0"
### Broadcom bcm4345c0 bluetooth device
ATTRS{vendor}=="0x02d0", ATTRS{device}=="0xa9bf", \
ENV{brcm_device}="bcm4345c0"
ENV{brcm_device}=="bcm*", ACTION=="add", \
TAG+="systemd", ENV{SYSTEMD_WANTS}+="brcmfmac_sdio-firmware@$env{brcm_device}.service"
LABEL="end"

View File

@ -1,18 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="qca9377-firmware-aml"
PKG_VERSION="1.0.0-3"
PKG_SHA256="9a9f214943e77e89ce8fc8c0dc5b41bc253478a9d92383a76590993df861f36d"
PKG_ARCH="arm aarch64"
PKG_LICENSE="BSD-3c"
PKG_SITE="http://linode.boundarydevices.com/repos/apt/ubuntu-relx/pool/main/q/qca-firmware/"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="qca9377 Linux firmware"
PKG_TOOLCHAIN="manual"
makeinstall_target() {
mkdir -p $INSTALL/$(get_full_firmware_dir)
cp -a * $INSTALL/$(get_full_firmware_dir)
}

View File

@ -1,8 +0,0 @@
[Unit]
Description=QCA Bluetooth firmware service
ConditionPathExists=/dev/ttyS1
[Service]
Type=simple
RemainAfterExit=yes
ExecStart=/usr/bin/hciattach -n -s 115200 /dev/ttyS1 qca 2000000

View File

@ -1,6 +0,0 @@
################################################################################
# udev rules file for loading qca9377-firmware-aml
################################################################################
ACTION=="add", SUBSYSTEMS=="sdio", ATTRS{vendor}=="0x0271", ATTRS{device}=="0x0701", \
TAG+="systemd", ENV{SYSTEMD_WANTS}+="qca9377-firmware-aml.service"

View File

@ -1,36 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="wlan-firmware-aml"
PKG_VERSION="5f5fae7"
PKG_SHA256="a926edbd87b028afcf8048c776859fa2bf0dca006df6a0f6867ce3915bd21494"
PKG_LICENSE="Free-to-use"
PKG_SITE="http://openlinux.amlogic.com:8000/download/ARM/wifi/"
PKG_URL="https://github.com/openwetek/wlan-firmware-aml/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="wlan-firmware-aml: Firmware for various WLAN chips used in the devices based on Amlogic SoCs"
PKG_TOOLCHAIN="manual"
makeinstall_target() {
mkdir -p $INSTALL/$(get_full_firmware_dir)/brcm
# AP6210
cp -PR bcm_ampak/config/AP6210/Wi-Fi/fw_bcm40181a2*.bin $INSTALL/$(get_full_firmware_dir)/brcm
cp -P bcm_ampak/config/AP6210/Wi-Fi/nvram_ap6210.txt $INSTALL/$(get_full_firmware_dir)/brcm
cp -P bcm_ampak/config/AP6210/BT/bcm20710a1.hcd $INSTALL/$(get_full_firmware_dir)/brcm
# AP6255
cp -PR bcm_ampak/config/6255/fw_bcm43455c0_*.bin $INSTALL/$(get_full_firmware_dir)/brcm
cp -P bcm_ampak/config/6255/nvram.txt $INSTALL/$(get_full_firmware_dir)/brcm/nvram_ap6255.txt
cp -P bcm_ampak/config/6255/BT/BCM4345C0.hcd $INSTALL/$(get_full_firmware_dir)/brcm/bcm4345c0.hcd
# AP6330
cp -PR bcm_ampak/config/AP6330/Wi-Fi/fw_bcm40183b2*.bin $INSTALL/$(get_full_firmware_dir)/brcm
cp -P bcm_ampak/config/AP6330/Wi-Fi/nvram_ap6330.txt $INSTALL/$(get_full_firmware_dir)/brcm
cp -P bcm_ampak/config/AP6330/BT/bcm40183b2.hcd $INSTALL/$(get_full_firmware_dir)/brcm
# AP6335
cp -PR bcm_ampak/config/6335/fw_bcm4339a0_*.bin $INSTALL/$(get_full_firmware_dir)/brcm
cp -P bcm_ampak/config/6335/nvram.txt $INSTALL/$(get_full_firmware_dir)/brcm/nvram_ap6335.txt
cp -P bcm_ampak/config/6335/BT/bcm4335c0.hcd $INSTALL/$(get_full_firmware_dir)/brcm
}

View File

@ -16,14 +16,6 @@ PKG_STAMP="$KERNEL_TARGET $KERNEL_MAKE_EXTRACMD"
PKG_PATCH_DIRS="$LINUX"
case "$LINUX" in
amlogic-3.14)
PKG_VERSION="6d8fbb4ee61a7779ac57b5961e076f0c63ff8b65"
PKG_SHA256="ef05c88779c893f92e92e5315d0e5396f34c32289726c301fae7ffe8c4214227"
PKG_URL="https://github.com/LibreELEC/linux-amlogic/archive/$PKG_VERSION.tar.gz"
PKG_SOURCE_NAME="linux-$LINUX-$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET aml-dtbtools:host"
PKG_BUILD_PERF="no"
;;
rockchip-4.4)
PKG_VERSION="aa8bacf821e5c8ae6dd8cae8d64011c741659945"
PKG_SHA256="a2760fe89a15aa7be142fd25fb08ebd357c5d855c41f1612cf47c6e89de39bb3"
@ -65,16 +57,11 @@ if [[ "$KERNEL_TARGET" = uImage* ]]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET u-boot-tools:host"
fi
if [ "$BUILD_ANDROID_BOOTIMG" = "yes" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET mkbootimg:host"
fi
post_patch() {
cp $PKG_KERNEL_CFG_FILE $PKG_BUILD/.config
if [ ! "$BUILD_ANDROID_BOOTIMG" = "yes" ]; then
sed -i -e "s|^CONFIG_INITRAMFS_SOURCE=.*$|CONFIG_INITRAMFS_SOURCE=\"$BUILD/image/initramfs.cpio\"|" $PKG_BUILD/.config
sed -i -e '/^CONFIG_INITRAMFS_SOURCE=*./ a CONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0' $PKG_BUILD/.config
fi
sed -i -e "s|^CONFIG_INITRAMFS_SOURCE=.*$|CONFIG_INITRAMFS_SOURCE=\"$BUILD/image/initramfs.cpio\"|" $PKG_BUILD/.config
sed -i -e '/^CONFIG_INITRAMFS_SOURCE=*./ a CONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0' $PKG_BUILD/.config
# set default hostname based on $DISTRONAME
sed -i -e "s|@DISTRONAME@|$DISTRONAME|g" $PKG_BUILD/.config
@ -218,27 +205,6 @@ make_target() {
# Without that it'll contain only the symbols from the kernel
kernel_make $KERNEL_TARGET $KERNEL_MAKE_EXTRACMD modules
if [ "$BUILD_ANDROID_BOOTIMG" = "yes" ]; then
DTB_BLOBS=($(ls arch/$TARGET_KERNEL_ARCH/boot/dts/amlogic/*.dtb 2>/dev/null || true))
DTB_BLOBS_COUNT="${#DTB_BLOBS[@]}"
DTB_BLOB_OUTPUT="arch/$TARGET_KERNEL_ARCH/boot/dtb.img"
ANDROID_BOOTIMG_SECOND="--second $DTB_BLOB_OUTPUT"
if [ "$DTB_BLOBS_COUNT" -gt 1 ]; then
$TOOLCHAIN/bin/dtbTool -o arch/$TARGET_KERNEL_ARCH/boot/dtb.img -p scripts/dtc/ arch/$TARGET_KERNEL_ARCH/boot/dts/amlogic/
elif [ "$DTB_BLOBS_COUNT" -eq 1 ]; then
cp -PR $DTB_BLOBS $DTB_BLOB_OUTPUT
else
ANDROID_BOOTIMG_SECOND=""
fi
LDFLAGS="" mkbootimg --kernel arch/$TARGET_KERNEL_ARCH/boot/$KERNEL_TARGET --ramdisk $BUILD/image/initramfs.cpio \
$ANDROID_BOOTIMG_SECOND $ANDROID_BOOTIMG_OPTIONS --output arch/$TARGET_KERNEL_ARCH/boot/boot.img
mv -f arch/$TARGET_KERNEL_ARCH/boot/boot.img arch/$TARGET_KERNEL_ARCH/boot/$KERNEL_TARGET
fi
if [ -n "$KERNEL_UIMAGE_TARGET" ] ; then
# determine compression used for kernel image
KERNEL_UIMAGE_COMP=${KERNEL_UIMAGE_TARGET:7}
@ -272,15 +238,11 @@ make_target() {
makeinstall_target() {
if [ "$BOOTLOADER" = "u-boot" ]; then
mkdir -p $INSTALL/usr/share/bootloader
if [ -d arch/$TARGET_KERNEL_ARCH/boot/dts/amlogic -a -f arch/$TARGET_KERNEL_ARCH/boot/dtb.img ]; then
cp arch/$TARGET_KERNEL_ARCH/boot/dtb.img $INSTALL/usr/share/bootloader/dtb.img 2>/dev/null || :
else
for dtb in arch/$TARGET_KERNEL_ARCH/boot/dts/*.dtb arch/$TARGET_KERNEL_ARCH/boot/dts/*/*.dtb; do
if [ -f $dtb ]; then
cp -v $dtb $INSTALL/usr/share/bootloader
fi
done
fi
for dtb in arch/$TARGET_KERNEL_ARCH/boot/dts/*.dtb arch/$TARGET_KERNEL_ARCH/boot/dts/*/*.dtb; do
if [ -f $dtb ]; then
cp -v $dtb $INSTALL/usr/share/bootloader
fi
done
elif [ "$BOOTLOADER" = "bcm2835-bootloader" ]; then
mkdir -p $INSTALL/usr/share/bootloader/overlays

View File

@ -202,8 +202,6 @@ configure_package() {
KODI_PLAYER="-DCORE_PLATFORM_NAME=gbm -DGBM_RENDER_SYSTEM=gles"
CFLAGS="$CFLAGS -DMESA_EGL_NO_X11_HEADERS"
CXXFLAGS="$CXXFLAGS -DMESA_EGL_NO_X11_HEADERS"
elif [ "$KODIPLAYER_DRIVER" = libamcodec ]; then
KODI_PLAYER="-DCORE_PLATFORM_NAME=aml"
fi
fi

View File

@ -1,35 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
PKG_NAME="libamcodec"
PKG_ARCH="arm aarch64"
PKG_LICENSE="other"
PKG_SITE="http://openlinux.amlogic.com"
case $TARGET_KERNEL_ARCH in
arm)
PKG_VERSION="5e23a81"
PKG_SHA256="412cfafbd9725f5186b884b9599ff6561d2031b44d9873e79d377631a2b5f9b9"
PKG_URL="https://github.com/codesnake/libamcodec/archive/$PKG_VERSION.tar.gz"
;;
arm64)
PKG_VERSION="bb19db7"
PKG_SHA256="81f78b37f2c14313b68cad5c43237dc3a217afaaad4f41e07a840e26673309c4"
PKG_URL="https://github.com/surkovalex/libamcodec/archive/$PKG_VERSION.tar.gz"
;;
esac
PKG_DEPENDS_TARGET="toolchain alsa-lib"
PKG_LONGDESC="libamplayer: Interface library for Amlogic media codecs"
post_unpack() {
sed -e "s|-lamadec||g" -i $PKG_BUILD/amcodec/Makefile
}
make_target() {
mkdir -p $SYSROOT_PREFIX/usr/lib
make -C amcodec HEADERS_DIR="$SYSROOT_PREFIX/usr/include/amcodec" PREFIX="$SYSROOT_PREFIX/usr" install
}
makeinstall_target() {
mkdir -p $INSTALL/usr/lib
make -C amcodec HEADERS_DIR="$INSTALL/usr/include/amcodec" PREFIX="$INSTALL/usr" install
}

View File

@ -1,13 +0,0 @@
# OpenELEC NEC remote
factory_code = 0x00680001
work_mode = 1
repeat_enable = 1
release_delay = 150
debug_enable = 1
reg_control = 0xfbe40
key_begin
0xdb 116 ;POWER
key_end

View File

@ -1,11 +0,0 @@
# WeTek Play NEC remote
factory_code = 0xbc430001
work_mode = 1
repeat_enable = 1
release_delay = 150
debug_enable = 1
reg_control = 0xfbe40
key_begin
0xca 116 ;POWER
key_end

View File

@ -1,27 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
PKG_NAME="amremote"
PKG_VERSION="6431040"
PKG_SHA256="5859680b0951ed3d2265999b7ad5309060587815df4dd1c48c6fa9aae039d5c5"
PKG_ARCH="arm aarch64"
PKG_LICENSE="other"
PKG_SITE="http://www.amlogic.com"
PKG_URL="https://github.com/codesnake/amremote/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain usbutils"
PKG_LONGDESC="amremote - IR remote configuration utility for Amlogic-based devices"
makeinstall_target() {
mkdir -p $INSTALL/usr/bin
cp remotecfg $INSTALL/usr/bin
mkdir -p $INSTALL/usr/lib/libreelec
cp $PKG_DIR/scripts/* $INSTALL/usr/lib/libreelec
mkdir -p $INSTALL/etc/amremote
cp $PKG_DIR/config/*.conf $INSTALL/etc/amremote
}
post_install() {
enable_service amlogic-remotecfg.service
}

View File

@ -1,18 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2014 Stephan Raue (stephan@openelec.tv)
# check the Security chip if we run on a WeTek device
lsusb -d 096e:0006 &> /dev/null
LSUSB_RET=$?
if [ -f /storage/.config/remote.conf ]; then
/usr/bin/remotecfg /storage/.config/remote.conf
elif [ -f /etc/amremote/remote.conf ]; then
/usr/bin/remotecfg /etc/amremote/remote.conf
elif [ "$LSUSB_RET" = 0 ]; then
/usr/bin/remotecfg /etc/amremote/wetek.conf
elif [ "$LSUSB_RET" = 1 ]; then
/usr/bin/remotecfg /etc/amremote/libreelec.conf
fi

View File

@ -1,11 +0,0 @@
[Unit]
Description=Amlogic IR remote support
ConditionPathExists=/dev/amremote
[Service]
Type=oneshot
ExecStart=/usr/lib/libreelec/remote-config
RemainAfterExit=yes
[Install]
WantedBy=basic.target

View File

@ -854,7 +854,7 @@ check_update() {
FLASH_FREE=$(df /flash/ | awk '/[0-9]%/{print $4}')
FLASH_FREE=$(( $FLASH_FREE * 1024 ))
# Disregard kernel size if it's a a block device, which is the case on Amlogic/WeTek devices
# Disregard kernel size if it's a a block device
if [ ! -b "/$IMAGE_KERNEL" ]; then
OLD_KERNEL=$(stat -t "/flash/$IMAGE_KERNEL" | awk '{print $2}')
else

View File

@ -1,18 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="aml-dtbtools"
PKG_VERSION="cce100f"
PKG_SHA256="8bcaa83fcc9e85c9c04930e7411447d96a97da0809c5ecd9af91c8b554133c41"
PKG_LICENSE="free"
PKG_SITE="https://github.com/Wilhansen/aml-dtbtools"
PKG_URL="https://github.com/Wilhansen/aml-dtbtools/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_HOST="gcc:host"
PKG_LONGDESC="AML DTB Tools"
PKG_MAKE_OPTS_HOST="dtbTool"
makeinstall_host() {
mkdir -p $TOOLCHAIN/bin
cp dtbTool $TOOLCHAIN/bin
}

View File

@ -1,31 +0,0 @@
# Configuration file for fw_(printenv/setenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash.
# Futhermore, if the Flash sector size is ommitted, this value is assumed to
# be the same as the Environment size, which is valid for NOR and SPI-dataflash
# NOR example
# MTD device name Device offset Env. size Flash sector size Number of sectors
#/dev/mtd1 0x0000 0x4000 0x4000
#/dev/mtd2 0x0000 0x4000 0x4000
# MTD SPI-dataflash example
# MTD device name Device offset Env. size Flash sector size Number of sectors
#/dev/mtd5 0x4200 0x4200
#/dev/mtd6 0x4200 0x4200
# NAND example
#/dev/mtd0 0x4000 0x4000 0x20000 2
# Block device example
#/dev/mmcblk0 0xc0000 0x20000
# VFAT example
#/boot/uboot.env 0x0000 0x4000
# Amlogic NAND
/dev/nand_env 0x000000 0x10000 0x10000
# Amlogic eMMC
/dev/env 0x000000 0x10000 0x10000

View File

@ -1,37 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="u-boot-tools-aml"
PKG_VERSION="2016.03"
PKG_SHA256="e49337262ecac44dbdeac140f2c6ebd1eba345e0162b0464172e7f05583ed7bb"
PKG_SITE="https://www.denx.de/wiki/U-Boot"
PKG_URL="ftp://ftp.denx.de/pub/u-boot/u-boot-$PKG_VERSION.tar.bz2"
PKG_DEPENDS_HOST="gcc:host"
PKG_DEPENDS_TARGET="toolchain u-boot-tools-aml:host"
PKG_LICENSE="GPL"
PKG_LONGDESC="Das U-Boot is a cross-platform bootloader for embedded systems."
make_host() {
make mrproper
make dummy_defconfig
make tools-only
}
make_target() {
CROSS_COMPILE="$TARGET_PREFIX" LDFLAGS="" ARCH=arm make dummy_defconfig
CROSS_COMPILE="$TARGET_PREFIX" LDFLAGS="" ARCH=arm make env
}
makeinstall_host() {
mkdir -p $TOOLCHAIN/bin
cp tools/mkimage $TOOLCHAIN/bin
}
makeinstall_target() {
mkdir -p $INSTALL/etc
cp $PKG_DIR/config/fw_env.config $INSTALL/etc/fw_env.config
mkdir -p $INSTALL/usr/sbin
cp tools/env/fw_printenv $INSTALL/usr/sbin/fw_printenv
cp tools/env/fw_printenv $INSTALL/usr/sbin/fw_setenv
}

Some files were not shown because too many files have changed in this diff Show More