summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add test case for empty yaboot.conf fileGeoff Levand2009-06-301-0/+6
| | | | | | | 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>
* Check if yaboot.conf files are emptyGeoff Levand2009-06-301-1/+6
| | | | | | | 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>
* Remove unneeded conf stripGeoff Levand2009-06-301-5/+0
| | | | | | | | 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>
* Udev log socket deviceGeoff Levand2009-06-301-0/+2
| | | | | | | 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 udev triggerGeoff Levand2009-06-303-0/+13
| | | | | | | | 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 protocol payload size to 64KiBGeoff Levand2009-06-301-1/+1
| | | | | | | | | | | 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>
* Revert const device in discover_client_opsGeoff Levand2009-06-302-4/+4
| | | | | | | | | | | | | | 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>
* Fix memmove sizeGeoff Levand2009-06-302-2/+3
| | | | | | | 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>
* PS3 platform routinesGeoff Levand2009-03-303-2/+312
| | | | | | | | | | | 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>
* Rename client add remove opsGeoff Levand2009-03-304-15/+15
| | | | | | | | 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>
* Kboot parser URL testGeoff Levand2009-03-301-0/+7
| | | | | | | 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 more yaboot parser testsGeoff Levand2009-03-304-0/+84
| | | | | | | | 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 parser test programGeoff Levand2009-03-303-73/+61
| | | | | | | | | | 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 yaboot-cfg filesGeoff Levand2009-03-302-521/+0
| | | | | | | | 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 yaboot parserGeoff Levand2009-03-302-201/+222
| | | | | | | | | 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>
* Split common routines from kboot parserGeoff Levand2009-03-305-270/+432
| | | | | | | | | | | | | | | | 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>
* Log new boot optionsGeoff Levand2009-03-301-0/+9
| | | | | | | 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>
* log discover mount failureGeoff Levand2009-03-301-2/+4
| | | | | | | 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>
* Makefile set udev rule permissionsGeoff Levand2009-03-301-1/+1
| | | | | | | 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>
* Fix udev ruleGeoff Levand2009-03-301-1/+1
| | | | | | | 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>
* Get log streamGeoff Levand2009-03-302-0/+6
| | | | | | | | | 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>
* Increase protocol payload sizeGeoff Levand2009-03-302-4/+18
| | | | | | | | | | | | 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>
* Add hotplug test scriptJeremy Kerr2009-03-231-0/+61
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Log server messages to fileGeoff Levand2009-03-234-8/+20
| | | | | | | 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 CFLAGS to LDFLAGSGeoff Levand2009-03-231-0/+1
| | | | | | | | | | | 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>
* Fix out of source make distGeoff Levand2009-03-231-2/+2
| | | | | | | 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 makefile deps to makefileGeoff Levand2009-03-231-0/+8
| | | | | | | Add a dependency on the makefiles so a rebuild is done when they change. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Makefile cleanupsGeoff Levand2009-03-232-41/+75
| | | | | | General cleanup of the makefile. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Add maintainer-clean makefile targetGeoff Levand2009-03-231-0/+11
| | | | | | | Add a maintainer-clean makefile target that cleans all the generated files. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Install udev rulesGeoff Levand2009-03-231-1/+4
| | | | | | Add 99-petitboot.rules to the install make target. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Add SHELL to Makefile.inGeoff Levand2009-03-231-0/+1
| | | | | | | 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>
* Hookup the --with-twin configure optionGeoff Levand2009-03-233-3/+9
| | | | | | | 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 types header in tallocGeoff Levand2009-03-231-0/+1
| | | | | | | | | | | 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>
* Loop through valid kboot conf namesGeoff Levand2009-03-231-13/+38
| | | | | | | | | | | 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>
* Rename symbol newGeoff Levand2009-03-232-16/+16
| | | | | | | 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 list_for_each_entry_continue routineGeoff Levand2009-03-231-0/+4
| | | | | | | 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 cb_arg to discover_client_initGeoff Levand2009-02-213-3/+4
| | | | | | | | 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>
* petitboot: Add --with-twin config optionGeoff Levand2009-02-211-1/+19
| | | | | | | | | 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 boot_option_copy routineGeoff Levand2009-02-212-22/+0
| | | | | | | | | | 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 list insert routinesGeoff Levand2009-02-212-9/+23
| | | | | | | | 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 protocol object compare routinesGeoff Levand2009-02-212-0/+15
| | | | | | | | | 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 log move commitGeoff Levand2009-02-021-1/+1
| | | | | | | | 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>
* [discover client] Remove device from discover array before notifying UIJeremy Kerr2009-02-011-4/+4
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* [discover client] Add device accessorsJeremy Kerr2009-02-012-0/+32
| | | | | | Allow the UIs to query the current device set. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* [pb-protocol] Add ui_info member to devices and boot optionsJeremy Kerr2009-02-011-0/+4
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* [discover client] Make devices persistentJeremy Kerr2009-02-013-6/+52
| | | | | | | 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 device instance constantGeoff Levand2009-02-015-15/+17
| | | | | | | 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 client ops constantGeoff Levand2009-02-013-8/+11
| | | | | | | 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 client ops instance argGeoff Levand2009-02-013-7/+16
| | | | | | | | | 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 boot_option_copy routineGeoff Levand2009-02-012-0/+21
| | | | | | | 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>
OpenPOWER on IntegriCloud