• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..08-Dec-2020-

.github/H08-Dec-2020-43

asm/H08-Dec-2020-1,5621,083

ccan/H08-Dec-2020-4,2162,700

core/H08-Dec-2020-27,04918,097

doc/H03-May-2022-46,37034,806

external/H08-Dec-2020-17,33212,546

hdata/H08-Dec-2020-17,44013,964

hw/H08-Dec-2020-65,12643,900

include/H08-Dec-2020-16,98310,055

libc/H03-May-2022-3,3621,922

libfdt/H08-Dec-2020-6,2102,784

libflash/H08-Dec-2020-12,5879,182

libpore/H08-Dec-2020-13,4317,393

libstb/H08-Dec-2020-8,9365,952

libxz/H08-Dec-2020-2,9431,527

opal-ci/H08-Dec-2020-584419

platforms/H08-Dec-2020-9,0876,448

test/H08-Dec-2020-966664

.gitignoreH A D08-Dec-20202.1 KiB9998

.travis.ymlH A D08-Dec-20201.8 KiB6453

.versionH A D08-Dec-20205 21

CONTRIBUTING.mdH A D08-Dec-20202.7 KiB7857

LICENCEH A D08-Dec-202011.1 KiB203169

MakefileH A D08-Dec-20201.3 KiB6721

Makefile.mainH A D08-Dec-202011.1 KiB361251

Makefile.rulesH A D08-Dec-20201.7 KiB7958

README.mdH A D08-Dec-20205.1 KiB153108

coverity-model.cH A D08-Dec-2020515 2519

extract-gcov.cH A D08-Dec-20206.6 KiB260190

make_offsets.shH A D08-Dec-2020159 117

make_version.shH A D08-Dec-20201 KiB6154

skiboot.lds.SH A D08-Dec-20205 KiB235173

skiboot.specH A D08-Dec-20203.3 KiB11991

README.md

1# skiboot
2
3Firmware for OpenPower systems.
4
5Source: https://github.com/open-power/skiboot
6
7Mailing list: skiboot@lists.ozlabs.org
8
9Info/subscribe: https://lists.ozlabs.org/listinfo/skiboot
10
11Archives: https://lists.ozlabs.org/pipermail/skiboot/
12
13Patchwork: http://patchwork.ozlabs.org/project/skiboot/list/
14
15## Overview
16OPAL firmware (OpenPower Abstraction Layer) comes in several parts.
17
18A simplified flow of what happens when the power button is pressed is:
19
201. The baseboard management controller (BMC) powers the system on.
212. The BMC selects the master chip and releases the self-boot engines (SBEs)
22   on the POWER8 chips, master last.
233. The BMC relinquishes control of the flexible service interface (FSI)
24   SCAN/SCOM engines.
254. The hostboot firmware IPLs the system. It initiates a secondary power-on
26   sequence through a digital power systems sweep (DPSS).
275. The hostboot firmware loads the OPAL image and moves all processors to
28   their execution starting points.
29
30Here, the OPAL image is three parts:
31
321. skiboot (includes OPAL runtime services)
332. skiroot - the bootloader environment
34   * kernel
35   * initramfs (containing petitboot bootloader)
36
37They may be all part of one payload or three separate images (depending on
38platform).
39
40The bootloader will kexec a host kernel (probably linux). The host OS can
41make OPAL calls. The OPAL API is documented in doc/opal-api/ (there are
42missing parts, patches are welcome!)
43
44See doc/overview.rst for a more in depth overview of skiboot.
45
46## Building
47
48Any host OS can build and test skiboot provided it has a C cross compiler
49for *big endian* powerpc64. All good Linux distributions (and several bad
50ones) provide a packaged compiler that can be installed through the usual
51package management tools.
52
53To build on Ubuntu:
54```
55apt-get install gcc-powerpc64le-linux-gnu gcc valgrind \
56	expect libssl-dev device-tree-compiler make \
57	xz-utils
58CROSS=powerpc64le-linux-gnu- make -j`nproc`
59```
60
61To build on Fedora:
62```
63dnf install gcc-powerpc64le-linux-gnu binutils-powerpc64-linux-gnu gcc make \
64    diffutils findutils expect valgrind-devel dtc openssl-devel xz
65CROSS=powerpc64le-linux-gnu- make -j`nproc`
66```
67
68(The little-endian powerpc64le compilers in Ubuntu and Fedora are actually
69bi-endian and can compile skiboot even though it's big-endian. We recommend
70installing a little-endian toolchain if you plan on building other projects.)
71
72On any POWER system with a bi-endian system compiler:
73```
74CROSS="" make -j`nproc`
75```
76
77Alternatively, pre-built cross compilers for x86 systems can be downloaded
78from here: https://www.kernel.org/pub/tools/crosstool/ When using
79these compilers add /opt/cross/gcc-4.8.0-nolibc/powerpc64-linux/bin/
80to your PATH. Once this is done skiboot can be compiler by just running `make`
81
82## Testing
83Skiboot comes with a set of unit tests that can be run on your desktop.
84They can can be run with:
85```
86make check
87```
88
89To test in a simulator, install the IBM POWER8 Functional Simulator from:
90http://www-304.ibm.com/support/customercare/sas/f/pwrfs/home.html
91Also see external/mambo/README.md
92
93Qemu as of version 2.8 implements the 'powernv' machine model and is sufficient
94to run skiboot:
95
96 qemu-system-ppc64 -M powernv -m 3G -nographic -L /path/to/skiboot/
97
98To run a boot-to-bootloader test you need a Linux kernel image 'zImage.epapr'.
99Build one using the `opal_defconfig` config for op-build. See
100https://github.com/open-power/op-build/ on how to build, or download one from
101https://openpower.xyz/job/openpower/job/openpower-op-build/.
102
103Drop zImage.epapr in the skiboot directory and the skiboot test suite will
104automatically pick it up. You can also run a combined skiboot and Linux test in
105Qemu (version 3.0+):
106
107 qemu-system-ppc64 -M powernv -m 3G -nographic -kernel zImage.epapr -L /path/to/skiboot/
108
109See opal-ci/README for further testing instructions.
110
111To test on real hardware, you will need to understand how to flash new
112skiboot onto your system. This will vary from platform to platform.
113
114You may want to start with external/boot-tests/boot_test.sh as it can
115(provided the correct usernames/passwords) automatically flash a new
116skiboot onto ASTBMC based OpenPower machines.
117
118## Hacking
119
120All patches should be sent to the mailing list with linux-kernel style
121'Signed-Off-By'. The following git commands are your friends:
122```
123git commit -s
124git format-patch
125```
126
127You probably want to read the linux
128https://kernel.org/doc/html/latest/process/submitting-patches.html as
129much of it applies to skiboot.
130
131
132## Output files
133
134The Skiboot build process produces a bunch of different outputs. This is what
135they are, and where you should use them:
136
137 skiboot.elf: The output of the linker. Don't flash to a system, but useful when debugging
138
139 skiboot.lid: The raw binary object, named .lid because IBM. Flash this on
140	      really old P8 systems, the POWER Functional Simulator (mambo), or
141	      FSP systems
142
143 skiboot.lid.stb: Lid wrapped with secure boot header. Use on FSP systems
144
145 skiboot.lid.xz: Compressed raw binary. Use this on a OpenPower P8
146
147 skiboot.lid.xz.stb: Compressed raw binary wrapped with a secure boot header.
148                     Use this on OpenPower P9 systems
149
150## License
151
152See LICENSE
153