-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sh
executable file
·30 lines (26 loc) · 1.04 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
set -xe
BUILDROOT_VERSION="2019.08.3"
# Use the first argument as config name
# Default to "norns_defconfig" if no argument given
CONFIG=${1:-norns_defconfig}
# Make sure the Docker image is up to date
docker pull "simonvanderveldt/buildroot:${BUILDROOT_VERSION}"
# Run the build
docker run --rm -ti \
-v "${HOME}/.cache/buildroot-downloads":/buildroot/dl \
-v "${HOME}/.cache/buildroot-ccache":/root/.buildroot-ccache \
-v "${PWD}":/mycustombuildroot \
-v "${PWD}/output/images":/buildroot/output/images \
-v "${PWD}/output/graphs":/buildroot/output/graphs \
-e BR2_EXTERNAL=/mycustombuildroot \
-e BR2_GRAPH_OUT=png \
"simonvanderveldt/buildroot:${BUILDROOT_VERSION}" \
sh -c "make ${CONFIG} \
&& make \
&& BR2_GRAPH_DEPS_OPTS='--exclude host' make graph-depends \
&& mv output/graphs/graph-depends.dot output/graphs/graph-depends-target.dot \
&& mv output/graphs/graph-depends.png output/graphs/graph-depends-target.png \
&& make graph-depends \
&& make graph-build \
&& make graph-size"