Jump to content
XPEnology Community

duck.

Rookie
  • Posts

    2
  • Joined

  • Last visited

Everything posted by duck.

  1. For those who have been looking for modules to use with their DVBSky cards on DSM6, and because I didn't have any luck with the above user's modules, see my post in this thread: http://xpenology.com/forum/viewtopic.php?f=2&t=3066&p=91071#p91071 - hope this is useful!
  2. Hey folks! Been using DSM6 on my trusty Microserver for a few weeks now, but needed to get my S952 v3 (delivered this afternoon) working with it. After several hours trying to figure out why DSM6 uses a woefully old Linux kernel without the support compiled in, and also trying to find the DSM6.0.2 kernel source (which, as it happens, doesn't exist), I finally figured it out (indeed TVHeadend is running through the muxes in the background while I type this!) Considering the ridiculous amount of legwork needed to figure this out, I'll post a quick walkthrough on how I did it, as well as my compiled modules at the end. Credit to this post for figuring out how to put a build environment together (including where to find the damn kernel source) I MAKE NO GUARANTEES REGARDING THE ACCURACY OF THIS. DON'T COME TO ME CRYING IF YOUR NAS SPONTANEOUSLY COMBUSTS, YOUR LOTTERY NUMBERS DON'T COME UP, OR IF YOU'RE A LAWYER ABOUT TO TELL ME THAT THIS IS THE WRONG WAY TO DO IT. First off you'll need a development environment, I personally did it through the debian chroot on the box itself - but you might want to investigate doing it in a VM if you're going to be compiling heavier stuff. You'll need the debian-chroot package from synocommunity for this method. Let the chroot install fully (give it 5-10 minutes, be patient, it's still installing packages in the background) then chroot in: sudo /var/packages/debian-chroot/scripts/start-stop-status chroot and grab some dependencies (n.b: any warnings for locale issues can (probably) be safely ignored, if they're causing issues you can always localegen some more): apt-get update; apt-get install build-essential ncurses-dev bc git We also need to make a fake /dev/shm otherwise compilation is going to go berserk about it not existing. Edit /etc/fstab and insert the following: none /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0 then mount it with the usual mount /dev/shm. Now we need to go grab our synology development environment. Thankfully, Synology provide some super useful scripts to automate this for DSM6 (EnvDeploy provides ample opportunity to grab a cup of tea): mkdir ~/build cd ~/build git clone https://github.com/SynologyOpenSource/pkgscripts-ng.git pkgscripts-ng/EnvDeploy -v 6.0 -p bromolow cd build_env/ds.bromolow-6.0 We can now go grab the kernel source, which is also on github (I'm assuming this is some cobbled together one, but hey, it works) - we also symlink it to make sure the dvb module compilation works properly cd source git clone https://github.com/quiknick/7274-kernel.git cd 7274-kernel cp synoconfigs/bromolow .config mkdir -p /lib/modules/3.10.77 ln -s /root/build_env/ds.bromolow-6.0/source/7274-kernel /lib/modules/3.10.77/build (Note: At this point, if you just want extra 3.10 tree kernel modules, you're done (in fact, you don't even need that last command)! just go make them with make ARCH="x86_64" oldconfig -> menuconfig -> modules) This is where the fun part starts: compiling the DVB modules. First we grab them... cd /root/build_env/ds.bromolow-6.0/source wget http://www.dvbsky.net/download/linux/media_build-bst-140128.tar.gz tar xf media_build-bst-140128.tar.gz rm media_build-bst-140128.tar.gz and then actually compile them (opportunity to grab your next cup of tea): ./v4l/build_x64.sh make touch /lib/modules/3.10.77/modules.order touch /lib/modules/3.10.77/modules.builtin make install Note the fact that we did make install after touching those modules files. This is just installing them inside the chroot - it won't actually install them to your DSM, so this isn't the end! We mainly do the install step because we want /lib/modules/3.10.77/modules.dep, which lists the dependencies that your particular card is going to need. I'm not going to tell you exactly to do this because the end modules you need are going to vary by card to card, but you basically need to search that file for your module, and copy any dependencies (listed after the colon) to your DSM / load them before that module. (Note: some dependencies may have dependencies of their own, be sure to check!) We can now copy these shiny new modules out of our chroot (do this outside your chroot, use exit to escape!): rm /lib/modules/backports_dvb/* cp /volume1/\@appstore/debian-chroot/var/chroottarget/root/build_env/ds.bromolow-6.0/source/media_build-bst-13/v4l/*.ko /lib/modules/backports_dvb/ chmod 755 /lib/modules/backports_dvb/*.ko and copy any firmware that your card needs to /lib/firmware (you can usually find this on the linuxtv page for your card, the following should work for all dvbsky cards but do your own research!): cd /lib/firmware wget http://www.dvbsky.net/download/linux/dvbsky-firmware.tar.gz tar zxf dvbsky-firmware.tar.gz rm dvbsky-firmware.tar.gz Now create a script to load them in when the machine starts. Use the notes you took earlier regarding your module dependencies, and tailor the script below to suit your tastes. (credit to Charles Hallard for the original script). This one is ready to go for S952 v3 folks, read above if you're using something else (this goes in something like nano /usr/local/etc/rc.d/S10loaddvb.sh) !/bin/sh MODULES_DIR="/lib/modules/backports_dvb" SUBMODULES="dvb-core.ko rc-core.ko dvbsky_m88rs6000.ko" MAINMODULES="smipcie.ko" start_modules(){ echo "--- Load modules ---" for i in $SUBMODULES $MAINMODULES; do echo "Loading $i" insmod $MODULES_DIR/$i done } stop_modules(){ echo "--- Unload modules ---" for i in $MAINMODULES $SUBMODULES; do echo "Unloading $i" rmmod $MODULES_DIR/$i done } case "$1" in start) start_modules ;; stop) stop_modules ;; *) echo "usage: $0 { start | stop }" >&2 exit 1 ;; esac Make it executable with a wave of the magic chmod +x /usr/local/etc/rc.d/S10loaddvb.sh wand, reboot with as many things crossed as possible, and hopefully it'll work! If you're left after reading that thinking "what the hell does half of this mean I can't linux", then don't panic: here's my compiled modules, tested working against DSM6.0.2: dvbsky_modules_dsm6_bromolow_190216.tar.gz (58.3M, md5: 4ee12139a024f3123cab0dfeebc81e4a) Again, I make no guarantee, warranty, or otherwise for the above compiled modules: they are provided as-is. If you don't trust me, then feel free to compile them as above with the instructions. Many thanks to everyone here for providing an excellent information resource, and I hope this solves a few people's nightmares! N.B: I don't have enough posts to respond to PMs yet, so if you have issues, post in this thread or email me (me@duck.me.uk) - preferably the former because it's super useful for people to go back in a thread to see what did / didn't work! - and I'll try my best to help; but like I said, no guarantees.
×
×
  • Create New...