So, do these steps (assuming you have debian squeeze and TP-LINK 1043ND):
sudo aptitude install zlib1g-dev gettext flex git subversion build-essential libncurses5-dev gawk
mkdir -p ~/openwrt
cd ~/openwrt
svn co svn://svn.openwrt.org/openwrt/trunk/ tp-link
cd tp-link
./scripts/feeds update packages
./scripts/feeds install mpd-full
./scripts/feeds install mpc
mkdir -p ~/openwrt/downloads/
ln -s ~/openwrt/downloads dl
echo CONFIG_TARGET_ar71xx=y > .config
echo CONFIG_TARGET_ar71xx_generic_TLWR1043=y >> .config
echo CONFIG_PACKAGE_block-mount=y >> .config
echo CONFIG_PACKAGE_kmod-fs-ext4=y >> .config
echo CONFIG_PACKAGE_kmod-usb-ohci=y >> .config
echo CONFIG_PACKAGE_kmod-usb-storage=y >> .config
echo CONFIG_PACKAGE_e2fsprogs=y >> .config
echo CONFIG_PACKAGE_kmod-usb-audio=m >> .config
echo CONFIG_PACKAGE_libffmpeg-full=m >> .config # without this mpd won't be enabled in trunk
echo CONFIG_PACKAGE_mpd-full=m >> .config
echo CONFIG_PACKAGE_mpc=m >> .config
make defconfig
mkdir -p files/etc/config
cp ~/fstab files/etc/config/fstab
cp ~/mpd.conf files/etc/mpd.conf
cp ~/opkg.conf files/etc/opkg.conf
make
Everything should compile cleanly.
Flash your tp-link device.
insert usb stick to your PC
sudo fdisk /dev/sdb
<partition to 2 parts, 1 part having type 82, 2 part type 83>
Then,
sudo mkswap /dev/sdb1
sudo mkfs.ext4 -L openwrt-root /dev/sdb2
eject then insert and after it's mounted do:
sudo chown -R user: /media/openwrt-root/
cp -a ~/openwrt/tp-link/bin/ar71xx/packages/ /media/openwrt-root
tar -C /media/openwrt-root -zxf ~/openwrt/tp-link/bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz
copy some mp3s to /media/openwrt-root/home/music/
After that you need to insert into your device this usb stick and usb sound card via usb hub.
Then telnet to your device and reboot it.
After it reboots, telnet to it and do:
mkdir /home/mpd/
opkg update
opkg install kmod-usb-audio
opkg install mpd-full
/etc/init.d/mpd enable
/etc/init.d/mpd start
opkg install mpc
mpc update --wait
Then install gmpc on your PC
set only the following, anything other don't touch:
host 192.168.1.1
autoconnect yes
Now you should be able to play music.
====================================
Following are config files used above:
opkg.conf
src/gz packages file:///packages
fstab:
config global automount
option from_fstab 1
option anon_mount 1
config global autoswap
option from_fstab 1
option anon_swap 0
config mount
option target /
option device /dev/sda2
option fstype ext4
option options rw,sync,noatime
option enabled 1
option enabled_fsck 1
config swap
option device /dev/sda1
option enabled 1
mpd.conf:
music_directory "/home/music"
db_file "/home/mpd/database"
log_file "/home/mpd/log"
input {
plugin "curl"
}
audio_output {
type "alsa"
name "My ALSA Device"
mixer_type "software"
device "hw:0,0"
}
EDIT:
add CONFIG_PACKAGE_kmod-usb-audio=m
add CONFIG_PACKAGE_libffmpeg-full=m and remove libffmpeg-fix.patch
add device "hw:0,0"
(Last edited by usv on 21 Jul 2012, 04:34)