Linux DVB driver = success

HDHomeRun development

Moderator: Moderators

Postby 0xdeadbeef » Sat Jan 14, 2012 9:35 pm

Well, the null pointer is actually inside the DVB subsystem in the kernel, so chances are that you've actually stumbled upon a kernel bug. I've personally not seen that one trip before in any of the (many) versions of the kernel I've tried, _but_ I haven't actually tried squeeze before.

The particular function the throws the NULL pointer (dvb_dmx_swfilter_packet()) just happens to be changed in kernel 2.6.33 and you are on 2.6.32.

So if I where you I would try with a newer kernel first.


Sorry for my late reply, I thought I'd get an email when someone else posted.

I ended up changing the OS of my server to ubuntu 11.10, so problem solved. Thanks for your help.
0xdeadbeef
 
Posts: 2
Joined: Sun Jan 01, 2012 10:23 pm

Postby tfylliv » Sun Jan 22, 2012 7:04 am

0xdeadbeef wrote:
Well, the null pointer is actually inside the DVB subsystem in the kernel, so chances are that you've actually stumbled upon a kernel bug. I've personally not seen that one trip before in any of the (many) versions of the kernel I've tried, _but_ I haven't actually tried squeeze before.

The particular function the throws the NULL pointer (dvb_dmx_swfilter_packet()) just happens to be changed in kernel 2.6.33 and you are on 2.6.32.

So if I where you I would try with a newer kernel first.



Just a quick followup on this one. I could reproduce the kernel NULL pointer on debian squeeze, which is kernel 2.6.32-5 + debian patches.

I then upgraded the kernel using www.backports.org, which upgraded to 2.6.39 + backport patches - and that worked just fine.

So if you are on a Debian Squeeze use backports to get a kernel that works.

On a side note, Ubuntu 10.04 also used kernel 2.6.32 + ubuntu patches, so either there is (was?) a general problem in kernel 2.6.32 or it is the debian patches to that kernel which causes the problem.
tfylliv
Expert
 
Posts: 107
Joined: Sat Sep 04, 2010 3:08 pm

Postby rmoliner » Thu Feb 02, 2012 8:57 am

Hi tfylliv,

Time ago, you help me compile dvbhdhomerun with s2-liplianin drivers.
That was nice.
In the latest times, userhdhomerun was crashing about every 120 minutes (segfaults errors).

I found, by surprise, your Nov/2011 changes on "userhdhomerun_contro.cpp'
(http://dvbhdhomerun.cvs.sourceforge.net ... ortby=date)

I downloaded this piece of code and recompiled.

Now, all is more stable. A lot of more stable!!

I write you this email, because this change of code is not reflected on the 0.0.9 source code tar ball (http://sourceforge.net/projects/dvbhdhomerun/files/)

I am running Natty. The launchpad's repository only reflects this change for the "Oneric" repository.

Maybe, other users can get benefit of using the latest release 0.0.9-2

Many thanks for your code!!
Ramon

My system:
Hdhomerun-EU DVB-T
2 km distance wifi link that connects hdhomerun to ubuntu
Ubuntu Natty 64 bits.
s2-liplianin stack
tfylliv's dvbhdhomerun's drivers
tvheadend + oscam
XBMC running on a Mac
rmoliner
 
Posts: 7
Joined: Thu Dec 17, 2009 12:15 pm

Not working yet on QNAP NAS (possible kernel issue)

Postby fstrange » Sun Feb 05, 2012 7:04 am

Hi HDHomeRun forum.

Two brave guys (321liftoff, virtualdj) have fought to get the HDHomeRun drivers working (libhdhomerun) on QNAP NAS in conjunction with TVHeadend PVR. We're many users supporting their work.

It seems that they/we have come to a high wall. I'm not into all the details, but i read about kernel issue. It's not that easy for us to change kernel version, since that is part of the QNAP firmware.

Please read previous Posts in this thread and give 321liftoff some advice of how to proceed on this difficult issue. Thank you very much!


Thread in QNAP forum:
http://forum.qnap.com/viewtopic.php?f=2 ... 45#p248886

Best Regards,
Fredrik Strange
QNAP NAS and HDHomeRun user
fstrange
 
Posts: 2
Joined: Fri Apr 01, 2011 9:53 am

Postby 321liftoff » Thu Feb 09, 2012 4:52 pm

Thanks fstrange! I feel that we're almost there to getting it fully functional, if we can get past this one hiccup!

Here's my error, which looks slightly different from 0xdeadbeef's error. I'm using a NAS which has a 2.6.33.2 kernel and we can't upgrade at the moment. tfylliv, you were thinking that maybe it was fixed in 2.6.33, but maybe there's some other problem that was fixed in a later version? Can you help parse this error to see if it's pointing to something else? Also to consider, is there any work-around in the dvbhdhomerun code or are we at the mercy of the kernel on this one?

I see that instead of "dvb_dmx_swfilter_packet" my error is just "dvb_dmx_swfilter" and that my last sysfs file is "/sys/devices/platform/orion-ehci.0/usb1/1-1/devnum" instead of "/sys/devices/platform/HDHomeRun.1/dvb/dvb1.frontend0/uevent"

Code: Select all
[ 7766.630000] Unable to handle kernel NULL pointer dereference at virtual address 000001d5
[ 7766.630000] pgd = dde40000
[ 7766.640000] [000001d5] *pgd=1ed8d031, *pte=00000000, *ppte=00000000
[ 7766.640000] Internal error: Oops: 1 [#1]
[ 7766.640000] last sysfs file: /sys/devices/platform/orion-ehci.0/usb1/1-1/devnum
[ 7766.640000] Modules linked in: dvb_hdhomerun dvb_hdhomerun_fe dvb_hdhomerun_core dvb_core    iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi fbdisk uvcvideo v4l2_common videodev v4l   1_compat v4l2_int_device snd_usb_caiaq snd_usb_audio snd_usb_lib snd_hwdep snd_pcm_oss snd_mi   xer_oss snd_pcm snd_seq_oss snd_seq_midi snd_seq_midi_event snd_seq snd_rawmidi snd_page_allo   c snd_seq_device snd_timer snd soundcore mac80211 cfg80211 lib80211 fnotify(P) smbfs cifs nfs    udf isofs ufsd(P) ext4 jbd2 sysinfo usblp usbhid mv_cesa aes_generic dm_crypt dm_mod raid456    async_raid6_recov async_pq async_xor async_memcpy async_tx raid6_pq xor nls_utf8 nls_iso8859   _2 nls_cp850 nls_cp437 vfat fat appletalk psnap llc hid ext3 jbd [last unloaded: dvb_core]
[ 7766.640000] CPU: 0    Tainted: P            (2.6.33.2 #1)
[ 7766.640000] PC is at dvb_dmx_swfilter+0x14/0xe4 [dvb_core]
[ 7766.640000] LR is at hdhomerun_data_write+0xd0/0xf0 [dvb_hdhomerun]
[ 7766.640000] pc : [<bf49c7c0>]    lr : [<bf105910>]    psr: 60000013
[ 7766.640000] sp : c0e2de20  ip : c0e2de48  fp : c0e2de44
[ 7766.640000] r10: 00000000  r9 : bf105840  r8 : 00000001
[ 7766.640000] r7 : bf08d5cc  r6 : 00000010  r5 : 00000000  r4 : 00000000
[ 7766.640000] r3 : 00000000  r2 : 00000000  r1 : 00000010  r0 : 00000001
[ 7766.640000] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[ 7766.640000] Control: 0005397f  Table: 1de40000  DAC: 00000015
[ 7766.640000] Process userhdhomerun (pid: 10831, stack limit = 0xc0e2c270)
[ 7766.640000] Stack: (0xc0e2de20 to 0xc0e2e000)
[ 7766.640000] de20: c03e4618 00000000 00000000 00000010 bf08d5cc dd1c1ecc c0e2de6c c0e2de48
[ 7766.640000] de40: bf105910 bf49c7bc c0e2dec0 00000000 00000002 c0e2df78 c0d5b3a0 bf105840
[ 7766.640000] de60: c0e2de9c c0e2de70 c00c6308 bf105850 c0e2df78 00000002 00000524 c0d5b3a0
[ 7766.640000] de80: 00000001 00000524 c0e2df78 c0e2dec0 c0e2df54 c0e2dea0 c00c7160 c00c62cc
[ 7766.640000] dea0: bf105840 c0e2df24 3b9aca00 00000000 c0e2defc c0e2dec0 c030ca60 c007e148
[ 7766.640000] dec0: 00000000 00000000 40b9b008 00000524 00000000 0000c350 00000000 03d09000
[ 7766.640000] dee0: 00000000 c0e2c000 c0e2df20 00000001 c0e2df84 c0e2df00 c007e7d0 c030c998
[ 7766.640000] df00: 0000c350 00000000 c00c742c 00000000 0000c350 00000000 03d15350 00000000
[ 7766.640000] df20: dddb1a89 c0e2dec0 00000000 c0e2df78 00000000 c0d5b3a0 00000092 c002b228
[ 7766.640000] df40: c0e2c000 00000000 c0e2df74 c0e2df58 c00c71d8 c00c6df8 c0e2df78 00000000
[ 7766.640000] df60: c0e2df88 00000000 c0e2dfa4 c0e2df78 c00c7c64 c00c7180 00000000 00000000
[ 7766.640000] df80: c007e908 00000001 00000000 00000002 00000008 4205ec30 00000000 c0e2dfa8
[ 7766.640000] dfa0: c002b080 c00c7c30 00000002 00000008 00000008 4205ec30 00000002 00000000
[ 7766.640000] dfc0: 00000002 00000008 4205ec30 00000092 4205ec30 00000524 00000524 4205ec04
[ 7766.640000] dfe0: 4205ec08 4205ebe8 402c6c9c 402c6bb8 60000010 00000008 00000000 00000000
[ 7766.640000] Backtrace:
[ 7766.640000] [<bf49c7ac>] (dvb_dmx_swfilter+0x0/0xe4 [dvb_core]) from [<bf105910>] (hdhomer   un_data_write+0xd0/0xf0 [dvb_hdhomerun])
[ 7766.640000]  r8:dd1c1ecc r7:bf08d5cc r6:00000010 r5:00000000 r4:00000000
[ 7766.640000] [<bf105840>] (hdhomerun_data_write+0x0/0xf0 [dvb_hdhomerun]) from [<c00c6308>]    (do_loop_readv_writev+0x4c/0x7c)
[ 7766.640000]  r9:bf105840 r8:c0d5b3a0 r7:c0e2df78 r6:00000002 r5:00000000
[ 7766.640000] r4:c0e2dec0
[ 7766.640000] [<c00c62bc>] (do_loop_readv_writev+0x0/0x7c) from [<c00c7160>] (do_readv_write   v+0x378/0x388)
[ 7766.640000] [<c00c6de8>] (do_readv_writev+0x0/0x388) from [<c00c71d8>] (vfs_writev+0x68/0x   80)
[ 7766.640000] [<c00c7170>] (vfs_writev+0x0/0x80) from [<c00c7c64>] (sys_writev+0x44/0x74)
[ 7766.640000]  r4:00000000
[ 7766.640000] [<c00c7c20>] (sys_writev+0x0/0x74) from [<c002b080>] (ret_fast_syscall+0x0/0x2   8)
[ 7766.640000]  r6:4205ec30 r5:00000008 r4:00000002
[ 7766.640000] Code: e92dd9f0 e24cb004 e24dd004 e1a08000 (e59001d4)
[ 7766.650000] ---[ end trace 26e68592833f6a63 ]---
321liftoff
 
Posts: 29
Joined: Sat Apr 17, 2010 4:22 am

Compile on Synology

Postby hoontune » Fri Feb 10, 2012 4:05 am

Hi,

I've been cross compiling dvbhdhomerun for an arm based Synology DS210J

I've cross compiled the dvb-core.ko module, but when I insmod it, it fails. dmesg reports:

[172003.160000] dvb_core: Unknown symbol ___copy_to_user
[172003.170000] dvb_core: Unknown symbol __arch_copy_from_user


can anyone shed some light on what the dependancy is to get past this ?
hoontune
 
Posts: 14
Joined: Fri Feb 10, 2012 3:56 am

Postby tfylliv » Fri Feb 10, 2012 2:07 pm

321liftoff wrote:Thanks fstrange! I feel that we're almost there to getting it fully functional, if we can get past this one hiccup!

Here's my error, which looks slightly different from 0xdeadbeef's error. I'm using a NAS which has a 2.6.33.2 kernel and we can't upgrade at the moment.


Hmm, I have an initial silly question. Where do you get your dvb_core kernel module from?

The dvb_dmx_swfilter_xxx() function which crashes comes from the dvb_core module.

The reason I ask is that I downloaded the QNAP kernel source from http://www.qnap.com/GPL.asp and looking at the kernel configuration from those, the DVB core module is _not_ build with those configurations.

For example GPL_TS/kernel_cfg/TS-210/linux-2.6.33.2-arm.cfg contain the line:

Code: Select all
# CONFIG_DVB_CORE is not set


And it is the same for all the other configurations. Without a dvb_core module it will certainly not work (can you insmod dvb_core?).

I've FYI also tried building a 2.6.33.2 kernel on a debian box - and that _does_ work, so there is hope. ;-)

A stock debian squeeze kernel which is 2.6.32 + debian patches actually crashes pretty similarily to what you see - but I can't really see what difference in the diff between those two should cause it.


There is FYI a third option if we can't get the above to work - namely to build the DVB drivers (dvb_core and so forth) ourselves against your current kernel. They DVB drivers are maintained seperately by the linuxtv.org guys and are fairly simple to build on top of an existing kernel. But lets not go there yet. :-)
tfylliv
Expert
 
Posts: 107
Joined: Sat Sep 04, 2010 3:08 pm

Postby 321liftoff » Fri Feb 10, 2012 8:44 pm

WOW! You really went above and beyond, downloading the kernel sources and even building on a 2.6.33.2 kernel! Thanks for the glimmer of hope, since we thought that we were stuck in the mud...

You are right that the dvb_core isn't included in the QNAP kernel by default. virtualdj on the QNAP forum you've seen is providing us the dvb-core with the dvbhdhomerun kernel drivers. I believe he is compiling on the QNAP to get the dvb-core.ko, but I don't know the source (maybe it is linuxtv.org, like you suggested).

The current technique is to create the dvb adapter device nodes manually using a script (/dev/dvb/adapter0, and adapter1). Then perform "load_modules_fromfile" which uses a file as a parameter listing dvb-core.ko, dvb_hdhomerun_core.ko, dvb_hdhomerun_fe.ko, and dvb_hdhomerun.ko, in that order. I can't find any info about "load_modules_fromfile" so I'm not sure how that's working, but I think it's the equivalent of doing "insmod dvb-core.ko" etc, because running the insmod command after the script has run gives me the "File exists" message, which to me means it's loaded. Then we create the hdhomerun_control device node binding to the loaded kernel driver, run userhdhomerun, then create the two /dev/hdhomerun_data device nodes binding to the those devices created by userhdhomerun.

The dmesg look pretty clean. So maybe we need to take a closer look at our dvb-core file to make sure it's correctly built?
321liftoff
 
Posts: 29
Joined: Sat Apr 17, 2010 4:22 am

Postby 321liftoff » Sat Feb 11, 2012 4:12 am

tfylliv, some answers?
http://forum.qnap.com/viewtopic.php?f=2 ... 45#p249922

Looks like 2.6.33.2 kernel was compiled from sources. Also from virtualdj:

I also tried to build the modules from linuxtv.org, but then I gave up because on the QNAP - at least with my Nova-T - they seemed more "unstable" compared with the "vanilla" DVB from kernel.org (more dmesg mess).


The dvb-core he built does work with other USB tv tuners. Is there something we should be aware of when compiling dvb-core? If you have a dvb-core.ko file for 2.6.33.2, could you provide and I can try that one as well?
321liftoff
 
Posts: 29
Joined: Sat Apr 17, 2010 4:22 am

Postby tfylliv » Sat Feb 11, 2012 11:25 am

321liftoff wrote:tfylliv, some answers?
http://forum.qnap.com/viewtopic.php?f=2 ... 45#p249922


I've created a user on that forum, lets keep the rest there - this is starting to be confusing. :-)

321liftoff wrote:The dvb-core he built does work with other USB tv tuners. Is there something we should be aware of when compiling dvb-core? If you have a dvb-core.ko file for 2.6.33.2, could you provide and I can try that one as well?


Depends, which QNAP are you on? I've been building for x86_64 for now - I think you are on and ARM processor right?
tfylliv
Expert
 
Posts: 107
Joined: Sat Sep 04, 2010 3:08 pm

Postby 321liftoff » Sat Feb 11, 2012 1:37 pm

Thanks for joining us over there. I'm using an armel architecture. We'll continue on the other forum.
321liftoff
 
Posts: 29
Joined: Sat Apr 17, 2010 4:22 am

Re: Compile on Synology

Postby hoontune » Wed Feb 15, 2012 3:58 pm

hoontune wrote:Hi,

I've been cross compiling dvbhdhomerun for an arm based Synology DS210J

I've cross compiled the dvb-core.ko module, but when I insmod it, it fails. dmesg reports:


I fixed this in the end, strangely the synology arm toolchain doesn't default the system type to an arm processor !

So I've being piggy-backing on the work that the QNAP guys have been doing, and have modified the tvh_start script
Code: Select all
# Create device nodes for HDHomerun
mkdir -p /dev/dvb/adapter0
mknod /dev/dvb/adapter0/frontend0 c 212 3
mknod /dev/dvb/adapter0/demux0 c 212 4
mknod /dev/dvb/adapter0/dvr0 c 212 5
mkdir -p /dev/dvb/adapter1
mknod /dev/dvb/adapter1/frontend0 c 212 67
mknod /dev/dvb/adapter1/demux0 c 212 68
mknod /dev/dvb/adapter1/dvr0 c 212 69

# Set permissions
chmod 755 /dev/dvb/adapter*
chmod 666 /dev/dvb/adapter*/*
chown root:users /dev/dvb/adapter*/*

insmod /opt/dvb-core/dvb-core.ko
insmod /opt/dvb-core/dvb_hdhomerun_core.ko
insmod /opt/dvb-core/dvb_hdhomerun.ko
insmod /opt/dvb-core/dvb_hdhomerun_fe.ko

#lsmod to check if everything is running
#grep -i dvb /proc/devices

#DYNAMIC_ID=$(/bin/grep hdhomerun_control /proc/misc | /bin/awk "{print \$1}")
DYNAMIC_ID=57
if [ "$DYNAMIC_ID" != "" ]; then
  mknod /dev/hdhomerun_control c 10 $DYNAMIC_ID
else
  echo "Unable to detect hdhomerun_control inside /proc/misc."
fi
# Set permissions
chmod 666 /dev/hdhomerun_control
chown root:users /dev/hdhomerun_control

# Clear userhdhomerun log
rm -f "/opt/dvbhdhomerun/dvbhdhomerun.log"

# Run userhdhomerun with LD_PRELOAD
# (because libhdhomerun.so is inside QPKG folder)
/opt/dvbhdhomerun/userhdhomerun/build/userhdhomerun \
        -f -u root -g users -l "/opt/dvbhdhomerun/dvbhdhomerun.log"

sleep 1

#DYNAMIC_ID=$(/bin/grep hdhomerun_data /proc/devices | /bin/awk "{print \$1}")
DYNAMIC_ID=57
if [ "$DYNAMIC_ID" != "" ]; then
  mknod /dev/hdhomerun_data0 c $DYNAMIC_ID 0
  mknod /dev/hdhomerun_data1 c $DYNAMIC_ID 1
else
  /bin/echo "Unable to detect hdhomerun_data inside /proc/devices."
fi


# Set permissions
chmod 666 /dev/hdhomerun_data*
chown root:users /dev/hdhomerun_data*


so when I run it, I see
tail -f /var/log/dvbhdhomerun.log wrote:Tuner: 0
Set initial pass-all filter for tuner: 0

Name of device: 11105D0A-1
Tuner type set to "DVB-T" based on conf file
Tuner: 1
Set initial pass-all filter for tuner: 1

Registered tuner, id from kernel: 0 name: 11105D0A-0
Registered tuner, id from kernel: 1 name: 11105D0A-1


dmesg wrote:[ 184.600000] HDHomeRun: Begin init, version 0.0.9
[ 184.600000] HDHomeRun: Waiting for userspace to connect
[ 184.610000] HDHomeRun: End init
[ 269.540000] hdhomerun: userhdhomerun connected
[ 269.540000] hdhomerun: userhdhomerun connected
[ 269.550000] hdhomerun: creating dvb device for 11105D0A-0
[ 269.550000] DVB: registering new adapter (HDHomeRun)
[ 269.590000] DVB: registering adapter 0 frontend 0 (HDHomeRun DVB-T)...
[ 269.590000] HDHomeRun0: DVB Frontend registered
[ 269.600000] HDHomeRun0: Registered DVB adapter0
[ 269.640000] hdhomerun: device /dev/hdhomerun_data0 created
[ 269.640000] hdhomerun: userhdhomerun connected
[ 269.670000] hdhomerun: creating dvb device for 11105D0A-1
[ 269.670000] DVB: registering new adapter (HDHomeRun)
[ 269.710000] DVB: registering adapter 1 frontend 0 (HDHomeRun DVB-T)...
[ 269.710000] HDHomeRun1: DVB Frontend registered
[ 269.720000] HDHomeRun1: Registered DVB adapter1
[ 269.750000] hdhomerun: device /dev/hdhomerun_data1 created
[ 269.750000] hdhomerun: userhdhomerun connected


but when I run tvheadend, I get
[ALERT]:dvb: /dev/dvb/adapter0/frontend0: Unable to query adapter
[ALERT]:dvb: Unable to open /dev/dvb/adapter1/frontend0 -- No such device
[INFO]:dvr: Creating new configuration ''
[WARNING]:dvr: Output directory for video recording is not yet configured for DVR configuration "". Defaulting to to "/root". This can be changed from the web user interface.
[INFO]:CSA: Using 32bit parallel descrambling
[NOTICE]:START: HTS Tvheadend version git-fdf89b2 started, running as PID:7249 UID:0 GID:0, settings located in '/root/.hts/tvheadend'


I thought it might be a permissions issue, I'm running as root and have changed the owner to match.

Would appreciate any help/suggestions I could get... it's sooo close !
hoontune
 
Posts: 14
Joined: Fri Feb 10, 2012 3:56 am

Postby 321liftoff » Wed Feb 15, 2012 5:18 pm

I notice that the tvh_start script you posted has the device numbers hard-coded to "57". This may not be the correct value for all users, as it is a dynamic number assigned by linux.

First, doublecheck that 57 is correct for hdhomerun_control by looking in /proc/misc for hdhomerun_control, or try commenting out the static variable declaration in and uncommenting the dynamic assignment 1 line above.

After hdhomerun_control is set correctly, double check that 57 is correct for hdhomerun_data0 and hdhomerun_data1 by looking in /proc/devices, or try commenting out the static variable declaration and uncommenting the dynamic assignment 1 line above.
321liftoff
 
Posts: 29
Joined: Sat Apr 17, 2010 4:22 am

Postby hoontune » Wed Feb 15, 2012 8:06 pm

321liftoff wrote:I notice that the tvh_start script you posted has the device numbers hard-coded to "57". This may not be the correct value for all users, as it is a dynamic number assigned by linux.

Yeah the device number seems to stay consistently as 57. The awk part was crashing on the synology box (haven't worked out why yet) so I had to disable it, and set it manually - I'll double check just in case

The frontend0 devices are created... is there any way to 'query the adapter' from another tool that might give me some details as to what is wrong ?

Thanks
hoontune
 
Posts: 14
Joined: Fri Feb 10, 2012 3:56 am

Postby hoontune » Thu Feb 16, 2012 6:29 am

hoontune wrote:The awk part was crashing on the synology box (haven't worked out why yet) so I had to disable it, and set it manually


I've fixed the start script,but I'm still getting the same errors

Code: Select all
# Create device nodes for HDHomerun
mkdir -p /dev/dvb/adapter0
mknod /dev/dvb/adapter0/frontend0 c 212 3
mknod /dev/dvb/adapter0/demux0 c 212 4
mknod /dev/dvb/adapter0/dvr0 c 212 5
mkdir -p /dev/dvb/adapter1
mknod /dev/dvb/adapter1/frontend0 c 212 67
mknod /dev/dvb/adapter1/demux0 c 212 68
mknod /dev/dvb/adapter1/dvr0 c 212 69
# Set permissions
chmod 755 /dev/dvb/adapter*
chmod 666 /dev/dvb/adapter*/*
chown root:users /dev/dvb/adapter*/*
#
insmod /opt/dvb-core/dvb-core.ko
insmod /opt/dvb-core/dvb_hdhomerun_core.ko
insmod /opt/dvb-core/dvb_hdhomerun.ko
insmod /opt/dvb-core/dvb_hdhomerun_fe.ko
#
#lsmod to check if everything is running
#grep -i dvb /proc/devices
#
DYNAMIC_ID=$(grep hdhomerun_control /proc/misc | awk "{print \$1}")
if [ "$DYNAMIC_ID" != "" ]; then
  echo "making node hdhomerun_control" $DYNAMIC_ID
  mknod /dev/hdhomerun_control c 10 $DYNAMIC_ID
else
  echo "Unable to detect hdhomerun_control inside /proc/misc."
fi
# Set permissions
chmod 666 /dev/hdhomerun_control
chown root:users /dev/hdhomerun_control
#
# Clear userhdhomerun log
rm -f "/opt/dvbhdhomerun/dvbhdhomerun.log"
#
# Run userhdhomerun with LD_PRELOAD
# (because libhdhomerun.so is inside QPKG folder)
/opt/dvbhdhomerun/userhdhomerun/build/userhdhomerun \
        -f -u root -g users -l "/opt/dvbhdhomerun/dvbhdhomerun.log"
#
sleep 1
#
DYNAMIC_ID=$(grep hdhomerun_data /proc/devices | awk "{print \$1}")
if [ "$DYNAMIC_ID" != "" ]; then
  echo "making node hdhomerun_data" $DYNAMIC_ID
  mknod /dev/hdhomerun_data0 c $DYNAMIC_ID 0
  mknod /dev/hdhomerun_data1 c $DYNAMIC_ID 1
else
  echo "Unable to detect hdhomerun_data inside /proc/devices."
fi
#
# Set permissions
chmod 666 /dev/hdhomerun_data*
chown root:users /dev/hdhomerun_data*
hoontune
 
Posts: 14
Joined: Fri Feb 10, 2012 3:56 am

PreviousNext

Return to Development - HDHomeRun

Who is online

Users browsing this forum: No registered users and 2 guests