| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It seems better to treat unset variable values as empty rather than
crashing in save_env. While GRUB's behavior is actually to delete the
variable from the environment block, it seems useful to at least not
crash while later on someone can do further work to improve GRUB
compatibility if desired.
Tested:
Modified test-grub2-save-env to cover this case.
Signed-off-by: Alan Dunn <amdunn@google.com>
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
|
|
|
|
|
|
|
|
| |
Update the nc-lang help string translation to reflect the change
introduced in the previous commit, "Remove "h=help" hint in language page".
Also update each .po file with any new strings lacking a translation.
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
|
|\
| |
| | |
Remove "h=help" hint in language page
|
| |
| |
| |
| | |
Signed-off-by: Johnny <johnny.cl.chang@foxconn.com>
|
|/
|
|
| |
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When queried libflash will return the 'first' flash side (ie. the one
with the lowest TOC address), however we label this the 'Current' side
which is incorrect if the machine has booted from the alternate side.
A future fix will inlcude additional platform logic to determine which
flash side is current; in the interim label the first flash side as
'Primary' instead of 'Current'.
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
|
|
|
|
| |
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On BMC platforms the 'Get System Boot Options' command can also be used
to check for a temporary network interface config override. This is
implemented via the optional 'OEM Parameters' field defined in the IPMI
v2 spec. We define the actual format of the field as:
- 4 byte cookie value
- 2 byte version value
- 1 byte hardware address size
- 1 byte IP address size
- Hardware address
- 1 byte flags for 'ignore' and 'method'
And for static configs:
- IP Address
- 1 byte subnet value
- Gateway address
If set the config override replaces any other interface config, forcing
the use of the specified configuration.
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
|
|
|
|
|
|
|
|
| |
On BMC machines the "Get Device ID" and "Get BMC Golden Side Version"
IPMI commands are available. If possible retrieve some interesting
version numbers and display them in the System Information screen.
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
|
|
|
|
|
|
|
|
|
|
| |
On supported platforms read the VERSION partition on startup and display
the available versions strings in the System Information screen.
This adds a skeleton hostboot.c to support possible additional BMC
platform support.
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add basic libflash support to read the VERSION partition on BMC
machines. This adds a dependency on the libflash shared library from
Skiboot.
The MTD partition is accessed through the libflash helper functions.
Once read into a buffer, the VERSION partition is a simple list of
newline-terminated version strings. Some BMC platforms may have two
'sides' to flash - these are interpreted as the "current" and "other"
sides depending on which one the current Petitboot is running from.
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
|
|
|
|
| |
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
|
|
|
|
|
|
| |
Support optionally building features that rely on libflash support.
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
|
|
|
|
| |
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
|
|
|
|
|
|
|
|
|
|
|
| |
If "" or '' are used in a statement to omit a word, we must still
return a TOKEN_WORD for an empty string.
In particular this fixes an issue where Petitboot would fail to parse
the grub.cfg included in the Debian 8.2 install image, which includes a
menuentry statement with an empty name.
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
|
|
|
|
|
|
| |
Fixes Coverity defect #30486
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
|
|
|
|
|
|
| |
Fixes Coverity defect #30472
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
|
|
|
|
|
|
| |
Fixes Coverity defect #30466
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During install some distributions[0] will create subvolumes when formatting
the root filesystem with BTRFS. In particular this can mean that
bootloader config files will appear (in the case of GRUB) under
/var/petitboot/mnt/dev/$device/@/boot/grub/
rather than the expected
/var/petitboot/mnt/dev/$device/boot/grub/
If this is the case, perform all file operations from the parser
relative to this subvolume rather than the mount point. At the moment
this only supports the trivial case where the subvolume name for root is
blank (ie. '@').
[0] In particular, Ubuntu from at least 14.04
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, "save_env -f" in the GRUB2 parser only works with three
arguments, which means only commands of the form "save_env -f <path>"
that save *no* environment variables are allowed.
Allow "save_env -f <path> [<var>]*", making "save_env -f" useful.
Tested:
Unit test test-grub2-save-env-dash-f tests this change, and the
remaining unit tests still pass.
Signed-off-by: Alan Dunn <amdunn@google.com>
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
|
|
|
|
|
|
|
|
| |
If not running on a powerpc platform the bmc_mac pointer remains NULL.
If this is the case set an address of zero when serialising rather
than dereferencing the pointer.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The URL field currently only supports loading a particular file for
static network configurations. But it makes sense in certain static
network configurations to 'auto-discover' a file like petitboot does
with DHCP -- based off the MAC address and IP. Extend
device_handler_process_url to take those as parameters, and toggle off
the URL ending in a '/' to indicate whether to 'auto-discover' or
directly load the specified URL.
Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In certain configurations, e.g. automation, we want to use static
networking but load a particular file, automatically and parse it as a
pxelinux config file. Currently, we support something like this for DHCP
based booting, but not static. Add a URL field to the UI for static
configurations and reuse the logic from device_handler_process_url() to
load the specified file.
Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|\
| |
| | |
Coverity fixes
|
| |
| |
| |
| |
| |
| | |
Fixes Coverity defect #30484
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
| |
| |
| |
| |
| |
| | |
Fixes Coverity defect #30479
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
| |
| |
| |
| |
| |
| | |
Fixes Coverity defect #30480
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
| |
| |
| |
| |
| |
| | |
Fixes Coverity defects #30474 and #30475
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
| |
| |
| |
| |
| |
| | |
Fixes Coverity defect #30471
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
| |
| |
| |
| |
| |
| | |
Fixes Coverity defect #30468
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
| |
| |
| |
| |
| |
| | |
Fixes Coverity defects #30485 and #30486
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The check against ddev->mounted to cause an eject action is logically
impossible. Change it so a cdrom_eject() is called properly.
Change the return value to 'true' for any action caused by
DISK_EJECT_REQUEST - no further action is appropriate in this case
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
| |
| |
| |
| |
| |
| | |
Fixes Coverity defect #30476
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
| |
| |
| |
| |
| |
| | |
Fixes Coverity defects #30481 and #30482
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|/
|
|
|
|
|
|
| |
Fixes three unchecked return values, and one missing
initialisation.
Fixes Coverity defects #30450, #30451, #30454, and #30483
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|\
| |
| | |
Add BMC interface MAC to system info output
|
|/
|
|
|
|
| |
Useful for identifying the initial BMC traffic on the network.
Signed-off-by: Jack Miller <jack@codezen.org>
|
|
|
|
|
|
|
|
|
| |
- Abbreviate several translations of "Disk R/W".
- Do not expand 'DHCP' in pt_BR.
- Remove several extra space characters in French translations.
- Shorten some translations of "Boot Order", "DNS Servers".
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
|
|
| |
Abbreviation and help text updates.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We've seen some IPMI timeouts during testing - meaning that an IPMI
bootdev setting will be ignored. This can result in a machine booting
from an incorrect boot device, or missing a 'safe mode' indication, or
incorrectly proceeding past petitboot.
The firmware & kernel has its own timeout & retry mechanism, so we
already have a little error-recovery there; the timeout in petitboot is
to prevent an indefinite block if the kernel interface isn't behaving
correctly.
So, this change bumps the timeout to a value that suits BMCs we've seen
in the field (specifying a 2 second timeout, with one retry).
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ipmi module is shared between pb-config and pb-discover. During
system initilisation, we're likely to have a few invocations of
pb-config running, as well as pb-discover starting.
We may have multiple potential concurrent accesses to the ipmi device
node. To avoid problems, this change introduces a fcntl lock on the
device node.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
We currently have a bug where the return value from get_block_sectors
may overflow an unsigned int, so we create a snapshot that is too small.
This change uses uint64_t types for the sector counts.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Rather than setting NULL, do a setlocale(LC_ALL, NULL) to query the
system locale value as our default.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
We have a few manual fixes missing from the fr.po translation.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Fix the status message, and remove the newline from our translations.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
We have a few minor issues, mostly formatting, from the latest translation
drop.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|