]> git.ozlabs.org Git - petitboot/log
petitboot
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>
15 years agoReport error is no message is read
Jeremy Kerr [Sun, 4 Jan 2009 01:24:02 +0000 (10:24 +0900)]
Report error is no message is read

Allow the client to detect read() failures.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agoUse separate section for parsers array
Jeremy Kerr [Fri, 2 Jan 2009 09:27:00 +0000 (18:27 +0900)]
Use separate section for parsers array

Instead of hardcoding the array of parsers, use the linker to do the
work for us.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agoHook up parsers to device discovery
Jeremy Kerr [Fri, 2 Jan 2009 07:34:18 +0000 (16:34 +0900)]
Hook up parsers to device discovery

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>
15 years agoUse a list for device->boot_options
Jeremy Kerr [Fri, 2 Jan 2009 06:30:29 +0000 (15:30 +0900)]
Use a list for device->boot_options

Makes adding and removing options easier for parsers.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agoUse CPPFLAGS for -I arguments
Jeremy Kerr [Wed, 31 Dec 2008 06:12:41 +0000 (15:12 +0900)]
Use CPPFLAGS for -I arguments

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agoRemove reference to device.h
Jeremy Kerr [Sat, 20 Dec 2008 05:03:57 +0000 (16:03 +1100)]
Remove reference to device.h

It isn't needed anymore.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agoUse talloc for device handler destruction
Jeremy Kerr [Tue, 16 Dec 2008 05:45:09 +0000 (16:45 +1100)]
Use talloc for device handler destruction

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agoAdd device handler cleanup
Jeremy Kerr [Tue, 16 Dec 2008 05:38:25 +0000 (16:38 +1100)]
Add device handler cleanup

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agoInitial device handler code
Jeremy Kerr [Tue, 16 Dec 2008 04:33:59 +0000 (15:33 +1100)]
Initial device handler code

Mount discovered devices, and set up symlinks for UUID and LABELs

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agoFix invocation of udev_init
Jeremy Kerr [Tue, 16 Dec 2008 00:07:49 +0000 (11:07 +1100)]
Fix invocation of udev_init

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agoHook up udev events to device handler
Jeremy Kerr [Mon, 15 Dec 2008 06:51:44 +0000 (17:51 +1100)]
Hook up udev events to device handler

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agoRemove const from print_device_remove
Jeremy Kerr [Mon, 15 Dec 2008 06:45:46 +0000 (17:45 +1100)]
Remove const from print_device_remove

..we can add consts where suitable later.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agoDon't print pid on ui test startup
Jeremy Kerr [Mon, 15 Dec 2008 06:43:35 +0000 (17:43 +1100)]
Don't print pid on ui test startup

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agoCreate device-handler for managing registered devices
Jeremy Kerr [Mon, 15 Dec 2008 06:43:04 +0000 (17:43 +1100)]
Create device-handler for managing registered devices

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agoInitial support for multiple UIs
Jeremy Kerr [Mon, 15 Dec 2008 04:22:34 +0000 (15:22 +1100)]
Initial support for multiple UIs

Move the device discovery code from separate udev helpers to a single
process to listen on two sockets: one SOCK_DGRAM for incoming udev
events, and one SOCK_STREAM for UIs to connect.

Initial support for client/server infrastructure, still need to wire-up
the udev messages.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agoautoconfiscate
Jeremy Kerr [Tue, 9 Dec 2008 06:48:45 +0000 (17:48 +1100)]
autoconfiscate

Add autoconf, but keep non-recursive Makefile structure.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agotests: add tests for assorted ydl and ubuntu configs
Jeremy Kerr [Sun, 7 Dec 2008 05:56:56 +0000 (16:56 +1100)]
tests: add tests for assorted ydl and ubuntu configs

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agokboot parser: Add UUID and LABEL tests
Jeremy Kerr [Sun, 7 Dec 2008 05:51:33 +0000 (16:51 +1100)]
kboot parser: Add UUID and LABEL tests

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agoyaboot parser: fix cfg_getc inline
Jeremy Kerr [Sun, 7 Dec 2008 05:45:46 +0000 (16:45 +1100)]
yaboot parser: fix cfg_getc inline

Current build fails with:

petitboot/devices/yaboot-cfg.c:151: undefined reference to `cfg_getc'

As it it maked inline. This change un-inlines this function.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agoInclude limits.h
Geoff Levand [Fri, 7 Nov 2008 00:20:51 +0000 (16:20 -0800)]
Include limits.h

Fixes these build errors:

  petitboot-udev-helper.c:415: error: 'PATH_MAX' undeclared
  petitboot-udev-helper.c:496: error: 'INT_MAX' undeclared

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agoRemove unneded kboot patch
Geoff Levand [Fri, 7 Nov 2008 00:20:46 +0000 (16:20 -0800)]
Remove unneded kboot patch

Remove the unneeded Ubuntu ps3-kboot support patch.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoVersion 0.2
Jeremy Kerr [Thu, 10 Jan 2008 23:52:21 +0000 (10:52 +1100)]
Version 0.2

We don't need a major.minor.patch version string, jsut major.minor
is fine.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoUnify boot messages
Jeremy Kerr [Tue, 8 Jan 2008 05:37:57 +0000 (16:37 +1100)]
Unify boot messages

Both linux and gameos boots have elipses.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoGive boot messages time to display.
Jeremy Kerr [Tue, 8 Jan 2008 05:37:15 +0000 (16:37 +1100)]
Give boot messages time to display.

Currently we don't see booting messages, as petitboot has quit before
the fbdev has updated. By using twin_window_draw() in pboot_message,
we force the refresh before petitboot exits.

Also, don't exit in the gameOS path - may as well leave the GUI active
while rebooting.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoPrint ststus message when booting
Jeremy Kerr [Tue, 8 Jan 2008 04:54:10 +0000 (15:54 +1100)]
Print ststus message when booting

Add a couple of calls to pboot_message() to give some feedback when
an option (or gameos) is selected.

Also, convert pboot_message to varargs, to allow more flexible message
formats.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoAdd define for boot-game-os binary
Jeremy Kerr [Tue, 8 Jan 2008 03:20:38 +0000 (14:20 +1100)]
Add define for boot-game-os binary

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoUse git-ls-files for make dist target
Jeremy Kerr [Mon, 7 Jan 2008 22:39:55 +0000 (09:39 +1100)]
Use git-ls-files for make dist target

To make sure we won't miss any files.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoRename udev-helper to petitboot-udev-helper
Jeremy Kerr [Mon, 7 Jan 2008 22:24:57 +0000 (09:24 +1100)]
Rename udev-helper to petitboot-udev-helper

.. so that the installed binary looks more like a component of
petitboot, not udev.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoFix check for null initrd and boot args
Jeremy Kerr [Mon, 7 Jan 2008 10:50:33 +0000 (21:50 +1100)]
Fix check for null initrd and boot args

Because the strings are read from the pb socket, we need to check
for an empty string, not a NULL string.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoMake kboot_parser global options array static
Jeremy Kerr [Mon, 7 Jan 2008 10:49:40 +0000 (21:49 +1100)]
Make kboot_parser global options array static

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoAdd kexec argument logging
Jeremy Kerr [Mon, 7 Jan 2008 10:42:45 +0000 (21:42 +1100)]
Add kexec argument logging

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoIgnore /dev/loop* devices
Jeremy Kerr [Mon, 7 Jan 2008 10:28:00 +0000 (21:28 +1100)]
Ignore /dev/loop* devices

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoDon't log in removable device poll loops
Jeremy Kerr [Mon, 7 Jan 2008 10:27:09 +0000 (21:27 +1100)]
Don't log in removable device poll loops

This creates large log files.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoCreate uuid and label symlinks when mounting devices
Jeremy Kerr [Mon, 7 Jan 2008 10:25:22 +0000 (21:25 +1100)]
Create uuid and label symlinks when mounting devices

When we discover a device with ID_FS_UUID or ID_FS_LABEL properties,
create a symlink in the mount tree. This will end up with a mount
tree structure mirroring /dev, and allow devices to be referenced
by uuid when booting is attempted.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoRework device-path handling
Jeremy Kerr [Mon, 7 Jan 2008 08:15:03 +0000 (19:15 +1100)]
Rework device-path handling

Pass full device paths around, rather than shortened device names and
mountpoints.

The parse() function has been updated to only take a device path; the
mountpoint can be derived with mountpoint_for_device. Also, add
initial handling for uuid= and label= syntaxes.

This allows us to remap ps3 devices where necessary.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoDon't reset dev->id in yaboot parser
Jeremy Kerr [Fri, 4 Jan 2008 02:23:37 +0000 (13:23 +1100)]
Don't reset dev->id in yaboot parser

- this may end up giving duplicate IDs for different partitions. It's
fine to keep the device where we discovered the config file.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoMove path maniuplation functions to devices/paths.c
Jeremy Kerr [Thu, 3 Jan 2008 03:46:06 +0000 (14:46 +1100)]
Move path maniuplation functions to devices/paths.c

This allows us to include the real functions in the parser testsuite,
instead of using fakes.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoDon't #include <libio.h>
Jeremy Kerr [Thu, 20 Dec 2007 15:31:43 +0000 (00:31 +0900)]
Don't #include <libio.h>

It isn't present on uClibc, and we don't seem to need anything from
this header.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoFix path in udev rule example
Jeremy Kerr [Thu, 20 Dec 2007 15:31:02 +0000 (00:31 +0900)]
Fix path in udev rule example

The default prefix is /usr, so the correct path to the udev-helper
script is /usr/sbin.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoLog udev-helper output to /var/log/, not /var/tmp/
Jeremy Kerr [Thu, 20 Dec 2007 15:30:05 +0000 (00:30 +0900)]
Log udev-helper output to /var/log/, not /var/tmp/

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoRemove completed items from TODO
Jeremy Kerr [Wed, 12 Sep 2007 12:54:58 +0000 (22:54 +1000)]
Remove completed items from TODO

We've got controller support, and the kboot parser can handle device
prefixes.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoUpdate ps3-kboot patch
Jeremy Kerr [Wed, 12 Sep 2007 12:45:54 +0000 (22:45 +1000)]
Update ps3-kboot patch

Ubuntu's ps3-kboot has been updated, so update our patch to match,
and fix the missing -.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoAdd 'make check' and 'make distcheck' targets
Jeremy Kerr [Thu, 23 Aug 2007 08:35:13 +0000 (16:35 +0800)]
Add 'make check' and 'make distcheck' targets

Provides an easy way to test the working dir and tarball.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoAdd parser tests, clean up test system
Jeremy Kerr [Thu, 23 Aug 2007 08:23:21 +0000 (16:23 +0800)]
Add parser tests, clean up test system

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoAdd ps3 controller support
Jeremy Kerr [Thu, 23 Aug 2007 07:36:34 +0000 (15:36 +0800)]
Add ps3 controller support

Using the new twin joystick API, map some of the sixaxis controller
events to key events.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoAdd utils dir to tarball
Jeremy Kerr [Thu, 16 Aug 2007 23:50:34 +0000 (07:50 +0800)]
Add utils dir to tarball

make dist left it out.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoResolve device paths in kernel and initrd locations.
Jeremy Kerr [Wed, 27 Jun 2007 01:02:38 +0000 (11:02 +1000)]
Resolve device paths in kernel and initrd locations.

Instead of mounting in random locations, create a fixed mapping between
device and mountpoint. This allows the parsers to refer to files
outside the current partition.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoUse --disable-x11 for configuring libtwin in kboot.
Jeremy Kerr [Wed, 27 Jun 2007 00:05:28 +0000 (10:05 +1000)]
Use --disable-x11 for configuring libtwin in kboot.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agoUse --std=gnu99, not c99.
Jeremy Kerr [Tue, 26 Jun 2007 11:04:20 +0000 (21:04 +1000)]
Use --std=gnu99, not c99.

c99 seems to break byteorder.h

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
16 years agokboot parser: add facility for default options
Jeremy Kerr [Tue, 26 Jun 2007 09:20:55 +0000 (19:20 +1000)]
kboot parser: add facility for default options

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
17 years agoAdd todo for kboot device paths
Jeremy Kerr [Tue, 10 Apr 2007 00:56:19 +0000 (10:56 +1000)]
Add todo for kboot device paths

Signed-off-by: Jeremy Kerr
17 years agoInclude COPYING and TODO in dist target
Jeremy Kerr [Thu, 5 Apr 2007 21:42:31 +0000 (07:42 +1000)]
Include COPYING and TODO in dist target

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
17 years agoMore TODO items, ready for 0.0.1 release v0.0.1
Jeremy Kerr [Thu, 5 Apr 2007 12:47:21 +0000 (22:47 +1000)]
More TODO items, ready for 0.0.1 release

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
17 years agoUse shorter status bar string
Jeremy Kerr [Thu, 5 Apr 2007 12:46:50 +0000 (22:46 +1000)]
Use shorter status bar string

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
17 years agoFix another bogon in log()
Jeremy Kerr [Thu, 5 Apr 2007 12:12:23 +0000 (22:12 +1000)]
Fix another bogon in log()

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
17 years agoAdd petitboot utilities
Jeremy Kerr [Thu, 5 Apr 2007 11:53:55 +0000 (21:53 +1000)]
Add petitboot utilities

A udev script and a patch to feisty's ps3-kboot package.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
17 years agoAdd GPL
Jeremy Kerr [Thu, 5 Apr 2007 11:49:11 +0000 (21:49 +1000)]
Add GPL

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
17 years agoMore robusst comment-ignoring in kboot parser.
Jeremy Kerr [Thu, 5 Apr 2007 09:24:25 +0000 (19:24 +1000)]
More robusst comment-ignoring in kboot parser.

The previous check wouldn't ignore comment lines that contain an '='.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
17 years agoStop on first valid config found
Jeremy Kerr [Thu, 5 Apr 2007 09:21:03 +0000 (19:21 +1000)]
Stop on first valid config found

Removed the stop case during testing, so put it back now.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
17 years agoFix random bytes in string in kboot parser
Jeremy Kerr [Thu, 5 Apr 2007 09:19:35 +0000 (19:19 +1000)]
Fix random bytes in string in kboot parser

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
17 years agoFix bogon in parser test
Jeremy Kerr [Thu, 5 Apr 2007 09:06:26 +0000 (19:06 +1000)]
Fix bogon in parser test

fprintf isn't vfprintf.

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