| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
Add an ncurses boot option editor.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Add support for an ncurses UI menu object.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
Add a udhcpc utility script. udhcpc can be configured to run a
specified script when there is a change in the dhcp configuration.
This udhcpc utility script will write a petitboot netboot message
to the petitboot user event socket.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
Add a new helper utility pb_event. pb_event reads
data on stdin and writes it to the petitboot event
socket.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Add a gereric event interface to pb-discover.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
The struct udev_event can be used as a generic event, so rename it
struct event and move it from udev.h into a new file event.h.
Also, rename the emums UDEV_ACTION_ADD and UDEV_ACTION_REMOVE
to ACTION_UDEV_ADD and ACTION_UDEV_REMOVE.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add some UI system helper routines:
pb_run_kexec()
pb_elf_hash()
pb_cat_hash()
pb_opt_hash()
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Create the new files loader.h and loader.c for loading remote
file specifed by its URL.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
Create the new files url.h and url.c for parsing URL strings.
The new structure struct pb_url holds the results of the parse
operation.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Convert device-handler to use the common lib system routines.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move some of the common system operations to lib system routines.
Creates these common routines:
pb_mkdir_recursive()
pb_rmdir_recursive()
pb_run_cmd()
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
Add a check to discover's resolve_path() to test if the path
is a URL, and if so just return that path.
If the path has "file://", treat it as a local path.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
Fillout the missing discover code that reports current devices.
Replaces device_handler_get_current_devices() with two new
accessor routines device_handler_get_device_count() and
device_handler_get_device().
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
Remove the test code from device-handler.c and hookup
handler.devices and handler.n_devices in
device_handler_get_current_devices().
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Add a test case for empty yaboot.conf files.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Add a yaboot parser check to ignore empty yaboot.conf files.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
conf_get_param_pair() already runs conf_strip_str() on value,
so remove a redundent conf_strip_str() call.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
To aid problem resolution log the udev socket device to the pb_log.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Add a new routine udev_trigger() that requests a replay of
system udev events.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Increase the protocol payload size from 8 KiB to 64 KiB.
Udev uses some really long device names for USB mass storage
devices so the config file data can easily excceed the protocol
payload.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make the device structure passed to the discover_client_ops callbacks
writable.
Commit 2b42cdd35ccd83c52e9df257efdfcda040d170d9 (Make client ops constant)
changed the discover_client_ops callback routine arguments to be pointers
to const device structures. Typically, the callback routines will
initialize and destroy the device.ui_info and boot_option.info variables,
so the device instance must be writable by the callback routines.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Correct the byte count for several memmove calls.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Add new files ui/common/ps3.h and ui/common/ps3.c with
platform specific routines to access the PS3 flash
memory and to get and set the PS3 video mode.
The flash routines use the ps3-utils library.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
For consistency, rename the symbols add_device and remove_device
to device_add and device_remove.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Add a kboot parser test for network URLs.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Add yaboot.conf files from fedora, OpenSUSE, and a yaboot whitespace
and comment test.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
Fixup the parser test program and helper script to work
with the new multi-ui design.
The expected-output files have not been updated.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Remove the now unused yaboot-cnf.h and yaboot-cnf.c files.
These files are no longer needed with the parser-conf routines.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
Hookup the yaboot parser to the new parser-conf routines.
This update eliminates the dependency on yaboot-cnf.h
and yaboot-cnf.c.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pull out the common .conf file parsing logic from kboot-parser.c and
into two new files parser-conf.h and parser-conf.c, and rework
the kboot parser to use those common routines.
The new common routines are based on a .conf file parser context
struct conf_context. The specific parsers setup the context then
call the main parsing entry routine conf_parse(). conf_parse()
uses the context info to open and read .conf files and call
parser specific callbacks to process name:value pairs and to
add boot_option instances to the discover server.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Add calls to log new devices in device_add_boot_option().
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Add the status value to the discover mount failure log.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Set the proper install file permissions on the udev rules.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Change 'RUN=' to 'RUN+=' to let other block rules run.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
Add a new convenience routine pb_log_get_stream() that returns the
current PB_log stream. Used to setup the ps3-utils library to log
to the pb_log.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes the problem of big conf files not showing up in the UI.
Increases the protocol payload from 4 KiB to 8 KiB.
Also, adds some log messages when I/O errors occur, or the payload
is too large for the protocol.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Log discover server messages to a file. Helps in debugging
the server when is has problems at system startup.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add the CFLAGS options to LDFLAGS so that the machine option
from CFLAGS is used when linking. This duplicates the
behavior of automake.
Fixes errors like these:
ppu-ld: skipping incompatible libc.so when searching for -lc
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
|
|
|
|
|
|
|
| |
The dist makefile target needs to work on files in the
source directory. Add the missing $(top_srcdir).
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
|
|
|
|
|
|
|
| |
Add a dependency on the makefiles so a rebuild is done
when they change.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
|
|
|
|
|
|
| |
General cleanup of the makefile.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
|
|
|
|
|
|
|
| |
Add a maintainer-clean makefile target that cleans all the
generated files.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
|
|
|
|
|
|
| |
Add 99-petitboot.rules to the install make target.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
|
|
|
|
|
|
|
| |
Add SHELL to the list of variables in Makefile.in to make
it available to the Makefile.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
|
|
|
|
|
|
|
| |
Add some missing makefile parts to make the --with-twin configure
option work properly.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Include sys/types.h in talloc.h.
talloc.h uses off_t, which is defined in sys/types.h.
Fixes this OpenWRT build error:
./lib/talloc/talloc.h:114: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'talloc_total_size'
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The PS3 bootloader spec allows several kboot.conf file names.
Add a loop in the parser to check for all of them.
Also, print some diagnostic messages to the log file and change
the parser routine name from 'parser' to 'kboot_parser'
to give a better log file output.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
|
|
|
|
|
|
|
| |
Change the symbol 'new' to an alternative. The symbol new is
reserved for C++ compilers.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
|
|
|
|
|
|
|
| |
Add a new list iteration routine list_for_each_entry_continue(). Continues
iteration from a user specified list item.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
|