]> git.ozlabs.org Git - petitboot/blob - doc/dev/linux-image.rst
doc: Start writing some in-tree documentation
[petitboot] / doc / dev / linux-image.rst
1 Linux Image Requirements
2 ========================
3
4 Petitboot has a few requirements for the linux image it is built in to.
5 For an in-practice example of how to build a Petitboot image see op-build_.
6
7 For build-time dependencies see configure.ac_.
8
9 .. _op-build: https://github.com/open-power/op-build/tree/master/openpower/package/petitboot
10 .. _configure.ac: https://github.com/open-power/petitboot/blob/master/configure.ac
11
12 Core dependencies
13 -----------------
14
15 * pb-discover expects to be run as root, or at least have permission for device management, executing kexec, etc.
16 * udev: pb-discover discovers devices via libudev enumeration so a udev implementation must be present.
17   Following this any udev rules required for certain device types must also be present. Eg. op-build's inclusions_.
18 * network utilities: pb-discover expects to have ``udhcpc`` available for DHCP, or a call-equivalent version. Similarly it expects ``tftp`` and ``wget`` binaries in order to download boot resources.
19 * kexec: A kexec binary must be available. This is commonly kexec-lite_ however kexec-tools should also work.
20 * LVM: Petitboot depends on libdevmapper, and also requires ``vgscan`` and ``vgchange`` to be available if order to setup logical volumes.
21
22 .. _inclusions: https://github.com/open-power/op-build/blob/master/openpower/package/petitboot/63-md-raid-arrays.rules
23 .. _kexec-lite: https://github.com/open-power/kexec-lite
24
25 Optional dependencies
26 ---------------------
27
28 * ``mdadm`` for software RAID handling.
29 * libflash: On OPAL platforms Petitboot will use libflash to load firmware version information.
30 * ipmi: If ``/dev/ipmi`` is available Petitboot will use it to source information from the BMC.
31 * console setup: unless you have other requirements you probably want to be starting the UI through ``pb-console`` in which case it is useful to have this called by udev.
32   For example: petitboot-console-ui.rules_, or depending on if you're using ``agetty -l`` to log in a user, shell_profile_.
33
34 .. _petitboot-console-ui.rules: https://github.com/open-power/op-build/blob/master/openpower/package/petitboot/petitboot-console-ui.rules
35 .. _shell_profile: https://github.com/open-power/op-build/blob/master/openpower/package/petitboot/shell_profile