mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-01 00:47:23 +00:00
Update Travis CI files to account for new build dependencies
* Add Fedora 28 and Ubuntu 18.04 Dockerfile * Add new build dependencies (for the ACRN tools) * Change default Fedora version to 28 Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
This commit is contained in:
committed by
lijinxia
parent
f4122d99c5
commit
c396c5361c
20
.travis-dockerfiles/Dockerfile.centos7
Normal file
20
.travis-dockerfiles/Dockerfile.centos7
Normal file
@@ -0,0 +1,20 @@
|
||||
# Build container based on CentOS 7
|
||||
FROM centos:centos7
|
||||
|
||||
RUN yum -y update; yum clean all
|
||||
RUN yum -y install gcc \
|
||||
git \
|
||||
make \
|
||||
vim \
|
||||
libuuid-devel \
|
||||
openssl-devel \
|
||||
libpciaccess-devel \
|
||||
gnu-efi-devel \
|
||||
systemd-devel \
|
||||
libxml2-devel \
|
||||
libevent-devel \
|
||||
libusbx-devel
|
||||
|
||||
WORKDIR /root/acrn
|
||||
|
||||
CMD ["/bin/bash"]
|
11
.travis-dockerfiles/Dockerfile.clearlinux
Normal file
11
.travis-dockerfiles/Dockerfile.clearlinux
Normal file
@@ -0,0 +1,11 @@
|
||||
# Build container based on Clearlinux
|
||||
FROM clearlinux:base
|
||||
|
||||
RUN swupd bundle-add os-clr-on-clr
|
||||
|
||||
RUN mkdir -p /usr/local/bin
|
||||
RUN git config --global http.sslVerify false
|
||||
|
||||
WORKDIR /root/acrn
|
||||
|
||||
CMD ["/bin/bash"]
|
19
.travis-dockerfiles/Dockerfile.debian8
Normal file
19
.travis-dockerfiles/Dockerfile.debian8
Normal file
@@ -0,0 +1,19 @@
|
||||
# Build container based on Debian 8
|
||||
FROM debian:8
|
||||
|
||||
# Install dependencies.
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y gcc make vim git \
|
||||
gnu-efi \
|
||||
libssl-dev \
|
||||
libpciaccess-dev \
|
||||
uuid-dev \
|
||||
libsystemd-dev \
|
||||
libevent-dev \
|
||||
libxml2-dev \
|
||||
libusb-1.0-0-dev \
|
||||
&& apt-get clean
|
||||
|
||||
WORKDIR /root/acrn
|
||||
|
||||
CMD ["/bin/bash"]
|
20
.travis-dockerfiles/Dockerfile.fedora26
Normal file
20
.travis-dockerfiles/Dockerfile.fedora26
Normal file
@@ -0,0 +1,20 @@
|
||||
# Build container based on Fedora 26
|
||||
FROM fedora:26
|
||||
|
||||
RUN dnf -y update && dnf clean all
|
||||
RUN dnf -y install gcc \
|
||||
git \
|
||||
make \
|
||||
vim \
|
||||
libuuid-devel \
|
||||
openssl-devel \
|
||||
libpciaccess-devel \
|
||||
gnu-efi-devel \
|
||||
systemd-devel \
|
||||
libxml2-devel \
|
||||
libevent-devel \
|
||||
libusbx-devel
|
||||
|
||||
WORKDIR /root/acrn
|
||||
|
||||
CMD ["/bin/bash"]
|
20
.travis-dockerfiles/Dockerfile.fedora27
Normal file
20
.travis-dockerfiles/Dockerfile.fedora27
Normal file
@@ -0,0 +1,20 @@
|
||||
# Build container based on Fedora 27
|
||||
FROM fedora:27
|
||||
|
||||
RUN dnf -y update && dnf clean all
|
||||
RUN dnf -y install gcc \
|
||||
git \
|
||||
make \
|
||||
vim \
|
||||
libuuid-devel \
|
||||
openssl-devel \
|
||||
libpciaccess-devel \
|
||||
gnu-efi-devel \
|
||||
systemd-devel \
|
||||
libxml2-devel \
|
||||
libevent-devel \
|
||||
libusbx-devel
|
||||
|
||||
WORKDIR /root/acrn
|
||||
|
||||
CMD ["/bin/bash"]
|
20
.travis-dockerfiles/Dockerfile.fedora28
Normal file
20
.travis-dockerfiles/Dockerfile.fedora28
Normal file
@@ -0,0 +1,20 @@
|
||||
# Build container based on Fedora 28
|
||||
FROM fedora:28
|
||||
|
||||
RUN dnf -y update && dnf clean all
|
||||
RUN dnf -y install gcc \
|
||||
git \
|
||||
make \
|
||||
vim \
|
||||
libuuid-devel \
|
||||
openssl-devel \
|
||||
libpciaccess-devel \
|
||||
gnu-efi-devel \
|
||||
systemd-devel \
|
||||
libxml2-devel \
|
||||
libevent-devel \
|
||||
libusbx-devel
|
||||
|
||||
WORKDIR /root/acrn
|
||||
|
||||
CMD ["/bin/bash"]
|
19
.travis-dockerfiles/Dockerfile.ubuntu14.04
Normal file
19
.travis-dockerfiles/Dockerfile.ubuntu14.04
Normal file
@@ -0,0 +1,19 @@
|
||||
# Build container based on Ubuntu 14.04
|
||||
FROM ubuntu:14.04
|
||||
|
||||
# Install dependencies.
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y gcc make vim git \
|
||||
gnu-efi \
|
||||
libssl-dev \
|
||||
libpciaccess-dev \
|
||||
uuid-dev \
|
||||
libsystemd-journal-dev \
|
||||
libevent-dev \
|
||||
libxml2-dev \
|
||||
libusb-1.0-0-dev \
|
||||
&& apt-get clean
|
||||
|
||||
WORKDIR /root/acrn
|
||||
|
||||
CMD ["/bin/bash"]
|
19
.travis-dockerfiles/Dockerfile.ubuntu16.04
Normal file
19
.travis-dockerfiles/Dockerfile.ubuntu16.04
Normal file
@@ -0,0 +1,19 @@
|
||||
# Build container based on Ubuntu 16.04
|
||||
FROM ubuntu:16.04
|
||||
|
||||
# Install dependencies.
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y gcc make vim git \
|
||||
gnu-efi \
|
||||
libssl-dev \
|
||||
libpciaccess-dev \
|
||||
uuid-dev \
|
||||
libsystemd-dev \
|
||||
libevent-dev \
|
||||
libxml2-dev \
|
||||
libusb-1.0-0-dev \
|
||||
&& apt-get clean
|
||||
|
||||
WORKDIR /root/acrn
|
||||
|
||||
CMD ["/bin/bash"]
|
19
.travis-dockerfiles/Dockerfile.ubuntu18.04
Normal file
19
.travis-dockerfiles/Dockerfile.ubuntu18.04
Normal file
@@ -0,0 +1,19 @@
|
||||
# Build container based on Ubuntu 18.04
|
||||
FROM ubuntu:18.04
|
||||
|
||||
# Install dependencies.
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y gcc make vim git \
|
||||
gnu-efi \
|
||||
libssl-dev \
|
||||
libpciaccess-dev \
|
||||
uuid-dev \
|
||||
libsystemd-dev \
|
||||
libevent-dev \
|
||||
libxml2-dev \
|
||||
libusb-1.0-0-dev \
|
||||
&& apt-get clean
|
||||
|
||||
WORKDIR /root/acrn
|
||||
|
||||
CMD ["/bin/bash"]
|
80
.travis-dockerfiles/README.md
Normal file
80
.travis-dockerfiles/README.md
Normal file
@@ -0,0 +1,80 @@
|
||||
# Build containers for Project ACRN
|
||||
|
||||
## Introduction
|
||||
|
||||
This folder contains a number of Dockerfile that include
|
||||
all the build tools and dependencies to build the ACRN Project
|
||||
components, i.e. the `acrn-hypervisor` and `acrn-devicemodel`
|
||||
|
||||
The workflow is pretty simple and can be summarized in these few steps:
|
||||
|
||||
1. Build the *build containers* based on your preferred OS
|
||||
1. Clone the Project ACRN repositories
|
||||
1. Start the build container and give it the repositories
|
||||
1. Build the Project ACRN components
|
||||
|
||||
The pre-requisite is that you have Docker installed on your machine.
|
||||
Explaining how to install it on your system is beyond the scope of this
|
||||
document, please visit https://www.docker.com for detailed instructions.
|
||||
|
||||
## Build the *build containers*
|
||||
|
||||
Each `Dockerfile` in this repo has an extension that tells what Linux
|
||||
distribution it is based on. To build a container using any of those,
|
||||
use this command:
|
||||
```
|
||||
$ sudo docker build -t <container-name> -f Dockerfile.<baseos> .
|
||||
```
|
||||
|
||||
As an example, to build a container based on CentOS 7, do:
|
||||
```
|
||||
$ sudo docker build -t centos7 -f Dockerfile.centos7 .
|
||||
```
|
||||
|
||||
## Clone Project ACRN
|
||||
|
||||
Follow these simple steps to clone the Project ACRN repositories
|
||||
```
|
||||
$ mkdir ~/acrn
|
||||
$ cd ~/acrn
|
||||
$ git clone https://github.com/projectacrn/acrn-hypervisor
|
||||
$ git clone https://github.com/projectacrn/acrn-devicemodel
|
||||
```
|
||||
|
||||
## Start the build container
|
||||
|
||||
Use this `~/acrn` folder and pass it on to your build container:
|
||||
```
|
||||
$ cd ~/acrn
|
||||
$ sudo docker run -ti -v $PWD:/root/acrn <container-name>
|
||||
```
|
||||
|
||||
Using CentOS 7 again as an example, that gives us:
|
||||
```
|
||||
$ cd ~/acrn
|
||||
$ sudo docker run -ti -v $PWD:/root/acrn centos7
|
||||
```
|
||||
|
||||
**Note:** if you encounter permission issues within the container (as it
|
||||
happens on a Fedora 27 host), try adding the `:z` parameter to the mount option.
|
||||
This will unlock the permission restriction (that comes from SElinux). Your
|
||||
command-line would then be:
|
||||
```
|
||||
$ cd ~/acrn
|
||||
$ sudo docker run -ti -v $PWD:/root/acrn:z centos7
|
||||
```
|
||||
|
||||
## Build the ACRN components
|
||||
|
||||
The steps above place you inside the container and give you access to
|
||||
the Project ACRN repositories you cloned earlier. You can now build any
|
||||
of the components. Here is an example:
|
||||
```
|
||||
# cd acrn-hypervisor
|
||||
# make PLATFORM=uefi RELEASE=1
|
||||
```
|
||||
|
||||
You can do this for all build combinations and also try to build the `acrn-devicemodel`.
|
||||
All the build dependencies and tools are pre-installed in the container as well as a
|
||||
couple of useful tools (`git` and `vim`) so you can directly edit files to experiment
|
||||
from within the container.
|
Reference in New Issue
Block a user