Modify

Opened 8 years ago

Closed 6 years ago

Last modified 4 years ago

#7142 closed enhancement (fixed)

MPD + dependencies + USB Storage + base system is over 8MB

Reported by: ldolse Owned by: nico
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:

Description

MPD's size with dependencies can vary dramatically depending on what dependencies are enabled. As many routers are limited by 8MB of storage it would be good to keep the total size under 8MB.

A minimal system would include:

Base System
USB Support
USB Storage or Samba or NFS
Sound and USB Audio
Common Codecs
Minimal Internet Radio functions

The MPD Makefile currently being used with the official builds has a significant number of dependencies enabled, making a complete installation over 8 megabytes with a 2.6 kernel. Additionally not all dependencies are correctly called out in the makefile, and in turn by ipkg, currently alsa-lib, ffmpeg, mdnsresponder, and libspeex.

A few dependencies that could be disabled include ALSA (uses much more space than OSS which is also enabled), libspeex, sqlite, mdnsresponder, openssl, and possibly the vorbis/ogg codecs. Not all of these would need to be disabled to bring the size under 8MB, just disabling ALSA may be sufficient.

MPD wiki listing configure options:
http://mpd.wikia.com/wiki/Configure

Forum thread for reference:
https://forum.openwrt.org/viewtopic.php?pid=106544

Attachments (0)

Change History (7)

comment:1 Changed 8 years ago by flux

What about additional mpd-mini configuration for the next build? Technically it shouldn't be very complex to add such a package because it makes no sense to deliver the mpd package for any hardware with 8Meg flash it won't fit. So it definitely makes sense to remove following dependencies alsa, ffmpeg, mdnsresponder, and libspeex.

comment:2 Changed 8 years ago by nico

  • Owner changed from developers to nico
  • Status changed from new to accepted
  • Type changed from task to enhancement

comment:3 Changed 8 years ago by zdavkeos@…

I ran into this problem while installing Backfire - below is the mpd makefile I used to get everything to fit onto an Asus wl-520gu (8mb)

Not many features are enabled... but it compiles and plays streaming radio.


#
# Copyright (C) 2007-2010 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:=mpd
PKG_VERSION:=0.15.8
PKG_RELEASE:=4

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/musicpd
PKG_MD5SUM:=824e1ce46c0f468865d9e5e403cdaf5d

PKG_INSTALL:=1

include $(INCLUDE_DIR)/package.mk

define Package/mpd
  SECTION:=sound
  CATEGORY:=Sound
  TITLE:=Music Player Daemon
  URL:=http://www.musicpd.org/
# libvorbis and therewith libogg are needed for shout support
  DEPENDS:= \
	+BUILD_PATENTED:libmad \
	+BUILD_PATENTED:+glib2 +libcurl +libpthread 
endef

define Package/mpd/description
 MPD is a music player supporting flac, mp3 and ogg files. It is
 typically controlled over a network using one of it's many clients
 including mpc(console), gmpc(gnome), phpmp(php), etc...
endef

define Package/mpd/conffiles
/etc/avahi/services/mpd.service
/etc/mpd.conf
endef

# oggflac is not compatible with tremor
CONFIGURE_ARGS += \
	$(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
	--disable-alsa \
	--disable-audiofile \
	--disable-mpc \
	--disable-lsr \
	--disable-ao \
	--disable-mvp \
	--disable-lame-encoder \
	--disable-ffmpeg \
	--disable-flac \
	--disable-vorbis \
	--disable-vorbis-encoder \
	--disable-oggflac \
	--disable-cue \
	--disable-jack \
	--disable-modplug \
	--disable-pulse \
	--disable-sidplay \
	--disable-sqlite \
	--disable-shout \
	--disable-id3 \
	--disable-lastfm \
	--disable-mms \
	--disable-aac \
	--with-zeroconf=no \
	--disable-libOggFLACtest \
	--disable-test \
	--enable-lame-encoder \
	--enable-oss \
	--enable-curl \
	--disable-httpd-output \

CONFIGURE_VARS += \
	$(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
	$(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \


TARGET_CFLAGS += \
	-std=gnu99 \
	-I$(STAGING_DIR)/usr/lib/libintl/include/ \
	-I$(STAGING_DIR)/usr/lib/libiconv/include/ \

TARGET_LDFLAGS += \
	-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
	-L$(STAGING_DIR)/usr/lib/libintl/lib/ \
	-L$(STAGING_DIR)/usr/lib/libiconv/lib/ \

# use gcc instead of g++ to avoid unnecessary linking against libstdc++
TARGET_CXX:=$(TARGET_CC)

define Package/mpd/install
	$(INSTALL_DIR) $(1)/etc
	$(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
	$(INSTALL_DIR) $(1)/etc/init.d
	$(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
	$(INSTALL_DIR) $(1)/etc/avahi/services
	$(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
endef

$(eval $(call BuildPackage,mpd))

comment:4 Changed 7 years ago by flux

There is an additional problem with the mpd is that despite the fact that feature is disabled it still requires dynamic libs to be installed.
I have the following

  DEPENDS:= \
	+BUILD_PATENTED:libmad \
	+glib2 +libmms +libpthread \
	+libid3tag +libcurl
...

CONFIGURE_ARGS += \
	$(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
	--disable-alsa \
	--disable-flac \
	--disable-ipv6 \
	--disable-audiofile \
	--disable-mpc \
	--disable-aac \
	--disable-lsr \
	--disable-ao \
	--disable-mvp \
	--disable-lame-encoder \
	--disable-ffmpeg \
	--disable-vorbis \
	--disable-oggflac \
	--disable-oggvorbis \
	--disable-cue \
	--disable-jack \
	--disable-modplug \
	--disable-pulse \
	--disable-sidplay \
	--disable-sqlite \
	--disable-shout \
	--enable-id3 \
	--enable-lastfm \
	--enable-mms \
	--enable-curl \
	--enable-oss \
	--with-zeroconf=no \
	--disable-libOggFLACtest \
	--disable-test \
	--with-tremor=yes \

mpd compiles fine but the following packages have to be installed despite the fact they are not selected

/usr/bin/mpd: can't load library 'libvorbisidec.so.1'
/usr/bin/mpd: can't load library 'libFLAC.so.8'
/usr/bin/mpd: can't load library 'libvorbisenc.so.2'
+ libogg

comment:5 Changed 6 years ago by nico

  • Resolution set to fixed
  • Status changed from accepted to closed

Done, mpd was split in 2 variants -full & -mini in [28524]

comment:6 Changed 6 years ago by nico

And updated to 0.16.5 too (missed it in the commit msg)

comment:7 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.