From e4828d037061db8aba2af46212be0ab618bd81e0 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Thu, 19 Jan 2017 23:09:02 +0100 Subject: [PATCH 1/8] add decription to install the cross-compiler via as packet --- README.md | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ff956e86b..fa39bf740 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,14 @@ # HermitCore - A lightweight unikernel for a scalable and predictable runtime behavior -The project [HermitCore](http://www.hermitcore.org) is new [unikernel](http://unikernel.org) targeting at high-performance computing. +The project [HermitCore](http://www.hermitcore.org) is new [unikernel](http://unikernel.org) targeting a scalable and predictable runtime for high-performance computing and cloud computing. HermitCore extends the multi-kernel approach (like [McKernel](http://www-sys-aics.riken.jp/ResearchTopics/os/mckernel.html)) with unikernel features for a better programmability and scalability for hierarchical systems. On the startup of HermitCore applications, cores are isolated from the Linux system enabling the bare-metal of the applications on these cores. This approach achieves lower OS jitter and a better scalability compared to full-weight kernels. Inter-kernel communication between HermitCore applications and the Linux system is realized by means of an IP interface. In addition to the multi-kernel approach described above, HermitCore can be used as classical standalone unikernel as well. -This reduces the demand on resources and improves the boot time. +In this case HermitCore run a single-kernel exklusive on the hardware or within a virtual machine. +This reduces the demand on resources and improves the boot time, which is an excellent behavior for cloud computing. It is the result of a research project at RWTH Aachen University and is currently an experimental approach, i.e., not production ready. Please use it with caution. @@ -23,9 +24,22 @@ The build process works currently only on **x86-based Linux** systems. The follo On Debian-based systems the packets can be installed by executing: ``` - sudo apt-get install qemu-system-x86 nasm texinfo libmpfr-dev libmpc-dev libgmp-dev libisl-dev flex bison + sudo apt-get install qemu-system-x86 nasm texinfo libmpfr-dev libmpc-dev libgmp-dev libisl-dev flex bison ``` +## Installing HermitCore with help of debian packets + +We provide binary packets for Debian-based systems, which contains the whole HermitCore toolchain including a cross-compiler. +To install the debian packets with following commands: +``` +echo "deb [trusted=yes] https://dl.bintray.com/rwth-os/hermitcore vivid main" | sudo tee -a /etc/apt/sources.list +sudo apt-get -qq update +sudo apt-get install binutils-hermit newlib-hermit pthread-embedded-hermit gcc-hermit libhermit +``` +This toolchain is able to build applications to run within VM as [classical unikernel](building-and-testing-hermitcore-as-classical-standalone-unikernel) or bare-metal in a multi-kernel environment. +For the multi-kernel environment, install the a modified Linux kernel. +An introduction is published in section [Building and testing HermitCore as multi-kernel on a real machine](building-and-testing-hermitcore-as-multi-kernel-on a-real-machine). + ## Building and testing HermitCore as multi-kernel within a virtual machine 1. Please make sure that you cloned this repository and all its submodules. @@ -59,7 +73,7 @@ On Debian-based systems the packets can be installed by executing: 1. In principle you have to follow the tutorial above. After the configuration, building of the cross-compilers and all example application (Step 5 in the [above tutorial](#building-and-testing-hermitcore-within-a-virtual-machine)), a modified Linux kernel has to be installed. - Please clone the repository with the [modified Linux kernel](https://github.com/RWTH-OS/linux). + Please clone the repository with the [modified Linux kernel](https://github.com/RWTH-OS/linux). Afterwards switch to the branch `hermit` for a relative new vanilla kernel or to `centos`, which is compatible to the current CentOS 7 kernel. Configure the kernel with `make menuconfig` for your system. Be sure, that the option `CONFIG_HERMIT_CORE` in `Processor type and features` is enabled. From 6e26391c2ca85ba8c98110d8328d7f8a433f087a Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Thu, 19 Jan 2017 23:12:00 +0100 Subject: [PATCH 2/8] remove typos --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fa39bf740..1c2de7ee5 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,9 @@ echo "deb [trusted=yes] https://dl.bintray.com/rwth-os/hermitcore vivid main" | sudo apt-get -qq update sudo apt-get install binutils-hermit newlib-hermit pthread-embedded-hermit gcc-hermit libhermit ``` -This toolchain is able to build applications to run within VM as [classical unikernel](building-and-testing-hermitcore-as-classical-standalone-unikernel) or bare-metal in a multi-kernel environment. +This toolchain is able to build applications to run within VM as [classical unikernel](#building-and-testing-hermitcore-as-classical-standalone-unikernel) or bare-metal in a multi-kernel environment. For the multi-kernel environment, install the a modified Linux kernel. -An introduction is published in section [Building and testing HermitCore as multi-kernel on a real machine](building-and-testing-hermitcore-as-multi-kernel-on a-real-machine). +An introduction is published in section [Building and testing HermitCore as multi-kernel on a real machine](#building-and-testing-hermitcore-as-multi-kernel-on a-real-machine). ## Building and testing HermitCore as multi-kernel within a virtual machine From d79d75a38a56944ba06e0801f2bab3e0ea9778e7 Mon Sep 17 00:00:00 2001 From: Simon Pickartz Date: Fri, 20 Jan 2017 08:40:57 +0100 Subject: [PATCH 3/8] fix some typos --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 1c2de7ee5..cd42ae4a0 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ # HermitCore - A lightweight unikernel for a scalable and predictable runtime behavior -The project [HermitCore](http://www.hermitcore.org) is new [unikernel](http://unikernel.org) targeting a scalable and predictable runtime for high-performance computing and cloud computing. +The project [HermitCore](http://www.hermitcore.org) is new [unikernel](http://unikernel.org) targeting at a scalable and predictable runtime for high-performance and cloud computing. HermitCore extends the multi-kernel approach (like [McKernel](http://www-sys-aics.riken.jp/ResearchTopics/os/mckernel.html)) with unikernel features for a better programmability and scalability for hierarchical systems. On the startup of HermitCore applications, cores are isolated from the Linux system enabling the bare-metal of the applications on these cores. This approach achieves lower OS jitter and a better scalability compared to full-weight kernels. Inter-kernel communication between HermitCore applications and the Linux system is realized by means of an IP interface. In addition to the multi-kernel approach described above, HermitCore can be used as classical standalone unikernel as well. -In this case HermitCore run a single-kernel exklusive on the hardware or within a virtual machine. -This reduces the demand on resources and improves the boot time, which is an excellent behavior for cloud computing. +In this case HermitCore runs a single-kernel exclusively on the hardware or within a virtual machine. +This reduces the resource demand and improves the boot time which is critical for cloud computing applications. It is the result of a research project at RWTH Aachen University and is currently an experimental approach, i.e., not production ready. Please use it with caution. @@ -27,18 +27,18 @@ On Debian-based systems the packets can be installed by executing: sudo apt-get install qemu-system-x86 nasm texinfo libmpfr-dev libmpc-dev libgmp-dev libisl-dev flex bison ``` -## Installing HermitCore with help of debian packets +## Installing HermitCore with by using debian packets -We provide binary packets for Debian-based systems, which contains the whole HermitCore toolchain including a cross-compiler. -To install the debian packets with following commands: +We provide binary packets for debian-based systems containing the complete HermitCore toolchain including a cross-compiler. +To install the packets you have to execute the following commands: ``` echo "deb [trusted=yes] https://dl.bintray.com/rwth-os/hermitcore vivid main" | sudo tee -a /etc/apt/sources.list sudo apt-get -qq update -sudo apt-get install binutils-hermit newlib-hermit pthread-embedded-hermit gcc-hermit libhermit +sudo apt-get install binutils-hermit newlib-hermit pthread-embedded-hermit gcc-hermit libhermit ``` -This toolchain is able to build applications to run within VM as [classical unikernel](#building-and-testing-hermitcore-as-classical-standalone-unikernel) or bare-metal in a multi-kernel environment. -For the multi-kernel environment, install the a modified Linux kernel. -An introduction is published in section [Building and testing HermitCore as multi-kernel on a real machine](#building-and-testing-hermitcore-as-multi-kernel-on a-real-machine). +This toolchain is able to build applications for [classical unikernel](#building-and-testing-hermitcore-as-classical-standalone-unikernel) environments within virtual machines or bare-metal in a multi-kernel environment. +For the latter, you have to install the modified Linux kernel. +An introduction to this execution mode is provided in section [Building and testing HermitCore as multi-kernel on a real machine](#building-and-testing-hermitcore-as-multi-kernel-on a-real-machine). ## Building and testing HermitCore as multi-kernel within a virtual machine From b301e019c5e178b7701460fa21ac4e6919d8d966 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Sat, 21 Jan 2017 01:11:18 +0100 Subject: [PATCH 4/8] delete unneeded building of the gcc --- usr/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/usr/Makefile b/usr/Makefile index 2a5b0b30c..0d6f6b564 100644 --- a/usr/Makefile +++ b/usr/Makefile @@ -91,8 +91,6 @@ install: $(TMP)/gcc: @echo Build final gcc - $Q$(MKDIR) $(TMP)/gcc - $Q$(CD) $(TMP)/gcc; $(TOPDIR)/gcc/configure --target=$(TARGET) --prefix=$(PREFIX) --with-newlib --with-isl --disable-multilib --without-libatomic --with-tune=generic --enable-languages=c,c++,lto --disable-nls --disable-shared --disable-libssp --enable-threads=posix --disable-libgomp --enable-tls --enable-lto --disable-symvers && $(MAKE) $(NJOBS) && $(MAKE) install $Q$(RM) $(TMP)/gcc $Q$(MKDIR) $(TMP)/gcc $Q$(CD) $(TMP)/gcc; $(TOPDIR)/gcc/configure --target=$(TARGET) --prefix=$(PREFIX) --with-newlib --with-isl --disable-multilib --without-libatomic --with-tune=generic --enable-languages=c,c++,go,fortran,lto --disable-nls --disable-shared --disable-libssp --enable-threads=posix --disable-libgomp --enable-tls --enable-lto --disable-symvers && $(MAKE) $(NJOBS) && $(MAKE) install From c0c968add961f8d873ba7601071dbd5dc7612792 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Sat, 21 Jan 2017 01:12:32 +0100 Subject: [PATCH 5/8] - add tests also for the production branch --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8c49ccdb4..aa51f358f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,8 @@ script: - debuild -e PATH -us -uc -j2 - sudo dpkg -i ../libhermit*_amd64.deb - make -j2 examples - - if [ "$TRAVIS_BRANCH" != "production" ]; then make test; fi + - make test + #- if [ "$TRAVIS_BRANCH" != "production" ]; then make test; fi deploy: on: production From cfcdd8b2cb03812323c81303447ae522fa1724c2 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Sat, 21 Jan 2017 01:17:40 +0100 Subject: [PATCH 6/8] forward compiler flags to the build system --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index aa51f358f..3d662dc9f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ script: - mv HermitCore libhermit-0.1 - tar -czf libhermit_0.1.orig.tar.gz libhermit-0.1 --exclude=.git - cd libhermit-0.1 - - debuild -e PATH -us -uc -j2 + - debuild -e PATH -e CFLAGS_FOR_TARGET -e GOFLAGS_FOR_TARGET -e FCFLAGS_FOR_TARGET -e FFLAGS_FOR_TARGET -e CXXFLAGS_FOR_TARGET -us -uc -j2 - sudo dpkg -i ../libhermit*_amd64.deb - make -j2 examples - make test @@ -40,3 +40,8 @@ env: - HERMIT_MEM="512M" - HERMIT_KVM="0" - HERMIT_VERBOSE="1" + - CFLAGS_FOR_TARGET="-m64 -mtls-direct-seg-refs -O2 -ftree-vectorize" + - GOFLAGS_FOR_TARGET"=-m64 -mtls-direct-seg-refs -O2 -ftree-vectorize" + - FCFLAGS_FOR_TARGET"=-m64 -mtls-direct-seg-refs -O2 -ftree-vectorize" + - FFLAGS_FOR_TARGET="-m64 -mtls-direct-seg-refs -O2 -ftree-vectorize" + - CXXFLAGS_FOR_TARGET="-m64 -mtls-direct-seg-refs -O2 -ftree-vectorize" From 9c395cbef1b7fedfd584651d7beca86fb967f390 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Sat, 21 Jan 2017 10:22:52 +0100 Subject: [PATCH 7/8] remove obsolte variable PROXY_STR --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3d662dc9f..4022c6fee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,6 @@ deploy: env: global: - PATH=$PATH:/opt/hermit/bin/ - - PROXY_STR=":hermit:M:7:\\x42::`pwd`/RWTH-OS/libhermit-0.1/tools/proxy" - HERMIT_ISLE=qemu - HERMIT_CPUS=1 - HERMIT_MEM="512M" From fc0631e9112637ffef6f150d83e440b25be5d074 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Sun, 22 Jan 2017 23:14:17 +0100 Subject: [PATCH 8/8] avoid tests on the master branch --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4022c6fee..eb6a8274f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,8 +20,7 @@ script: - debuild -e PATH -e CFLAGS_FOR_TARGET -e GOFLAGS_FOR_TARGET -e FCFLAGS_FOR_TARGET -e FFLAGS_FOR_TARGET -e CXXFLAGS_FOR_TARGET -us -uc -j2 - sudo dpkg -i ../libhermit*_amd64.deb - make -j2 examples - - make test - #- if [ "$TRAVIS_BRANCH" != "production" ]; then make test; fi + - if [ "$TRAVIS_BRANCH" != "master" ]; then make test; fi deploy: on: production