* Docker container for ELISA
@ 2020-09-15 23:03 Mohammed Billoo
0 siblings, 0 replies; only message in thread
From: Mohammed Billoo @ 2020-09-15 23:03 UTC (permalink / raw)
To: linux-safety
[-- Attachment #1: Type: text/plain, Size: 1608 bytes --]
All,
Attached are the files needed to build a Docker container to support
the following tested operations against the latest-ish master (I need
to test it against Shuah's branch):
- checkpatch
- coccicheck
- sparse
- make menuconfig
- make (against the default x86 config)
To build the container, download the attached files to a location on
your local machine and run:
docker build -t elisa-kernel-builder . (the dot at the end is important)
Then checkout Shuah's kernel to your local machine, cd to that
directory, and do the following:
$> docker run --rm -it -v $PWD:/opt/elisa/kernel -w /opt/elisa/kernel
elisa-kernel-builder <command>
where <command> can be any of the available commands to operate on the
kernel. For example, if I wanted to configure my checkout using the
docker container, I would do:
$> docker run --rm -it -v $PWD:/opt/elisa/kernel -w /opt/elisa/kernel
elisa-kernel-builder make menuconfig
To pass environment variables specify "-e VARNAME=VARVAL". For
example, if I wanted to run just my cocci script:
$> docker run --rm -it -v $PWD:/opt/elisa/kernel -w /opt/elisa/kernel
-e COCCI=scripts/coccinelle/misc/magic_numbers.cocci
elisa-kernel-builder make coccicheck MODE=report
Please continue to hammer away and test the container with other
workflows and find bugs/issues, since I banged this out in a few hours
and didn't thoroughly test this (I wanted to get this out before I
leave for the day).
We still need to figure out how to source control this.
--
Mohammed A Billoo
Founder
MAB Labs, LLC
www.mab-labs.com
201-338-2022
[-- Attachment #2: Dockerfile --]
[-- Type: application/octet-stream, Size: 1584 bytes --]
FROM ubuntu:18.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
apt-utils \
automake \
autoconf \
bc \
bison \
build-essential \
ca-certificates \
clang-7 \
curl \
flex \
git \
gperf \
lcov \
llvm \
libelf-dev \
libgtk-3-dev \
libncurses-dev \
libssl-dev \
libsqlite3-dev \
libtool \
libusb-1.0-0-dev \
libxml2-dev \
m4 \
make \
ninja-build \
ocaml \
perl \
python3 \
python3-pip \
sqlite3 \
unzip \
wget \
xz-utils \
zip \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& update-alternatives --install /usr/bin/python python /usr/bin/python3 10
RUN python -m pip install --upgrade pip virtualenv
# To build the image for a branch or a tag of IDF, pass --build-arg IDF_CLONE_BRANCH_OR_TAG=name.
# To build the image with a specific commit ID of IDF, pass --build-arg IDF_CHECKOUT_REF=commit-id.
# It is possibe to combine both, e.g.:
# IDF_CLONE_BRANCH_OR_TAG=release/vX.Y
# IDF_CHECKOUT_REF=<some commit on release/vX.Y branch>.
RUN git clone https://git.kernel.org/pub/scm/devel/sparse/sparse.git /opt/elisa/sparse && cd /opt/elisa/sparse && make && make install PREFIX=/usr
RUN git clone https://github.com/coccinelle/coccinelle.git /opt/elisa/coccinelle && cd /opt/elisa/coccinelle && ./autogen && ./configure && make && make install
COPY entrypoint.sh /opt/elisa/entrypoint.sh
RUN chmod +x /opt/elisa/entrypoint.sh
ENTRYPOINT [ "/opt/elisa/entrypoint.sh" ]
CMD [ "/bin/bash" ]
[-- Attachment #3: entrypoint.sh --]
[-- Type: application/x-shellscript, Size: 48 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-15 23:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-15 23:03 Docker container for ELISA Mohammed Billoo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).