• Disclaimer: This Vendor's Forum is a paid-for commercial area. Unlike the rest of diyAudio, the Vendor has complete control of what may or may not be posted in this forum. If you wish to discuss technical matters outside the bounds of what is permitted by the Vendor, please use the non-commercial areas of diyAudio to do so.

Support for Botic Linux driver

Of course, if there's any help needed just feel free to ask me!

mikelangeloz, Hi!

in a new assembly volumio, which recently collected and posted on the forum,
It does not work to mount a folder (SAMBA) via the web interface.

The size, its name is visible, but it DOES NOT be MOUNTED.
register in additional settings "vers = 1.0, 2.0" 0 does not help

Help solve this?
 
Hi,
I use Debian Jassie:
Code:
BeagleBoard.org Debian Image 2017-02-26
and Botic kernel:
Code:
Linux beaglebone 4.8.13-botic7-rc3 #1 PREEMPT Sat Dec 10 01:35:51 CET 2016 armv7l GNU/Linux
For some time I have an issue with date/time in my system. After boot/reboot I see old date/time:
Code:
root@beaglebone:~# date
Thu Dec 28 22:14:56 CET 2017
How can I restore the automatic date/time update at system startup/boot?
TIA
 
Hi! I was wondering if anyone knows if there is a way to update to the latest MPD/MPC with Botic (4.8.13-botic7-rc3), so to enjoy the latest features there? I like to use a minimal interface to play music, so either mpc directly or ympd which is available on Botic's system.
Thanks!
Regards,
Knut
 
Hi, I may be mistaken, but there is no easy way to get latest MPD on current Botic image.

I had to go the long route - write vanilla Debian image onto SD card, then build the latest MPD from source, and apply the Botic driver.

I can post detailed instruction, if you (or someone else) need one. :)

Thanks,
Fedor
 
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/bone-debian-9.3-iot-armhf-2018-03-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:

sudo su
(enter debian password (temppwd))
passwd
(enter root password)
(repeat)
exit

6. Enable root over SSH:

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:

8. Edit uEnv.txt
nano /boot/uEnv.txt
# check if there is a line starting with dtb= and change it to dtb=am335x-boneblack-botic.dtb

Then
sync
reboot

9. Prior to compiling MPD, there are some dependencies that must be installed:

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:
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"):

11. Now comes the fun part:
./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.


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

make install

12. Now we need to create all the directories and files for MPD to work:
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":
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:
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:
systemctl enable mpd.service

18. Also, you will need to configure your mpd.config with music directory and output device:
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.
 

Attachments

  • mpd_files.zip
    1.3 KB · Views: 68
Last edited:
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,