diff mbox

README: Update build instructions

Message ID 20170505062549.14272-1-oohall@gmail.com
State Accepted
Headers show

Commit Message

Oliver O'Halloran May 5, 2017, 6:25 a.m. UTC
Add some more explicit instructions about how to install and use cross
compilers.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
---
Can someone verify the ubuntu instructions work on an x86 laptop.
---
 README.md | 42 +++++++++++++++++++++++++++---------------
 1 file changed, 27 insertions(+), 15 deletions(-)

Comments

Stewart Smith May 5, 2017, 6:50 a.m. UTC | #1
Oliver O'Halloran <oohall@gmail.com> writes:
> Add some more explicit instructions about how to install and use cross
> compilers.
>
> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
> ---
> Can someone verify the ubuntu instructions work on an x86 laptop.

Even better, I stole dependencies from opal-ci/Dockerfile-* and put them
in.

Merged to master as of 8fbf67e5b1bd5295e7795f7534832fb44889b9e6
diff mbox

Patch

diff --git a/README.md b/README.md
index ad58bb19aeb4..d7319ad05453 100644
--- a/README.md
+++ b/README.md
@@ -44,29 +44,41 @@  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-6-powerpc64-linux-gnu
+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
+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 +118,4 @@  much of it applies to skiboot.
 
 ## License
 
-See LICENSE
\ No newline at end of file
+See LICENSE