diff mbox

[stage1-xen,(RFC),10/10] BUILDING.md: Add Fedora instructions

Message ID 20170821071850.65172.70404.stgit@rajivs-macbook-pro.local (mailing list archive)
State New, archived
Headers show

Commit Message

Rajiv Ranganath Aug. 21, 2017, 7:18 a.m. UTC
---
 BUILDING.md |   35 ++++++++++++++++++++++++++++++-----
 1 file changed, 30 insertions(+), 5 deletions(-)

Comments

Stefano Stabellini Aug. 24, 2017, 12:42 a.m. UTC | #1
On Mon, 21 Aug 2017, Rajiv Ranganath wrote:
> ---
>  BUILDING.md |   35 ++++++++++++++++++++++++++++++-----
>  1 file changed, 30 insertions(+), 5 deletions(-)
> 
> diff --git a/BUILDING.md b/BUILDING.md
> index 3ef5311..b9ca404 100644
> --- a/BUILDING.md
> +++ b/BUILDING.md
> @@ -1,7 +1,13 @@
>  # Build
> -stage1-xen requires new Xen and QEMU versions at the time of writing. You are unlikely to find them already packaged with your distro. This document describes how to build and install the latest Xen and QEMU from scratch. In addition, given that CoreOS rkt is also missing from reasonably new distros such as Ubuntu Xenial Xerus, I added instructions on how to build that too. The document includes the dependencies needed for the build based on Ubuntu Xenial Xerus.
> +stage1-xen requires new Xen and QEMU versions at the time of writing. You are unlikely to find them already packaged with your distro. This document describes how to build and install the latest Xen, QEMU and rkt from scratch for Ubuntu Xenial Xerus and Fedora.

I would clarify that the build and installation method for Ubuntu and
the one for Fedora use very different approaches. I would add:

  ... "for Ubuntu Xenial Xerus and Fedora. Differently from the
  documentation for Ubuntu, the documentation for Fedora uses a separate
  Docker container for the build."


> -## Building Xen
> + * [Ubuntu Xenial Xerus](#build_ubuntu)
> + * [Fedora](#build_fedora)

  [Fedora via container]



> +<a name="build_ubuntu"></a>
> +## Ubuntu Xenial Xerus
> +
> +### Building Xen
>  ```
>  apt-get install git build-essential python-dev gettext uuid-dev libncurses5-dev libyajl-dev libaio-dev pkg-config libglib2.0-dev libssl-dev libpixman-1-dev bridge-utils wget libfdt-dev bin86 bcc liblzma-dev iasl libc6-dev-i386
>  
> @@ -17,7 +23,7 @@ reboot
>  Make sure to select Xen at boot, or edit /boot/grub/grub.cfg to make it the default, changing "set default="0" to point to the appropriate entry below (the one booting xen.gz), which could be entry number "4" for example.
>  
>  
> -## Building QEMU
> +### Building QEMU
>  ```
>  apt-get install libglib2.0-dev libpixman-1-dev libcap-dev libattr1-dev
>  
> @@ -54,7 +60,7 @@ make install
>  cp i386-softmmu/qemu-system-i386 /usr/lib/xen/bin/
>  ```
>  
> -## Building CoreOS rkt
> +### Building CoreOS rkt
>  ```
>  apt-get install golang automake libacl1-dev libsystemd-dev
>  ./configure --disable-tpm --with-stage1-flavors=coreos
> @@ -62,7 +68,7 @@ make
>  cp build-rkt-1.26.0+git/target/bin/rkt /usr/sbin
>  ```
>  
> -## Building stage1-xen
> +### Building stage1-xen
>  ```
>  apt-get install busybox-static jq
>  
> @@ -72,3 +78,22 @@ export GOPATH=/path/to/gopath
>  bash build.sh
>  cp stage1-xen.aci /home/username
>  ```
> +
> +<a name="build_fedora"></a>
> +## Fedora
> +
> +On Fedora we build stage1-xen artifacts (Xen, QEMU and rkt) in a docker container as follows &ndash;
> +
> +```
> +cd stage1-xen
> +
> +docker pull lambdalinuxfedora/stage1-xen-fedora-buildroot
> +
> +docker run --rm \
> +  -v `pwd`:/root/gopath/src/github.com/rkt/stage1-xen \
> +  -v /tmp:/tmp \
> +  -t -i lambdalinuxfedora/stage1-xen-fedora-buildroot \
> +  /sbin/my_init -- /root/bin/run
> +```
> +
> +Once `docker run` completes, the build artifact `stage1-xen-build.tar.gz` is generated in `/tmp` directory. Please see [RUNNING_STAGE1_XEN.md](build/fedora/RUNNING_STAGE1_XEN.md) for details on how to setup Fedora for running stage1-xen.
diff mbox

Patch

diff --git a/BUILDING.md b/BUILDING.md
index 3ef5311..b9ca404 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -1,7 +1,13 @@ 
 # Build
-stage1-xen requires new Xen and QEMU versions at the time of writing. You are unlikely to find them already packaged with your distro. This document describes how to build and install the latest Xen and QEMU from scratch. In addition, given that CoreOS rkt is also missing from reasonably new distros such as Ubuntu Xenial Xerus, I added instructions on how to build that too. The document includes the dependencies needed for the build based on Ubuntu Xenial Xerus.
+stage1-xen requires new Xen and QEMU versions at the time of writing. You are unlikely to find them already packaged with your distro. This document describes how to build and install the latest Xen, QEMU and rkt from scratch for Ubuntu Xenial Xerus and Fedora.
 
-## Building Xen
+ * [Ubuntu Xenial Xerus](#build_ubuntu)
+ * [Fedora](#build_fedora)
+
+<a name="build_ubuntu"></a>
+## Ubuntu Xenial Xerus
+
+### Building Xen
 ```
 apt-get install git build-essential python-dev gettext uuid-dev libncurses5-dev libyajl-dev libaio-dev pkg-config libglib2.0-dev libssl-dev libpixman-1-dev bridge-utils wget libfdt-dev bin86 bcc liblzma-dev iasl libc6-dev-i386
 
@@ -17,7 +23,7 @@  reboot
 Make sure to select Xen at boot, or edit /boot/grub/grub.cfg to make it the default, changing "set default="0" to point to the appropriate entry below (the one booting xen.gz), which could be entry number "4" for example.
 
 
-## Building QEMU
+### Building QEMU
 ```
 apt-get install libglib2.0-dev libpixman-1-dev libcap-dev libattr1-dev
 
@@ -54,7 +60,7 @@  make install
 cp i386-softmmu/qemu-system-i386 /usr/lib/xen/bin/
 ```
 
-## Building CoreOS rkt
+### Building CoreOS rkt
 ```
 apt-get install golang automake libacl1-dev libsystemd-dev
 ./configure --disable-tpm --with-stage1-flavors=coreos
@@ -62,7 +68,7 @@  make
 cp build-rkt-1.26.0+git/target/bin/rkt /usr/sbin
 ```
 
-## Building stage1-xen
+### Building stage1-xen
 ```
 apt-get install busybox-static jq
 
@@ -72,3 +78,22 @@  export GOPATH=/path/to/gopath
 bash build.sh
 cp stage1-xen.aci /home/username
 ```
+
+<a name="build_fedora"></a>
+## Fedora
+
+On Fedora we build stage1-xen artifacts (Xen, QEMU and rkt) in a docker container as follows &ndash;
+
+```
+cd stage1-xen
+
+docker pull lambdalinuxfedora/stage1-xen-fedora-buildroot
+
+docker run --rm \
+  -v `pwd`:/root/gopath/src/github.com/rkt/stage1-xen \
+  -v /tmp:/tmp \
+  -t -i lambdalinuxfedora/stage1-xen-fedora-buildroot \
+  /sbin/my_init -- /root/bin/run
+```
+
+Once `docker run` completes, the build artifact `stage1-xen-build.tar.gz` is generated in `/tmp` directory. Please see [RUNNING_STAGE1_XEN.md](build/fedora/RUNNING_STAGE1_XEN.md) for details on how to setup Fedora for running stage1-xen.