]> git.ozlabs.org Git - petitboot/log
petitboot
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 years ago[discover client] Remove device from discover array before notifying UI
Jeremy Kerr [Sun, 1 Feb 2009 05:28:38 +0000 (16:28 +1100)]
[discover client] Remove device from discover array before notifying UI

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years ago[discover client] Add device accessors
Jeremy Kerr [Sun, 1 Feb 2009 05:22:03 +0000 (16:22 +1100)]
[discover client] Add device accessors

Allow the UIs to query the current device set.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years ago[pb-protocol] Add ui_info member to devices and boot options
Jeremy Kerr [Sun, 1 Feb 2009 05:07:23 +0000 (16:07 +1100)]
[pb-protocol] Add ui_info member to devices and boot options

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years ago[discover client] Make devices persistent
Jeremy Kerr [Sun, 1 Feb 2009 04:45:34 +0000 (15:45 +1100)]
[discover client] Make devices persistent

Change discover client to keep devices around after they've been
added, and freed after removal.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agoMake device instance constant
Geoff Levand [Thu, 22 Jan 2009 00:27:02 +0000 (16:27 -0800)]
Make device instance constant

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>
15 years agoMake client ops constant
Geoff Levand [Thu, 22 Jan 2009 00:27:01 +0000 (16:27 -0800)]
Make client ops constant

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>
15 years agoAdd client ops instance arg
Geoff Levand [Thu, 22 Jan 2009 00:27:00 +0000 (16:27 -0800)]
Add client ops instance arg

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>
15 years agoAdd boot_option_copy routine
Geoff Levand [Thu, 22 Jan 2009 00:26:59 +0000 (16:26 -0800)]
Add boot_option_copy routine

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>
15 years agoFlush log stream on write
Geoff Levand [Thu, 22 Jan 2009 00:26:58 +0000 (16:26 -0800)]
Flush log stream on write

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>
15 years agoChange client to use pb_log
Geoff Levand [Thu, 22 Jan 2009 00:26:57 +0000 (16:26 -0800)]
Change client to use pb_log

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>
15 years agoMove log to library
Geoff Levand [Thu, 22 Jan 2009 00:26:56 +0000 (16:26 -0800)]
Move log to library

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>
15 years agoFix waiter alloc
Geoff Levand [Thu, 22 Jan 2009 00:26:55 +0000 (16:26 -0800)]
Fix waiter alloc

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>
15 years agoMove waiter to library
Geoff Levand [Thu, 22 Jan 2009 00:26:54 +0000 (16:26 -0800)]
Move waiter to library

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>
15 years agoFix unused parameter warnings
Jeremy Kerr [Sun, 1 Feb 2009 00:19:19 +0000 (11:19 +1100)]
Fix unused parameter warnings

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agoFix build warnings
Geoff Levand [Tue, 13 Jan 2009 01:31:56 +0000 (17:31 -0800)]
Fix build warnings

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>
15 years agoFix make install
Geoff Levand [Tue, 13 Jan 2009 01:31:40 +0000 (17:31 -0800)]
Fix make install

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>
15 years agoUse enum type in pb_protocol_create_message
Geoff Levand [Tue, 13 Jan 2009 01:28:53 +0000 (17:28 -0800)]
Use enum type in pb_protocol_create_message

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>
15 years agoUpdate udev rule for socket
Geoff Levand [Tue, 13 Jan 2009 01:28:25 +0000 (17:28 -0800)]
Update udev rule for socket

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>
15 years agoAdd more -W flags to CFLAGS
Jeremy Kerr [Mon, 5 Jan 2009 13:10:03 +0000 (22:10 +0900)]
Add more -W flags to CFLAGS

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>