]> git.ozlabs.org Git - petitboot/log
petitboot
12 years agoAdd STATIC_LIST initializer
Geoff Levand [Sat, 12 Nov 2011 06:28:50 +0000 (22:28 -0800)]
Add STATIC_LIST initializer

Signed-off-by: Geoff Levand <geoff@infradead.org>
12 years agoFix waiter_register return value
Geoff Levand [Fri, 4 Nov 2011 03:31:50 +0000 (20:31 -0700)]
Fix waiter_register return value

12 years agoAdd data structs to ui-system
Geoff Levand [Mon, 31 Oct 2011 03:58:04 +0000 (20:58 -0700)]
Add data structs to ui-system

12 years agoAdd pb_protocol_dump_device
Geoff Levand [Mon, 31 Oct 2011 03:54:31 +0000 (20:54 -0700)]
Add pb_protocol_dump_device

12 years agopb-event: Add help message
Geoff Levand [Sun, 30 Oct 2011 04:49:51 +0000 (21:49 -0700)]
pb-event: Add help message

12 years agoAdd n_options to struct device
Geoff Levand [Fri, 28 Oct 2011 04:56:53 +0000 (21:56 -0700)]
Add n_options to struct device

12 years agoUpdate maintainer
Geoff Levand [Tue, 11 Oct 2011 21:13:06 +0000 (14:13 -0700)]
Update maintainer

14 years agocui: Remove tab hotkey
Geoff Levand [Wed, 26 Aug 2009 22:41:40 +0000 (15:41 -0700)]
cui: Remove tab hotkey

Remove the 'tab' hotkey that was used for kboot compatability.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoFix seg fault on ps3 flash error
Geoff Levand [Wed, 26 Aug 2009 00:25:12 +0000 (17:25 -0700)]
Fix seg fault on ps3 flash error

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoFix minor typo in discover-client file descriptor check
Geoff Levand [Tue, 4 Aug 2009 00:11:38 +0000 (17:11 -0700)]
Fix minor typo in discover-client file descriptor check

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoIterate over all conf file parsers
Geoff Levand [Thu, 9 Jul 2009 22:37:25 +0000 (15:37 -0700)]
Iterate over all conf file parsers

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoDelete kexec temporary files before rebooting
Geoff Levand [Thu, 9 Jul 2009 21:45:48 +0000 (14:45 -0700)]
Delete kexec temporary files before rebooting

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoBuild test UI program with tests
Geoff Levand [Thu, 9 Jul 2009 17:40:44 +0000 (10:40 -0700)]
Build test UI program with tests

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoAdd petitboot man pages
Geoff Levand [Thu, 9 Jul 2009 17:40:44 +0000 (10:40 -0700)]
Add petitboot man pages

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoAdd discover server options
Geoff Levand [Thu, 9 Jul 2009 17:40:44 +0000 (10:40 -0700)]
Add discover server options

Add --help, --log, and --version command line options to the discover server.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoUse yaboot global boot option
Geoff Levand [Thu, 9 Jul 2009 17:40:44 +0000 (10:40 -0700)]
Use yaboot global boot option

Use any yaboot global boot option in preference to the
yaboot.conf device path.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoFix parsing for OpenSUSE
Geoff Levand [Thu, 9 Jul 2009 17:40:44 +0000 (10:40 -0700)]
Fix parsing for OpenSUSE

Fix the special yaboot.conf parsing needed for the
OpenSUSE install CD.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoZero parser globals before use
Geoff Levand [Thu, 9 Jul 2009 17:40:44 +0000 (10:40 -0700)]
Zero parser globals before use

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoAdd default video arg to kernel command line
Geoff Levand [Thu, 9 Jul 2009 17:40:44 +0000 (10:40 -0700)]
Add default video arg to kernel command line

Add the current bootloader video mode to the kernel command line
when the command line does not have a video mode specified.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoAdd ncurses joystick support
Geoff Levand [Thu, 9 Jul 2009 17:40:44 +0000 (10:40 -0700)]
Add ncurses joystick support

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoUpdate item text on edit
Geoff Levand [Thu, 9 Jul 2009 17:40:44 +0000 (10:40 -0700)]
Update item text on edit

Update the boot option menu item text on edit.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoRemove unused ked status ked_boot.
Geoff Levand [Thu, 9 Jul 2009 17:40:44 +0000 (10:40 -0700)]
Remove unused ked status ked_boot.

Remove unused code for the ked return status ked_boot.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoRemove nc menu description
Geoff Levand [Thu, 9 Jul 2009 17:40:44 +0000 (10:40 -0700)]
Remove nc menu description

Remove some unused nc menu description code.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoCUI add empty item
Geoff Levand [Thu, 9 Jul 2009 17:40:44 +0000 (10:40 -0700)]
CUI add empty item

Add a CUI hot-key 'o' that opens a new empty menu item.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoAdd generic CUI program
Geoff Levand [Thu, 9 Jul 2009 17:40:44 +0000 (10:40 -0700)]
Add generic CUI program

Add a non-PS3 CUI program.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoFix CUI scroll
Geoff Levand [Thu, 9 Jul 2009 17:40:44 +0000 (10:40 -0700)]
Fix CUI scroll

A call to pos_menu_cursor() is needed when items are added
to menu.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoFix ps3 boot game OS
Geoff Levand [Thu, 9 Jul 2009 17:40:44 +0000 (10:40 -0700)]
Fix ps3 boot game OS

Fix the PS3 boot game OS item.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoDisplay version on debug builds
Geoff Levand [Thu, 9 Jul 2009 17:40:44 +0000 (10:40 -0700)]
Display version on debug builds

Display the program version in the main menu for debug builds.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoAdd PS3 timeout option
Geoff Levand [Thu, 9 Jul 2009 17:40:44 +0000 (10:40 -0700)]
Add PS3 timeout option

Add an option --timeout to the PS3 CUI program to enable
the use of the autoboot timer.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoAdd PS3 reset default option
Geoff Levand [Thu, 9 Jul 2009 17:40:44 +0000 (10:40 -0700)]
Add PS3 reset default option

Add a --reset-defaults option to the PS3 CUI program.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoAdd PS3 countdown timer
Geoff Levand [Thu, 9 Jul 2009 17:40:44 +0000 (10:40 -0700)]
Add PS3 countdown timer

Add countdown timer support to the PS3 UI programs.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoAdd CUI countdown timer
Geoff Levand [Thu, 9 Jul 2009 17:40:44 +0000 (10:40 -0700)]
Add CUI countdown timer

Add support for a petitboot CUI countdown timer.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoAdd generic UI countdown timer
Geoff Levand [Thu, 9 Jul 2009 17:40:44 +0000 (10:40 -0700)]
Add generic UI countdown timer

Add support for a generic petitboot UI countdown timer.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoRemove ked ctrl-B hot key
Geoff Levand [Thu, 9 Jul 2009 17:40:44 +0000 (10:40 -0700)]
Remove ked ctrl-B hot key

Remove ked ctrl-B hot key.  It is just as easy to hit
enter twice.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoFix ked backspace
Geoff Levand [Thu, 9 Jul 2009 17:40:43 +0000 (10:40 -0700)]
Fix ked backspace

Fix a bug in the ked editor field backspace logic.
Stop deleting chars when cursor reaches front of feild
buffer.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoSimplify kexec
Geoff Levand [Thu, 9 Jul 2009 17:40:43 +0000 (10:40 -0700)]
Simplify kexec

Simplify the pb_run_kexec() routine.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoFix kexec call
Geoff Levand [Thu, 9 Jul 2009 17:40:43 +0000 (10:40 -0700)]
Fix kexec call

Fix the preparation of kexec call args.  kexec wants the param
and value in the same arg.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoQuiet wget
Geoff Levand [Thu, 9 Jul 2009 17:40:43 +0000 (10:40 -0700)]
Quiet wget

Add the --quiet option to wget for non-debug builds.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoLog child output
Geoff Levand [Thu, 9 Jul 2009 17:40:43 +0000 (10:40 -0700)]
Log child output

Redirect the output of child processes to pb_log.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoRemove discover sd to ps3d hack
Geoff Levand [Thu, 9 Jul 2009 17:40:43 +0000 (10:40 -0700)]
Remove discover sd to ps3d hack

This is now old enough to be retired and allow config files
on ps3d devices to refer to scsi devices.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agomakefile INSTALL variables
Geoff Levand [Thu, 9 Jul 2009 17:40:43 +0000 (10:40 -0700)]
makefile INSTALL variables

Add more INSTALL variables to the makefile.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoFix nc-cui comment
Geoff Levand [Thu, 9 Jul 2009 17:40:43 +0000 (10:40 -0700)]
Fix nc-cui comment

A simple comment move.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
14 years agoAdd PS3 ncurses CUI program
Geoff Levand [Sun, 12 Apr 2009 15:12:00 +0000 (15:12 +0000)]
Add PS3 ncurses CUI program

Add a PS3 ncurses CUI program, and the configure option --enable-ps3
to control its build.  The default is --enable-ps3=yes.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
14 years agoAdd ncurses UI support
Geoff Levand [Sun, 12 Apr 2009 15:11:59 +0000 (15:11 +0000)]
Add ncurses UI support

Add helper routines to support ncurses UI programs.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
14 years agoAdd ncurses boot option editor
Geoff Levand [Sun, 12 Apr 2009 15:11:58 +0000 (15:11 +0000)]
Add ncurses boot option editor

Add an ncurses boot option editor.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
14 years agoAdd ncurses UI menu
Geoff Levand [Sun, 12 Apr 2009 15:11:57 +0000 (15:11 +0000)]
Add ncurses UI menu

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>
14 years agoAdd udhcpc utility script
Geoff Levand [Sun, 12 Apr 2009 15:11:56 +0000 (15:11 +0000)]
Add udhcpc utility script

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>
14 years agoAdd pb-event helper utility
Geoff Levand [Sun, 12 Apr 2009 15:11:55 +0000 (15:11 +0000)]
Add pb-event helper utility

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>
14 years agoAdd discover user event
Geoff Levand [Sun, 12 Apr 2009 15:11:54 +0000 (15:11 +0000)]
Add discover user event

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>
14 years agoMake udev_event a generic event
Geoff Levand [Sun, 12 Apr 2009 15:11:53 +0000 (15:11 +0000)]
Make udev_event a generic event

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>
14 years agoAdd ui-system helper routines
Geoff Levand [Sun, 12 Apr 2009 15:11:52 +0000 (15:11 +0000)]
Add ui-system helper routines

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>
14 years agoAdd remote file loading routines
Geoff Levand [Sun, 12 Apr 2009 15:11:51 +0000 (15:11 +0000)]
Add remote file loading routines

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>
14 years agoAdd URL parsing routines
Geoff Levand [Sun, 12 Apr 2009 15:11:50 +0000 (15:11 +0000)]
Add URL parsing routines

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>
14 years agoSwitch device-handler to system helpers
Geoff Levand [Sun, 12 Apr 2009 15:11:49 +0000 (15:11 +0000)]
Switch device-handler to system helpers

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>
14 years agoMove common system routines to lib
Geoff Levand [Sun, 12 Apr 2009 15:11:48 +0000 (15:11 +0000)]
Move common system routines to lib

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>
14 years agoAdd URL test to resolve_path
Geoff Levand [Sun, 12 Apr 2009 15:11:47 +0000 (15:11 +0000)]
Add URL test to resolve_path

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>
14 years agoAdd discover device report
Geoff Levand [Sun, 12 Apr 2009 15:11:46 +0000 (15:11 +0000)]
Add discover device report

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>
14 years agoRemove device handler test code
Geoff Levand [Sun, 12 Apr 2009 15:11:45 +0000 (15:11 +0000)]
Remove device handler test code

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>
14 years agoAdd test case for empty yaboot.conf file
Geoff Levand [Sun, 12 Apr 2009 15:11:44 +0000 (15:11 +0000)]
Add test case for empty yaboot.conf file

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>
14 years agoCheck if yaboot.conf files are empty
Geoff Levand [Sun, 12 Apr 2009 15:11:43 +0000 (15:11 +0000)]
Check if yaboot.conf files are empty

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>
14 years agoRemove unneeded conf strip
Geoff Levand [Sun, 12 Apr 2009 15:11:42 +0000 (15:11 +0000)]
Remove unneeded conf strip

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>
14 years agoUdev log socket device
Geoff Levand [Sun, 12 Apr 2009 15:11:41 +0000 (15:11 +0000)]
Udev log socket device

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>
14 years agoAdd udev trigger
Geoff Levand [Sun, 12 Apr 2009 15:11:40 +0000 (15:11 +0000)]
Add udev trigger

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>
14 years agoIncrease protocol payload size to 64KiB
Geoff Levand [Sun, 12 Apr 2009 15:11:39 +0000 (15:11 +0000)]
Increase protocol payload size to 64KiB

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>
14 years agoRevert const device in discover_client_ops
Geoff Levand [Sun, 12 Apr 2009 15:11:38 +0000 (15:11 +0000)]
Revert const device in discover_client_ops

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>
14 years agoFix memmove size
Geoff Levand [Sun, 12 Apr 2009 15:11:37 +0000 (15:11 +0000)]
Fix memmove size

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>
15 years agoPS3 platform routines
Geoff Levand [Wed, 25 Mar 2009 12:36:03 +0000 (12:36 +0000)]
PS3 platform routines

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>
15 years agoRename client add remove ops
Geoff Levand [Wed, 25 Mar 2009 12:36:04 +0000 (12:36 +0000)]
Rename client add remove ops

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>
15 years agoKboot parser URL test
Geoff Levand [Wed, 25 Mar 2009 12:36:01 +0000 (12:36 +0000)]
Kboot parser URL test

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>
15 years agoAdd more yaboot parser tests
Geoff Levand [Wed, 25 Mar 2009 12:36:00 +0000 (12:36 +0000)]
Add more yaboot parser tests

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>
15 years agoFixup parser test program
Geoff Levand [Wed, 25 Mar 2009 12:35:59 +0000 (12:35 +0000)]
Fixup parser test program

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>
15 years agoRemove yaboot-cfg files
Geoff Levand [Wed, 25 Mar 2009 12:35:58 +0000 (12:35 +0000)]
Remove yaboot-cfg files

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>
15 years agoHookup yaboot parser
Geoff Levand [Wed, 25 Mar 2009 12:35:57 +0000 (12:35 +0000)]
Hookup yaboot parser

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>
15 years agoSplit common routines from kboot parser
Geoff Levand [Wed, 25 Mar 2009 12:35:56 +0000 (12:35 +0000)]
Split common routines from kboot parser

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>
15 years agoLog new boot options
Geoff Levand [Wed, 25 Mar 2009 12:35:55 +0000 (12:35 +0000)]
Log new boot options

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>
15 years agolog discover mount failure
Geoff Levand [Wed, 25 Mar 2009 12:35:53 +0000 (12:35 +0000)]
log discover mount failure

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>
15 years agoMakefile set udev rule permissions
Geoff Levand [Wed, 25 Mar 2009 12:35:50 +0000 (12:35 +0000)]
Makefile set udev rule permissions

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>
15 years agoFix udev rule
Geoff Levand [Wed, 25 Mar 2009 12:35:49 +0000 (12:35 +0000)]
Fix udev rule

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>
15 years agoGet log stream
Geoff Levand [Wed, 25 Mar 2009 12:35:48 +0000 (12:35 +0000)]
Get log stream

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>
15 years agoIncrease protocol payload size
Geoff Levand [Wed, 25 Mar 2009 12:35:47 +0000 (12:35 +0000)]
Increase protocol payload size

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>
15 years agoAdd hotplug test script
Jeremy Kerr [Mon, 23 Mar 2009 10:44:14 +0000 (21:44 +1100)]
Add hotplug test script

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agoLog server messages to file
Geoff Levand [Fri, 27 Feb 2009 14:54:06 +0000 (14:54 +0000)]
Log server messages to file

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>
15 years agoAdd CFLAGS to LDFLAGS
Geoff Levand [Fri, 27 Feb 2009 14:54:04 +0000 (14:54 +0000)]
Add CFLAGS to LDFLAGS

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>
15 years agoFix out of source make dist
Geoff Levand [Fri, 27 Feb 2009 14:54:03 +0000 (14:54 +0000)]
Fix out of source make dist

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>
15 years agoAdd makefile deps to makefile
Geoff Levand [Fri, 27 Feb 2009 14:54:02 +0000 (14:54 +0000)]
Add makefile deps to makefile

Add a dependency on the makefiles so a rebuild is done
when they change.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
15 years agoMakefile cleanups
Geoff Levand [Fri, 27 Feb 2009 14:54:01 +0000 (14:54 +0000)]
Makefile cleanups

General cleanup of the makefile.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
15 years agoAdd maintainer-clean makefile target
Geoff Levand [Fri, 27 Feb 2009 14:54:00 +0000 (14:54 +0000)]
Add maintainer-clean makefile target

Add a maintainer-clean makefile target that cleans all the
generated files.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
15 years agoInstall udev rules
Geoff Levand [Fri, 27 Feb 2009 14:53:59 +0000 (14:53 +0000)]
Install udev rules

Add 99-petitboot.rules to the install make target.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
15 years agoAdd SHELL to Makefile.in
Geoff Levand [Fri, 27 Feb 2009 14:53:58 +0000 (14:53 +0000)]
Add SHELL to Makefile.in

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>
15 years agoHookup the --with-twin configure option
Geoff Levand [Fri, 27 Feb 2009 14:53:57 +0000 (14:53 +0000)]
Hookup the --with-twin configure option

Add some missing makefile parts to make the --with-twin configure
option work properly.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
15 years agoInclude types header in talloc
Geoff Levand [Fri, 27 Feb 2009 14:53:55 +0000 (14:53 +0000)]
Include types header in talloc

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>
15 years agoLoop through valid kboot conf names
Geoff Levand [Fri, 27 Feb 2009 14:53:54 +0000 (14:53 +0000)]
Loop through valid kboot conf names

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>
15 years agoRename symbol new
Geoff Levand [Fri, 27 Feb 2009 14:53:53 +0000 (14:53 +0000)]
Rename symbol new

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>
15 years agoAdd list_for_each_entry_continue routine
Geoff Levand [Fri, 27 Feb 2009 14:53:52 +0000 (14:53 +0000)]
Add list_for_each_entry_continue routine

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>
15 years agoPass cb_arg to discover_client_init
Geoff Levand [Mon, 16 Feb 2009 06:57:13 +0000 (22:57 -0800)]
Pass cb_arg to discover_client_init

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>
15 years agopetitboot: Add --with-twin config option
Geoff Levand [Wed, 18 Feb 2009 09:15:07 +0000 (09:15 +0000)]
petitboot: Add --with-twin config option

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>
15 years agoRemove boot_option_copy routine
Geoff Levand [Sat, 7 Feb 2009 18:35:54 +0000 (18:35 +0000)]
Remove boot_option_copy routine

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>
15 years agoAdd list insert routines
Geoff Levand [Sat, 7 Feb 2009 18:35:53 +0000 (18:35 +0000)]
Add list insert routines

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>
15 years agoAdd protocol object compare routines
Geoff Levand [Sat, 7 Feb 2009 18:35:52 +0000 (18:35 +0000)]
Add protocol object compare routines

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>
15 years agoFix log move commit
Geoff Levand [Mon, 2 Feb 2009 01:06:20 +0000 (17:06 -0800)]
Fix log move commit

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>