Skip to content

Commit 4117f99

Browse files
committed
Update to buildroot 2017.02.2, add a few more comments (and experimental arm64 support)
1 parent f2c0b9f commit 4117f99

File tree

1 file changed

+29
-20
lines changed

1 file changed

+29
-20
lines changed

uclibc/Dockerfile.builder

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,22 @@ RUN apt-get update && apt-get install -y \
2727
# sub 2048g/45428075 2009-01-15
2828
RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys AB07D806D2CE741FB886EE50B025BA8B59C36319
2929

30-
ENV BUILDROOT_VERSION 2015.11.1
30+
# https://buildroot.uclibc.org/download.html
31+
# https://buildroot.uclibc.org/downloads/?C=M;O=D
32+
ENV BUILDROOT_VERSION 2017.02.2
3133

32-
RUN set -x \
33-
&& mkdir -p /usr/src/buildroot \
34-
&& cd /usr/src/buildroot \
35-
&& curl -fsSL "http://buildroot.uclibc.org/downloads/buildroot-${BUILDROOT_VERSION}.tar.bz2" -o buildroot.tar.bz2 \
36-
&& curl -fsSL "http://buildroot.uclibc.org/downloads/buildroot-${BUILDROOT_VERSION}.tar.bz2.sign" -o buildroot.tar.bz2.sign \
37-
&& gpg --verify buildroot.tar.bz2.sign \
38-
&& tar -xf buildroot.tar.bz2 --strip-components 1 \
39-
&& rm buildroot.tar.bz2*
34+
RUN set -ex; \
35+
tarball="buildroot-${BUILDROOT_VERSION}.tar.bz2"; \
36+
curl -fsSL -o buildroot.tar.bz2 "http://buildroot.uclibc.org/downloads/$tarball"; \
37+
curl -fsSL -o buildroot.tar.bz2.sign "http://buildroot.uclibc.org/downloads/$tarball.sign"; \
38+
gpg --batch --decrypt --output buildroot.tar.bz2.txt buildroot.tar.bz2.sign; \
39+
cat buildroot.tar.bz2.txt; \
40+
awk '$1 == "SHA1:" && $2 ~ /^[0-9a-f]+$/ && $3 == "'"$tarball"'" { print $2, "*buildroot.tar.bz2" }' buildroot.tar.bz2.txt > buildroot.tar.bz2.sha1; \
41+
test -s buildroot.tar.bz2.sha1; \
42+
sha1sum -c buildroot.tar.bz2.sha1; \
43+
mkdir -p /usr/src/buildroot; \
44+
tar -xf buildroot.tar.bz2 -C /usr/src/buildroot --strip-components 1; \
45+
rm buildroot.tar.bz2*
4046

4147
RUN set -ex; \
4248
\
@@ -53,14 +59,26 @@ RUN set -ex; \
5359
BR2_SHARED_LIBS \
5460
'; \
5561
\
62+
# buildroot arches: https://git.busybox.net/buildroot/tree/arch
63+
# buildroot+uclibc arches: https://git.busybox.net/buildroot/tree/toolchain/toolchain-buildroot/Config.in (config BR2_TOOLCHAIN_BUILDROOT_UCLIBC)
5664
dpkgArch="$(dpkg --print-architecture)"; \
5765
case "$dpkgArch" in \
5866
amd64) \
59-
setConfs="$setConfs BR2_x86_64=y"; \
67+
setConfs="$setConfs \
68+
BR2_x86_64=y \
69+
"; \
70+
unsetConfs="$unsetConfs BR2_i386"; \
71+
;; \
72+
arm64) \
73+
setConfs="$setConfs \
74+
BR2_aarch64=y \
75+
"; \
6076
unsetConfs="$unsetConfs BR2_i386"; \
6177
;; \
6278
i386) \
63-
setConfs="$setConfs BR2_i386=y"; \
79+
setConfs="$setConfs \
80+
BR2_i386=y \
81+
"; \
6482
;; \
6583
*) \
6684
echo >&2 "error: unsupported architecture '$dpkgArch'!"; \
@@ -97,15 +115,6 @@ RUN set -ex; \
97115
grep -q "^$confV\$" .config; \
98116
done;
99117

100-
ENV UCLIBC_NG_VERSION 1.0.13
101-
ENV UCLIBC_NG_SHA256 7baae61e243da3ab85e219fead68406995be5eabf889001c0d41676546b19317
102-
103-
RUN set -xe \
104-
&& cd /usr/src/buildroot \
105-
&& sed -i 's!^BR2_UCLIBC_VERSION_STRING=.*!BR2_UCLIBC_VERSION_STRING="'"$UCLIBC_NG_VERSION"'"!' .config \
106-
&& grep -q '^BR2_UCLIBC_VERSION_STRING="'"$UCLIBC_NG_VERSION"'"$' .config \
107-
&& echo "sha256 $UCLIBC_NG_SHA256 uClibc-ng-${UCLIBC_NG_VERSION}.tar.xz" > package/uclibc/uclibc.hash
108-
109118
# http://www.finnie.org/2014/02/13/compiling-busybox-with-uclibc/
110119
RUN set -ex; \
111120
# force a particular GNU arch for "host-gmp" (otherwise it fails on some arches)

0 commit comments

Comments
 (0)