-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_pi2.sh
executable file
·34 lines (29 loc) · 968 Bytes
/
run_pi2.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
31
32
33
34
#!/bin/bash
# Start container and start process inside container.
# Specific for SWUpdate running of Raspberry Pi 2B.
set -e
OUTPUT_DIR=/buildroot_output
BUILDROOT_DIR=/root/buildroot
# At least on macOS, exposing the full OUTPUT_DIR to the host, seems to impact
# negatively the speed of the builds and frequent errors building libraries.
# That's why we just expose images and target
DOCKER_RUN="docker run
--rm
-ti
--volumes-from br_output_PiSWU_Pi2
-v $(pwd)/.ssh:/root/.ssh
-v $(pwd)/externals:$BUILDROOT_DIR/externals
-v $(pwd)/rootfs_overlay:$BUILDROOT_DIR/rootfs_overlay
-v $(pwd)/images/pi_swupdate/pi2:$OUTPUT_DIR/images
-v $(pwd)/target/pi_swupdate/pi2:$OUTPUT_DIR/target
-v $(pwd)/graphs/pi_swupdate/pi2:$OUTPUT_DIR/graphs
advancedclimatesystems/buildroot"
make() {
echo "make O=$OUTPUT_DIR"
}
echo $DOCKER_RUN
if [ "$1" == "make" ]; then
eval $DOCKER_RUN $(make) ${@:2}
else
eval $DOCKER_RUN $@
fi