MiniDLNA Server Software: Firmware Project for WNR3500L

27 posts / 0 new
Last post
Peter Redmer
Peter Redmer's picture
MiniDLNA Server Software: Firmware Project for WNR3500L

Hello everyone,

We're looking for our skilled community members to step up and check out the MiniDLNA server software, which is compatible with the NETGEAR WNR3500L open source router.

This requires that you set up the proper cross-compiling environment with the necessary shared libraries, to turn your WNR3500L into a DLNA server.

We are looking for someone, or a group of course, to create a ready-made firmware for the WNR3500L that includes this software.

Please post if you are interested or have any questions, and good luck!

Download the MiniDLNA Code Here!

Brandon C
Brandon C's picture
Is that code compiled for an

Is that code compiled for an i386 architecture not the ARM architecture? If so someone would need to recompile to ARM.

But if done it probably could be added to the router and just ran as an additional program. No new firmware needed. (I am guessing)

Kong
Kong's picture
@Brandon, if you download the

@Brandon, if you download the static you can run "readelf -h minidlna" to get information about the binary. You will see, that is is compiled for i386.

netgearl
netgearl's picture
In order to compile minidlna,

In order to compile minidlna, you need to check out the latest source code with:
cvs -z3 -d:pserver:[email protected]:/cvsroot/minidlna co -P minidlna

I was trying to compile it with the optware toolchain ( http://www.nslu2-linux.org/wiki/FAQ/Optware-uClibcBuild ) because it has the minidlna source code (20090413) with all dependencies (libexif, libjpeg, libid3tag, libFLAC, libvorbis, sqlite3, libavformat/ffmpeg, libuuid).
However compiling ffmpeg stops with 'img_convert' is deprecated.

netgearl
netgearl's picture
I fixed the ffmpeg problem,

I fixed the ffmpeg problem, but I cannot compile minidlna:
uuid.c:40: error: '__NR_clock_gettime' undeclared (first use in this function)

I've checked the dd-wrt v24_2 linux header files, but this function is not there.
It might require a special kernel or any ideas?

netgearl
netgearl's picture
Finally I've got minidlna

Finally I've got minidlna working on my WNR3500L. I can play mp3 files and see jpeg images on the PS3 from the router.

I've compiled with optware-clibc-0.9.28 and installed with ipkg-opt. The source had to be patched, because __NR_clock_gettime and __NR_inotify syscalls are not implemted. As a result inotify is still not working, and I need to rebuild the database manually after copying files to the media library. Next time I will try with uclibc 0.9.29 or later with all the dependent packages.

 

 

 

Peter Redmer
Peter Redmer's picture
@netgearl - this is fantastic

@netgearl - this is fantastic! I'm not an expert, so I'm curious as to how an average user might be able to take advantage of your hard work and get miniDLNA running on their WNR3500L.

In other words, is there a final firmware build that you can submit to the community with miniDLNA compatibility pre-installed, that users could easily upgrade to?

If not, I'd love to help you get a tutorial up and running on the community to show other users how to download and compile, if possible.

Let me know, we can communicate via PM if you prefer!

netgearl
netgearl's picture
Hi Peter,

Hi Peter,

I just wanted to get it work as a package on my router. I wouldn't say it will fit into 8MB flash, because it requires a lot of other packages, logging space and of course the media files. So in my opinion it needs be installed on USB drive. I choose optware to compile, but current stable packages are compiled with uclibc9.27-9 and this minidlna requires more recent uclibc, because some functions are still not working. I would suggest trying to compile it with the dd-wrt toolchain or other. It will be a hard work to get all the dependencies compiled.

Kong
Kong's picture
because __NR_clock_gettime

because __NR_clock_gettime and __NR_inotify syscalls are not implemted

You have to compile using K26 sources

netgearl
netgearl's picture
Hi Kong!

Hi Kong!

Yes you are perfectly right, but K26 headers was not in the optware official toolchain when I tried first.

I compiled this minidlna with K26 sources with a different toolchain.
Now I have this issue:
inotify.c:189: warn: WARNING: Could not read inotify max_user_watches! Hopefully it is enough to cover 0 current directories plus any new ones added.

/proc/sys/fs/inotify/max_user_watches doesn't work or not implemented.

Any ideas on this? Thanks.

Kong
Kong's picture
DD-WRT does not have inotify

DD-WRT does not have inotify compiled in kernel, don't know if tomato has it enabled. Unfortunately you cannot compile inotify as module and install it later on.
So it requires a customized kernel.

Sevandija
Sevandija's picture
Hi there, I've following this

Hi there, I've following this thread for a wile now... Is there any update in this quest for the firmware with miniDLNA?

Thank you

Kong
Kong's picture
I'm have just compiled,tested

I'm have just compiled,tested a dd-wrt image with included samba3, once I have the webpage + config scripts for samba ready, I will integrate minidlna.

Peter Redmer
Peter Redmer's picture
@Kong - awesome. Looking

@Kong - awesome. Looking forward to it!

Peter Redmer
Peter Redmer's picture
In addition, please let me

In addition, please let me know when you have it ready. We'd love to feature it on the site.

Kong
Kong's picture
netgearl said: Hi Kong! Yes

netgearl said: Hi Kong! Yes you are perfectly right, but K26 headers was not in the optware official toolchain when I tried first. I compiled this minidlna with K26 sources with a different toolchain. Now I have this issue: inotify.c:189: warn: WARNING: Could not read inotify max_user_watches! Hopefully it is enough to cover 0 current directories plus any new ones added. /proc/sys/fs/inotify/max_user_watches doesn't work or not implemented. Any ideas on this? Thanks.

My build of dd-wrt with included samba3 now has inotify enabled.

creaturecool
creaturecool's picture
This is really awesome,

This is really awesome, sounds like it's getting close!(?)

netgearl
netgearl's picture
Kong said: My build of dd-wrt

Kong said: My build of dd-wrt with included samba3 now has inotify enabled.

Kong,

First of all thanks for your samba enabled firmware. I tested my minidlna package on it and it works pretty good with inotify support, even on NTFS USB drive. It doesn't work with your embedded uclibc, I've used uClibc-0.9.28 from optware. The required size of the minidlna package is minimum 9.3 MB (3.3 MB in tar.gz format). I'm not sure how this package should be integrated into the firmware (maybe loaded to ramdisk?), but I can run this from USB without optware or any other ipkg prerequisites.

Kong
Kong's picture
Hi netgearl,

Hi netgearl,

actually with included minidlna the firmware size is 6.9MB:-)

I have already flashed my WNR. Once I finish my tests tonight I'll upload the new mod with included minidlna + a few fixes for samba.

Peter Redmer
Peter Redmer's picture
Looking forward to it, Kong!

Looking forward to it, Kong! Let me know when you get the new build uploaded.

netgearl
netgearl's picture
Kong said: Hi netgearl,

Kong said: Hi netgearl, actually with included minidlna the firmware size is 6.9MB:-)

Hi Kong,

Great work, but how did you manage it? Have you included the libraries?
http://minidlna.cvs.sourceforge.net/viewvc/minidlna/minidlna/INSTALL?rev...

Kong
Kong's picture
Hi netgearl,

Hi netgearl,

the libraries are all statically compiled in. The biggest challenge was to create my own patched toolchain. DD-WRTs toolchain uses an older uClibc that does not include all functions which are needed by minidlna. On the other hand you cannot use a default openwrt toolchain , since dd-wrt added features to its toolchain that are not in any standard toolchains:-)

Now based on latest kamikaze openwrt toolchain I have an updated toolchain that has the neccessary changes to be compatible with dd-wrt sources + new features and enhancements from newer uClibc.

pb234
pb234's picture
hi,

hi,

I am interested to get minidlna compiled for ARM as well.

Anyone share some tips.

pb234
pb234's picture
hi all

hi all
I am interested to compile minidlna for ARM as well, but not sure how to start.

Any guide will be appreciated.

pb234
pb234's picture
Hi Liya,

Hi Liya,
where do you download all the libs required?

Kong
Kong's picture
Hi Mahendra,

Hi Mahendra,

the answer is already given by your compiler, the lib your are trying to link was not compiled for the expected platform (skipping incompatible), e.g. libexif was compiled for x86 while minidlna is beeing compiled for arm. You need to make sure libexif has been compiled to match your target platform.

Chetan
Chetan's picture
Hi Mahendra,

Hi Mahendra,

Can you tell me from where did you download the source for all the required libraries?

Thanks,
Chetan