Skip to content

Commit bf0f846

Browse files
committed
Tweak armv6hf crossbuild script
Fix example typo in Dockerfile
1 parent c0a45d7 commit bf0f846

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

contrib/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# $ docker run -v /tmp/librespot-build:/build librespot-cross cargo build --release --no-default-features --features "alsa-backend"
1212
# $ docker run -v /tmp/librespot-build:/build librespot-cross cargo build --release --target arm-unknown-linux-gnueabihf --no-default-features --features "alsa-backend"
1313
# $ docker run -v /tmp/librespot-build:/build librespot-cross cargo build --release --target arm-unknown-linux-gnueabi --no-default-features --features "alsa-backend"
14-
# $ docker run -v /tmp/librespot-build:/build librespot-cross docker-build-pi-armv6hf.sh
14+
# $ docker run -v /tmp/librespot-build:/build contrib/librespot-cross docker-build-pi-armv6hf.sh
1515

1616
FROM debian:stretch
1717

contrib/docker-build-pi-armv6hf.sh

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
#!/usr/bin/env bash
22

33
# Snipped and tucked from https://github.com/plietar/librespot/pull/202/commits/21549641d39399cbaec0bc92b36c9951d1b87b90
4+
# and further inputs from https://github.com/kingosticks/librespot/commit/c55dd20bd6c7e44dd75ff33185cf50b2d3bd79c3
45

56
set -eux
7+
# Get alsa lib and headers
8+
ALSA_VER="1.0.25-4"
9+
DEPS=( \
10+
"http://mirrordirector.raspbian.org/raspbian/pool/main/a/alsa-lib/libasound2_${ALSA_VER}_armhf.deb" \
11+
"http://mirrordirector.raspbian.org/raspbian/pool/main/a/alsa-lib/libasound2-dev_${ALSA_VER}_armhf.deb" \
12+
)
13+
614
# Collect Paths
715
SYSROOT="/pi-tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/arm-bcm2708hardfp-linux-gnueabi/sysroot"
816
GCC="/pi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin"
@@ -18,16 +26,11 @@ export TARGET_CC="$GCC/arm-linux-gnueabihf-gcc"
1826
echo -e '#!/bin/bash' "\n$TARGET_CC --sysroot $SYSROOT \"\$@\"" > $GCC_SYSROOT
1927
chmod +x $GCC_SYSROOT
2028

21-
# get alsa lib and headers
22-
ALSA_VER="1.0.25-4"
23-
ALSA_LIB="libasound2_${ALSA_VER}_armhf.deb"
24-
ALSA_DEV_LIB="libasound2-dev_${ALSA_VER}_armhf.deb"
25-
26-
curl -OL "http://mirrordirector.raspbian.org/raspbian/pool/main/a/alsa-lib/$ALSA_LIB"
27-
dpkg -x $ALSA_LIB $SYSROOT
28-
curl -OL "http://mirrordirector.raspbian.org/raspbian/pool/main/a/alsa-lib/$ALSA_DEV_LIB"
29-
dpkg -x $ALSA_DEV_LIB $SYSROOT
30-
29+
# Add extra target dependencies to our rpi sysroot
30+
for path in "${DEPS[@]}"; do
31+
curl -OL $path
32+
dpkg -x $(basename $path) $SYSROOT
33+
done
3134

3235
# i don't why this is neccessary
3336
# ln -s ld-linux.so.3 $SYSROOT/lib/ld-linux-armhf.so.3

0 commit comments

Comments
 (0)