| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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 discover/dm-snapshot that allows the creation of device-mapper
snapshots that support merging changes back to disk.
Device-mapper snapshots are a CoW device backed by a ramdisk, mirroring
the contents of a source device. No changes are made to the original
disk unless an explicit merge action is performed. This guarantees
read-only mounting of host disks even when writes could implicitly
occur, eg. when performing recovering a journaled filesystem.
In the event that writing back to the disk is desired, such as when
updating grubenv, the changes made to the snapshot can be merged back to
the source disk.
This patch adds support but does not change functionality.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is to indicate to a BMC that we have initiated OS boot.
This patch manually parses the device tree for the sensor information.
In the future this could be replaced by libfdt or similar.
Discover the id of your OS Boot sensor:
$ sudo ipmitool sensor get "OS Boot"
Locating sensor record...
Sensor ID : OS Boot (0x5a)
Entity ID : 35.0 (Operating System)
Sensor Type (Discrete): OS Boot (0x1f)
Sensor Reading : 0h
Event Message Control : Per-threshold
Assertion Events : OS Boot
[boot completed - device not specified]
Assertions Enabled : OS Boot
[A: boot completed]
[C: boot completed]
[PXE boot completed]
[Diagnostic boot completed]
[CD-ROM boot completed]
[ROM boot completed]
[boot completed - device not specified]
[Installation started]
[Installation completed]
[Installation aborted]
[Installation failed]
OEM : 0
In this case it is 0x1f. Note that the sesnor is currently asserted iwth boot
completed - device not specified.
Test by clearing all assertions in the OS Boot sensor:
$ sudo ipmitool raw 0x04 0x30 0x5a 0x30 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
$ sudo ipmitool sensor get "OS Boot"
Locating sensor record...
Sensor ID : OS Boot (0x5a)
Entity ID : 35.0 (Operating System)
Sensor Type (Discrete): OS Boot (0x1f)
Sensor Reading : 0h
Event Message Control : Per-threshold
Assertions Enabled : OS Boot
[A: boot completed]
[C: boot completed]
[PXE boot completed]
[Diagnostic boot completed]
[CD-ROM boot completed]
[ROM boot completed]
[boot completed - device not specified]
[Installation started]
[Installation completed]
[Installation aborted]
[Installation failed]
OEM : 0
Then reboot your system. The assertion event should once more say "boot
completed - device not specified".
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Move our IPMI-specific definitions to a separate header, and a
mostly-empty ipmi.c file. We'll populate this with IPMI functionality in
later changes.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
We want to allow an external utility to use the platform config code, so
build it into a .ro, which is then linked to the discover code.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
By default, AC_CHECK_LIB will append to $LIBS, which is used for all
link stages. Intstead, we should popuate $UDEV_LIBS, and just use that
for the single pb-discover link stage.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the current testing infrastructure, we don't have a strictly
hierarchical set of dependencies. This causes problems with a recursive
make, and means we have to hack around some of the dependencies.
This change generates a single, top-level makefile from all of the
Makefile.am fragments. We still need the po/ directory as a separate
SUBDIR, but all others can be converted to non-recursive.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
We want the discover server to respect the configured language, so we'll
need to add appropriate setlocale() calls. We use the config->lang
setting to use any previously-saved language.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's no need to include the config storage code in lib/ as only the
discover server should be using it.
This change moves the config-storage code to discover/, with the
platform-specific parts moved to a 'struct platform'. Each platform has
a probe function, which is called during init. The first probe function
to return a platform is used.
At present we only have the one platform, but it's now non-intrusive to
add others.
We keep an array of platform pointers in a separate ("platforms")
section, to allow the test module to drop-in its own test "platform".
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we don't handle CDROM devices well; we'll try to mount on
boot, and not detect any media changes. Also, the default rules shipping
with udev will put the CDROM tray into a locked state, blocking eject
from working.
This change adds a set of cdrom utility functions, which the udev code
can use to properly initialise cdrom devices and handle eject and media
change requests.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Add a little infrastructure for communicating information about the
system to the petitboot UIs. We just send some identifying info (type
and identifier), as well as the interfaces.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we pass "events" between the udev, user-event and
device-handler layers. These events all get sent through
device_handler_event, then de-multiplexed to an appropriate handler,
depending on their source.
Instead, just export relevant device_handler functions, and have the
(old) event sources call these functions directly.
This also means we can include a lot more of the device hander code in
the parser tests.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
We'll need to read files in the network config code, so add a 'file'
object, containing the read_file function.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
There's no real need for a separate libparser object. Our tests pull-in
the parsers directly, and the discover server is the only thing that
actually links to libparser.ro.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the Makfile.am relocatable output files from automake _LIBRARIES
to automake _PROGRAMS. Also, change the output file name extension
from .o to .ro to better show these are relocatable files.
Fixes automake warnings like these:
discover/Makefile.am: `libparser.o' is not a standard library name
discover/Makefile.am: did you mean `libparser.a'?
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
|
|
| |
We'll need a sysconf dir to store the boot hooks.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Support for 'RUN+="socket:' in udev rules files has been removed
in udev version 183. Update the discover server to use libudev.
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we require all parsers to be defined in an array in
parsers.c.
This change removes this requirement, by introducting a
register_parser() macro, which adds a constructor to register the parser
with the core parser infrastructure.
Because each parser no longer resolves an undefined symbol, we need to
use a `ld -r` object for libparser, instead of using libtool, which
creates a .a (and hence has no parsers included).
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change switches the parsers over to populate the resources in
discover_boot_option, rather than the string parameters in boot_option.
To do this, we need a few things:
* Add struct resources to discover_boot_option for the boot_image,
initrd and icon data.
* Have the parsers populate the resources, rather than the strings.
Currently, parsers can all use the devpath resource type.
* Add a resolve_resource callback to parsers; this is how the device
handler will attempt to resolve resources.
* Change load_file to load_url, as we should be only accessing
(resolved) resources by URLs.
This then allows us to remove the mount map, and associated lookup code,
as well as the UUID and label links to devices.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
Add a generic resource type, to handle "dev:path"-style file references.
This creates a duplicate of is_prefix_ignorecase, which we'll switch
over to later.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce a new type, struct resource, for handling resources such as
kernels and initrds.
This allows the parsers to better describe resources that are required
for booting. Firstly, we enforce all resources to be URLs, rather than
local paths. Also, resources allow us to describe files devices that
have not-yet been hotplugged.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
This change adds a funtion, device_handler_boot, which processes the
boot command message from the discover server.
We add a new file, discover/boot.c (and a corresponding header) with a
skeleton for the final kexec code.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
|
|
|
|
| |
Add grub2 parser and sample config file.
Reorder parser priorities:
From (yaboot -> kboot) to (kboot -> grub2 -> yaboot).
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
| |
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
| |
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
Signed-off-by: Geoff Levand <geoff@infradead.org>
|