summaryrefslogtreecommitdiffstats
path: root/discover
Commit message (Collapse)AuthorAgeFilesLines
* discover/platform-powerpc: Reject bootdevs with empty UUIDsSamuel Mendoza-Jonas2016-11-241-4/+5
| | | | | | | | | | If a "uuid:" label is set in the petitboot,bootdevs parameter without a matching UUID, the UUID is unintentionally accepted and set to NULL. This can cause a segfault in nc-config when device UUIDs are compared against the autoboot option. Instead treat options like this as malformed. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/platform-powerpc: Deprecate petitboot,bootdev parameterSamuel Mendoza-Jonas2016-11-241-45/+6
| | | | | | | | | The "petitboot,bootdevs" parameter has been around long enough now that there shouldn't be anyone still transitioning over from the old "petitboot,bootdev" parameter. Drop this parameter to simplify the populate_bootdev_config() logic. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/platform-powerpc: Remove unused max_partition_sizeSamuel Mendoza-Jonas2016-11-241-3/+0
| | | | Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* Support HTTP(S) proxies when downloading resourcesSamuel Mendoza-Jonas2016-11-242-0/+36
| | | | | | | | Allow the user to specify a HTTP and HTTPS proxy server. The discover server will set the http_proxy and https_proxy environment variables, enabling the proxy servers for any further HTTP(S) requests. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/pxe-parser: Parse only the first configv1.3.1Samuel Mendoza-Jonas2016-10-111-34/+59
| | | | | | | | | | | | | | | | | | | Commit 2163af5 "discover/pxe-parser: Retrieve configs asynchronously" added asynchronous loading of remote pxe filenames, but made an unintended change in behaviour to the PXE parser. Previously the parser would try a list of possible filenames, and parse the first one it found. However the above commit spawns an asynchronous job for every filename, and parses any that can be retrieved. It is a common configuration to have a machine-specific config and a 'fallback' default config, and the change means we could erroneously retrieve and parse both configs. Update the PXE parser so that asynchronous jobs are spawned sequentially. That is, spawn a job for the first filename and if not successful spawn another job for the next filename, and so on. Once a remote config is successfully retrieved, parse it and stop. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* Consolidate petitboot,tty and petitboot,consoleSamuel Mendoza-Jonas2016-09-083-9/+14
| | | | | | | | | | | | | | | | | | | | 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-084-25/+25
| | | | | | | '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>
* discover: Avoid writing network overrides to NVRAMSamuel Mendoza-Jonas2016-09-082-0/+10
| | | | | | | | Explicitly keep track of whether the current interface config was set by an IPMI network override, and avoid overwriting any saved config unless the override was marked persistent. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/network: Add find_interface_by_uuidSamuel Mendoza-Jonas2016-09-081-21/+40
| | | | | | | | | | Currently in network_register_device() and network_unregister_device() the appropriate interface is searched for by name. However it is possible in some scenarios for multiple interfaces to have the same name, so instead search by UUID to be sure that the correct interface is being selected. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover: Pass UUID to discover_device_create()Samuel Mendoza-Jonas2016-09-085-13/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently discover_device_create() will search for existing discover devices by id to determine if a new device is required. However it is possible under some circumstances for distinct devices to have the same name. This is especially troublesome if the following network events are seen in network_handle_nlmsg(): - New interface, 'foo' with uuid x:x:x:x:x:x -> new discover device created with dev->device->id = 'foo' dev->uuid = x:x:x:x:x:x - New interface, 'foo' with uuid y:y:y:y:y:y -> existing device 'foo' found dev->uuid = y:y:y:y:y:y This can occur if an interface rename event arrives *after* an old name is reused, where temporarily Petitboot will see two distinct network interfaces with the same name. Now the two interfaces point to the same discover device, which can quickly result in a segfault if a 'remove' event occurs for one of the interfaces and the discover device is freed. To generally avoid this a 'uuid' parameter is added to discover_device_create(), which if present allows existing devices to be looked up by UUID rather than just their name. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover: Deprecate 'conf' user eventSamuel Mendoza-Jonas2016-09-085-61/+1
| | | | | | | | | | | | The 'conf' user event is functionally very similar to the 'url' event, in that both events result in downloading a specified configuration file and passing it to iterate_parsers(). The 'url' event additionally allows downloading files from a directory path and is also accessed by the UI via pb-protocol, so remove the 'conf' event and associated functions in favour of 'url' and device_handler_process_url(). Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/event: Ensure event struct exists for async callersSamuel Mendoza-Jonas2016-09-012-3/+7
| | | | | | | | | | | | | | | | When handling an event, user_event_handle_message() creates an event struct with relevant parameters. Once user_event_handle_message() is finished it frees the struct. However in the case of a dhcp or add_url event, asynchronous jobs may be spawned that will later reference the event struct. In particular this becomes a problem when pxe_process_pair() handles an IPAPPEND name/value pair and tries to access event->device. In the case of dhcp and add_url events, we avoid this by changing the event struct's talloc parent to the discover_context struct which persists until all async pxe jobs have completed. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* Add encrypted file supporttpearson@raptorengineering.com2016-08-262-5/+39
| | | | | | | | | | | | In certain cases, such as network booting over an untrusted connection, it may be useful to fully encrypt and sign the kernel files. Enable fully encrypted boot using builtin keyring via the addition of the string "ENCRYPTED" to the first line of the /etc/pb-lockdown file. This disables detached (plaintext) signature verification. Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* Add support for GPG signature enforcement on bootedtpearson@raptorengineering.com2016-08-2610-26/+208
| | | | | | | | | | | | | kernels and related blobs This can be used to implement a form of organization-controlled secure boot, whereby kernels may be loaded from a variety of sources but they will only boot if a valid signature file is found for each component, and only if the signature is listed in the /etc/pb-lockdown file. Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> (Minor build fixes and gpgme.m4, comment on secure boot in gpg.c)
* discover/network: Ignore tun devicesv1.2.3Samuel Mendoza-Jonas2016-08-231-0/+3
| | | | | | | | In some environments a default 'tun' device is created. Petitboot doesn't use this and it clutters up the list of network devices, so ignore it if it is encountered. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/boot: Always pass --append to kexecSamuel Mendoza-Jonas2016-08-191-6/+4
| | | | | | | | | If we don't specify command line arguments for the next kernel, kexec will add the contents of /chosen/bootargs if present. This is unintended and not obvious to the user, so explicitly add append="" to the kexec arguments if we have none to add instead. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover: Add 'sync' user eventSamuel Mendoza-Jonas2016-08-085-0/+62
| | | | | | | | | | | | | | | | | | | | Add a user event named 'sync' that causes the discover server to merge the devicemapper snapshots of mounted devices. This is particularly useful as a debug aid (for example, when copying logs to a USB device), as the server will otherwise only sync changes to mounted devices in response to parser actions. The command can be called as pb-event sync@device to sync a particular device, or as pb-event sync@all to sync all devices with snapshots. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/device-handler: Remove default option if device removedv1.2.1Samuel Mendoza-Jonas2016-07-141-0/+9
| | | | | | | If one of a device's boot options is the current default boot option, make sure the default boot is cancelled before the device is removed. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/network: Mark interfaces configured once configuredSamuel Mendoza-Jonas2016-07-141-1/+6
| | | | | | | | | | In some cases additional netlink messages can be received for an already-configured interface without any relevant changes. This can result in multiple DHCP requests for the same interface. Once an interface has been configured mark it as IFSTATE_CONFIGURED to avoid configuring it again. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/platform-powerpc: Use IPMI on BMC-based machines onlySamuel Mendoza-Jonas2016-07-141-3/+5
| | | | | | | | With a kernel that has IPMI support Petitboot will try to use direct IPMI, however on FSP machines this is not fully functional. Use direct IPMI only on BMC-based machines, and use sysparams otherwise. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/device-handler: Ignore options without kernelSamuel Mendoza-Jonas2016-07-141-0/+8
| | | | | | | All boot options must at least have a boot image; ignore any options that do not before trying to resolve them. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/boot: Set boot_tty variable before kexecSamuel Mendoza-Jonas2016-06-291-0/+13
| | | | | | | | If boot_tty is set or a boot command is sent manually from a certain console, set the boot_tty environment variable to be used by a boot hook before kexec. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover: Add petitboot,tty and track available consolesSamuel Mendoza-Jonas2016-06-292-0/+53
| | | | | | | | | | Add the NVRAM parameter petitboot,tty which sets the default console to use when booting a kernel. In load_config() construct a list of available consoles depending on the current platform. A future patch depending on firmware changes will allow this list to be constructed dynamically. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/pxe-parser: Retrieve configs asynchronouslySamuel Mendoza-Jonas2016-06-282-43/+126
| | | | | | | | | | | | | | | | | | Depending on the configuration of the DHCP server and the network, tftp requests made by the pxe parser can timeout. The pxe parser makes these requests synchronously so several timeouts can block the server completely for several minutes, leaving the server unresponsive to UI requests. Rework the pxe parser such that it handles the result of each tftp request in a callback, which can complete after iterate_parsers() has returned. Each callback is allocated its own conf_context which takes a talloc reference on the discover_context so that each callback can commit new boot options after the initial iterate loop has completed. This also means talloc_unlink must be used instead by the original parent of the discover_context. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* Update tests to support changes to pxe_parserSamuel Mendoza-Jonas2016-06-282-45/+82
| | | | | | | | | | | Substitute load_url_async() when running tests to support direct callers of load_url_async() who will expect to read a file in a callback. Stub out device_handler_discover_context_commit() since it will remove discover_options from the given discover_context, but the tests will check the discover_context to count boot_options. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/device-handler: Make boot_status() publicSamuel Mendoza-Jonas2016-06-282-10/+14
| | | | | | | | | Rename boot_status() to device_handler_boot_status() and make it accessible by files that include device-handler.h. This enables the boot status to be updated from additional callers, in particular within parser functions. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/platform-powerpc: Return bootdev error correctlyv1.1.1Samuel Mendoza-Jonas2016-06-161-2/+2
| | | | | | | | | | | | | In one case get_ipmi_bootdev_ipmi() can return 0 on an error, which leads to bootdev being treated as a valid bootdev despite being uninitialised. If the planets line up correctly and bootdev is less than or equal to IPMI_BOOTDEV_SETUP, Petitboot will incorrectly apply an IPMI override. Update the error return value in get_ipmi_bootdev_ipmi(), and properly initialise bootdev. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* Extend the "add url" function to allow file:// URLsSamuel Mendoza-Jonas2016-05-241-2/+8
| | | | | | | | | | | | | | This allows URLs of the form file:///path/to/local/file.conf to be used in nc-add-url, in order to access configuration files relative to the root directory. This is primarily a debugging tool aimed at developers rather than an expected use case. The DEVICE_TYPE_ANY enum is used in this case to represent that a resulting boot option is not associated with any device in the traditional sense, and in the UI is represented as a "Custom Local Option". Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* pb-discover: add dtb support for PXE configOliver O'Halloran2016-05-241-0/+4
| | | | | | | | | | | | | | Currently there is no way to manually specify a DTB file when with a PXE network boot configuration file. This makes it difficult when you need to work with or emulate a special snowflake machines with special snowflake hardware. Some ARM systems provide this feature with the "fdt" option so this patch adds support for using the ftd or dtb configuration options to the PXE config parser. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* pb-event: Add 'boot' user eventSamuel Mendoza-Jonas2016-05-063-0/+26
| | | | | | | | | | | Add a user event to send a boot command to the discover server. The format of the boot command is similar to the add command, eg: pb-event boot@eth0 image="http://host/image" initrd="http://host/initrd" and also recognises "id", "dtb", and "args" arguments. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/platform-powerpc: Zero-pad BMC aux-versionv1.0.1Samuel Mendoza-Jonas2016-04-261-1/+1
| | | | Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/grub2: Do not set $0 in functionsAlan Dunn2016-04-261-1/+1
| | | | | | | | | | | | | | | GRUB2 does not set $0 in functions, so don't set it in our GRUB2 script parser. (As it doesn't have a value in GRUB2 scripts, probably no GRUB2 script depends on the value of $0.) Additionally, dash and bash set environment variable 0 to the name of the script (even in functions), so the current behavior of $0 doesn't really match shell scripts either. Tested: Existing tests pass. Signed-off-by: Alan Dunn <amdunn@google.com> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* Allow evaluation of arbitrarily-positioned arguments in GRUB2 parserAlan Dunn2016-04-261-1/+2
| | | | | | | | | | | | | | | GRUB2 allows essentially arbitrary numbers of positional arguments, so ensure that they can be evaluated within scripts. GRUB2 also appears to support arbitrary numbers of leading 0's in positional parameters (i.e., $01 should evalute the same as $1), but this doesn't seem like a particularly important case to support. Tested: Modified test-grub2-pos-param to cover higher-numbered positional arguments. Signed-off-by: Alan Dunn <amdunn@google.com> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* Fix sparse warningsAndrew Donnellan2016-04-201-1/+1
| | | | | | | | Fix some sparse warnings by using NULL instead of 0 and static-ifying a variable not used outside its file. Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/udev: Don't call udev_set_log_fn()Samuel Mendoza-Jonas2016-04-131-0/+4
| | | | | | | | | | As of libudev 218 udev_set_log_fn() is deprecated, causing a -Wdeprecated-declarations warning when building, and is otherwise a noop. Add a configure check for libudev, and only call udev_set_log_fn() if using a version older than 218. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover: Perform pre-boot steps when timeout expiresSamuel Mendoza-Jonas2016-04-131-0/+2
| | | | | | | | | | | When a default boot timeout expires boot() is called via default_timeout() rather than device_handler_boot(). default_timeout() doesn't call platform_pre_boot() beforehand, which means steps such as clearing a temporary boot device override are skipped. Add a call to platform_pre_boot() immediately before boot() to ensure these steps are performed regardless of boot type. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/devmapper: Read device size from sysfsSamuel Mendoza-Jonas2016-04-082-12/+79
| | | | | | | | | | | | | If udev doesn't export the ID_PART_ENTRY_SIZE variable for a device we skip creating a snapshot for it. However in most cases the sysfs attribute which udev reads to find ID_PART_ENTRY_SIZE is still available. Therefore if we don't have access to ID_PART_ENTRY_SIZE try to find the size in sysfs directly. This allows us to create snapshots for devices which often don't have this udev variable set, such as software raid (md) devices and NVMe devices. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* configure.ac: Add checks for libflash and libdevmapperSamuel Mendoza-Jonas2016-04-051-1/+1
| | | | | | | | | libdevmapper is a hard dependency since snapshots were introduced, so add an unconditional configure-time check for it. Also add a check for libflash library and headers if --enable-mtd is set. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/grub2: Ignore sign-compare warning for generated codeSamuel Mendoza-Jonas2016-04-011-1/+1
| | | | Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover: Respect persistent flag for network overridesv1.0.0Samuel Mendoza-Jonas2016-03-233-14/+28
| | | | | | | If the persistent bit is set in a IPMI network override, overwrite any existing interface config in NVRAM with the new network override. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover/device-handler: Attempt to retry failed mountsSam Mendoza-Jonas2016-03-231-44/+56
| | | | | | | | | | | | | | | | Commit 6c1a9dd, "discover: Allow fs recovery if snapshot available", forced the use of 'norecovery' for all XFS mounts to avoid failing when a cross-endian journal existed. This is a bit heavy handed, healthy XFS file systems can still be safely mounted, as can dirty filesystems in the same endian as Petitboot. This adds try_mount() which opportunistically mounts devices and falls back to using 'norecovery' where possible on failure. This enables XFS filesystems to be mounted read-write when possible. try_mount() contains the logic previously described by fs_parameters(), and should be used in place of any existing calls to mount(). Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
* discover/boot: Safely cleanup after failed loadSam Mendoza-Jonas2016-03-231-2/+3
| | | | | | | | | | | | | If a call to load_url_async() fails immediately, boot() will free the boot task and return. If other jobs started by load_url_async() are still running they will attempt to free their task struct in load_url_process_exit(), however the original boot task is the parent context of this process task, resulting in a double-free. Instead call cleanup_cancellations if an error immediately occurs to cancel any pending load operations safely before freeing the boot task. Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
* discover/grub2: Fix handling of positional parametersAlan Dunn2016-03-151-1/+1
| | | | | | | | | | | | | | Positional parameters are set in the environment with '$' prepended to the name. This causes lookups to fail because parameter lookups don't include the '$'. TESTED: Added a test that covers positional parameters in GRUB2 parser. Build succeeds, tests pass. Bootstrapped-by: Nancy Yuen <yuenn@google.com> Signed-off-by: Alan Dunn <amdunn@google.com> Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
* Change parser interface to allow statAlan Dunn2016-03-153-26/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the GRUB2 parser incorrectly reports "[ -f <path> ]" as false if the size of the file is above 1 MB. This patch changes the parser interface to allow stating files (with parser_stat_file). Then in the implementation of "[ -f <path> ]", we can use parser_stat_file instead of parser_request_file which has the size limitation. I eliminate parser_check_dir in lieu of this new interface, which has the side effect of making "[ -d <path> ]" work (the error code for stat was not checked correctly before). I add a basic test for the test file operations -f, -s, and -d (to show that my changes to test file operations do not break them) and minorly modify the test framework to ensure it has enough fidelity to cause the expected results. Unfortunately the test wouldn't have caught the issue with -d, since the test framework stubs out the parser interface itself. Nor can the test framework catch the initial problem with -f because the imposed limit is (transitively) in function parser_request_file. Note that -f and -d follow symlinks despite the fact that GRUB does not (see http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00142.html discussing GRUB's behavior). This is not a change to Petitboot's behavior though. Tested: The test test-grub2-test-file-ops passes. I booted Petitboot against a GRUB snippet: status=success if [ ! -f /large_file -a $status = success ] then status=fail_large_file fi if [ ! -d /a_directory -a $status = success ] then status=fail_dir fi menuentry $status { linux /vmlinux } (after making /large_file a file of size > 1 MiB and /a_directory a directory) and the menuentry had title "success", as desired. Signed-off-by: Alan Dunn <amdunn@google.com> Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
* In GRUB2 parser save_env, treat unset variable value as emptyAlan Dunn2016-03-151-0/+4
| | | | | | | | | | | | | | 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>
* Use 'Primary' instead of 'Current' for flash sidesSam Mendoza-Jonas2016-02-261-2/+2
| | | | | | | | | | | | 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>
* discover: Include leading zero in firmware version stringSam Mendoza-Jonas2016-02-261-2/+2
| | | | Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
* discover: Add support for IPMI network overrideSam Mendoza-Jonas2016-02-263-0/+196
| | | | | | | | | | | | | | | | | | | | | | 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>
* Retrieve BMC version info via IPMISam Mendoza-Jonas2016-02-102-0/+95
| | | | | | | | 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>
* Display VERSION partition info on BMC machinesSamuel Mendoza-Jonas2016-02-094-0/+65
| | | | | | | | | | 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>
OpenPOWER on IntegriCloud