Skip to content

Commit

Permalink
dockerfiles: Add container for DT validation
Browse files Browse the repository at this point in the history
The kernel has started moving devicetree schemas to a format which
allows for automatic validation.  This requires a separate build target
and a toolset (currently not packaged for any distro) so create a new
docker container with the toolset installed that we can use to run these
tests.

Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
broonie authored and gctucker committed May 22, 2020
1 parent 5c66564 commit 18ed548
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
16 changes: 15 additions & 1 deletion jenkins/dockerfiles/build-and-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,22 @@
# -p = push to dockerhub
# -b = also rebuild build-base
# -d = also rebuild debos
# -i = also rebuild dt-validation
# -q = make the builds quiet
# -t = the prefix to use in docker tags (default is kernelci/)

set -e
tag_px='kernelci/'

options='npbdqt:'
options='npbdiqt:'
while getopts $options option
do
case $option in
n ) cache_args="--no-cache";;
p ) push=true;;
b ) base=true;;
d ) debos=true;;
i ) dt_validation=true;;
q ) quiet="--quiet";;
t ) tag_px=$OPTARG;;
\? )
Expand Down Expand Up @@ -95,3 +97,15 @@ then
docker push $tag
fi
fi

if [ "x${dt_validation}" == "xtrue" ]
then
tag=${tag_px}dt-validation
echo_build $tag
docker build ${quiet} ${cache_args} dt-validation -t $tag
if [ "x${push}" == "xtrue" ]
then
echo_push $tag
docker push $tag
fi
fi
12 changes: 12 additions & 0 deletions jenkins/dockerfiles/dt-validation/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM kernelci/build-base

RUN apt-get update && apt-get install --no-install-recommends -y \
gcc-8 \
gcc-8-plugin-dev \
python3-pip \
python3-setuptools \
python3-wheel

RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 500

RUN pip3 install git+https://github.com/devicetree-org/dt-schema.git@master

0 comments on commit 18ed548

Please sign in to comment.