Go Back   Home > Forums > > >

Twisted Pear Superior quality electronic kits

Reply
 
Thread Tools
Old 24th May 2018, 11:23 AM   #2471
fred_com is offline fred_com  Russian Federation
diyAudio Member
 
Join Date: Nov 2009
Location: Belgorod
Sorry for the delay, here it is.

I'd like to point out that I'm not a Linux guru, so some commands in this instruction may be redundant or doing nothing

1. Download latest Debian image for BBB. I've used this one - http://debian.beagleboard.org/images...-05-4gb.img.xz

2. Write it to the SD card using Win32DiskImager, if on Windows. Should be something similar for MAC

3. It may be a good time to expand the partition to which the image was written. I've used Partition Guru, as it can work with SD cards and Linux file systems.

4. Plug SD card into the BBB, connect the ethernet cable, and power on. From now on I'm using connection to BBB over SSH by using Putty.

5. The default login-password is debian/temppwd. One can use these credentials all the way, but I was too lazy to type sudo on every command, so I've just enabled root:

Quote:
sudo su
(enter debian password (temppwd))
passwd
(enter root password)
(repeat)
exit
6. Enable root over SSH:

Quote:
As root, edit the sshd_config file in /etc/ssh/sshd_config : nano /etc/ssh/sshd_config.
Add a line in the Authentication section of the file that says PermitRootLogin yes . ...
Save the updated /etc/ssh/sshd_config file.
Restart the SSH server: service sshd restart.
7. Download and install latest Botic:
Quote:
wget http://repo.ieero.com/botic/pool/mai...c3_1_armhf.deb
dpkg -i linux-image-4.8.13-botic7-rc3_1_armhf.deb
8. Edit uEnv.txt
Quote:
nano /boot/uEnv.txt
# check if there is a line starting with dtb= and change it to dtb=am335x-boneblack-botic.dtb
Then
Quote:
sync
reboot
9. Prior to compiling MPD, there are some dependencies that must be installed:

Quote:
apt-get install g++ \
libmad0-dev libmpdclient-dev \
libflac-dev \
libaudiofile-dev libsndfile1-dev libfaad-dev \
libwavpack-dev \
libavcodec-dev libavformat-dev \
libmp3lame-dev libshine-dev \
libsamplerate0-dev libsoxr-dev \
libbz2-dev \
libcurl4-gnutls-dev libyajl-dev libexpat-dev \
libasound2-dev \
libupnp-dev \
libavahi-client-dev \
libsqlite3-dev \
libsystemd-dev libwrap0-dev \
libcppunit-dev xmlto \
libboost-dev \
libicu-dev
10. Download MPD (the files will be downloaded into your home directory, so if under root, it will be in "root" dir):
Either from official site, where tested versions are stored:
Quote:
wget https://www.musicpd.org/download/mpd...0.20.19.tar.xz
tar xf mpd-0.20.19.tar.xz
cd mpd-0.20.19
Or from GitHub, where there is a latest code (probably would need to install git, automake and autoconf first - "apt-get install git automake autoconf"):
Quote:
git clone GitHub - MusicPlayerDaemon/MPD: Music Player Daemon mpd
cd mpd
./autogen.sh
11. Now comes the fun part:
Quote:
./configure --target=arm-none-linux-gnueabi --host=armv7-none-linux-gnueabi \
--prefix=/usr \
--sysconfdir=/etc \
--enable-dsd \
--enable-libmpdclient \
--enable-alsa \
--enable-soxr \
--enable-tidal \
--disable-ao \
--disable-ipv6 \
--disable-iso9660 \
--disable-jack \
--disable-modplug \
--disable-pulse \
--disable-shout \
--disable-sidplay \
--disable-soundcloud \
--disable-zzip \
--with-zeroconf=no \
--disable-smbclient \
--disable-lsr \
--disable-sqlite \
--disable-nfs \
--disable-wildmidi \
--disable-roar \
--disable-cdio-paranoia \
--disable-mms \
--disable-webdav \
--disable-sndio \
--disable-haiku \
--disable-oss \
--disable-httpd-output \
--disable-recorder-output \
--disable-openal \
--disable-adplug \
--disable-mikmod \
--disable-bzip2 \
--disable-aac \
--disable-sndfile \
--disable-vorbis-encoder \
--disable-vorbis \
--disable-ffmpeg \
--with-systemdsystemunitdir=/lib/systemd/system
Here I've disabled almost all plugins, except for the ones that are needed for music reproduction (I've tried experimenting with Tidal, but the plugin is still beta, so didn't work).
Please note, that if you'll want to enable some of the plugins, it's quite possible that you will need to install additional libraries (step 9) to support this plugin.

Quote:
make
Now this command will take a lot of time, something like 20-30 minutes, since our BBB is not really fast (I know that you could compile it on your desktop PC using cross-compiling, but just didn't have time to research this any further)

So after it compiles succesfully, doing

Quote:
make install
12. Now we need to create all the directories and files for MPD to work:
Quote:
mkdir /var/lib/mpd
mkdir /var/lib/mpd/playlists
mkdir /var/log/mpd/
mkdir /var/run/mpd

touch /var/lib/mpd/tag_cache
touch /var/run/mpd/pid
13. Also, we need a user named "mpd":
Quote:
adduser mpd
gpasswd -a 'mpd' audio
14. Then we need a startup script (), it should be placed in /etc/init.d directory (named "mpd" in attached zip)

15. Make this script executable, and update main startup script, so that our "mpd" script will launch after reboot:
Quote:
chmod +x /etc/init.d/mpd
update-rc.d mpd defaults
16. We need to grant permissions for our mpd user to change the files in /run/mpd/, so we need to put "mpd.conf" into /etc/tmpfiles.d/ (it's in the attached zip, it's not the config of mpd, it's some script that runs on system startup)

17. We need to enable mpd.service daemon:
Quote:
systemctl enable mpd.service
18. Also, you will need to configure your mpd.config with music directory and output device:
Quote:
music_directory "<your music dir>"

audio_output {
type "alsa"
name "Botic"
device "hw:0,0"
period_time "1"
mixer_type "none"
}
19. Reboot, and mpd should work. Try to connect to it via some client app.


I think this is it. I've omitted the setup of network interfaces (it's DHCP by default, but you may need to change it to static or wifi, etc.), shares and mounts, as this is all varies between users.

Troubleshooting:

there are several places where something can go wrong:
1. Installing the dependencies. Well, we all know that Linux is better than Windows in all possible ways (at least that's what Linux guys tell us ) but it gets really nasty if some dependency depends on some lib, and this lib conflicts with other lib, and so on. So when I'm presented with some error when doing "apt-get install" I would just google the error message, as I don't know better. But, if using only the stable repository (default config of apt-get) in the sources list - it should not be a problem.

2. When running configure - if there are errors, it would mean that some dependency lib is not installed, and you should run apt-get install <lib>

3. When building - now this is also tricky, and I would just google if anything goes wrong.

4. When starting mpd service - you can test starting the mpd by running "service mpd start" if there are some errors, you could see detailed info by running "systemctl status mpd.service", and then again, google

Not much of a troubleshooting section I guess

That's it, the scripts in the attached zip are coming from mpd Debian package, so they are not mine

Thanks,
Fedor

PS. I forgot to mention - I was using WinSCP to upload and edit files on the BBB. It's much easier than doing editing via nano.
Attached Files
File Type: zip mpd_files.zip (1.3 KB, 35 views)

Last edited by fred_com; 24th May 2018 at 11:35 AM.
  Reply With Quote
Old 24th May 2018, 08:03 PM   #2472
Kanutus is offline Kanutus
diyAudio Member
 
Join Date: Jun 2016
Wow! Very impressive, and very, very helpful! Thanks a lot; this is great!

Regards,
Knut
  Reply With Quote
Old 24th May 2018, 10:00 PM   #2473
fred_com is offline fred_com  Russian Federation
diyAudio Member
 
Join Date: Nov 2009
Location: Belgorod
Thanks! If there are any questions - please ask, I will try to answer, although I'm not that proficient at Linux, as I've said
  Reply With Quote
Old 25th May 2018, 11:58 AM   #2474
PET240 is offline PET240  Australia
diyAudio Member
 
Join Date: Feb 2010
Location: Brisbane Northside
Damn sight more than me Fred!


I'm starting from scratch again!


Thanks for the guide!
  Reply With Quote
Old 25th May 2018, 12:03 PM   #2475
PET240 is offline PET240  Australia
diyAudio Member
 
Join Date: Feb 2010
Location: Brisbane Northside
Question.


After this is all done and running, can we remove the SD card and copy it so I dont have to do this repeatedly or will this be flashed onto the BBB and is there forevermore?


Thanks.
  Reply With Quote
Old 25th May 2018, 12:28 PM   #2476
twluke is offline twluke  Japan
diyAudio Member
 
Join Date: Nov 2012
Location: Tokyo
Quote:
Originally Posted by PET240 View Post
Question.
After this is all done and running, can we remove the SD card and copy it so I dont have to do this repeatedly or will this be flashed onto the BBB and is there forevermore?
Just look into the /boot/uEnv.txt of your SD card, at the bottom of which you'll find the line like below:

#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

Just comment out this line and then boot from this SD card. After that the card will flash the eMMC and the contents of the SD card will be all copied to it. This way, you can always boot from the on-board eMMC.

Regards,
  Reply With Quote
Old 25th May 2018, 12:36 PM   #2477
PET240 is offline PET240  Australia
diyAudio Member
 
Join Date: Feb 2010
Location: Brisbane Northside
Thanks twluke!
  Reply With Quote
Old 25th May 2018, 12:42 PM   #2478
PET240 is offline PET240  Australia
diyAudio Member
 
Join Date: Feb 2010
Location: Brisbane Northside
I am going to have a game just building this!


One I may not win, but I'll play anyway.
  Reply With Quote
Old 25th May 2018, 12:52 PM   #2479
PET240 is offline PET240  Australia
diyAudio Member
 
Join Date: Feb 2010
Location: Brisbane Northside
And I assume Fedor that this doesnt use the Volumio web interface since you said to connect via a client app.
  Reply With Quote
Old 25th May 2018, 06:15 PM   #2480
fred_com is offline fred_com  Russian Federation
diyAudio Member
 
Join Date: Nov 2009
Location: Belgorod
Quote:
Originally Posted by PET240 View Post
And I assume Fedor that this doesnt use the Volumio web interface since you said to connect via a client app.
No, there's nothing apart from MPD. You'll need something like Cantata Releases * CDrummond/cantata * GitHub
  Reply With Quote

Reply


Support for Botic Linux driverHide this!Advertise here!
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Open baffle with fullrange driver and bass support Godzilla Full Range 5 22nd July 2011 01:32 PM
Low end support for single driver monitors strider75 Multi-Way 97 30th September 2009 03:02 PM
ASIO support (driver) for Labview Aoxomox Digital Line Level 0 3rd May 2009 05:29 PM
Linux/BruteFIR support coming in LspCAD tcpip Multi-Way 18 18th October 2005 03:08 AM
linux badgers Introductions 3 3rd April 2005 03:27 PM


New To Site? Need Help?

All times are GMT. The time now is 02:36 PM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 14.29%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
Copyright ©1999-2021 diyAudio
Wiki