From 8fbf67e5b1bd5295e7795f7534832fb44889b9e6 Mon Sep 17 00:00:00 2001 From: Oliver O'Halloran Date: Fri, 5 May 2017 16:25:49 +1000 Subject: README: Update build instructions Add some more explicit instructions about how to install and use cross compilers. Signed-off-by: Oliver O'Halloran [stewart@linux.vnet.ibm.com: Add dependencies from our CI Dockerfiles] Signed-off-by: Stewart Smith --- README.md | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index ad58bb1..7042b8e 100644 --- a/README.md +++ b/README.md @@ -44,29 +44,43 @@ missing parts, patches are welcome!) See doc/overview.txt for a more in depth overview of skiboot. ## Building -You can build on a linux host. Modern Debian and Ubuntu are well known -to be suitable. Build and testing on x86 is fine. You do not need a POWER -host to build and test skiboot. -You will need a C compiler for big endian ppc64. If your distro does -not provide one, crosstool built compilers work well: -https://www.kernel.org/pub/tools/crosstool/ +Any host OS can build and test skiboot provided it has a C cross compiler +for *big endian* powerpc64. All good Linux distributions (and several bad +ones) provide a packaged compiler that can be installed through the usual +package management tools. -You should then be able to just (where 4=nr cpu cores of your machine) +To build on Ubuntu: +``` +apt-get install gcc-powerpc64le-linux-gnu gcc valgrind \ + expect libssl-dev device-tree-compiler +CROSS=powerpc64-linux-gnu- make -j`nproc` +``` +To build on Fedora: ``` -make -j4 -make -j4 check +dnf install gcc-powerpc64-linux-gnu binutils-powerpc64-linux-gnu gcc make \ + diffutils findutils expect valgrind-devel dtc openssl-devel +CROSS=powerpc64-linux-gnu- make -j`nproc` ``` -If using crosstool compilers, add /opt/cross/gcc-4.8.0-nolibc/powerpc64-linux/bin/ -to your PATH. +On any POWER system with a bi-endian system compiler: +``` +CROSS="" make -j`nproc` +``` -If using packaged cross compilers on Ubuntu, you may need to set the -following environment variable: -CROSS=powerpc-linux-gnu- +Alternatively, pre-built cross compilers for x86 systems can be downloaded +from here: https://www.kernel.org/pub/tools/crosstool/ When using +these compilers add /opt/cross/gcc-4.8.0-nolibc/powerpc64-linux/bin/ +to your PATH. Once this is done skiboot can be compiler by just running `make` ## Testing +Skiboot comes with a set of unit tests that can be run on your desktop. +They can can be run with: +``` +make check +``` + To test in a simulator, install the IBM POWER8 Functional Simulator from: http://www-304.ibm.com/support/customercare/sas/f/pwrfs/home.html Also see external/mambo/README.md @@ -106,4 +120,4 @@ much of it applies to skiboot. ## License -See LICENSE \ No newline at end of file +See LICENSE -- cgit v1.1