| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Pass the client cb_arg to discover_client_init() and have it
initialize the structure member.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
Make the build of the GUI components conditional on the installation
of libtwin. Also, add options --with-twin and --without-twin to allow the
user to override the default.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
Remove the now uneeded boot_option_copy() routine.
The addition of persistant client device and boot option info
make this routine uneeded.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Add new list insertion routines list_insert_before(), list_insert_after(),
and list_add_tail(). Also, change list_add() to use list_insert_after().
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
Add routines pb_protocol_device_cmp() and pb_protocol_boot_option_cmp()
to hide the implemention details of the device. The implementation
of the id can be changed without effecting the users of it.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Fix missed log.h path change in log move commit
(dae4540e417e2bf72dd83b2713a670bde0056ba9).
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>
|
|
|
|
|
|
| |
Allow the UIs to query the current device set.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Change discover client to keep devices around after they've been
added, and freed after removal.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Make the instance of devices read-only.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Make the discover_client_ops args read-only.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
Add a user supplied agument to the struct discover_client_ops
callback routines that is suitable for managing client instance
data.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Add the convenience routine boot_option_copy(). Does a deep copy.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
Flush the pb_log stream when the stream is changed, and add an
option to flush the pb_log stream on every write. Useful while
debugging.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Change any use of the standard io streams in the client
routines to use pb_log().
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Move the log routines to the petitboot library. The log
routines are generic enough to be used for both server and
client. Does not change the log source.
jk: move to lib/log/ instead of lib/
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Add the missing assignment of the global n_pollfds variable.
Fix a minor memory leak in waiter_poll().
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Move the waiter routines into the petitboot library. The waiter
routines are generic enough to be used for both server and
client. Does not change the waiter source.
jk: move to lib/waiter/ instead of lib/
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix various minor build warnings:
lib/pb-protocol/pb-protocol.c:72: warning: comparison between signed and unsigned
lib/pb-protocol/pb-protocol.c:78: warning: comparison between signed and unsigned
lib/pb-protocol/pb-protocol.c:141: warning: unused parameter 'buf_len'
lib/pb-protocol/pb-protocol.c:241: warning: comparison between signed and unsigned
discover/pb-discover.c:14: warning: no previous prototype for 'sigint_handler'
discover/pb-discover.c:13: warning: unused parameter 'signum'
discover/log.c:22: warning: no previous prototype for 'pb_log_set_stream'
discover/discover-server.c:159: warning: no previous prototype for 'discover_server_notify_add'
discover/discover-server.c:169: warning: no previous prototype for 'discover_server_notify_remove'
discover/discover-server.c:179: warning: no previous prototype for 'discover_server_set_device_source'
discover/discover-server.c:184: warning: no previous prototype for 'discover_server_init'
discover/discover-server.c:229: warning: no previous prototype for 'discover_server_destroy'
discover/device-handler.c:395: warning: comparison between signed and unsigned
discover/paths.c:44: warning: comparison between signed and unsigned
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
Fix the make target install.
Fixes errors like these:
/usr/bin/install: cannot stat `petitboot': No such file or directory
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
To better illustrate the usage of pb_protocol_create_message(),
change the type of the arg action from int to enum pb_protocol_action.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Update the udev petitboot rule to use the petitboot discover socket
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>
|
|
|
|
|
|
| |
Allow the client to detect read() failures.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Instead of hardcoding the array of parsers, use the linker to do the
work for us.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Iterate the parsers from the device handler on an add event.
Initial change to just the kboot parser.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|