Hello community,
here is the log from the commit of package powerpc-utils
checked in at Fri Aug 10 17:14:31 CEST 2007.
--------
--- arch/ppc/powerpc-utils/powerpc-utils.changes 2007-08-07 11:52:41.000000000 +0200
+++ /mounts/work_src_done/STABLE/powerpc-utils/powerpc-utils.changes 2007-08-10 12:17:23.348219000 +0200
@@ -1,0 +2,10 @@
+Fri Aug 10 09:59:52 CEST 2007 - sassmann@suse.de
+
+- added petitboot features
+ * implemented timeout handling
+ * default timeout of 20s
+ * added fancy loading screen
+- fixed ps3-utils naming issue in petitboot
+- fixed dhcp handling, now sets subnet mask correctly
+
+-------------------------------------------------------------------
Old:
----
petitboot.select-entry.patch
New:
----
petitboot.add-timeout.patch
petitboot.boot-game-os.patch
petitboot.loading-screen.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ powerpc-utils.spec ++++++
--- /var/tmp/diff_new_pack.p32145/_old 2007-08-10 17:13:52.000000000 +0200
+++ /var/tmp/diff_new_pack.p32145/_new 2007-08-10 17:13:52.000000000 +0200
@@ -17,7 +17,7 @@
Obsoletes: ppc64-utils
Provides: ppc64-utils
Version: 1.0.0
-Release: 200704280157
+Release: 200704280159
License: IBM Public License
URL: http://powerpc-utils.ozlabs.org/
Group: System/Management
@@ -47,7 +47,10 @@
Patch21: petitboot.kboot-parser.patch
Patch22: petitboot.yaboot-parser.patch
Patch23: petitboot.change-resolution.patch
-Patch24: petitboot.select-entry.patch
+Patch25: petitboot.add-timeout.patch
+Patch27: petitboot.loading-screen.patch
+Patch28: petitboot.boot-game-os.patch
+%define build_kernel 1
%description
IBM PPC64 hardware utilities for accessing NVRAM, flashing firmware,
@@ -78,7 +81,9 @@
%patch21 -p1
%patch22 -p1
%patch23 -p1
-%patch24 -p1
+%patch25 -p1
+%patch27 -p1
+%patch28 -p1
%build
# workaround for using gcc41 to build
@@ -132,6 +137,7 @@
gcc -Wall -Os -s -o extract_from_elf %{S:9}
mkdir -p O/arch/powerpc/boot
bash -x %{S:5} initrd-tmp
+%if %{build_kernel}
# make kernel
cd linux
quilt push -q -a
@@ -142,6 +148,7 @@
MAXSIZE=$(( 0x3FFE00 ))
echo "otheros.bld filesize:$FILESIZE max size:$MAXSIZE size left:$(( $MAXSIZE - $FILESIZE )) "
test $FILESIZE -lt $MAXSIZE
+%endif
%install
rm -rf $RPM_BUILD_ROOT
@@ -162,7 +169,9 @@
mkdir -p $RPM_BUILD_ROOT/usr/share/ps3
mkdir -p $RPM_BUILD_ROOT/usr/bin
mkdir -p $RPM_BUILD_ROOT/usr/lib
+%if %{build_kernel}
cp O/arch/powerpc/boot/otheros.bld $RPM_BUILD_ROOT/usr/share/ps3
+%endif
cp install-ps3-utils/usr/bin/ps3-boot-game-os $RPM_BUILD_ROOT/usr/bin
cp install-ps3-utils/usr/bin/ps3-video-mode $RPM_BUILD_ROOT/usr/bin
cp install-ps3-utils/usr/sbin/ps3-flash-util $RPM_BUILD_ROOT/usr/sbin
@@ -183,6 +192,13 @@
%config %attr (755,root,root) /etc/init.d/ibmvscsis.sh
%changelog
+* Fri Aug 10 2007 - sassmann@suse.de
+- added petitboot features
+ * implemented timeout handling
+ * default timeout of 20s
+ * added fancy loading screen
+- fixed ps3-utils naming issue in petitboot
+- fixed dhcp handling, now sets subnet mask correctly
* Tue Aug 07 2007 - olh@suse.de
- fix filelist to not include /usr/lib/debug, to fix build
bz2 sources
++++++ geninitrd.sh ++++++
--- arch/ppc/powerpc-utils/geninitrd.sh 2007-07-31 10:38:31.000000000 +0200
+++ /mounts/work_src_done/STABLE/powerpc-utils/geninitrd.sh 2007-08-10 12:17:23.354224000 +0200
@@ -28,8 +28,7 @@
cp -avL /sbin/udevd /sbin/udevtrigger /sbin/udevsettle sbin
cp -avL /lib/udev/*_id lib/udev
-cp -avL ../cmds/lsprop bin
-cp -avL /usr/bin/netcat bin
+#cp -avL /usr/bin/netcat bin
pwd
mv ../extract_from_elf sbin/
cat > etc/udev/rules.d/00-petit.rules < init <<'EOF'
#!/bin/ash
-set -x
+#set -x
# create device nodes and mount filesystems
mknod /dev/null c 1 3
@@ -122,7 +121,6 @@
tail -f /var/log > /dev/tty10 < /dev/tty10 &
# check for dhcp
-ip link set eth0 up
udhcpc -i eth0 -n -q
# switch videomode to 720p
@@ -153,16 +151,24 @@
mkdir -p usr/share/udhcpc
cat > usr/share/udhcpc/default.script <<'EOF'
#!/bin/ash
+#set -x
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
-ifconfig $interface $ip netmask $subnet
-route add default gw $router dev $interface
-echo $hostname > /etc/hosts
-echo "domain $domain" > /etc/resolv.conf
-echo "nameserver $dns" >> /etc/resolv.conf
+if [ "$1" = deconfig ] ; then
+ ifconfig $interface 0.0.0.0
+fi
-exit 0
+if [ "$1" = bound ] ; then
+ ip link set eth0 up
+ ifconfig $interface $ip netmask $subnet
+ route add default gw $router dev $interface
+ echo $hostname > /etc/hosts
+ echo "domain $domain" > /etc/resolv.conf
+ echo "nameserver $dns" >> /etc/resolv.conf
+
+ exit 0
+fi
EOF
chmod 755 usr/share/udhcpc/default.script
++++++ 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
Files old/petitboot-0.0.1/artwork/sda1.png and new/petitboot-0.0.1/artwork/sda1.png differ
Files old/petitboot-0.0.1/artwork/sda2.png and new/petitboot-0.0.1/artwork/sda2.png differ
Files old/petitboot-0.0.1/artwork/sda3.png and new/petitboot-0.0.1/artwork/sda3.png differ
Files old/petitboot-0.0.1/artwork/sda4.png and new/petitboot-0.0.1/artwork/sda4.png differ
Files old/petitboot-0.0.1/artwork/sda5.png and new/petitboot-0.0.1/artwork/sda5.png differ
Files old/petitboot-0.0.1/artwork/sda6.png and new/petitboot-0.0.1/artwork/sda6.png differ
Files old/petitboot-0.0.1/artwork/sda7.png and new/petitboot-0.0.1/artwork/sda7.png differ
Files old/petitboot-0.0.1/artwork/sda8.png and new/petitboot-0.0.1/artwork/sda8.png differ
Files old/petitboot-0.0.1/artwork/sda9.png and new/petitboot-0.0.1/artwork/sda9.png differ
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/petitboot-0.0.1/Makefile new/petitboot-0.0.1/Makefile
--- old/petitboot-0.0.1/Makefile 2007-04-07 14:16:24.000000000 +0200
+++ new/petitboot-0.0.1/Makefile 2007-08-08 14:59:11.000000000 +0200
@@ -10,7 +10,7 @@
CFLAGS = -O0 -ggdb -Wall '-DPREFIX="$(PREFIX)"'
PARSERS = native yaboot kboot
-ARTWORK = background.jpg cdrom.png hdd.png usbpen.png tux.png cursor.gz
+ARTWORK = background.jpg loading.jpg cdrom.png hdd.png usbpen.png tux.png cursor.gz
all: petitboot udev-helper
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/petitboot-0.0.1/Makefile.orig new/petitboot-0.0.1/Makefile.orig
--- old/petitboot-0.0.1/Makefile.orig 1970-01-01 01:00:00.000000000 +0100
+++ new/petitboot-0.0.1/Makefile.orig 2007-04-07 14:16:24.000000000 +0200
@@ -0,0 +1,58 @@
+PREFIX?=/usr
+VERSION=0.0.1
+PACKAGE=petitboot
+CC=gcc
+INSTALL=install
+TWIN_CFLAGS?=$(shell pkg-config --cflags libtwin)
+TWIN_LDFLAGS?=$(shell pkg-config --libs libtwin)
+
+LDFLAGS =
+CFLAGS = -O0 -ggdb -Wall '-DPREFIX="$(PREFIX)"'
+
+PARSERS = native yaboot kboot
+ARTWORK = background.jpg cdrom.png hdd.png usbpen.png tux.png cursor.gz
+
+all: petitboot udev-helper
+
+petitboot: petitboot.o devices.o
+ $(CC) $(LDFLAGS) -o $@ $^
+
+petitboot: LDFLAGS+=$(TWIN_LDFLAGS)
+petitboot: CFLAGS+=$(TWIN_CFLAGS)
+
+udev-helper: devices/udev-helper.o devices/params.o devices/parser.o \
+ devices/yaboot-cfg.o \
+ $(foreach p,$(PARSERS),devices/$(p)-parser.o)
+ $(CC) $(LDFLAGS) -o $@ $^
+
+parser-test: devices/parser-test.o devices/params.o devices/parser.o \
+ devices/yaboot-cfg.o \
+ $(foreach p,$(PARSERS),devices/$(p)-parser.o)
+ $(CC) $(LDFLAGS) -o $@ $^
+
+devices/%: CFLAGS+=-I.
+
+install: all
+ $(INSTALL) -D petitboot $(DESTDIR)$(PREFIX)/sbin/petitboot
+ $(INSTALL) -D udev-helper $(DESTDIR)$(PREFIX)/sbin/udev-helper
+ $(INSTALL) -Dd $(DESTDIR)$(PREFIX)/share/petitboot/artwork/
+ $(INSTALL) -t $(DESTDIR)$(PREFIX)/share/petitboot/artwork/ \
+ $(foreach a,$(ARTWORK),artwork/$(a))
+
+dist: $(PACKAGE)-$(VERSION).tar.gz
+
+$(PACKAGE)-$(VERSION).tar.gz: $(PACKAGE)-$(VERSION)
+ tar czvf $@ $^
+
+$(PACKAGE)-$(VERSION): clean
+ mkdir $@ $@/devices
+ cp -a artwork $@
+ cp *.[ch] $@
+ cp -a devices/*.[ch] $@/devices/
+ cp Makefile $@
+ cp TODO COPYING $@
+
+clean:
+ rm -f petitboot
+ rm -f udev-helper
+ rm -f *.o devices/*.o
++++++ petitboot.add-timeout.patch ++++++
Index: powerpc-utils-1.0.0/petitboot-0.0.1/devices.c
===================================================================
--- powerpc-utils-1.0.0.orig/petitboot-0.0.1/devices.c
+++ powerpc-utils-1.0.0/petitboot-0.0.1/devices.c
@@ -164,11 +164,13 @@ static int read_option(int fd, struct de
return TWIN_FALSE;
LOG("got option: '%s'\n", opt->name);
+ LOG("got default:'%s'\n", opt->default_prio);
icon = get_icon(opt->icon_file);
if (icon)
index = pboot_add_option(dev_ctx->device_idx, opt->name,
- opt->description, icon, opt);
+ opt->description, icon,
+ opt->default_prio, opt);
return index != -1;
}
Index: powerpc-utils-1.0.0/petitboot-0.0.1/devices/message.h
===================================================================
--- powerpc-utils-1.0.0.orig/petitboot-0.0.1/devices/message.h
+++ powerpc-utils-1.0.0/petitboot-0.0.1/devices/message.h
@@ -24,6 +24,7 @@ struct boot_option {
char *boot_image_file;
char *initrd_file;
char *boot_args;
+ char *default_prio;
};
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
@@ -132,7 +132,8 @@ int add_boot_option(const struct boot_op
write_string(sock, opt->icon_file) ||
write_string(sock, opt->boot_image_file) ||
write_string(sock, opt->initrd_file) ||
- write_string(sock, opt->boot_args);
+ write_string(sock, opt->boot_args) ||
+ write_string(sock, opt->default_prio);
if (rc)
pb_log("error writing boot option %s to socket\n", opt->name);
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
@@ -15,6 +15,7 @@
static struct device *dev;
static const char *mountpoint;
+static char *defimage;
char *
make_params(char *label, char *params)
@@ -112,6 +113,9 @@ void process_image(char *label)
}
pb_log("boot_image_file %s\n",opt.boot_image_file);
+ if (cfgopt == defimage)
+ opt.default_prio = "7";
+
cfgopt = cfg_get_strg(label, "initrd");
if (cfgopt) {
if (cfgopt[0] == '/')
@@ -193,7 +197,10 @@ static int yaboot_parse(const char *devi
}
dev->icon_file = strdup(generic_icon_file(guess_device_type()));
-
+ defimage = cfg_get_default();
+ if (!defimage)
+ return 0;
+ defimage = cfg_get_strg(defimage, "image");
label = cfg_next_image(NULL);
pb_log("label: %s\n",label);
Index: powerpc-utils-1.0.0/petitboot-0.0.1/petitboot.h
===================================================================
--- powerpc-utils-1.0.0.orig/petitboot-0.0.1/petitboot.h
+++ powerpc-utils-1.0.0/petitboot-0.0.1/petitboot.h
@@ -8,8 +8,9 @@
int pboot_add_device(const char *dev_id, const char *name,
twin_pixmap_t *pixmap);
-int pboot_add_option(int devindex, const char *title,
- const char *subtitle, twin_pixmap_t *badge, void *data);
+int pboot_add_option(int devindex, const char *title, const char *subtitle,
+ twin_pixmap_t *badge, const char *default_prio,
+ void *data);
int pboot_remove_device(const char *dev_id);
int pboot_start_device_discovery(int udev_trigger);
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
@@ -29,6 +29,9 @@ static twin_fbdev_t *pboot_fbdev;
#endif
static twin_screen_t *pboot_screen;
+static twin_timeout_t *default_timeout;
+static int select_rpane_on_startup;
+
#define PBOOT_INITIAL_MESSAGE \
"keys: 0=auto 1=720p 2=1080i 3=1080p del=GameOS"
@@ -102,6 +105,7 @@ struct _pboot_device
twin_pixmap_t *badge;
twin_rect_t box;
int option_count;
+ int option_default;
pboot_option_t options[PBOOT_MAX_OPTION];
};
@@ -143,6 +147,9 @@ static pboot_spane_t *pboot_spane;
static int pboot_vmode_change = -1;
+static void pboot_set_lfocus(int index);
+static void pboot_set_device_select(int sel, int force);
+
/* XXX move to twin */
static inline twin_bool_t twin_rect_intersect(twin_rect_t r1,
twin_rect_t r2)
@@ -287,6 +294,57 @@ static void pboot_rpane_draw(twin_window
twin_path_destroy(path);
}
+#define TIMER_TIMEOUT 20000.
+
+static void pboot_choose_option(void);
+static twin_time_t option_timer_starttime = 0;
+static twin_time_t pboot_rfocus_option_timer (twin_time_t now, void *closure)
+{
+ int option_timer_size;
+ static int option_timer_maxsize;
+
+ // special cases for starttime to control this timer
+ switch(option_timer_starttime) {
+ case 0:
+ option_timer_starttime = now;
+ option_timer_maxsize = pboot_rpane->focus_box.right - pboot_rpane->focus_box.left;
+ break;
+ case -1:
+ option_timer_starttime = 0;
+ return -1;
+ }
+
+ option_timer_size = pboot_rpane->focus_box.right - pboot_rpane->focus_box.left;
+
+ // check for timeout
+ if (option_timer_size < 0) {
+ LOG("this should show a nice LOADING SCREEN now\n");
+ //pboot_default_boot();
+ option_timer_starttime = 0;
+ return -1;
+ }
+
+ twin_window_damage(pboot_rpane->window,
+ pboot_rpane->focus_box.left,
+ pboot_rpane->focus_box.top,
+ pboot_rpane->focus_box.right,
+ pboot_rpane->focus_box.bottom);
+
+ pboot_rpane->focus_box.right = pboot_rpane->focus_box.left + option_timer_maxsize -
+ (int) ((float)option_timer_maxsize * (((float)now - (float)option_timer_starttime) / TIMER_TIMEOUT));
+
+ twin_window_damage(pboot_rpane->window,
+ pboot_rpane->focus_box.left,
+ pboot_rpane->focus_box.top,
+ pboot_rpane->focus_box.right,
+ pboot_rpane->focus_box.bottom);
+
+ twin_window_queue_paint(pboot_rpane->window);
+
+ return 10;
+}
+
+static int pboot_rfocus_timeout_running = 0;
static twin_time_t pboot_rfocus_timeout (twin_time_t now, void *closure)
{
int dir = 1, dist, pos;
@@ -296,7 +354,10 @@ static twin_time_t pboot_rfocus_timeout
dir = dist > 5 ? 5 : dist;
pos = pboot_rpane->focus_target - (int)pboot_rpane->focus_box.top;
if (pos == 0) {
- return -1;
+ twin_time_t retval;
+ retval = pboot_rfocus_option_timer(now, closure);
+ if(retval == -1) pboot_rfocus_timeout_running = 0;
+ return retval;
}
if (pos < 0) {
dir = -dir;
@@ -331,17 +392,26 @@ static void pboot_set_rfocus(int index)
dev = pboot_devices[pboot_dev_sel];
if (index < 0 || index >= dev->option_count)
return;
-
+
pboot_rpane->focus_start = pboot_rpane->focus_box.top;
pboot_rpane->focus_target = PBOOT_RIGHT_FOCUS_YOFF +
PBOOT_RIGHT_OPTION_STRIDE * index;
+
pboot_rpane->focus_curindex = index;
- twin_set_timeout(pboot_rfocus_timeout, 0, NULL);
+ option_timer_starttime = 0;
+ if(!pboot_rfocus_timeout_running) {
+ pboot_rfocus_timeout_running = 1;
+ twin_set_timeout(pboot_rfocus_timeout, 0, NULL);
+ }
}
static void pboot_select_rpane(void)
{
+ // for default boot option
+ pboot_device_t *dev;
+ dev = pboot_devices[pboot_dev_sel];
+
if (pboot_focus_lpane == 0)
return;
pboot_focus_lpane = 0;
@@ -360,16 +430,20 @@ static void pboot_select_rpane(void)
pboot_rpane->focus_box.right,
pboot_rpane->focus_box.bottom);
+
twin_window_queue_paint(pboot_lpane->window);
twin_window_queue_paint(pboot_rpane->window);
- pboot_set_rfocus(0);
+ /* set focus on default boot entry */
+ pboot_set_rfocus(dev->option_default);
+
}
static void pboot_select_lpane(void)
{
if (pboot_focus_lpane == 1)
return;
+ option_timer_starttime = -1;
pboot_focus_lpane = 1;
twin_screen_set_active(pboot_screen, pboot_lpane->window->pixmap);
@@ -440,6 +514,11 @@ static void pboot_choose_option(void)
static twin_bool_t pboot_rpane_event (twin_window_t *window,
twin_event_t *event)
{
+ // reset right focus after timeout interrupt
+ pboot_rpane->focus_box.right = pboot_rpane->window->pixmap->width -
+ 2 * PBOOT_RIGHT_FOCUS_XOFF;
+
+
/* filter out all mouse events */
switch(event->kind) {
case TwinEventEnter:
@@ -477,15 +556,34 @@ 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, void *data)
+int pboot_add_option(int devindex, const char *title, const char *subtitle,
+ twin_pixmap_t *badge, const char *default_prio,
+ void *data)
{
pboot_device_t *dev;
pboot_option_t *opt;
twin_coord_t width;
int index;
+
if (devindex < 0 || devindex >= pboot_dev_count)
return -1;
dev = pboot_devices[devindex];
@@ -517,13 +615,20 @@ int pboot_add_option(int devindex, const
opt->box.bottom = opt->box.top + PBOOT_RIGHT_OPTION_HEIGHT;
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);
+ }
return index;
}
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)
@@ -554,6 +659,12 @@ static void pboot_set_device_select(int
pboot_rpane->window->pixmap->width,
pboot_rpane->window->pixmap->height);
twin_window_queue_paint(pboot_rpane->window);
+
+ // select rpane to start timeout to support unattended boot
+ if (select_rpane_on_startup) {
+ select_rpane_on_startup = 0;
+ pboot_select_rpane();
+ }
}
static void pboot_create_rpane(void)
@@ -611,12 +722,6 @@ static twin_time_t pboot_lfocus_timeout
pboot_lpane->focus_box.top += dir;
pboot_lpane->focus_box.bottom += dir;
- twin_window_damage(pboot_lpane->window,
- pboot_lpane->focus_box.left,
- pboot_lpane->focus_box.top,
- pboot_lpane->focus_box.right,
- pboot_lpane->focus_box.bottom);
-
twin_window_queue_paint(pboot_lpane->window);
return accel[(pos * 10) / dist];
@@ -627,6 +732,11 @@ static void pboot_set_lfocus(int index)
if (index >= pboot_dev_count)
return;
+ if (default_timeout) {
+ twin_clear_timeout(default_timeout);
+ default_timeout = NULL;
+ }
+
pboot_lpane->focus_start = pboot_lpane->focus_box.top;
if (index < 0)
@@ -930,7 +1040,8 @@ int pboot_add_device(const char *dev_id,
if (pboot_dev_count >= PBOOT_MAX_DEV)
return -1;
-
+
+ // increment device counter
index = pboot_dev_count++;
dev = malloc(sizeof(*dev));
@@ -949,8 +1060,15 @@ int pboot_add_device(const char *dev_id,
twin_window_damage(pboot_lpane->window,
dev->box.left, dev->box.top,
dev->box.right, dev->box.bottom);
+
+ /* set focus on first device if no device selected */
+ if (pboot_lpane->focus_curindex < 0) {
+ pboot_set_lfocus(pboot_lpane->focus_curindex = 0);
+ select_rpane_on_startup = 1;
+ }
twin_window_queue_paint(pboot_lpane->window);
+
return index;
}
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
@@ -147,6 +147,7 @@ static int parse_option(struct boot_opti
*pos = 0;
opt->boot_image_file = blah(config);
+ //opt->default_prio = strdup(config);
cmdline = malloc(buf_size);
*cmdline = 0;
@@ -193,9 +194,25 @@ static int parse_option(struct boot_opti
static void parse_buf(struct device *dev, char *buf)
{
- char *pos, *name, *value;
+ char *pos, *name, *value, *defimage, *tmp, *timeout;
int sent_device = 0;
+ // check for default entry and timeout
+ defimage = NULL;
+ timeout = NULL;
+ tmp = strdup(buf);
+ for (pos = tmp; pos;) {
+ pos = get_param_pair(pos, &name, &value, '\n');
+
+ if (name == NULL || *name == '#')
+ continue;
+ if (streq(name,"default"))
+ defimage = strdup(value);
+ /*FIXME: timeout not used yet */
+ if (streq(name,"timeout"))
+ timeout = strdup(value);
+ }
+
for (pos = buf; pos;) {
struct boot_option opt;
@@ -211,7 +228,12 @@ static void parse_buf(struct device *dev
memset(&opt, 0, sizeof(opt));
opt.name = strdup(name);
-
+ if (defimage != NULL) {
+ if (streq(defimage, name))
+ opt.default_prio = "5";
+ else
+ opt.default_prio = "";
+ }
if (parse_option(&opt, value))
if (!sent_device++)
add_device(dev);
++++++ petitboot.boot-game-os.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
@@ -875,7 +875,7 @@ twin_bool_t pboot_event_filter(twin_scre
/* Another gross hack for booting back to gameos */
case KEY_BACKSPACE:
case KEY_DELETE:
- system("boot-game-os");
+ system("ps3-boot-game-os");
pboot_quit();
}
case TwinEventKeyUp:
++++++ petitboot.loading-screen.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
@@ -297,6 +297,7 @@ static void pboot_rpane_draw(twin_window
#define TIMER_TIMEOUT 5000.
static void pboot_choose_option(void);
+static void pboot_make_background(const char *background);
static twin_time_t option_timer_starttime = 0;
static twin_time_t pboot_rfocus_option_timer (twin_time_t now, void *closure)
{
@@ -318,8 +319,8 @@ static twin_time_t pboot_rfocus_option_t
// check for timeout
if (option_timer_size < 0) {
- LOG("this should show a nice LOADING SCREEN now\n");
- //pboot_default_boot();
+ //execute selected option
+ pboot_choose_option();
option_timer_starttime = 0;
return -1;
}
@@ -505,6 +506,13 @@ static void pboot_choose_option(void)
pboot_device_t *dev = pboot_devices[pboot_dev_sel];
pboot_option_t *opt = &dev->options[pboot_rpane->focus_curindex];
+ // destroy windows to clear screen for boot logo
+ twin_window_destroy(pboot_rpane->window);
+ twin_window_destroy(pboot_lpane->window);
+ twin_window_destroy(pboot_spane->window);
+
+ pboot_make_background("loading.jpg");
+
LOG("Selected device %s\n", opt->title);
/* Give user feedback, make sure errors and panics will be seen */
@@ -1104,14 +1112,18 @@ int pboot_remove_device(const char *dev_
return TWIN_TRUE;
}
-static void pboot_make_background(void)
+static void pboot_make_background(const char *background)
{
twin_pixmap_t *filepic, *scaledpic;
- const char *background_path;
+ char background_path[512];
+
/* Set background pixmap */
LOG("loading background...");
- background_path = artwork_pathname("background.jpg");
+ strcpy(background_path, PKG_SHARE_DIR);
+ strcat(background_path, "/artwork/");
+ strcat(background_path, background);
+
filepic = twin_jpeg_to_pixmap(background_path, TWIN_ARGB32);
LOG("%s\n", filepic ? "ok" : "failed");
@@ -1236,7 +1248,7 @@ int main(int argc, char **argv)
#endif
/* Set background pixmap */
- pboot_make_background();
+ pboot_make_background("background.jpg");
/* Init more stuffs */
pboot_create_lpane();
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org