[APP] MiniDLNA original/patched for firmware V4+ (08/2017)

I’m confused.  Yes I’m trying to compile minidlna-1.1.4.  I have actually been able to compile the program after I redid

the build setup.  I was trying to build using a amd64 build environment.  So I created a 32 bit environmment.  It built the

first time.

On the first page of this thread it says to go to your site to get a credential.  Then download the minidlna install code.

Which I did.  I then installed to program to MY Cloud.  When I tried to run it I was missing the libraries.    In the third

entry on page one shows all of the libraries being installed.  I was wondering how these libraries were being installed.

AS you klnow I have built version 1.1.4 for the DNS-323 and its working fine.  I’ve now built version 1.1.4 after following the

instructions mauromol posted at http://community.wd.com/t5/WD-My-Cloud/GUIDE-Building-packages-for-the-new-firmware-someone-tried-it/m-p/770653#M18650.  I only created the wheezy4k and wheezy64k folders.  After following

these instructions I was able to run configure and it worked the first time after I installed the libraries.  Not sure why the code fails to run on the MY Cloud.  It gets a sigkill as soon as it starts to run.  It dosen’t even get to trying to load the first library.  It should have displayed an error that the library was missing.

Thanks  RAC


You said you were missing the libraries when you tried to run MiniDLNA from my installer from the first page of this thread, which libraries were missing? What is your WDMyCloud current firmware version?

If you get SIGKILL when you try to run the ones you built on WDMyCloud, it means your 64K patch build wasn’t successful. Though it will work on the normal 4K page size kernel i.e. firmware V3.

When I did the install of minidlna-1.1.4_static.tar.  It installed /etc/minidlna.conf /usr/sbin/minidland and the share/locale files.  No libraries were installed.  My My Cloud is version .421. 

I’m not is the process of trying to build all of the dependencies.  But I’m not sure what the dependencies are.  I’m going to use the list of libraries installed from page 1.  Either I’m not very smart or the information to build minidlna-1.1.4 is not complete.  On the first page it shows the library files being installed.  But does not show the command to start the install.

It would be nice to know the necesssary apt-get source command to get the necessary dependencies. 

What I’ve been doing is doing a apt-cache search library name.  Looking for the packages to load.  Also not sure what should be in the sources.list to get the correct files for the wd build environment. 

I have two 6TB clouds.  Both are basic out of the box systems running -421 frimware.  They both have the exact same sources.list file.  But one system will install the libraries.  But the other can’t find the libraries.  I don’t think the sources.list file is correct.  Yet when I used apt-get to install the necessary libraries.  They were loaded.  minidlna-1.1.4 is working on the one My Cloud. 

I did the build in the 64k-wheezy folder.  Are you saying that it actually built the 4k version?  What tells the build to do 4k or 64k versions.  Either it is a compile time option or it is based on the current compiler being used.  Not sure what mistake I made while setting up the build environment.  I suspected that since the program failed so quick that it might be a 4k version.  I don’t know it there is a way to tell if a pogram is built using 64k or 4k.


deb http://ftp.us.debian.org/debian/ jessie main

Note, wheezy is not 64K page aligned.

##deb http://ftp.us.debian.org/debian/ wheezy main
#deb http://ftp.us.debian.org/debian/ sid main
#deb http://ftp.us.debian.org/debian/ experimental main
#deb-src http://ftp.us.debian.org/debian/ jessie main

Thanks for your help.



I think you’re confused. If you’re building a static builds (cross-compile with the 64k patched cross-tool), you should not have to install any extra debs on your WDMyCloud. Get their tar source ready extracted in your build environment before you configure MiniDLNA so the config can include them. Then if successful, proceed to make.

When you mentioned 64k-wheezy folder (think you derived from the posted guide to build 64K), and debs from the first page, this is not cross-compiling and you can’t get static builds using this method in the guide. Even for this method you will need to individually build every dependencies you see on the first page.

Yes I am confused. I was under the impression that to build minidlna-1.1.4.  I needed to create a cross compile build

environment.  So I have a i386 PC.  I installed Debian linux 32bit on the system.  After that I followed the instructions

to create the build environment.  At this point I installed the source for minidlna-1.1.4.  I then ran the configure.  Which

got errors saying the different libraries were missing.  So I’m not building on the MY Cloud.

OK question 1 after installing minidlna-1.1.4 to My Cloud.  I got errors when I tried to run the progam saying the libraries were missing.  So how do I get the necessary libraries on My Cloud.  I thought that is what the installes on page one were being used for.

Question 2.  What is the proper procedure to create a build environment to firmware 421. 

Question 3 Is the following instructions correct to create a poper buikld environment?

Once the guest VM is installed, we need to make just a couple little tunings. First of all, Debian Wheezy comes with qemu-user-static package version 1.1.2. Qemu is an environment needed to emulate an actual ARM system on another platform, like the AMD64 platform our build system consists of. It’s a good idea to update Qemu to version 2.x from the wheezy-backports repository. To do this, start the build system and login. Then:

sudo su

echo “deb http://ftp.debian.org/debian wheezy-backports main contrib non-free” >>/etc/apt/sources.list

apt-get update

apt-get -t wheezy-backports install qemu-user-static

This should also install binfmt-support, which is another packages needed by the build environment. If this is not the case, also type:

apt-get install binfmt-support

Now, let’s prepare the actual build environment. Let’s create a folder in the /root directory of the build system and download the WD My Cloud 4.x firmware source package from WD website.

cd /root

mkdir wdmc-build

cd wdmc-build

wget http://download.wdc.com/gpl/gpl-source-sequoia-04.00.00-607.zip

In case the link changes, refer to WD My Cloud support page to find the new one: http://support.wdc.com/product/download.asp?groupid=904&lang=en

I then suggest to create different folders for different build scenarios. These are the possibilities:

the target system may be firmware 3.x (4k) or firmware 4.x (64k)

the source package base may be wheezy (Debian stable) or jessie (Debian testing); wheezy contains older packages, but that should run happily in My Cloud (which has a Wheezy in it!), while jessie contains newer packages that might also work and provide updated versions of many applications; I would personally recommend to build packages from wheezy, unless you absolutely need a newer version that is only in jessie

I don’t recommend to mix things, so I would create different folders for any different combination. You’re free to create just the one you are interested in, so among the following commands type fhe first ones, then only the block of commands of the combination(s) you’re interested in, then the last command:

cd /root/wdmc-build

unzip gpl-source-sequoia-04.00.00-607.zip packages/build_tools/debian/*

mkdir 64k-wheezy

cp -R packages/build_tools/debian/* ./64k-wheezy

echo ‘#!/bin/bash’ >>64k-wheezy/build.sh

echo ‘./build-armhf-package.sh --pagesize=64k $1 wheezy’ >>64k-wheezy/build.sh

chmod a+x ./64k-wheezy/build.sh

mkdir 64k-jessie

cp -R packages/build_tools/debian/* ./64k-jessie

echo ‘#!/bin/bash’ >>64k-jessie/build.sh

echo ‘./build-armhf-package.sh --pagesize=64k $1 jessie’ >>64k-jessie/build.sh

chmod a+x ./64k-jessie/build.sh

mkdir 4k-wheezy

cp -R packages/build_tools/debian/* ./4k-wheezy

echo ‘#!/bin/bash’ >>4k-wheezy/build.sh

echo ‘./build-armhf-package.sh --pagesize=4k $1 wheezy’ >>4k-wheezy/build.sh

chmod a+x ./4k-wheezy/build.sh

mkdir 4k-jessie

cp -R packages/build_tools/debian/* ./4k-jessie

echo ‘#!/bin/bash’ >>4k-jessie/build.sh

echo ‘./build-armhf-package.sh --pagesize=4k $1 jessie’ >>4k-jessie/build.sh

chmod a+x ./4k-jessie/build.sh

rm -rf packages/

In this way, in every folder will be created a build.sh script that passes the right parameters to the WD provided script, requiring only the name of the package to build. This would work straight away if there weren’t the problem with qemu I mentioned in the beginning, so another step is required to finish the prepare phase. Again, only type commands for the scenario(s) you’re interested in:


cd /root/wdmc-build/64k-wheezy

./setup.sh bootstrap/wheezy-bootstrap_1.24.14_armhf.tar.gz build

mv build/usr/bin/qemu-arm-static build/usr/bin/qemu-arm-static_orig

cp /usr/bin/qemu-arm-static build/usr/bin/qemu-arm-static


cd /root/wdmc-build/64k-jessie

./setup.sh bootstrap/jessie-bootstrap_5.14.14_armhf.tar.gz build

cp /usr/bin/qemu-arm-static build/usr/bin/qemu-arm-static


cd /root/wdmc-build/4k-wheezy

./setup.sh bootstrap/wheezy-bootstrap_1.24.14_armhf.tar.gz build

mv build/usr/bin/qemu-arm-static build/usr/bin/qemu-arm-static_orig

cp /usr/bin/qemu-arm-static build/usr/bin/qemu-arm-static


cd /root/wdmc-build/4k-jessie

./setup.sh bootstrap/jessie-bootstrap_5.14.14_armhf.tar.gz build

cp /usr/bin/qemu-arm-static build/usr/bin/qemu-arm-static

The meaning of the above is the following: prepare an emulated ARM system and replace the qemu-arm-static binary provided by the bootstrap with the recent one we’ve installed in our actual build system.

Ignore any errors produced by setup.sh: that script is really buggy and many things it tries to do seem to be useless, unless we apply the mentioned qemu fix.

As a final step, I would recommend to edit the sources file list within the armhf build subsystem in order to be able to build packages that are in any of the distribution repositories. To do this, type the following:

cd /root/wdmc-build

nano /build/etc/apt/sources.list

by replacing with the desired one (64k-wheezy, 64k-jessie, 4k-wheezy, 4k-jessie); the nano editor will open, then replace the contents of the existing file with the following:

For 64k-wheezy and 4k-wheezy:

deb http://security.debian.org/ wheezy/updates main contrib non-free

deb-src http://security.debian.org/ wheezy/updates main contrib non-free

deb http://ftp.debian.org/debian wheezy-updates main contrib non-free

deb-src http://ftp.debian.org/debian wheezy-updates main contrib non-free

deb http://ftp.debian.org/debian wheezy main contrib non-free

deb-src http://ftp.debian.org/debian wheezy main contrib non-free

#deb http://ftp.debian.org/debian wheezy-backports main contrib non-free

#deb http://ftp.debian.org/debian wheezy-backports main contrib non-free

For 64k-jessie and 4k-jessie:

deb http://security.debian.org/ jessie/updates main contrib non-free

deb-src http://security.debian.org/ jessie/updates main contrib non-free

deb http://ftp.debian.org/debian jessie-updates main contrib non-free

deb-src http://ftp.debian.org/debian jessie-updates main contrib non-free

deb http://ftp.debian.org/debian jessie main contrib non-free

deb-src http://ftp.debian.org/debian jessie main contrib non-free

In case of wheezy, uncomment the last two lines if you want to build package versions from wheezy-backports. I don’t know however if additional changes to the build.sh script (or better to the WD provided one) are needed to instruct apt to download and build the source from the backports repository. I don’t have tried it yet. Anyway, I would recommend to leave those two lines commented unless you actually need something from the backports repository.

Save the file by hitting Ctrl+X, Y, Enter.

Now you’re ready to build your first package!

Optional additional step (not strictly required) for wheezy scenarios

You may also want to use an updated C++ compiler to build packages in the wheezy scenarios. Debian Wheezy provides g++ package 4.6, but 4.7 is also available. With the following commands you can install the new version and then switch from one to the other using update-alternatives:

cd /root/wdmc-build/

chroot build

apt-get update

apt-get install g++ g+±4.7

update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++.4.6 10

update-alternatives --install /usr/bin/g++ g++ /usr/bin/g+±4.7 20

update-alternatives --install /usr/bin/gcc g++ /usr/bin/gcc-4.6 10

update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 20

rm /usr/bin/cpp

update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-4.6 10

update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-4.7 20


After these commands, the default C++ compiler will be version 4.7. You can then switch to the old version by typing:

cd /root/wdmc-build/

chroot build

update-alternatives --set cpp /usr/bin/cpp-4.6

update-alternatives --set gcc /usr/bin/gcc-4.6

update-alternatives --set g++ /usr/bin/g+±4.6



  1. Where did you get the minidlna-1.1.4? Was this from your attempt to build it yourself? If yes then you’re missing a lot of stuffs which why the program failed to run due to missing libraries. How to get them? You need to manually build them like how you did for minidlna-1.1.4, every each of them. They doesn’t get built automatically when you build minidlna-1.1.4 alone.

2-3) The ones you posted (and understood) seems extracted from the 64k build guide in this thread http://community.wd.com/t5/WD-My-Cloud/GUIDE-Building-packages-for-the-new-firmware-someone-tried-it/m-p/770653#M18650 and yes you should follow the OP’s guide in that thread to prepare the build environment.

I followed the instructions on page one of this thread. I downloaded the patched version from your site.  I did not try to build minidlna-1.1.4 for the My Cloud.  I have built it from source on the DNS-323 and it is working as expected.

On the previous install I used apt-get to get the libraries.

OK I just went back to page one and reinstalled minidlna-1.1.4.patched-1.  This time it did install the dependencies.

Not sure why it didn’t do that previously.

I have followed the instructions to create a 64k build environment.  But I did notice some thing strange in the file build-armhf-package.sh script.  It seems to always install the binutil  But never uninstalls them.  Which to me seems like an unnecessary step after the first time.

The source that I’m using for the build came from the Authors site.  Plus I downloaded your two patches. I’m not in a hurry to build minidlna-1.1.4 for the My Cloud.  Since I have a working version. 

Right now I need to figure out why the disk goes into standy a few seconds to a minute and then wakes up again.  If I

stop samba/wdmcserverd/wdphotodbmergerd it starts going to sleep for a few hours.

Thanks for your responses.  They have been helpful.



The binutil is a 64k patched version. Everytime you run the script, it will be replaced from the bootstrap tar, at least part of it I think (I never checked as I cross-compiled using the old conventional config make).

For the wakeups I’m not sure as my nas is being accessed all the time from my installers, hosted sites and other custom jobs.

I’ve found that after the first time thst you run there script.  It is only necessary to do the code in the script

from the chroot thru the EOF.    Where the apt-get update and the apt-get source --compile.  I just striped those lines

and put them in a smaller script.  It works just fine.

I’ve built the dependencies.  Though the libav build took more time than it takes to rebuild  the entire UnixWare

tree.  But I now can compile minidlna-1.1.4 and run it on my My Cloud.  I just need to verify that the notification is working


As for the wakeups.  It has something to do with the samba.  If samba is running and another pc has access to one of

the shared folders it seems to write to disk every minute.  If samba is not running.  The drive will go to sleep for several

hours at a time.  Though there are times that it will enter standy mode and 8 seconds later it will wake up again.  I can’t

seem to find what samba is writting yet.

Thanks for your help.

PS not sure it means anything but I was able to backup My Cloud and restore it to a foler on my debian build system.  I then was able to chroot to that folder and run commands.


Glad it works for you, do remember to enable back the binutils installation if you were to clear the bootstrap else it will still be 4K and won’t run on 64K firmware. I’m doing a different approach which is by loading the entire bootstrap into a dedicated ram space and do the config make there. I prefer this as it’s faster on ram. On top of that, I’m able to multi-thread in the make job process utilizing 100% of all available CPUs, i.e. 8 concurrent compile threads at once in conjunction with the number of logical CPUs.

Yes, you also would be able to loop mount and chroot into the original rootfs from V4 firmware on your Debian build system. The V4 rootfs also works on WDMyCloud itself, though you’ll need to extract the rootfs as WDMyCloud kernel wasn’t compiled with loop mount. But you’ll not be able to do it the other way round, i.e. 4K bootstrap on the 64K WDMyCloud.


First, a big thank you to Nazar for this great work.

I’ve installed MiniDLNA trying to solve this problem, everything went smooth, but MiniDLNA does not support pictures keywords (I think), which is the main reason I want a DLNA server.

So… how can I completly uninstall MiniDLNA (or at least stop it from running) or make it search keywords in my jpeg files?

Thanks in advance.


I’m not sure about keyword search support as I’m using only directly from my smart tv to browse.

You can uninstall the main app itself but I do not recommend removing the installed dependencies as I cannot confirm if it would break something else.

dpkg --purge minidlna

Thanks Nazar - removed.

For my needs, MiniDLNA is not a good choice - for instance, the (jpeg pictures) navigation by date shows everyday as a separate “folder” and Twonky, smartly, shows years then, inside, months. Much more logic and pratical.

Just have to solve the problem with “translated” characters - even chosing a diferent pagecode in Twonky, the result is the same :mansad:.

Wow, very great!

I haven’t thought that this could be that easy :slight_smile:

Is there a possibility that I can use the play-from-the-last-position-feature on my LG TV as well?

At the moment the only benefit for me is to display the root as a browser so save a few steps until starting a video e.g. But I can’t use the other great features (jump to position e.g.)…

Is there also a possibility to sort folders first and files behind? At the moment the files are inbetween the folder-icons…

Any ideas? Thanks in advance!

I’m not sure about LG, I’m using Samsung. Actually I don’t care much about those features as long my kids knows how to find their stuffs :slight_smile:

OK, then it has to work like it is :slight_smile:

Just to confirm: I have to reinstall (and re-configure) the minidlna-server after a firmware-upgrade of the wdmycloud?

Any changes to the rootfs will be lost during firmware flashing.

You could however backup this file /etc/minidlna.conf and restore after the upgrade.

What I would always do is to place this file elsewhere in the data mount then symlink to the /etc/ path so after firmware upgrade I would just install the apps and force recreate the symlinks to the /etc/ path.

I installed MiniDLNA and your setup is really nice! One question though: why don’t you host your files on github instead of your own MyCloud?

PS: no sleep issue for me after the installation of MiniDLNA

Github doesn’t support dynamic scripting from my installers.

Thanks very much, Nazar! It works a treat on MyCloud v04.01.04-422.

Edit: Actually, my Samsung TV keeps losing connection with the minidlna server or the server is resetting every few minutes. Any ideas what could be causing this?