build-unit-test-docker: Add linux-headers
Many of our packages like phosphor-networkd require linux kernel
headers to be present on the system. Install these headers so that
the build environment doesn't have to download a copy.
Tested:
phosphor-networkd no longer downloads linux/ncsi.h
Change-Id: If96ccb40c8c2ae5f7a11f2a49103c832d61a8938
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/build-unit-test-docker.sh b/build-unit-test-docker.sh
index fc764f4..7cfa2e5 100755
--- a/build-unit-test-docker.sh
+++ b/build-unit-test-docker.sh
@@ -97,6 +97,8 @@
[json]=v3.3.0
# Snapshot from 2019-01-11
[lcov]=04335632c371b5066e722298c9f8c6f11b210201
+ # dev-5.0 2019-03-26
+ [linux-headers]=c8733f5abd0656acfef17d462e72ef105db9924d
# libvncserver commit dd873fce451e4b7d7cc69056a62e107aae7c8e7a is required for obmc-ikvm
# Snapshot from 2018-10-08
[libvncserver]=7b1ef0ffc4815cab9a96c7278394152bdc89dc4d
@@ -161,6 +163,8 @@
libc6-dbg \
libc6-dev \
libtool \
+ bison \
+ flex \
cmake \
python \
python-dev \
@@ -247,6 +251,12 @@
RUN mkdir ${PREFIX}/include/nlohmann/ && \
curl -L -o ${PREFIX}/include/nlohmann/json.hpp https://github.com/nlohmann/json/releases/download/${PKG_REV['json']}/json.hpp
+FROM openbmc-base as openbmc-linux-headers
+RUN curl -L https://github.com/openbmc/linux/archive/${PKG_REV['linux-headers']}.tar.gz | tar -xz && \
+cd linux-* && \
+make -j$(nproc) defconfig && \
+make INSTALL_HDR_PATH=/usr/local headers_install
+
FROM openbmc-base as openbmc-boost
RUN curl -L https://dl.bintray.com/boostorg/release/${PKG_REV['boost']}/source/boost_$(echo "${PKG_REV['boost']}" | tr '.' '_').tar.bz2 | tar -xj && \
cd boost_*/ && \