Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32
  1. #1
    Senior Member
    Join Date
    Jul 2007
    Posts
    831

    Building LMS for 64-bit Debian running on ARM Single Board Computers

    1) Motivation: I don't want to run a power-hungry PC 24/7 with spinning fans etc, but I want something faster the a Raspberry Pi to run LMS (I still use the web interface). There are number of fast, cheap SBC's out there that handily out-perform the RPi3, such as OdroidC2 (which supports an eMMC module for storage), ROCK64 (which has USB3 and eMMC). Quad-Core ARM Cortex A53 64-Bit Processors and support for 2GB or 4GB of 1600MHz LPDDR3 memory, endow these tiny machines with similar power to the x86 PCs many of us used as LMS servers back in the day.

    2) Issue: ARM64/AARCH64 architectures are not currently supported in the highly build Debian packages as of now. It seems you have to roll your own.

    3) My solution: Build Debian install packages using the method and scripts supplied here: https://github.com/Uplink03/logitechmediaserver-deb. This, in turn, pulls together the source repositories from https://github.com/Logitech/slimserver-vendor.git, https://github.com/Logitech/slimserver.git and https://github.com/Logitech/slimserver-platforms.git. After checking out the repo
    Code:
    git clone --recursive -b public/7.9 https://github.com/Uplink03/logitechmediaserver-deb.git
    I wanted to make sure I was using fully updated sources, so I did the following (probably not the right way to do it, but it worked for me).
    Code:
    cd logitechmediaserver-deb/source/vendor
    git pull https://github.com/Logitech/slimserver-vendor.git
    cd ../server
    git pull https://github.com/Logitech/slimserver.git
    cd  ../platforms/
    git pull https://github.com/Logitech/slimserver-platforms.git
    Now the only problem I has was that those CPAN libraries that use automake/configure generally fail to complete the ./configure script on 64-bit ARM machines. To fix this, I modified ./logitechmediaserver-deb/source/vendor/CPAN/buildme.sh to copy the platform's config.guess file into each of the unarchived source directories, immediately before running ./configure. A suitable patch for doing this is attached, but you might have to edit the path to config.guess to suit your installation,(dpkg -L automake | grep guess) will tell what it should be. In my case, it was /usr/share/automake-1.15/config.guess. This simple trick is enough to allow ./logitechmediaserver-deb/source/vendor/CPAN/buildme.sh to run to completion without further issues.

    Then, it is sufficient to the following command in ./logitechmediaserver-deb
    Code:
    dpkg-buildpackage -rfakeroot -b -us -uc
    This should leave you with the following files, ready to install with dpkg -i
    Code:
    rw-r--r-- 1 charles charles 4476976 Oct 20 21:16 logitechmediaserver_7.9.0+lmce1_all.deb
    -rw-r--r-- 1 charles charles 2549430 Oct 20 21:16 logitechmediaserver-code2000-font_7.9.0+lmce1_all.deb
    -rw-r--r-- 1 charles charles 4908774 Oct 20 21:16 logitechmediaserver-cpan-bundle_7.9.0+lmce1_arm64.deb
    -rw-r--r-- 1 charles charles 1745448 Oct 20 21:15 logitechmediaserver-firmware_7.9.0+lmce1_all.deb
    -rw-r--r-- 1 charles charles 3396910 Oct 20 21:16 logitechmediaserver-html_7.9.0+lmce1_all.deb
    This is a reasonably easy route to follow, the only trickery being the need to patch CPAN/buildme.sh to work around automake's config.guess being so old in many packages. Can anyone suggest a more elegant way to solve this, that we could perhaps get merged into the official logitech repo version of buildme.sh?
    Attached Files Attached Files
    ----------------------
    "Dreamer, easy in the chair that really fits you..."

  2. #2
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    650
    Quote Originally Posted by dsdreamer View Post
    This is a reasonably easy route to follow, the only trickery being the need to patch CPAN/buildme.sh to work around automake's config.guess being so old in many packages. Can anyone suggest a more elegant way to solve this, that we could perhaps get merged into the official logitech repo version of buildme.sh?
    See this github issue for discussion.
    See this post for a slightly more elegant modification for the the build script (as is fetches the newest config.guess automatically and doesn't depend on a local copy), plus a update to build the newest versions of the libraries / perl modules (a LMS built this way has been running on my 64bit RPi3 for a couple of months without any issue).

  3. #3
    Senior Member
    Join Date
    Mar 2008
    Posts
    500
    Is there a guide out there for dummies who are comfortable with the command line and have git installed on an Odroid C2 but have never tried to do something like this from scratch? Or is the first post in this thread all I need?

  4. #4
    Senior Member
    Join Date
    Jul 2007
    Posts
    831

    More detailed guide

    Quote Originally Posted by atrocity View Post
    Is there a guide out there for dummies who are comfortable with the command line and have git installed on an Odroid C2 but have never tried to do something like this from scratch? Or is the first post in this thread all I need?
    I can try to post more detailed steps, and/or provide feedback in this thread if you get stuck. I did this on an odroidc2, as well. Are you running Jessie or Stretch and which system Perl is installed? (Also, is this armbian or dietpi or some other variant?)

    A few things I neglected to mention in the first post were:
    Code:
    sudo apt-get install fakeroot
    sudo apt-get install yasm
    sudo apt-get install debhelper quilt libz-dev libgd-dev
    sudo apt-get install libmodule-build-perl
    sudo apt-get install libmodule-install-perl
    sudo apt-get install libio-socket-ssl-perl
    uname -a; perl -v, on my machine shows the following:
    Code:
    Linux music2 4.13.7-odroidc2 #32 SMP PREEMPT Mon Oct 16 21:38:07 CEST 2017 aarch64 GNU/Linux
    This is perl 5, version 24, subversion 1 (v5.24.1) built for aarch64-linux-gnu-thread-multi
    (with 75 registered patches, see perl -V for more detail)
    I will try to do better write-up in the next 24 hours, but to make it better targeted to your system please let me know which OS (cat /etc/os-release) and which perl (perl -v) you are starting with.

    Thanks.
    ----------------------
    "Dreamer, easy in the chair that really fits you..."

  5. #5
    Senior Member
    Join Date
    Mar 2008
    Posts
    500
    Quote Originally Posted by dsdreamer View Post
    I can try to post more detailed steps, and/or provide feedback in this thread if you get stuck. I did this on an odroidc2, as well. Are you running Jessie or Stretch and which system Perl is installed? (Also, is this armbian or dietpi or some other variant?)

    A few things I neglected to mention in the first post were:
    Code:
    sudo apt-get install fakeroot
    sudo apt-get install yasm
    sudo apt-get install debhelper quilt libz-dev libgd-dev
    sudo apt-get install libmodule-build-perl
    sudo apt-get install libmodule-install-perl
    sudo apt-get install libio-socket-ssl-perl
    uname -a; perl -v, on my machine shows the following:
    Code:
    Linux music2 4.13.7-odroidc2 #32 SMP PREEMPT Mon Oct 16 21:38:07 CEST 2017 aarch64 GNU/Linux
    This is perl 5, version 24, subversion 1 (v5.24.1) built for aarch64-linux-gnu-thread-multi
    (with 75 registered patches, see perl -V for more detail)
    I will try to do better write-up in the next 24 hours, but to make it better targeted to your system please let me know which OS (cat /etc/os-release) and which perl (perl -v) you are starting with.

    Thanks.
    Thank you! There's definitely no hurry, though. I don't strictly need another server, it's just fun to play around with this stuff. I got as far as running git apply --check on the patch and wound up with:

    Code:
    error: slimserver-vendor-patched/CPAN/buildme.sh: No such file or directory
    error: slimserver-vendor-patched/flac/buildme-linux.sh: No such file or directory
    error: slimserver-vendor-patched/sox/buildme-linux.sh: No such file or directory
    I had not yet installed the additional packages (fakeroot, yasm, etc.), but now that I have I still see the same error.

    This is an Odroid C2.

    Result of cat /etc/os-release is:

    Code:
    NAME="Ubuntu"
    VERSION="16.04.3 LTS (Xenial Xerus)"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu 16.04.3 LTS"
    VERSION_ID="16.04"
    HOME_URL="http://www.ubuntu.com/"
    SUPPORT_URL="http://help.ubuntu.com/"
    BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
    VERSION_CODENAME=xenial
    UBUNTU_CODENAME=xenial
    Result of perl -v is:

    Code:
    This is perl 5, version 22, subversion 1 (v5.22.1) built for aarch64-linux-gnu-thread-multi
    (with 58 registered patches, see perl -V for more detail)
    Result of uname -a is:

    Code:
    Linux odroid64.wywh.com 3.14.79-108 #1 SMP PREEMPT Mon Feb 27 23:18:26 BRT 2017 aarch64 aarch64 aarch64 GNU/Linux
    Thank you again!

  6. #6
    Senior Member
    Join Date
    Jul 2007
    Posts
    831

    Thanks for the hints

    Quote Originally Posted by Roland0 View Post
    See this github issue for discussion.
    See this post for a slightly more elegant modification for the the build script (as is fetches the newest config.guess automatically and doesn't depend on a local copy), plus a update to build the newest versions of the libraries / perl modules (a LMS built this way has been running on my 64bit RPi3 for a couple of months without any issue).
    Okay, good to know this has been tackled by others before me. I see the patched buildme.sh updates the troublesome, outdated packages to overcome the staleness of the config.guess. My thought was not to stray further from the beaten path than necessary, so using the same (outdated) source code as the official Logitech build scripts seemed a better idea to me, but that's arguable both ways.

    I have experimented with actually running automake again instead of just copying in a newer config.guess, e.g., invoke automake -a -f, in all those places where outdated packages won't build. I'm not sure if that's better or worse, but it does work.
    We could have the following inserted at all the critical places in buildme.sh
    Code:
    if [ "`uname -m`" == "aarch64" ]; then
     automake -a -f
    fi
    or
    Code:
    if [ "`uname -m`" == "aarch64" ]; then
     cp `dpkg -L automake | grep 'config.guess'` .
    fi
    Either of these would be non-destructive to normal users of buildme.sh.
    ----------------------
    "Dreamer, easy in the chair that really fits you..."

  7. #7
    Senior Member
    Join Date
    Jul 2007
    Posts
    831

    Two more quick hints...

    Quote Originally Posted by atrocity View Post
    Thank you! There's definitely no hurry, though. I don't strictly need another server, it's just fun to play around with this stuff. I got as far as running git apply --check on the patch and wound up with:

    Code:
    error: slimserver-vendor-patched/CPAN/buildme.sh: No such file or directory
    error: slimserver-vendor-patched/flac/buildme-linux.sh: No such file or directory
    error: slimserver-vendor-patched/sox/buildme-linux.sh: No such file or directory
    Thank you again!
    1) Make sure that /sbin is in your PATH. I needed to edit my ~/.profile to include PATH=$PATH:/sbin:/usr/sbin

    2) When applying the patch, do so as follows:
    Code:
    cd ./logitechmediaserver-deb/source/vendor
    patch -p2 < ~/slimserver-vendor.patch
    ----------------------
    "Dreamer, easy in the chair that really fits you..."

  8. #8
    Senior Member
    Join Date
    Mar 2008
    Posts
    500
    Quote Originally Posted by dsdreamer View Post
    1) Make sure that /sbin is in your PATH. I needed to edit my ~/.profile to include PATH=$PATH:/sbin:/usr/sbin

    2) When applying the patch, do so as follows:
    Code:
    cd ./logitechmediaserver-deb/source/vendor
    patch -p2 < ~/slimserver-vendor.patch
    Your hints were perfect. I started the process last night and found it had finished when I woke up this morning. I installed everything via sudo dpkg -i with the only snag being that LMS complained about the CPAN package not being installed. So I installed it along with the two others, then re-installed LMS, which is now cheerfully scanning my 100,000+ tracks.

    THANK YOU!

  9. #9
    Senior Member
    Join Date
    Jul 2007
    Posts
    831

    Summary instructions for future reference

    Quote Originally Posted by atrocity View Post
    Your hints were perfect. I started the process last night and found it had finished when I woke up this morning. I installed everything via sudo dpkg -i with the only snag being that LMS complained about the CPAN package not being installed. So I installed it along with the two others, then re-installed LMS, which is now cheerfully scanning my 100,000+ tracks.

    THANK YOU!
    You're welcome!

    Just so that this thread can be more useful to any others who want to follow this method, I retraced my steps from a new install of Ubuntu 16.04.3 LTS on an odroidc2 to LMS installed and running. Here they are:
    Code:
        sudo apt-get update 
        sudo apt-get upgrade
        sudo apt-get install fakeroot
        sudo apt-get install yasm
        sudo apt-get install debhelper quilt libz-dev libgd-dev
        sudo apt-get install libmodule-build-perl
        sudo apt-get install libio-socket-ssl-perl
        sudo apt-get install libmodule-install-perl
        git clone --recursive -b public/7.9 https://github.com/Uplink03/logitechmediaserver-deb.git
        cd logitechmediaserver-deb/source/vendor/
        git pull https://github.com/Logitech/slimserver-vendor.git
        cd ../server/
        git pull https://github.com/Logitech/slimserver.git
        cd ../platforms/
        git pull https://github.com/Logitech/slimserver-platforms.git
        cd ../vendor/
        wget http://forums.slimdevices.com/attachment.php?attachmentid=23873&d=1508605856 slimserver-vendor.patch
        mv attachment.php\?attachmentid\=23873 slimserver-vendor.patch
        patch -p2 < slimserver-vendor.patch 
        rm slimserver-vendor.patch 
        cd ../..
        dpkg-buildpackage -rfakeroot -b -us -uc
        cd
        ls -l *.deb
        sudo dpkg -i logi*.deb
        sudo /etc/init.d/logitechmediaserver start
        systemctl status logitechmediaserver.service
    However, you may want the specially-patched versions of the helper binaries for flac, sox and faad as well.
    Code:
       cd ./logitechmediaserver-deb/source/vendor/flac/
       ./buildme-linux.sh    
       tar xvf flac-build-aarch64-.tgz --strip-components=7
       sudo cp ./bin/flac /usr/share/squeezeboxserver/Bin
       cd ../sox
       ./buildme-linux.sh    
       tar xvf sox-build-aarch64-.tgz --strip-components=7
       sudo cp ./bin/sox /usr/share/squeezeboxserver/Bin/
       cd ../alac_decoder
       make
       sudo cp ./alac /usr/share/squeezeboxserver/Bin/
       cd ../faad2
       git clone https://github.com/ralph-irving/faad2.git
       cd faad2/
       cp `dpkg -L automake | grep guess` .
       ./configure    
       make
       cd frontend/
       sudo cp ./faad /usr/share/squeezeboxserver/Bin/
       cd ../../../wavpack
       sed -i '/cd wavpack-4.50.1/a cp `dpkg -L automake | grep guess` .' build.sh 
       ./build.sh 
       sudo cp ./wvunpack /usr/share/squeezeboxserver/Bin/
    Hopefully this helps someone.

    Charles.
    Last edited by dsdreamer; 2017-10-22 at 22:17. Reason: up 3 and down 1 to get to wavpack.
    ----------------------
    "Dreamer, easy in the chair that really fits you..."

  10. #10
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,779

    Building LMS for 64-bit Debian running onARM Single Board Computers

    Thanks for these notes! At some point I might get around to finally
    build support for this platform...

    But may I ask why you go all the way as to build a .deb file? Why not
    just run from the source?

    --

    Michael

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •