- Notifications
You must be signed in to change notification settings - Fork134
OPAL boot and runtime firmware for POWER
License
open-power/skiboot
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Firmware for OpenPower systems.
Source:https://github.com/open-power/skiboot
Mailing list:skiboot@lists.ozlabs.org
Info/subscribe:https://lists.ozlabs.org/listinfo/skiboot
Archives:https://lists.ozlabs.org/pipermail/skiboot/
Patchwork:http://patchwork.ozlabs.org/project/skiboot/list/
Documentation:http://open-power.github.io/skiboot/doc/index.html
OPAL firmware (OpenPower Abstraction Layer) comes in several parts.
A simplified flow of what happens when the power button is pressed is:
- The baseboard management controller (BMC) powers the system on.
- The BMC selects the master chip and releases the self-boot engines (SBEs)on the POWER8 chips, master last.
- The BMC relinquishes control of the flexible service interface (FSI)SCAN/SCOM engines.
- The hostboot firmware IPLs the system. It initiates a secondary power-onsequence through a digital power systems sweep (DPSS).
- The hostboot firmware loads the OPAL image and moves all processors totheir execution starting points.
Here, the OPAL image is three parts:
- skiboot (includes OPAL runtime services)
- skiroot - the bootloader environment
- kernel
- initramfs (containing petitboot bootloader)
They may be all part of one payload or three separate images (depending onplatform).
The bootloader will kexec a host kernel (probably linux). The host OS canmake OPAL calls. The OPAL API is documented in doc/opal-api/ (there aremissing parts, patches are welcome!)
See doc/overview.rst for a more in depth overview of skiboot.
Any host OS can build and test skiboot provided it has a C cross compilerforbig endian powerpc64. All good Linux distributions (and several badones) provide a packaged compiler that can be installed through the usualpackage management tools.
To build on Ubuntu:
apt-get install gcc-powerpc64le-linux-gnu gcc valgrind \expect libssl-dev device-tree-compiler make \xz-utils libmbedtls-devCROSS=powerpc64le-linux-gnu- make -j`nproc`
To build on Fedora:
dnf install gcc-powerpc64le-linux-gnu binutils-powerpc64-linux-gnu gcc make \ diffutils findutils expect valgrind-devel dtc openssl-devel xz \ mbedtls-develCROSS=powerpc64le-linux-gnu- make -j`nproc`
(The little-endian powerpc64le compilers in Ubuntu and Fedora are actuallybi-endian and can compile skiboot even though it's big-endian. We recommendinstalling a little-endian toolchain if you plan on building other projects.)
On any POWER system with a bi-endian system compiler:
CROSS="" make -j`nproc`
Alternatively, pre-built cross compilers for x86 systems can be downloadedfrom here:https://www.kernel.org/pub/tools/crosstool/ When usingthese 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 runningmake
We useSphinx to produce various documentationfrom reStructuredText (preferred) and Markdown. The Sphinx documentation hasa useful primer for reStructuredTexthere.And the docutils website has a nicequickreference for thebasic constructes.
Building on Fedora
dnf install python3-sphinx python3-recommonmark.noarchpip install -r doc/requirements.txtmake -C doc/ html SPHINXBUILD=sphinx-build-3
On Ubuntu:
Patches welcome!
View the output usingdoc/_build/html/index.html
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.htmlAlso see external/mambo/README.md
Qemu as of version 2.8 implements the 'powernv' machine model and is sufficientto run skiboot:
qemu-system-ppc64 -M powernv -m 3G -nographic -L /path/to/skiboot/
To run a boot-to-bootloader test you need a Linux kernel image 'zImage.epapr'.Build one using theopal_defconfig
config for op-build. Seehttps://github.com/open-power/op-build/ on how to build, or download one fromhttps://github.com/open-power/op-build/releases/ .
Drop zImage.epapr in the skiboot directory and the skiboot test suite willautomatically pick it up. You can also run a combined skiboot and Linux test inQemu (version 3.0+):
qemu-system-ppc64 -M powernv -m 3G -nographic -kernel zImage.epapr -L /path/to/skiboot/
See opal-ci/README for further testing instructions.
To test on real hardware, you will need to understand how to flash newskiboot onto your system. This will vary from platform to platform.
You may want to start with external/boot-tests/boot_test.sh as it can(provided the correct usernames/passwords) automatically flash a newskiboot onto ASTBMC based OpenPower machines.
All patches should be sent to the mailing list with linux-kernel style'Signed-Off-By'. The following git commands are your friends:
git commit -sgit format-patch
You probably want to read the linuxhttps://kernel.org/doc/html/latest/process/submitting-patches.html asmuch of it applies to skiboot.
The Skiboot build process produces a bunch of different outputs. This is whatthey are, and where you should use them:
skiboot.elf: The output of the linker. Don't flash to a system, but useful when debugging
skiboot.lid: The raw binary object, named .lid because IBM. Flash this onreally old P8 systems, the POWER Functional Simulator (mambo), orFSP systems
skiboot.lid.stb: Lid wrapped with secure boot header. Use on FSP systems
skiboot.lid.xz: Compressed raw binary. Use this on a OpenPower P8
skiboot.lid.xz.stb: Compressed raw binary wrapped with a secure boot header.Use this on OpenPower P9 systems
See LICENSE
About
OPAL boot and runtime firmware for POWER