OpenWrt Forum Archive

Topic: Using mpc with mpd on OpenWRT running on WL500g

The content of this topic has been archived on 22 Jul 2014. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Finally, Ive got my router all setup how i want it (it took me long enough, being a relative Linux n00b)

The final step is to get this running mpd so i can play music wirelessly

Mpd server is running without problems, but im running into issues compiling and using mpc on the router

These are the details from the MPC site:
1) download mpc
2) untar and unzip
3) configure (type "./configure")
4) compile (type "make")
5) (Optional) as root: make install



Ive succesfully downloaded and untarred the package as per the instructions and ran the ./configure

But when i type make, i get an error.

Am i missing a package or just some common sense?

Thanks

Fatman

You can not natively compile programs on the router. You have to use the SDK or the full buildroot to cross-compile for mipsel.

I would recommend you to use the SDK (requires a Linux system, see the developer forum for the sticky thread on how to setup a development environment on Windows with VMware Player, just follow steps 1 to 5 then continue here). Once you have a running Linux system you can simply backport the packages you need.

Following creates MPC (client) and MPD (server) packages and all the required dependencies:

cd ~
wget http://downloads.openwrt.org/whiterussian/0.9/OpenWrt-SDK-Linux-i686-1.tar.bz2
tar -jxf OpenWrt-SDK-Linux-i686-1.tar.bz2
svn co https://svn.openwrt.org/openwrt/packages/
cd ~/OpenWrt-SDK-Linux-i686-1/package/
ln -s ../../packages/*/* .
cd ..
make package/mpc-{clean,compile} package/mpd-{clean,compile}
staging_dir_mipsel/usr/bin/ipkg-make-index bin/packages/ > bin/packages/Packages
ubuntu@ubuntu:~/OpenWrt-SDK-Linux-i686-1$ ll bin/packages/
total 380
-rw-r--r-- 1 ubuntu ubuntu  3297 Feb  5 16:07 Packages
-rw-r--r-- 1 ubuntu ubuntu 63465 Feb  5 16:04 libflac_1.1.2-1_mipsel.ipk
-rw-r--r-- 1 ubuntu ubuntu 10692 Feb  5 15:46 libiconv_1.9.1-1_mipsel.ipk
-rw-r--r-- 1 ubuntu ubuntu 25028 Feb  5 16:05 libid3tag_0.15.1b-1_mipsel.ipk
-rw-r--r-- 1 ubuntu ubuntu 62891 Feb  5 16:05 libmad_0.15.1b-1_mipsel.ipk
-rw-r--r-- 1 ubuntu ubuntu 81119 Feb  5 16:06 libvorbisidec_1.2.0-dave-1_mipsel.ipk
-rw-r--r-- 1 ubuntu ubuntu 22941 Feb  5 15:46 mpc_0.12.0-1_mipsel.ipk
-rw-r--r-- 1 ubuntu ubuntu 89085 Feb  5 16:07 mpd_0.12.0-1_mipsel.ipk
ubuntu@ubuntu:~/OpenWrt-SDK-Linux-i686-1$

Now you can use 'ipkg update; ipkg install mpc' or 'ipkg update; ipkg install mpd' (do not forget to make your packages availiable on a webserver (local) and modify /etc/ipkg.conf).

Have fun and make your life with OpenWrt easy as possible smile

(Last edited by forum2006 on 26 Mar 2007, 19:57)

Thanks so much for your help smile

I have a linux box available to me, so ill build it on there and ipkg it across

Fatman

After you telling me the package name, i seartched the Internet for it and downloaded the appropriate ipk file from here:
http://ftp.osuosl.org/pub/nslu2/feeds/unslung/wl500g/

I used ipkg to install it, but cant seem to find mpc anywhere - where would it install to?

Do NOT mix packages from different incompatible repositories. There is a reason why I told you to backport it by yourself. No support for third party packages.

That's all what I say sad

I haven't tried the binary mpc client available from musicpd.org but I have had great success using the simple shell script version found at http://devices.natetrue.com/musicap.  The source for the script is about halfway down and is basically just using netcat to send commands directly to the mpd port.

Thats actually the Guide im following - but he uses mpc not netcat??

Ive got to :

make package/mpc-{clean,compile}

What should this output?

He uses netcat, but named his script mpc smile

There is an .ipk for MPC 0.11.2 readily compiled by me for RC5 at http://klasseonline.dyndns.org/index.php?load=openwrt which you might want to give a try!

greetings,
andy

(Last edited by mauritzius on 5 Feb 2007, 21:00)

The discussion might have continued from here.