OpenWrt Forum Archive

Topic: shairport on openwrt

The content of this topic has been archived between 2 Sep 2014 and 25 Apr 2018. Unfortunately there are posts – most likely complete pages – missing.

jlars wrote:

Here is a brief summary of the steps:

1) Have a linux "host" system (dedicated or VM)
2) Install all prerequisites for OpenWrt build environment (refer to wiki) 
3) Create a base directory and do an svn checkout of openwrt
  a) mkdir ~/openwrt && cd ~/openwrt
  b) svn co svn://svn.openwrt.org/openwrt/trunk/
  c) cd trunk
4) Update package feeds, download, patch, and install shaiport package
  a) ./scripts/feeds update -a
  b) wget -O shairport.patch http://pastebin.com/raw.php?i=Lh8ae4hx
  c) echo "" >> shairport.patch
  d) patch -p0 < shairport.patch
  e) ./scripts/feeds update -a
  f) ./scripts/feeds install shairport
5) Generate the initial configuration and confirm build environment prerequisites
  a) make defconfig
  b) Repeat a) and install any missing host packages until there are no errors on "make defconfig"
6) Select your target and add shairport to your build configuration
  a) make menuconfig
  b) Select appropriate "Target system", e.g. Atheros AR71xx/AR......
  c) Select appropriate "Target Profile", e.g. Buffalo WZR-HP-G30XNH
  d) Select Sound --> shairport (highlight shairport and press "m" to build shairport as a package)
  e) Exit and save configuration
7) Build image and packages
  a) make
  b) If you encounter an error rerun with "make V=99" for verbose output
  c) After a successful build images and packages will be under ~/openwrt/trunk/bin

This is mostly from memory so be sure to read the wiki for full details and better understanding of what is going on.  Essential reading:

http://wiki.openwrt.org/doc/howto/buildroot.exigence
http://wiki.openwrt.org/doc/howto/build
https://dev.openwrt.org/wiki/GetSource

I tried following the steps listed here to install on my TP-Link TL-WR1043ND and ran into an issue and have a couple questions..
- The URL for the shairport.patch appears to be broken, file not found on pastebin. I think I found a newer version of the file here: http://pastebin.com/download.php?i=DknUpn7f but get the following errors:

patching file feeds/packages/libs/libao/Makefile
Hunk #2 FAILED at 8.
Hunk #4 FAILED at 57.

- Will the image with shairport fit in the 8MB flash on the router that i have?
- This post has been around for a while, is there an updated set of directions to install this?

Thanks in advance!!

(Last edited by mrdragon1 on 8 Jul 2012, 15:28)

I would also like to have shairport on my wr1043n router, please help.

what are the chances of someone making a Shairport OpenWRT package that can be installed like the other packages available? That seems like the next step once this is working to me.. I know that would make it a lot easier for those of us that haven't had any luck with building our own firmware..

I have a feeling that my router will need a USB hub and flash drive as it only has 8MB flash in it. It is a TP-Link tl-wr1043nd.

I hope no one gets upset with me for posting to a fairly old thread, but this is literally the ONLY place I have found for getting Shairport running on OpenWRT.

Thanks in advance to anyone that posts info about a package or even updated instructions to get this working!

(Last edited by mrdragon1 on 30 Aug 2012, 14:33)

hi, sorry for my bad english, because i´m spanish xD, i´m trying to compile shairport with my openwrt and i always have the same error (error 2), i´m so sad because, i want to have your package, and i can't.
RESUME: I follow all the steps and always have the same error when compileing, what can i do?

I'm also interested in making this work. Any luck. Seems like the previous patch has some issue with libao.

I managed to get ShairPort working on my TP MR-3020 running AA beta this weekend. I just followed jlars' instructions and used his feed.

You can get this as a feed by adding this line to feeds.conf:
src-git jlars git://github.com/jlars/packages.git;master

./scripts/feeds update -a
./scripts/feeds install shairport
make menuconfig
shairport will be in the Sound menu.

Note that it complained about not finding 'avahi/dbus' something package (don't recall exactly). You can just ignore it but make and force the installation without checking dependency. You still need avahi and dbus though, just not the particular package referenced in the Makefile (@jlars, can you fix it when you get a chance?).

Thanks! I'll have to try this later..
Did you install avahi and dbus from the packages after, or somehow during the build?

Avahi and dbus I installed using ipkg from the default feeds.

I'll work on a tutorial once I sort though all the details (basically when I have time to do it from scratch again).

mrdragon1 wrote:

Thanks! I'll have to try this later..
Did you install avahi and dbus from the packages after, or somehow during the build?

(Last edited by grayman4hire on 16 Oct 2012, 04:50)

i do what you say, with jlars feed, but it doesn't work i can't compile with shairport don't know what i'm doing bad but it doens't work what you say. any idea? (i'm going to repeat the process and then i will writte here the results, ty again) smile

I'm able to successfully compile shairport and use it on my router. It works wonderfully. I'll post a small guide once I'm free.

Ok. Here is the guide, but it requires you to build OpenWRT manually so please read the build root guide beforehand.

Once you've setup a buildroot environment, you should have a feeds.conf.default file and the feeds.conf file doesn't exist. Copy the file feeds.conf.default to feeds.conf

Then modify feeds.conf to include 1 additional line:

src-git jlars git://github.com/jlars/packages.git;master

Then type the following command to include this feed into package.

./scripts/feeds update -a
./scripts/feeds install -a

Now

make menuconfig
shairport will be in the sound menu

Choose to build it as a module. No need to build the shairport perl packages.

Once build is complete. You'll have the package.

Now, if you're using trunk, no need to flash the latest image. Just point /etc/opkg.conf to the bin/<platform>/packages

Install dbus, avahi-daemon, avahi-utils, libavahi and libavahi-dbus

Then install shairport using opkg install --force shairport (otherwise it will complaint abou dependency)

Also install alsa-utils and kmod-usb-audio (I presume it is a router so this should be the right sound card to use). Not to mention, you need either a USB speaker or a USB sound card.

To start all service, start dbus, avahi-daemon and shairport.

You should now see shairport in the list of AirPlay speakers.

Also a few tips:

To change shairport name in the AirPlay menu, start it with something like below:

shairport -a name -d -p 5000

-d is daemonize
-p 5000 is the port number to use

If no sound come out, run alsamixer to check of volume and output device is correct. It is in alsa-utils package.

i did what you say a lot of times, and getting the same error i'm going to stop trying it :'(, this is the error:

        touch /home/xurxo/openwrt/trunk/build_dir/host/opkg-618/.built
        make[3]: Leaving directory `/home/xurxo/openwrt/trunk/package/opkg'
        make[2]: Leaving directory `/home/xurxo/openwrt/trunk'
        make[1]: *** [/home/xurxo/openwrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/stamp/.package_compile] Error 2
        make[1]: Leaving directory `/home/xurxo/openwrt/trunk'
        make: *** [world] Error 2

If someone know what it means please, say to me, i'm trying to compile it for bcm63xx. Ty for your help smile

Your OpenWRT build root seems to have some problem, which could be complex. What platform are you trying to build from?

I don't understand what you mean, but i'm going to put here everything and you catch what you want XD:

OS: Ubuntu 12.04
Openwrt version: Trunk, Barrier breaker
Router chip: bcm63xx

(I think that here is your answer)
If not please say to me, I'm not very good in english smile

(Last edited by xurxo on 20 Oct 2012, 10:45)

A make V=s will show exact position on the compilation errors.

This is how i get from de compilation:

PunBB bbcode test

Somebody know this error and how i can fix it?

There are too few lines of output for me to see what's happening. Would you mind posting more lines (like ~100 or so?)

ok, i'm compileing for backfire, at the moment, when it finish if it doens't work i will upload everything on a text file

My tutorial only works on trunk I think, not backfire.

I compile another time, now following  written_direcon's tutorial but i got the same error, i don't know why, but here is all that i could copy, Now in Pastebin xD:

ERROR

(Last edited by xurxo on 23 Oct 2012, 12:32)

It looks like the package compiled just fine, but failed in packaging stage.

Sorry, posts 101 to 100 are missing from our archive.