diff options
author | Jonas Bjurel <jonas.bjurel@ericsson.com> | 2016-02-04 22:18:31 +0100 |
---|---|---|
committer | Jonas Bjurel <jonas.bjurel@ericsson.com> | 2016-02-04 22:15:36 +0000 |
commit | 8f9613b11ce6828670e23dfcc9c46107fdffd92f (patch) | |
tree | 7b4343a89e2b483341f05ad7723c49b0502941c1 /build/Makefile | |
parent | f030a4a75714e11dceb9d8ed20295e323f47d8e8 (diff) |
Added environment sanity checks for build.
Based on a discussion I and Stefan had today, better to check early on than
crash hours in to the build with vague information of the root-cause.
Added checks:
- Linus distro - must be Ubuntu
- Kernel version - must be 3.19 or later
- Docker network sanity check
Change-Id: Ie6758064ade4c58388368106d9bc556730d2bcec
Signed-off-by: Jonas Bjurel <jonas.bjurel@ericsson.com>
Diffstat (limited to 'build/Makefile')
-rw-r--r-- | build/Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/build/Makefile b/build/Makefile index ab60f005f..bc6a9418c 100644 --- a/build/Makefile +++ b/build/Makefile @@ -80,6 +80,12 @@ SUBCLEAN = $(addsuffix .clean,$(SUBDIRS)) all: @docker version >/dev/null 2>&1 || (echo 'No Docker installation available'; exit 1) @make -C docker + @lsb_release -a | grep Ubuntu > /dev/null 2>&1 || (echo 'Ubuntu is the only supported Linux distribution for this build system'; exit 1) + @KERNEL_VER=$$(uname -r); \ + KERNEL_VER="$${KERNEL_VER%.*-*}"; \ + KERNEL_VER="$${KERNEL_VER//.}"; \ + [ $$KERNEL_VER -ge 319 ] || (echo 'Kernel version must be 3.19 or newer'; exit 1) + @docker/runcontext $(DOCKERIMG) ping -c 1 www.google.com > /dev/null 2>&1 || (echo 'No docker network connectivity or name server - check your network- and docker settings'; exit 1) @docker/runcontext $(DOCKERIMG) $(MAKE) $(MAKEFLAGS) iso |