Created
September 2, 2020 16:27
-
-
Save Michcioperz/99b40b861b158e2cbff507288d804c6b to your computer and use it in GitHub Desktop.
librespot for openwrt netgear r6220
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:buster | |
RUN dpkg --add-architecture mipsel && apt-get update && apt-get install -y wget xz-utils | |
RUN wget https://downloads.openwrt.org/releases/19.07.2/targets/ramips/mt7621/openwrt-sdk-19.07.2-ramips-mt7621_gcc-7.5.0_musl.Linux-x86_64.tar.xz && tar xf openwrt-sdk-*.tar.* && rm openwrt-sdk-*.tar.* | |
ENV STAGING_DIR=/openwrt-sdk-19.07.2-ramips-mt7621_gcc-7.5.0_musl.Linux-x86_64/staging_dir | |
ENV PATH=/openwrt-sdk-19.07.2-ramips-mt7621_gcc-7.5.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-7.5.0_musl/bin:/root/.cargo/bin:$PATH:/usr/bin:/bin:/usr/sbin:/sbin | |
RUN wget https://sh.rustup.rs -O rustup-init && chmod +x rustup-init && ./rustup-init --profile minimal -y | |
RUN rustup target add mipsel-unknown-linux-musl | |
RUN apt-get install git --no-install-recommends -y | |
RUN git clone https://github.com/librespot-org/librespot | |
WORKDIR librespot | |
RUN cargo fetch --target mipsel-unknown-linux-musl --locked | |
RUN mkdir .cargo && echo '[target.mipsel-unknown-linux-musl]\nlinker = "mipsel-openwrt-linux-gcc"' > .cargo/config | |
RUN apt-get install build-essential -y --no-install-recommends | |
RUN echo '\n[profile.release]\nlto = "thin"\ndebug = 0\npanic = "abort"\nincremental = false\ncodegen-units = 1\nopt-level = "s"' >> Cargo.toml | |
RUN cargo build --release --target mipsel-unknown-linux-musl --locked --no-default-features | |
RUN mipsel-openwrt-linux-strip target/mipsel-unknown-linux-musl/release/librespot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
opkg update | |
opkg install kmod-usb-core kmod-usb-audio kmod-sound-core alsa-utils | |
amixer sset Speaker 100% | |
/tmp/librespot --name Router --backend pipe --disable-audio-cache | aplay -f cd - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I tried the commands you pasted in here, but when running "cargo build ..." I get "error: failed to run custom build command for
ring v0.16.20
" -- any ideas how to fix this? I couldn't find anything meaningful on Google. I am running Ubuntu 20.04.5 LTS.