Hello community,
here is the log from the commit of package powerpc-utils
checked in at Tue Aug 14 03:07:18 CEST 2007.
--------
--- arch/ppc/powerpc-utils/powerpc-utils.changes 2007-08-10 12:17:23.000000000 +0200
+++ /mounts/work_src_done/STABLE/powerpc-utils/powerpc-utils.changes 2007-08-13 16:23:52.205655000 +0200
@@ -1,0 +2,7 @@
+Mon Aug 13 14:50:06 CEST 2007 - sassmann@suse.de
+
+- added rudimentary editor for petitboot
+- resized petitboot loading jpg to gain some space
+- disabled wireless extension in kernel config
+
+-------------------------------------------------------------------
New:
----
petitboot.cmdline-editor.patch
petitboot.debug-cleanup.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ powerpc-utils.spec ++++++
--- /var/tmp/diff_new_pack.I19469/_old 2007-08-14 03:06:56.000000000 +0200
+++ /var/tmp/diff_new_pack.I19469/_new 2007-08-14 03:06:56.000000000 +0200
@@ -17,7 +17,7 @@
Obsoletes: ppc64-utils
Provides: ppc64-utils
Version: 1.0.0
-Release: 200704280159
+Release: 200704280161
License: IBM Public License
URL: http://powerpc-utils.ozlabs.org/
Group: System/Management
@@ -50,6 +50,8 @@
Patch25: petitboot.add-timeout.patch
Patch27: petitboot.loading-screen.patch
Patch28: petitboot.boot-game-os.patch
+Patch29: petitboot.debug-cleanup.patch
+Patch30: petitboot.cmdline-editor.patch
%define build_kernel 1
%description
@@ -84,6 +86,8 @@
%patch25 -p1
%patch27 -p1
%patch28 -p1
+%patch29 -p1
+%patch30 -p1
%build
# workaround for using gcc41 to build
@@ -192,6 +196,10 @@
%config %attr (755,root,root) /etc/init.d/ibmvscsis.sh
%changelog
+* Mon Aug 13 2007 - sassmann@suse.de
+- added rudimentary editor for petitboot
+- resized petitboot loading jpg to gain some space
+- disabled wireless extension in kernel config
* Fri Aug 10 2007 - sassmann@suse.de
- added petitboot features
* implemented timeout handling
++++++ petitboot-0.0.1.tar.bz2 ++++++
Files old/petitboot-0.0.1/artwork/loading.jpg and new/petitboot-0.0.1/artwork/loading.jpg differ
++++++ petitboot.cmdline-editor.patch ++++++
Index: powerpc-utils-1.0.0/petitboot-0.0.1/petitboot.c
===================================================================
--- powerpc-utils-1.0.0.orig/petitboot-0.0.1/petitboot.c
+++ powerpc-utils-1.0.0/petitboot-0.0.1/petitboot.c
@@ -19,6 +19,8 @@
#include "petitboot.h"
#include "petitboot-paths.h"
+#include "devices/message.h"
+
#ifdef _USE_X11
#include
@@ -34,7 +36,7 @@ static int select_rpane_on_startup;
#define PBOOT_INITIAL_MESSAGE \
- "keys: 0=auto 1=720p 2=1080i 3=1080p del=GameOS"
+ "keys: c=changeres e=edit del=GameOS ESC=quit"
#define PBOOT_LEFT_PANE_SIZE 160
#define PBOOT_LEFT_PANE_COLOR 0x80000000
@@ -86,6 +88,10 @@ static int select_rpane_on_startup;
#define PBOOT_STATUS_TEXT_SIZE (16 * TWIN_FIXED_ONE)
#define PBOOT_STATUS_TEXT_COLOR 0xff000000
+#define EDIT_KERNEL 1
+#define EDIT_INITRD 2
+#define EDIT_BOOTARGS 3
+
typedef struct _pboot_option pboot_option_t;
typedef struct _pboot_device pboot_device_t;
@@ -519,6 +525,212 @@ static void pboot_choose_option(void)
pboot_exec_option(opt->data);
}
+static unsigned char keycodes[128] = {
+0, 0, '1', '2', '3', '4', '5', '6', '7', '8', /* 0 - 9 */
+'9', '0', 0, 0, 0, 0, 'q', 'w', 'e', 'r', /* 10 - 19 */
+'t', 'y', 'u', 'i', 'o', 'p', 0, 0, 0, 0, /* 20 - 29 */
+'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 0, /* 30 - 39 */
+0, 0, 0, 0, 'z', 'x', 'c', 'v', 'b', 'n', /* 40 - 49 */
+'m', 0, 0, '/', 0, 0, 0, ' ', 0, 0, /* 50 - 59 */
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 60 - 69 */
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 70 - 79 */
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 - 89 */
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 - 99 */
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 100 - 109 */
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 110 - 119 */
+0, 0, 0, 0, 0, 0, 0, 0 /* 120 - 127 */
+};
+
+static char pboot_edit_buf[1024];
+static int edit_in_progress;
+
+int choose_edit_option (int option_attr)
+{
+ pboot_device_t *dev;
+ pboot_option_t *opt;
+ struct boot_option *option;
+
+ dev = pboot_devices[pboot_dev_sel];
+ opt = &dev->options[pboot_rpane->focus_curindex];
+ option = opt->data;
+
+ if (edit_in_progress)
+ return -1;
+ edit_in_progress = option_attr;
+
+ switch (option_attr) {
+ case EDIT_KERNEL:
+ pboot_message(option->boot_image_file);
+ strncpy(pboot_edit_buf, option->boot_image_file,
+ strlen(option->boot_image_file));
+ break;
+ case EDIT_INITRD:
+ pboot_message(option->initrd_file);
+ strncpy(pboot_edit_buf, option->initrd_file,
+ strlen(option->initrd_file));
+ break;
+ case EDIT_BOOTARGS:
+ pboot_message(option->boot_args);
+ strncpy(pboot_edit_buf, option->boot_args,
+ strlen(option->boot_args));
+ break;
+ default:
+ edit_in_progress = 0;
+ return -1;
+ }
+ return 0;
+}
+
+int edit_option(char key)
+{
+ unsigned int text_len;
+ text_len = strlen(pboot_edit_buf);
+ if (text_len > 1022)
+ return -1;
+
+ pboot_edit_buf[text_len] = key;
+ pboot_edit_buf[text_len+1] = '\0';
+ pboot_message(pboot_edit_buf);
+ return 0;
+}
+
+int save_edit_option(char *new_opt)
+{
+ pboot_device_t *dev;
+ pboot_option_t *opt;
+ struct boot_option *option;
+
+ dev = pboot_devices[pboot_dev_sel];
+ opt = &dev->options[pboot_rpane->focus_curindex];
+ option = opt->data;
+
+ switch(edit_in_progress) {
+ case EDIT_KERNEL:
+ option->boot_image_file = strdup(new_opt);
+ break;
+ case EDIT_INITRD:
+ option->initrd_file = strdup(new_opt);
+ break;
+ case EDIT_BOOTARGS:
+ option->boot_args = strdup(new_opt);
+ break;
+ default:
+ return -1;
+ }
+ return 0;
+}
+
+static twin_bool_t pboot_rpane_event (twin_window_t *window,
+ twin_event_t *event);
+
+static twin_bool_t pboot_edit_event (twin_window_t *window,
+ twin_event_t *event)
+{
+ /* filter out all mouse events */
+ switch(event->kind) {
+ case TwinEventEnter:
+ case TwinEventMotion:
+ case TwinEventLeave:
+ case TwinEventButtonDown:
+ case TwinEventButtonUp:
+ case TwinEventKeyDown:
+ switch(event->u.key.key) {
+ case KEY_ENTER:
+ save_edit_option(pboot_edit_buf);
+ edit_in_progress = 0;
+ pboot_rpane->window->event = pboot_rpane_event;
+ pboot_message("keys: c=changeres e=edit del=GameOS ESC=quit");
+ return TWIN_TRUE;
+ case KEY_BACKSPACE:
+ if( strlen(pboot_edit_buf) ) {
+ pboot_edit_buf[strlen(pboot_edit_buf)-1] = '\0';
+ pboot_message(pboot_edit_buf);
+ }
+ return TWIN_TRUE;
+ default:
+ edit_option(keycodes[event->u.key.key]);
+ break;
+ }
+ default:
+ break;
+ }
+ return TWIN_FALSE;
+}
+static twin_bool_t pboot_select_event (twin_window_t *window,
+ twin_event_t *event)
+{
+ /* filter out all mouse events */
+ switch(event->kind) {
+ case TwinEventEnter:
+ case TwinEventMotion:
+ case TwinEventLeave:
+ case TwinEventButtonDown:
+ case TwinEventButtonUp:
+ case TwinEventKeyDown:
+ switch(event->u.key.key) {
+ case KEY_1:
+ choose_edit_option(EDIT_KERNEL);
+ pboot_rpane->window->event = pboot_edit_event;
+ return TWIN_TRUE;
+ case KEY_2:
+ choose_edit_option(EDIT_INITRD);
+ pboot_rpane->window->event = pboot_edit_event;
+ return TWIN_TRUE;
+ case KEY_3:
+ choose_edit_option(EDIT_BOOTARGS);
+ pboot_rpane->window->event = pboot_edit_event;
+ return TWIN_TRUE;
+ default:
+ break;
+ }
+ default:
+ break;
+ }
+ return TWIN_FALSE;
+}
+
+static void pboot_changeres(void)
+{
+ exit(42);
+}
+
+static twin_bool_t pboot_changeres_event (twin_window_t *window,
+ twin_event_t *event)
+{
+ /* filter out all mouse events */
+ switch(event->kind) {
+ case TwinEventEnter:
+ case TwinEventMotion:
+ case TwinEventLeave:
+ case TwinEventButtonDown:
+ case TwinEventButtonUp:
+ case TwinEventKeyDown:
+ switch(event->u.key.key) {
+ case KEY_0:
+ pboot_vmode_change = 0; /* auto */
+ pboot_changeres();
+ return TWIN_TRUE;
+ case KEY_1:
+ pboot_vmode_change = 3; /* 720p */
+ pboot_changeres();
+ return TWIN_TRUE;
+ case KEY_2:
+ pboot_vmode_change = 4; /* 1080i */
+ pboot_changeres();
+ return TWIN_TRUE;
+ case KEY_3:
+ pboot_vmode_change = 5; /* 1080p */
+ pboot_changeres();
+ return TWIN_TRUE;
+ default:
+ break;
+ }
+ default:
+ break;
+ }
+ return TWIN_FALSE;
+}
+
static twin_bool_t pboot_rpane_event (twin_window_t *window,
twin_event_t *event)
{
@@ -550,8 +762,19 @@ static twin_bool_t pboot_rpane_event (tw
pboot_set_rfocus(pboot_rpane->focus_curindex + 1);
return TWIN_TRUE;
case KEY_LEFT:
+ pboot_message("keys: c=changeres del=GameOS ESC=quit");
pboot_select_lpane();
return TWIN_TRUE;
+ case KEY_E:
+ option_timer_starttime = -1;
+ pboot_rpane->window->event = pboot_select_event;
+ pboot_message("Edit: 1=kernel 2=initrd 3=cmdline");
+ return TWIN_TRUE;
+ case KEY_C:
+ option_timer_starttime = -1;
+ pboot_rpane->window->event = pboot_changeres_event;
+ pboot_message("res: 0=auto 1=720p 2=1080i 3=1080p");
+ return TWIN_TRUE;
case KEY_ENTER:
pboot_choose_option();
default:
@@ -564,24 +787,6 @@ static twin_bool_t pboot_rpane_event (tw
return TWIN_FALSE;
}
-static twin_time_t pboot_default_boot (twin_time_t now, void *closure)
-{
- pboot_choose_option();
- return TWIN_FALSE;
-}
-
-#if 0
-static twin_time_t pboot_select_default (twin_time_t now, void *closure)
-{
- pboot_device_t *dev;
- dev = pboot_devices[pboot_dev_sel];
-
- pboot_message("TIMEOUT: booting default!");
- pboot_choose_option();
- return TWIN_FALSE;
-}
-#endif
-
int pboot_add_option(int devindex, const char *title, const char *subtitle,
twin_pixmap_t *badge, const char *default_prio,
void *data)
@@ -816,8 +1021,14 @@ static twin_bool_t pboot_lpane_event (tw
pboot_set_lfocus(pboot_lpane->focus_curindex + 1);
return TWIN_TRUE;
case KEY_RIGHT:
+ pboot_message("keys: c=changeres e=edit del=GameOS ESC=quit");
pboot_select_rpane();
return TWIN_TRUE;
+ case KEY_C:
+ option_timer_starttime = -1;
+ pboot_rpane->window->event = pboot_changeres_event;
+ pboot_message("res: 0=auto 1=720p 2=1080i 3=1080p");
+ return TWIN_TRUE;
default:
break;
}
@@ -828,15 +1039,6 @@ static twin_bool_t pboot_lpane_event (tw
return TWIN_FALSE;
}
-static void pboot_quit(void)
-{
- kill(0, SIGINT);
-}
-
-static void pboot_changeres(void)
-{
- exit(42);
-}
twin_bool_t pboot_event_filter(twin_screen_t *screen,
twin_event_t *event)
@@ -855,6 +1057,7 @@ twin_bool_t pboot_event_filter(twin_scre
case TwinEventKeyDown:
switch(event->u.key.key) {
/* Gross hack for video modes, need something better ! */
+#if 0
case KEY_0:
pboot_vmode_change = 0; /* auto */
pboot_changeres();
@@ -871,12 +1074,12 @@ twin_bool_t pboot_event_filter(twin_scre
pboot_vmode_change = 5; /* 1080p */
pboot_changeres();
return TWIN_TRUE;
-
/* Another gross hack for booting back to gameos */
case KEY_BACKSPACE:
case KEY_DELETE:
system("ps3-boot-game-os");
pboot_quit();
+#endif
}
case TwinEventKeyUp:
twin_screen_set_cursor(pboot_screen, NULL, 0, 0);
++++++ petitboot.debug-cleanup.patch ++++++
Index: powerpc-utils-1.0.0/petitboot-0.0.1/devices/yaboot-cfg.c
===================================================================
--- powerpc-utils-1.0.0.orig/petitboot-0.0.1/devices/yaboot-cfg.c
+++ powerpc-utils-1.0.0/petitboot-0.0.1/devices/yaboot-cfg.c
@@ -296,7 +296,6 @@ static void cfg_return (char *item, char
static int cfg_set (char *item, char *value)
{
CONFIG *walk;
-pb_log("CFG_SET: %i\n",strcasecmp(item, "image[64]"));
if (!strcasecmp (item, "image") || !strcasecmp (item, "image[64bit]")) {
struct IMAGES **p = &images;
@@ -349,7 +348,6 @@ int cfg_parse (char *cfg_file, char *buf
}
while (1) {
if (!cfg_next (&item, &value)) {
- pb_log("cfg_next failed\n");
return 0;
}
if (!cfg_set (item, value)) {
@@ -367,7 +365,6 @@ static char *cfg_get_strg_i (CONFIG * ta
CONFIG *walk;
for (walk = table; walk->type != cft_end; walk++) {
- pb_log("cfg_get_strg_i -> walk->name: %s\n", walk->name);
if (walk->name && !strcasecmp (walk->name, item))
return walk->data;
}
@@ -479,9 +476,7 @@ char *cfg_next_image(char *prev)
wantnext = 1;
for (p = images; p; p = p->next) {
- pb_log("p->table %s\n",p->table);
label = cfg_get_strg_i (p->table, "label");
- pb_log("cfg_next_image ->label %s", label);
if (!label) {
label = cfg_get_strg_i (p->table, "image");
alias = strrchr (label, '/');
Index: powerpc-utils-1.0.0/petitboot-0.0.1/devices/yaboot-parser.c
===================================================================
--- powerpc-utils-1.0.0.orig/petitboot-0.0.1/devices/yaboot-parser.c
+++ powerpc-utils-1.0.0/petitboot-0.0.1/devices/yaboot-parser.c
@@ -97,7 +97,6 @@ void process_image(char *label)
{
struct boot_option opt;
char *cfgopt, path[PATH_MAX];
- pb_log("ENTER process_image\n");
memset(&opt, 0, sizeof(opt));
opt.name = label;
@@ -124,6 +123,7 @@ void process_image(char *label)
snprintf(path, sizeof(path), "/suseboot/%s", cfgopt);
opt.initrd_file = join_paths(mountpoint, path);
}
+ pb_log("initrd_file %s\n",opt.initrd_file);
}
opt.boot_args = make_params(label, NULL);
@@ -203,7 +203,6 @@ static int yaboot_parse(const char *devi
defimage = cfg_get_strg(defimage, "image");
label = cfg_next_image(NULL);
- pb_log("label: %s\n",label);
if (!label || !check_and_add_device(dev))
return 0;
Index: powerpc-utils-1.0.0/petitboot-0.0.1/devices/udev-helper.c
===================================================================
--- powerpc-utils-1.0.0.orig/petitboot-0.0.1/devices/udev-helper.c
+++ powerpc-utils-1.0.0/petitboot-0.0.1/devices/udev-helper.c
@@ -104,7 +104,7 @@ int add_device(const struct device *dev)
{
int rc;
- pb_log("device added:\n");
+ pb_log("try to add new device...\n");
print_device(dev);
rc = write_action(sock, DEV_ACTION_ADD_DEVICE) ||
write_string(sock, dev->id) ||
@@ -122,7 +122,7 @@ int add_boot_option(const struct boot_op
{
int rc;
- pb_log("boot option added:\n");
+ pb_log("try to add boot option...\n");
print_boot_option(opt);
rc = write_action(sock, DEV_ACTION_ADD_OPTION) ||
@@ -491,7 +491,6 @@ int main(int argc, char **argv)
logf = fopen("/var/tmp/petitboot-udev-helpers.log", "a");
if (!logf)
logf = stdout;
- pb_log("%d started\n", getpid());
rc = EXIT_SUCCESS;
if (!action) {
Index: powerpc-utils-1.0.0/petitboot-0.0.1/devices/kboot-parser.c
===================================================================
--- powerpc-utils-1.0.0.orig/petitboot-0.0.1/devices/kboot-parser.c
+++ powerpc-utils-1.0.0/petitboot-0.0.1/devices/kboot-parser.c
@@ -184,7 +184,7 @@ static int parse_option(struct boot_opti
/* if there's an initrd but no root, then its not a problem */
}
- pb_log("kboot cmdline: %s", cmdline);
+ pb_log("parsed commandline: %s", cmdline);
opt->boot_args = cmdline;
asprintf(&opt->description, "%s %s", config, cmdline);
Index: powerpc-utils-1.0.0/petitboot-0.0.1/petitboot.c
===================================================================
--- powerpc-utils-1.0.0.orig/petitboot-0.0.1/petitboot.c
+++ powerpc-utils-1.0.0/petitboot-0.0.1/petitboot.c
@@ -513,7 +513,7 @@ static void pboot_choose_option(void)
pboot_make_background("loading.jpg");
- LOG("Selected device %s\n", opt->title);
+ LOG("Booting selected option %s\n", opt->title);
/* Give user feedback, make sure errors and panics will be seen */
pboot_exec_option(opt->data);
@@ -624,9 +624,8 @@ int pboot_add_option(int devindex, const
opt->data = data;
if (default_prio && strlen(default_prio)) {
- LOG("%s prio: %d\n",__FUNCTION__, atoi(default_prio));
dev->option_default = index;
- LOG("%s option_default: %d\n",__FUNCTION__,dev->option_default);
+ LOG("Default boot option for current device: %d\n", dev->option_default);
}
return index;
}
@@ -635,8 +634,6 @@ int pboot_add_option(int devindex, const
static void pboot_set_device_select(int sel, int force)
{
- LOG("%s: %d -> %d\n", __FUNCTION__, pboot_dev_sel, sel);
- LOG("%s: pboot_dev_count %d\n", __FUNCTION__, pboot_dev_count);
if (!force && sel == pboot_dev_sel)
return;
if (sel >= pboot_dev_count)
++++++ ps3config-2.6.22 ++++++
--- arch/ppc/powerpc-utils/ps3config-2.6.22 2007-08-10 12:17:23.000000000 +0200
+++ /mounts/work_src_done/STABLE/powerpc-utils/ps3config-2.6.22 2007-08-13 16:23:52.240622000 +0200
@@ -313,7 +313,7 @@
# Wireless
#
# CONFIG_CFG80211 is not set
-CONFIG_WIRELESS_EXT=y
+# CONFIG_WIRELESS_EXT is not set
# CONFIG_MAC80211 is not set
# CONFIG_IEEE80211 is not set
# CONFIG_RFKILL is not set
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org