Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - fishfingers

1
Entwicklung [ Development ] / patches for vdr-plugin-mcli
« on: July 28, 2019, 20:01:38 »
Hi Folks,

Here are a few patches for the reel netceiver vdr-plugin-mcli. This is that I needed to get the
netceiver working together with MLD on a raspberrypi. One does of course need the vlan
package installed and configured and a kernel with ipv6 active.

(working is relative, just noticed its not possible to change the channel...)

First lets patch the existing patch to fix the first compile error:

Code: [Select]
diff --git a/src/01_mcli_vdr233.patch b/src/01_mcli_vdr233.patch
index 174613c..534000c 100644
--- a/src/01_mcli_vdr233.patch
+++ b/src/01_mcli_vdr233.patch
@@ -15,7 +15,7 @@
 -                              cChannel *ch = Channels.GetByNumber (cDevice::CurrentChannel ());
 +                              #if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
 +                                       LOCK_CHANNELS_READ;
-+                                       cChannel *ch = Channels->GetByNumber(1,0));
++                                       const cChannel *ch = Channels->GetByNumber(1,0);
 +                              #else
 +                                       cChannel *ch = Channels.GetByNumber (cDevice::CurrentChannel ());
 +                              #endif


Now add a new patch file that fixes the Lock() compile error:

Code: [Select]
diff --git a/src/20_mcli_Lock.patch b/src/20_mcli_Lock.patch
new file mode 100644
index 0000000..cadf986
--- /dev/null
+++ b/src/20_mcli_Lock.patch
@@ -0,0 +1,17 @@
+--- mcli-2015.11.11.orig/filter.c      2015-11-17 12:51:44.000000000 +0100
++++ mcli/filter.c      2019-01-06 21:32:00.983167344 +0100
+@@ -276,9 +276,12 @@
+       cMcliFilter *f = new cMcliFilter (Pid, Tid, Mask);
+       int fh = f->ReadPipe ();
+
+-      Lock ();
++      //Lock (); replace with LOCK_THREAD
++
++      LOCK_THREAD;
+       Add (f);
+-      Unlock ();
++
++      //Unlock (); replace with LOCK_THREAD
+
+       return fh;
+ }

Now add another patch file that removes the string concat warnings (this is of course sort of optional)

Code: [Select]
diff --git a/src/30_mcli_string_warnings.patch b/src/30_mcli_string_warnings.patch
new file mode 100644
index 0000000..f6c6782
--- /dev/null
+++ b/src/30_mcli_string_warnings.patch
@@ -0,0 +1,26 @@
+--- mcli-2015.11.11.orig/mcli.c        2019-01-06 21:25:49.596481613 +0100
++++ mcli/mcli.c        2019-01-07 21:52:52.203089758 +0100
+@@ -888,7 +888,7 @@
+
+ bool cPluginMcli::Start (void)
+ {
+-      isyslog("Mcli v"MCLI_PLUGIN_VERSION" started");
++      isyslog("Mcli v" MCLI_PLUGIN_VERSION " started");
+ #ifdef REELVDR
+     if (access("/dev/dvb/adapter0", F_OK) != 0) //TB: this line allows the client to be used with usb-sticks without conflicts
+ #endif
+
+--- mcli-2015.11.11.orig/mcast/common/version.h        2015-11-17 12:51:44.000000000 +0100
++++ mcli/mcast/common/version.h        2019-01-06 21:27:41.415347777 +0100
+@@ -11,8 +11,8 @@
+ #else
+   #define MCLI_P2PSTR ""
+ #endif
+-#define MCLI_APP_VERSION "0.99.34"MCLI_P2PSTR
+-#define MCLI_COMPILED __DATE__" "__TIME__
+-#define MCLI_VERSION_STR MCLI_APP_VERSION" ("MCLI_COMPILED")"
++#define MCLI_APP_VERSION "0.99.34" MCLI_P2PSTR
++#define MCLI_COMPILED __DATE__ " " __TIME__
++#define MCLI_VERSION_STR MCLI_APP_VERSION " (" MCLI_COMPILED ")"
+ #define MCLI_MAGIC 0xDEADBEEF
+ #define MCLI_VERSION 0x14

Yet another patch file to remove compiler warning - fixup mcli_cam_menu if/else

Code: [Select]

diff --git a/src/40_mcli_cam_menu.patch b/src/40_mcli_cam_menu.patch
new file mode 100644
index 0000000..71fc648
--- /dev/null
+++ b/src/40_mcli_cam_menu.patch
@@ -0,0 +1,15 @@
+--- mcli-2015.11.11.orig/cam_menu.c    2015-11-17 12:51:44.000000000 +0100
++++ mcli/cam_menu.c    2019-01-07 21:46:23.325772542 +0100
+@@ -509,10 +509,11 @@
+                       delete NCUpdate;
+                       NCUpdate=NULL;
+                       return osBack;
+-              } else
++              } else {
+                       SetStatus(NCUpdate->GetStateStr());
+                       Display();
+                       return osContinue;
++              }
+       } // if
+       eOSState ret = cOsdMenu::ProcessKey (Key);
+

Lastly the final change that got it working... add the missing directory where the
mcli socket file lives (/var/tmp).
   
Code: [Select]

diff --git a/template/var/tmp/.gitignore b/template/var/tmp/.gitignore
new file mode 100644
index 0000000..e69de29


If you copy the netcvdiag built in mcli/tools into the system it also
now works. I would have liked to add them to the package but don't
see how to do this.

mfg

Alan

PS The patches are attached...

2

Hi Folks,

I have been trying to build unstable 5.4 on a qemu
version 2.8.1(Debian 1:2.8+dfsg-6+deb9u5) running a
Raspbian 9 (stretch) with a fairly new kernel 4.14.50+
borrowed from here:

https://github.com/dhruvvyas90/qemu-rpi-kernel.git.

Several days later, I couldn't seem to get the ISO/Makefile to run at all. This was
because Makefile.arch was having problems identifying the hardware since it
appears the contents of /proc/cpuinfo has changed a little.

# grep Hardware /proc/cpuinfo | sed 's/.*: //'
ARM-Versatile (Device Tree Support)

However Makefile.arch seems to expect 'ARM-Versatile PB'

Makefile.arch:
...
> hardware := $(shell grep Hardware /proc/cpuinfo | sed 's/.*: //')
> host := .....$(findstring ARM-Versatile PB,$(hardware)),rpi....

Changing this to

> host := .....$(findstring ARM-Versatile,$(hardware)),rpi....

Has started to work for me...

mfg
        Alan

PS man spricht deutsch....