Giter Site home page Giter Site logo

snapcast-pi's Introduction

DEPRECATED IN FAVOR OF https://github.com/badaix/snapos/

snapcast-pi

This project uses buildroot to build snapcast for the raspberry pi. This example was tested with the raspberry pi zero, but has configurations for all raspberry pi models.

Build Environment

For convenience the build environment has been containerized using docker. To get started, simply install docker for your machine.

For more information on the docker image or to build it yourself see nickaknudson/buildroot-docker and nickaknudson/buildroot.

If you do not wish to use the provided docker container then you will need to install all of the buildroot dependencies yourself.

Building

Clone this repository and change directory:

git clone https://github.com/nickaknudson/snapcast-pi.git && cd snapcast-pi

Enter the build environment:

docker run -it -v $(pwd):/home/buildroot/snapcast-pi -w /home/buildroot/snapcast-pi nickaknudson/buildroot /bin/bash

(Use the following if using a SElinux-enabled host such as Fedora, RHEL, Scientific Linux, etc.:)

docker run -it -v $(pwd):/home/buildroot/snapcast-pi:Z -w /home/buildroot/snapcast-pi nickaknudson/buildroot /bin/bash

Clone buildroot:

BUILDROOT_VERSION=2016.11.2
git clone --branch $BUILDROOT_VERSION --depth=1 git://git.buildroot.net/buildroot ~/buildroot

Clone snapcast:

git clone --depth=1 https://github.com/badaix/snapcast.git ~/snapcast

Configure buildroot (this command is for raspberry pi zero, see buildroot-external/configs folder for other configurations):

make O=~/buildroot-output BR2_DL_DIR=~/buildroot-dl BR2_EXTERNAL=~/snapcast/buildroot:~/snapcast-pi/buildroot-external -C ~/buildroot snapcastpi0_defconfig

Use menuconfig to add additional packages (optional):

make O=~/buildroot-output BR2_DL_DIR=~/buildroot-dl BR2_EXTERNAL=~/snapcast/buildroot:~/snapcast-pi/buildroot-external -C ~/buildroot menuconfig

Build:

make O=~/buildroot-output BR2_DL_DIR=~/buildroot-dl BR2_EXTERNAL=~/snapcast/buildroot:~/snapcast-pi/buildroot-external -C ~/buildroot

Just build the snapcast binary:

make O=~/buildroot-output BR2_DL_DIR=~/buildroot-dl BR2_EXTERNAL=~/snapcast/buildroot:~/snapcast-pi/buildroot-external -C ~/buildroot package/snapcast

Flashing

Copy the build products from the container back to the host machine:

cp -R ~/buildroot-output/images .

Exit the build environment:

exit

Find your SD card:

df -h

Flash the SD card (where dev/sdX is from above):

dd bs=4M if=images/sdcard.img of=/dev/sdX

Tips

By design, docker will launch a new container every time you call docker run. But you can attach to old containers which will still contain all of the old build products.

First find the container that you want:

docker ps -a

Then start it if it is stopped:

docker start <container_id>

Then attach to it:

docker attach <container_id>

If you want to remove old containers to free up hard disk space:

docker containers prune

snapcast-pi's People

Contributors

axelsimon avatar nickaknudson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

snapcast-pi's Issues

does not have a name (in 'external.desc').

Hello,
i hope i could get some help here. when following your instructions on building for raspi0 in docker and i execute
make O=~/buildroot-output BR2_DL_DIR=~/buildroot-dl BR2_EXTERNAL=~/snapcast/buildroot:~/snapcast-pi/buildroot-external -C ~/buildroot snapcastpi0_defconfig
i get the following error:
make: Entering directory '/home/buildroot/buildroot' Makefile:190: *** '/home/buildroot/snapcast-pi/buildroot/': does not have a name (in 'external.desc'). See https://buildroot.org/manual.html#br2-external-converting. Stop. make: Leaving directory '/home/buildroot/buildroot
what might i be doing wrong?

edit: on a fresh install of ubuntu server 16.04, with docker and all building packages and libs installed that it complained about not being there.

buildroot-external: no such directory

Hi,
I thought I'd give your buildroot snapcast image a go, but I've hit a snag when running the make commands:

make: Entering directory '/home/buildroot/buildroot' Makefile:200: *** '/home/buildroot/snapcast-pi/buildroot-external': no such file or directory. Stop.
And indeed, from what I can see, /home/buildroot/snapcast-pi doesn't contain a directory called builroot-external. Any ideas?

Thanks!

Build ends in error

Hello again,
Unfortunately, the build command ends in an error.

If using BUILDROOT-VERSION=2017.08.1:

Copying files into the device: __populate_fs: Could not allocate block in ext2 filesystem while writing file "rfcomm.ko"
mkfs.ext4: Could not allocate block in ext2 filesystem while populating file system
*** Maybe you need to increase the filesystem size (BR2_TARGET_ROOTFS_EXT2_SIZE)
fs/ext2/ext2.mk:48: recipe for target '/home/buildroot/buildroot-output/images/rootfs.ext2' failed
make: *** [/home/buildroot/buildroot-output/images/rootfs.ext2] Error 1
make: Leaving directory '/home/buildroot/buildroot'

If using BUILDROOT-VERSION=2016.11.2:

*** ERROR: package host-binutils installs executables without proper RPATH:
***   /home/buildroot/buildroot-output/host/bin/xmlwf
***   /home/buildroot/buildroot-output/host/bin/mount
***   /home/buildroot/buildroot-output/host/bin/xmllint
***   /home/buildroot/buildroot-output/host/bin/xmlcatalog
***   /home/buildroot/buildroot-output/host/bin/msgcmp
***   /home/buildroot/buildroot-output/host/bin/msgfmt
***   /home/buildroot/buildroot-output/host/bin/msgmerge
***   /home/buildroot/buildroot-output/host/bin/msgunfmt
***   /home/buildroot/buildroot-output/host/bin/xgettext
***   /home/buildroot/buildroot-output/host/bin/msgattrib
***   /home/buildroot/buildroot-output/host/bin/msgcat
***   /home/buildroot/buildroot-output/host/bin/msgcomm
***   /home/buildroot/buildroot-output/host/bin/msgconv
***   /home/buildroot/buildroot-output/host/bin/msgen
***   /home/buildroot/buildroot-output/host/bin/msgexec
***   /home/buildroot/buildroot-output/host/bin/msgfilter
***   /home/buildroot/buildroot-output/host/bin/msggrep
***   /home/buildroot/buildroot-output/host/bin/msginit
***   /home/buildroot/buildroot-output/host/bin/msguniq
***   /home/buildroot/buildroot-output/host/bin/recode-sr-latin
***   /home/buildroot/buildroot-output/host/bin/tic
***   /home/buildroot/buildroot-output/host/bin/toe
***   /home/buildroot/buildroot-output/host/bin/infocmp
***   /home/buildroot/buildroot-output/host/bin/clear
***   /home/buildroot/buildroot-output/host/bin/tabs
***   /home/buildroot/buildroot-output/host/bin/tput
***   /home/buildroot/buildroot-output/host/bin/tset
***   /home/buildroot/buildroot-output/host/bin/umount
***   /home/buildroot/buildroot-output/host/bin/wdctl
***   /home/buildroot/buildroot-output/host/bin/mountpoint
***   /home/buildroot/buildroot-output/host/bin/lsblk
***   /home/buildroot/buildroot-output/host/bin/findmnt
***   /home/buildroot/buildroot-output/host/bin/column
***   /home/buildroot/buildroot-output/host/bin/lslogins
***   /home/buildroot/buildroot-output/host/bin/lsmem
***   /home/buildroot/buildroot-output/host/bin/lsipc
***   /home/buildroot/buildroot-output/host/bin/eject
***   /home/buildroot/buildroot-output/host/bin/prlimit
***   /home/buildroot/buildroot-output/host/bin/lsns
***   /home/buildroot/buildroot-output/host/bin/lscpu
***   /home/buildroot/buildroot-output/host/bin/lslocks
***   /home/buildroot/buildroot-output/host/bin/uuidgen
***   /home/buildroot/buildroot-output/host/bin/fincore
***   /home/buildroot/buildroot-output/host/bin/genimage
***   /home/buildroot/buildroot-output/host/bin/attr
***   /home/buildroot/buildroot-output/host/bin/setfattr
***   /home/buildroot/buildroot-output/host/bin/getfattr
***   /home/buildroot/buildroot-output/host/sbin/fstrim
***   /home/buildroot/buildroot-output/host/sbin/uuidd
***   /home/buildroot/buildroot-output/host/sbin/partx
***   /home/buildroot/buildroot-output/host/sbin/losetup
***   /home/buildroot/buildroot-output/host/sbin/zramctl
***   /home/buildroot/buildroot-output/host/sbin/swapon
***   /home/buildroot/buildroot-output/host/sbin/swapoff
***   /home/buildroot/buildroot-output/host/sbin/blkid
***   /home/buildroot/buildroot-output/host/sbin/findfs
***   /home/buildroot/buildroot-output/host/sbin/wipefs
***   /home/buildroot/buildroot-output/host/sbin/mkswap
***   /home/buildroot/buildroot-output/host/sbin/swaplabel
***   /home/buildroot/buildroot-output/host/sbin/fdisk
***   /home/buildroot/buildroot-output/host/sbin/sfdisk
***   /home/buildroot/buildroot-output/host/sbin/e2fsck
***   /home/buildroot/buildroot-output/host/sbin/debugfs
***   /home/buildroot/buildroot-output/host/sbin/mke2fs
***   /home/buildroot/buildroot-output/host/sbin/tune2fs
***   /home/buildroot/buildroot-output/host/sbin/dumpe2fs
***   /home/buildroot/buildroot-output/host/sbin/e2image
***   /home/buildroot/buildroot-output/host/sbin/fsck
***   /home/buildroot/buildroot-output/host/sbin/e4crypt
***   /home/buildroot/buildroot-output/host/usr/bin/xmlwf
***   /home/buildroot/buildroot-output/host/usr/bin/mount
***   /home/buildroot/buildroot-output/host/usr/bin/xmllint
***   /home/buildroot/buildroot-output/host/usr/bin/xmlcatalog
***   /home/buildroot/buildroot-output/host/usr/bin/msgcmp
***   /home/buildroot/buildroot-output/host/usr/bin/msgfmt
***   /home/buildroot/buildroot-output/host/usr/bin/msgmerge
***   /home/buildroot/buildroot-output/host/usr/bin/msgunfmt
***   /home/buildroot/buildroot-output/host/usr/bin/xgettext
***   /home/buildroot/buildroot-output/host/usr/bin/msgattrib
***   /home/buildroot/buildroot-output/host/usr/bin/msgcat
***   /home/buildroot/buildroot-output/host/usr/bin/msgcomm
***   /home/buildroot/buildroot-output/host/usr/bin/msgconv
***   /home/buildroot/buildroot-output/host/usr/bin/msgen
***   /home/buildroot/buildroot-output/host/usr/bin/msgexec
***   /home/buildroot/buildroot-output/host/usr/bin/msgfilter
***   /home/buildroot/buildroot-output/host/usr/bin/msggrep
***   /home/buildroot/buildroot-output/host/usr/bin/msginit
***   /home/buildroot/buildroot-output/host/usr/bin/msguniq
***   /home/buildroot/buildroot-output/host/usr/bin/recode-sr-latin
***   /home/buildroot/buildroot-output/host/usr/bin/tic
***   /home/buildroot/buildroot-output/host/usr/bin/toe
***   /home/buildroot/buildroot-output/host/usr/bin/infocmp
***   /home/buildroot/buildroot-output/host/usr/bin/clear
***   /home/buildroot/buildroot-output/host/usr/bin/tabs
***   /home/buildroot/buildroot-output/host/usr/bin/tput
***   /home/buildroot/buildroot-output/host/usr/bin/tset
***   /home/buildroot/buildroot-output/host/usr/bin/umount
***   /home/buildroot/buildroot-output/host/usr/bin/wdctl
***   /home/buildroot/buildroot-output/host/usr/bin/mountpoint
***   /home/buildroot/buildroot-output/host/usr/bin/lsblk
***   /home/buildroot/buildroot-output/host/usr/bin/findmnt
***   /home/buildroot/buildroot-output/host/usr/bin/column
***   /home/buildroot/buildroot-output/host/usr/bin/lslogins
***   /home/buildroot/buildroot-output/host/usr/bin/lsmem
***   /home/buildroot/buildroot-output/host/usr/bin/lsipc
***   /home/buildroot/buildroot-output/host/usr/bin/eject
***   /home/buildroot/buildroot-output/host/usr/bin/prlimit
***   /home/buildroot/buildroot-output/host/usr/bin/lsns
***   /home/buildroot/buildroot-output/host/usr/bin/lscpu
***   /home/buildroot/buildroot-output/host/usr/bin/lslocks
***   /home/buildroot/buildroot-output/host/usr/bin/uuidgen
***   /home/buildroot/buildroot-output/host/usr/bin/fincore
***   /home/buildroot/buildroot-output/host/usr/bin/genimage
***   /home/buildroot/buildroot-output/host/usr/bin/attr
***   /home/buildroot/buildroot-output/host/usr/bin/setfattr
***   /home/buildroot/buildroot-output/host/usr/bin/getfattr
***   /home/buildroot/buildroot-output/host/usr/sbin/fstrim
***   /home/buildroot/buildroot-output/host/usr/sbin/uuidd
***   /home/buildroot/buildroot-output/host/usr/sbin/partx
***   /home/buildroot/buildroot-output/host/usr/sbin/losetup
***   /home/buildroot/buildroot-output/host/usr/sbin/zramctl
***   /home/buildroot/buildroot-output/host/usr/sbin/swapon
***   /home/buildroot/buildroot-output/host/usr/sbin/swapoff
***   /home/buildroot/buildroot-output/host/usr/sbin/blkid
***   /home/buildroot/buildroot-output/host/usr/sbin/findfs
***   /home/buildroot/buildroot-output/host/usr/sbin/wipefs
***   /home/buildroot/buildroot-output/host/usr/sbin/mkswap
***   /home/buildroot/buildroot-output/host/usr/sbin/swaplabel
***   /home/buildroot/buildroot-output/host/usr/sbin/fdisk
***   /home/buildroot/buildroot-output/host/usr/sbin/sfdisk
***   /home/buildroot/buildroot-output/host/usr/sbin/e2fsck
***   /home/buildroot/buildroot-output/host/usr/sbin/debugfs
***   /home/buildroot/buildroot-output/host/usr/sbin/mke2fs
***   /home/buildroot/buildroot-output/host/usr/sbin/tune2fs
***   /home/buildroot/buildroot-output/host/usr/sbin/dumpe2fs
***   /home/buildroot/buildroot-output/host/usr/sbin/e2image
***   /home/buildroot/buildroot-output/host/usr/sbin/fsck
***   /home/buildroot/buildroot-output/host/usr/sbin/e4crypt
package/pkg-generic.mk:226: recipe for target '/home/buildroot/buildroot-output/build/host-binutils-2.26.1/.stamp_host_installed' failed
make: *** [/home/buildroot/buildroot-output/build/host-binutils-2.26.1/.stamp_host_installed] Error 1
make: Leaving directory '/home/buildroot/buildroot'

(rm -rf ~/buildroot && git clone --branch $BUILDROOT_VERSION --depth=1 git://git.buildroot.net/buildroot ~/buildroot between both attempts)

There are files in the buildroot-output/images directory, but no sdcard.img however:

buildroot@1b642947aba6:~/snapcast-pi$ ls -hAl ../buildroot-output/images/
total 58M
-rw-r--r--. 1 buildroot buildroot  14K Nov 16 14:18 bcm2708-rpi-b-plus.dtb
-rw-r--r--. 1 buildroot buildroot  60M Nov 16 14:22 rootfs.ext2
drwxr-xr-x. 2 buildroot buildroot   97 Nov 16 13:55 rpi-firmware
-rw-r--r--. 1 buildroot buildroot 4.0M Nov 16 14:18 zImage

standard_init_linux.go:190: exec user process caused "exec format error"

I am following the instructions on building snapcast on a raspberry pi from the README and getting the following error. What am I doing wrong? 👀

pi@raspberrypi:~/snapcast-pi $ docker run -it -v $(pwd):/home/buildroot/snapcast-pi -w /home/buildroot/snapcast-pi nickaknudson/buildroot /bin/bash
standard_init_linux.go:190: exec user process caused "exec format error"

Leaving these here incase it helps:

pi@raspberrypi:~/snapcast-pi $ uname -a
Linux raspberrypi 4.4.38+ #938 Thu Dec 15 15:17:54 GMT 2016 armv6l GNU/Linux

pi@raspberrypi:~/snapcast-pi $ docker info
Containers: 3
 Running: 0
 Paused: 0
 Stopped: 3
Images: 1
Server Version: 18.06.1-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 468a545b9edcd5932818eb9de8e72413e616e86e
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Kernel Version: 4.4.38+
Operating System: Raspbian GNU/Linux 8 (jessie)
OSType: linux
Architecture: armv6l
CPUs: 1
Total Memory: 434.7MiB
Name: raspberrypi
ID: SBSZ:DABD:CTMI:3JAS:I3W4:KCDS:HOJS:QIRE:HT2I:3LQB:3J6F:M6JA
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support
WARNING: No kernel memory limit support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support
WARNING: No cpuset support

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.