summaryrefslogtreecommitdiffstats
path: root/utils/hooks
Commit message (Collapse)AuthorAgeFilesLines
* utils/hooks: Rename 30-add-offb to 30-dtb-updatesv1.3.0Samuel Mendoza-Jonas2016-09-081-0/+0
| | | | | | | 30-add-offb now performs functions other than just setting offb information, so rename it to a more accurate '30-dtb-updates'. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* Consolidate petitboot,tty and petitboot,consoleSamuel Mendoza-Jonas2016-09-082-24/+4
| | | | | | | | | | | | | | | | | | | | Commit ce54f86 "Add petitboot,tty and track available consoles" added the petitboot,tty parameter, but the petitboot,console parameter is also recognised by Petitboot. These are ultimately handled by the 30-add-offb and 80-set-stdout hooks respectively, but exist for mostly the same purpose. We consolidate these down to just the original petitboot,console parameter. If the contents of petitboot,console have been configured by Petitboot (ie. it is of the form /dev/dev# [ Description ]) we behave as normal, otherwise we assume that petitboot,console contains a full OF path to the intended console device and do not allow it to be modified. This follows petitboot,console's original intent to be a debug aid, and takes precedence over any other use. The 80-set-stdout hook is removed as 30-add-offb now accounts for both use cases. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* Use 'consoles' instead of 'tty' to refer to interfacesSamuel Mendoza-Jonas2016-09-081-11/+14
| | | | | | | 'Console' is more readily understandable and technically more correct than 'tty' for referring to the interfaces that Petitboot starts a UI on. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* hooks/set-stdout: move hook to after automatic stdout settingsv1.2.2Jeremy Kerr2016-08-081-0/+0
| | | | | | | | | | If a console is defined in NVRAM, we want it to take precedence over anything that 30-add-offb calculates automatically. This change shifts the 20-set-stdout script to later in the hook processing, so that it will override any automatic settings. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* hooks/add-offb: Add leading slash to HVC node pathsJeremy Kerr2016-08-081-1/+1
| | | | | | | | | | We need an absolute path to the serial@N device. It looks like some kernels aren't reading the current path correctly, leading to no console output. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* utils/hooks: Set linux,stdout-path for primary consolev1.2.0Samuel Mendoza-Jonas2016-06-291-0/+120
| | | | | | | | If the boot_tty environment variable is set, determine which device path to set in the linux,stdout-path property, which will instruct the next kernel to use it as the primary console. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* utils/hooks: Write offb device address to device treeSam Mendoza-Jonas2016-02-251-0/+492
| | | | | | | | | | | On OpenPOWER machines, kernels missing the AST video driver can use the existing 'Open Firmware' framebuffer device code to inherit an existing framebuffer from Petitboot. This requires us to translate the 64-bit address of the framebuffer 'back' into a PCI address and write it into an assigned-addresses property in the device tree. Bootstrapped-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
* utils/hooks: Add dtb-sort hookJeremy Kerr2014-01-211-0/+12
| | | | | | | The boot hooks may have altered the DTB in various ways, so add a final (90-) boot hook to re-sort the dtb with `dtc -s`. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* utils: Add boot hook to set stdout property on DT machinesJeremy Kerr2014-01-151-0/+23
| | | | | | | | | On machines that use device-tree boot, they'll often set an early console, defined by the linux,stdout property in the /chosen/ device tree node. This hook adds a facility for petitboot to set this, based on an NVRAM setting.
* utils/hooks: Add sample update-dtb hook.Jeremy Kerr2013-06-241-0/+22
| | | | | | Provide an example for writing a pre-boot hook to update the dtb. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* utils/hooks: Add create-dtb hookJeremy Kerr2013-06-241-0/+11
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
OpenPOWER on IntegriCloud