| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Add a debug-style nvram parameter to disallow the use of device-mapper
snapshots.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Move petitboot to a more familiar 'boot-order' based autoboot system.
The discover server now reads multiple values from the petitboot,bootdev
parameter and adds them in order to config->autoboot_opts. Boot priority
is determined by the options' position in the list.
On the client, nc-config now recognises the new boot order, and allows
the user to add, remove, and reorder the devices in the list.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Add a little script for downloading and/or extracting a plugin into a
petitboot environment
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
This change adds a debug flag to the config, and groups it under
not-user-modifiable parts of struct config.
This means we no longer need the pb-sysinfo helper, as the last
remaining function (--debug-enabled) can be implemented with pb-config.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change uses the platform-specific code to read the system type and
identifier, rather than the pb-sysinfo utility. We introduce a new
callback for struct platform:
int (*get_sysinfo)(struct platform *, struct system_info *);
- which populates struct system_info with appropriate information.
This means that the system-specific code is kept in one place; rather
than having powerpc-specific device-tree-reading code in the pb-sysinfo
shell script.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
A simple tool to query platform configuration.
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>
|
|
|
|
|
|
| |
For local consoles, we always want a TERM=linux.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we need to compile with -DDEBUG to implement debug-level
logging in the UIs and discover server.
Since we may not be able to easily replace a system's petitboot
binaries, this change introduces a -v|--verbose option to the discver
server and ncurses UI, which enables debug at runtime. We also move some
of the udev debug code out of an #ifdef DEBUG block.
Since petitboot is generally started on boot, we also add a little
infrastructure to pass -v to petitboot on certain system contitions:
either petitboot.debug on the kernel command line, or a petitboot,debug?
NVRAM property containing the value 'true'.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
We were missing a couple of the later hooks from the Makefile.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
udhcpc may pass the bootfile parameter as either $bootfile or
$boot_file, depending on whether the option is present in the BOOTP
header, or as a DHCP vendor option. We have code in pb-udhcpc to unify
this to $bootfile, but we only use the unified value in one of the user
events.
This change uses the correct value of bootfile, and fixes the check to
conditionally generate the explicit add event. We also need to update
the user-event code to use the right event parameter name.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
We have a typo in the udhcpc hook, where we're not referncing the
interface variable correctly. This means we'll get the same device
identifier for all netboot options.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
The $(< FILE) syntax we use to read an interface's MAC address doesn't
work in dash or busybox sh. Instead, use cat.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change implements support for the DHCP "pathprefix" option. We use
the following logic:
- If pathprefix is present and a full URL, we base the config file
location on pathprefix + conffile
- If pathprefix is present but not a full URL, we use it as the path
component of the URL, and pick up the host from other parameters in
the DHCP response
- If no pathprefix is present, we determine the configuration prefix
from the DHCP bootfile parameter.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Rather than #defining _GNU_SOURCE in our .c files, we can define this
from config.h instead.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patch that went upstream for udhcpc's option 209 handling uses the
option name 'pxeconffile' rather than 'conffile', and it was added as a
non-default option:
http://git.busybox.net/busybox/commit/?id=d3092c99ae90f
This change uses the new name, and explicilty requests this option.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
... otherwise we'll try and bring the UI up on the current tty too.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new function parser_request_url() to read the data from
configuration files present remotely. We deprecate
iterate_parser_files() and download_config() functions along with the
'filenames' and 'method' members of the 'parser' structure so that
individual parsers would now require to request the configuration files
data from the parser code and doesn't necessarily export the list of
configuration files.
Add the support to handle incoming DHCP event, done by passing all the
relevant environment variables of the udhcpc to the discover code.
Also, update the pxe parser code to populate the list of configuration
file names as per PXELINUX convention of fallback names using mac and ip
addresses of the booting machine.
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Otherwise we'll keep collecting new options every $lease_time period.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
No need to prefix with /net/
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
In the 'as-is' case, we were echoing both URLs.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
We're currently requesting a colon-separated MAC address. Instead, we
need it to be hypen-separated, and prefixed with the ethernet type
("01-").
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Fix a couple of bugs in the udhcp script.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Since we're starting from no environment on the consoles, allow
specifying an initial environment.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Provide an example for writing a pre-boot hook to update the dtb.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
exec is a bit flaky for starting on consoles, so use getty instead.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Allows for cleaner usage message in the source.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
In preparation for packaging add a man page, a help option, and some
comments to the script.
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
It'd be nice to avoid using printf just for the \0 characters, so allow
parsing events from the command line.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we include the system include dir in some of our makefiles;
this is causing build problems when cross-compiling, as the system
include dir may not contain files for the host.
The compiler should be searing in the proper system include dir, so just
remove the redundant -I.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
With the switch of the discover server to use the libudev
monitor support a rules file is no longer needed.
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
DHCP boot-file parameters may not contain a preceeding slash. In this
case, the current udhcp script will not form a correct URL.
This change adds the slash unconditionally; in the case that the
pathname already has a preceeding slash, the URL parser will handle this
correctly.
Signed-off-by: Jeremy Kerr <jk@ozlabs.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>
|
|
|
|
| |
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>
|