How to compile MPD with extras enabled?

Discussion about my Wifi Radio project at http://mightyohm.com/wifiradio/ or my WL-520gU talk at NOTACON.
Post Reply
Ghostpilot
Posts: 7
Joined: Tue Jan 29, 2013 4:05 am

How to compile MPD with extras enabled?

Post by Ghostpilot »

A long story very very short. I set out to hack an ASUS WL500gp v2 into a radio. I specifically chose the wl500g premium as it has double flash capacity compared to the one in the tutorial.
I want to build this radio and give it as a gift to my elderly neighbor who want to listen to BBC World Service. By accident I happened to find an mp3 stream of BBC world service and that worked right away. What a nice surprise. (found here: http://www.budiarnopedode.com/p/radio-online.html)

Have in mind that I didn't know anything about virtual machines, ubuntu, openwrt and compiling when I started this. I felt so stupid when I had to google even the simplest tasks like how do I unpack a tar.gz file or how to use wget. Yeah, you can laugh at me for being a total noob at this, it's ok. I sometimes laugh at myself once I find out how easy something was, that I had been googling for hours.
Once bitten it's hard to stop chasing perfection. I found out AFTER I had compiled my image that I need to apply a patch to FAAD2 to enable fixed-point aac playback. When compiling again, I couldn't get the patch to take, so I ended up just rewriting the makefile line for line with the patch-file as reference in another window. Thats how to do it the H-A-R-D way. But it worked.

Luckily there is nano on the ubuntu virtual machine, so checking files is much more smooth with that than using "vi" on the router itself. As I was poking around in the makefile for MPD I saw that many many things were disabled. I thought that I had enough room left on the router to enable some of them. I wanted mikmod or modplug for playing mod, xm and tracker-files and the "new" fixed-point faad2 for aac support. Just for the hell of it I enabled it all. Sadly it wasn't possible to install those packages with a simple "./scripts/feeds install" command. So I got errors for most of them saying they couldn't be found.
Which in turn is strange because I can find some of them in menuconfig under the "hidden" menu that exist if you select ffmpeg.

No matter how I googled for sources and unpacked sidplaylibs, modpluglibs, wavpacklibs (I know it's not those exact names) to what I thought was the right place, the compile errors were still the same. It couldn't find sidplay plugin, modplug plugin and wavpack and the others I enabled, when compiling. For a linux illiterate like myself even the simplest task can prove to be a huge wall to climb. For instance, I never figured out exactly where to put those packages I downloaded. To make matters worse, sidplay seems to exist in a myriad of versions, merged, unmerged, old and semi-new.
If I did apt-get install on some of the packages, they installed. But that is on the virtual machine and not in the backfire build environment, so that didn't help even though it was a small victory for me.

In the end, all I managed to enable was the "patched" version of FAAD2 for fixed-point aac support, mms and mikmod. Not sidplay, wavpack or modplug. I have since then learned that mikmod and modplug supports the same formats, so modplug might not be needed, but I have used the stand alone modplug player on my windows machine to play mods for ages and I like it, so I wanted to enable it out of nostalgia.
Is there anyone who have managed to enable sidplay in MPD makefile and got away with it? If so, please tell me. Tell it like you talked to a 3 year old kid.
Last edited by Ghostpilot on Mon Feb 18, 2013 11:11 pm, edited 2 times in total.

User avatar
gerben
Posts: 164
Joined: Sat Oct 16, 2010 8:41 am
Location: Netherlands

Re: How to compile MPD with extras enabled?

Post by gerben »

Thanks for sharing your story. Very enjoyable to read, and I recognize a lot from my experience. Good for you.
But I'm afraid I can't help you with your problem. I think I'm a bigger noob that you, when it comes to compiling packages :-)
One last thing I wanted to share with you though :-P

Ghostpilot
Posts: 7
Joined: Tue Jan 29, 2013 4:05 am

Re: How to compile MPD with extras enabled?

Post by Ghostpilot »

So I am not the only one with a clearly visible learning curve then. Good to know.
I am just happy I managed to make a self-booting-audio-playing-stand-alone-radio-device out of the router it started out as.
So far it is me 1 and reality 0. But all those extra plugins in the MPD makefile just waiting to be enabled just sets me off in one direction and watches me go.
They beg to be enabled.

The thing is... I have found them and chosen those packages in the menuconfig menu structure. To the best of my knowledge that would also mean that said package is also installed in the build dir at the right position. Otherwise I wouldn't be able to see it in the list, right? So why can't MPD find them when it is being compiled? I must be missing something dead simple and not knowing about it. At least I hope so.
Not that I am a hardcore SID-tune listener. But it would still be cool to be able to play some sid tunes on the radio I am building.

If anyone have some info about getting sidplay to compile alongside with MPD in on openwrt, please let me know.

User avatar
gerben
Posts: 164
Joined: Sat Oct 16, 2010 8:41 am
Location: Netherlands

Re: How to compile MPD with extras enabled?

Post by gerben »

Try installing MPD on you normal linux box, and see if you can get SID working. I wouldn't be entirely surprised if they aren't yet fully implemented, and you only see some preliminary code.
No point trying to get something working on OpenWrt that isn't yet complete, and therefor can never work. Just my 2 cents.

Ghostpilot
Posts: 7
Joined: Tue Jan 29, 2013 4:05 am

Re: How to compile MPD with extras enabled?

Post by Ghostpilot »

gerben wrote:No point trying to get something working on OpenWrt that isn't yet complete, and therefor can never work. Just my 2 cents.
Yeah, that seems resonable. However there aren't any conclusive fact that so is the case. Most posts I find regarding sidplay is several years old and they talk about this and that beeing patched already. I think it might be a case of me installing the files in the wrong folder structure. Since ./scripts/feeds can't find them I have to do it manually... And I suck at that.

Post Reply