1st - Thank you MightyOhm for such an awsome and detailed project! My next step is to put together the LCD module and assemble everything into a box. I'm building this for my parents as they are not too comfortable with computers and this would solve the problem and give them a simple Internet Radio device.
2nd - MPD 0.15 went final on June 23. I've been trying for a week now to get myself familiar with OpenWRT and how to compile third party code as packages with NO luck! Has anyone been successful in compiling MPD 0.15 into OpenWRT? Or does anyone have a good HowTo link with some nice step by step instructions on compiling packages? The OpenWRT forums and wiki are not much help (The wiki is out of date and the few examples are for White Russian and the forums are not really noob friendly)
My desire for MPD 0.15 is because BBC World Radio and DW Radio broadcast in MMS. There are also other European stations that my parents would like to listen to that only play in MMS or RM, I know that MPD does not support RM.
I was able to compile a simple SID player using a Makefile I largely copied from some existing packages. It was somewhat painful and I'm not sure that I did things the right/easiest way, but in the end it worked! I'll dig through my files and see if I can find some files and notes that might help. As far as existing resources go, you're right, they are few and far between.
Here is the Makefile I created to compile tinysid. This might help you get started.
I put this into package/tinysid after creating the new tinysid directory. I also created a "patches" subdir, I think the build process may expect this (not sure).
The weird thing about the build system is that it expects the package to be downloaded from somewhere, I had a hard time fooling it into using a local directory for the source. That's why if you look at the Makefile, it downloads a tinysid package from mightyohm.com. This was a hack, I put the source for the package into a tar.gz and uploaded it to my host. There is probably a better way to do this.
#
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id: Makefile 13857 2009-01-04 13:01:21Z michu $
include $(TOPDIR)/rules.mk
PKG_NAME:=tinysid
PKG_VERSION:=0.94
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://mightyohm.com/files/
include $(INCLUDE_DIR)/package.mk
define Package/tinysid
SECTION:=sound
CATEGORY:=Sound
TITLE:=Extremely compact SID music player for Linux
URL:=http://www.rsinsch.de/?id=7298b&s=k2&lang=en
endef
define Package/tinysid/description
TinySID is a small C64 SID music file player.
endef
define Build/Configure
$(call Build/Configure/Default, \
--disable-iconv \
)
endef
define Package/tinysid/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_BUILD_DIR)/tinysid $(1)/usr/bin/
endef
$(eval $(call BuildPackage,tinysid))
##############################################
# OpenWrt Makefile for helloworld program
#
#
# Most of the variables used here are defined in
# the include directives below. We just need to
# specify a basic description of the package,
# where to build our program, where to find
# the source files, and where to install the
# compiled program on the router.
#
# Be very careful of spacing in this file.
# Indents should be tabs, not spaces, and
# there should be no trailing whitespace in
# lines that are not commented.
#
##############################################
include $(TOPDIR)/rules.mk
# Name and release number of this package
PKG_NAME:=cmdpad
PKG_RELEASE:=0.0.3
# This specifies the directory where we're going to build the program.
# The root build directory, $(BUILD_DIR), is by default the build_mipsel
# directory in your OpenWrt SDK directory
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
# Specify package information for this program.
# The variables defined here should be self explanatory.
define Package/cmdtab
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Cmdtab -- prints a snarky message
DESCRIPTION:=\
If you can't figure out what this program does, \\\
you're probably brain-dead and need immediate \\\
medical attention.
endef
# Specify what needs to be done to prepare for building the package.
# In our case, we need to copy the source files to the build directory.
# This is NOT the default. The default uses the PKG_SOURCE_URL and the
# PKG_SOURCE which is not defined here to download the source from the web.
# In order to just build a simple program that we have just written, it is
# much easier to do it this way.
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
# We do not need to define Build/Configure or Build/Compile directives
# The defaults are appropriate for compiling a simple program such as this one
# Specify where and how to install the program. Since we only have one file,
# the helloworld executable, install it by copying it to the /bin directory on
# the router. The $(1) variable represents the root directory on the router running
# OpenWrt. The $(INSTALL_DIR) variable contains a command to prepare the install
# directory if it does not already exist. Likewise $(INSTALL_BIN) contains the
# command to copy the binary file from its current location (in our case the build
# directory) to the install directory.
define Package/cmdpad/install
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/cmdpad $(1)/bin/
endef
# This line executes the necessary commands to compile our program.
# The above define directives specify all the information needed, but this
# line calls BuildPackage which in turn actually uses this information to
# build a package.
$(eval $(call BuildPackage,cmdpad))
-edit Note: you have to put the source files in ~/src/ which has to be located in your package folder.
#
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id: Makefile 13857 2009-01-04 13:01:21Z michu $
include $(TOPDIR)/rules.mk
#include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mpd15
PKG_VERSION:=0.15
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://localhost/files/
include $(INCLUDE_DIR)/package.mk
define Package/mpd15
SECTION:=sound
CATEGORY:=Sound
TITLE:=MPD v0.15
URL:=http://www.rsinsch.de/?id=7298b&s=k2&lang=en
endef
define Package/mpd15/description
MPD 0.15.
endef
define Build/Configure
$(call Build/Configure/Default, \
--disable-iconv \
)
endef
define Package/mpd15/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_BUILD_DIR)/mpd15 $(1)/usr/bin/
endef
$(eval $(call BuildPackage,mpd15))
I checked my Apache log files, and nothing.. I even created blank src and patches directories just in case.
Maybe by Christmas, OpenWRT will have compiled MPD 0.15 into their repository. I'm capable of compiling applications under linux, but this OpenWRT has me stumped.
You need to run "make menuconfig" and select the new package for it to compile. You can then build the package by either running "make" and waiting a while, or shortcut the build process by running "make package/<yourpackage>-compile V=99".
All of those pages were written for previous releases of OpenWrt, so the process they detail may not work 100%, but they are a good starting point anyway.
#
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libmms
PKG_VERSION:=0.4
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://code.launchpad.net/libmms/trunk/0.4/+download/
PKG_MD5SUM:=4a681a815186fe26bb1b02ccea57fb75
PKG_FIXUP:= libtool
PKG_INSTALL:= 1
include $(INCLUDE_DIR)/package.mk
define Package/libmms
SECTION:=libs
CATEGORY:=Libraries
TITLE:=MMS stream protocol library
URL:=https://launchpad.net/libmms
endef
define Package/libmms/description
LibMMS is a common library for parsing mms:// and mmsh:// type network streams.
These are commonly used to stream Windows Media Video content over the web.
LibMMS itself is only for receiving MMS stream,
it doesn't handle sending at all.
endef
TARGET_CFLAGS += $(FPIC)
define Build/Configure
(cd $(PKG_BUILD_DIR); ./autogen.sh );
$(call Build/Configure/Default, \
--enable-shared \
--enable-static \
)
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" \
all install
endef
define Build/InstallDev
mkdir -p $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/libmms $(1)/usr/include/
mkdir -p $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmms.{a,so*} $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig $(1)/usr/lib/
endef
define Build/UninstallDev
rm -rf \
$(STAGING_DIR)/usr/include/libmms \
$(STAGING_DIR)/usr/lib/libmms.{a,so*} \
$(STAGING_DIR)/usr/lib/pkgconfig/libmms.pc
endef
define Package/libmms/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmms.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libmms))
Hi, just wondering if anyone has got this work yet. I managed to get MPD 0.15.1 compiled into an ipk and installed on the asus wl-520. However, when I ran 'mpd', it just gave me errors that it couldn't find libasound. I tried compiling it again without alsa support and it gave me libstdc++ errors.... kind of depressing. I'm getting the latest packages from svn now and trying it again. Would like to hear if anyone has got 0.15 working yet.