From abf189152c4ded1a20071efd31f8e064eab5b163 Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Thu, 24 Jul 2008 16:59:03 +0000 Subject: [PATCH] Unfreeze DCON after failed X start, and fail more quickly when there are problems. Change default runlevel to 5 (replacing an uglier patch to do this in our image creation tool). Remove a redundant udev console initialization which causes the screen to flash during prettyboot (dlo trac #3569). This replaces an uglier patch to do this in our image creation tool. Set up keymap when hal sees an OLPC keyboard. This replaces an uglier patch in our image creation tool. --- initscripts-8.76.2-prettyboot.patch | 16 ++++++++++++++++ initscripts.spec | 23 ++++++++++++++++++++++- olpc-runlevel.patch | 8 ++++++++ olpc-setolpckeys.patch | 5 +++++ olpc-xstartup.patch | 14 ++++++++++++++ 5 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 olpc-runlevel.patch create mode 100644 olpc-setolpckeys.patch create mode 100644 olpc-xstartup.patch diff --git a/initscripts-8.76.2-prettyboot.patch b/initscripts-8.76.2-prettyboot.patch index c456043..282290a 100644 --- a/initscripts-8.76.2-prettyboot.patch +++ b/initscripts-8.76.2-prettyboot.patch @@ -50,3 +50,19 @@ diff -ruHp initscripts-8.76.2.orig/rc.d/rc.sysinit initscripts-8.76.2/rc.d/rc.sy # Load other user-defined modules for file in /etc/sysconfig/modules/*.modules ; do +diff -ruHp initscripts-8.76.2.orig/udev/rules.d/10-console.rules initscripts-8.76.2/udev/rules.d/10-console.rules +--- initscripts-8.76.2.orig/udev/rules.d/10-console.rules 2008-07-24 12:26:56.000000000 -0400 ++++ initscripts-8.76.2/udev/rules.d/10-console.rules 2008-07-24 12:29:15.000000000 -0400 +@@ -1,5 +1,11 @@ + # Console initialization - keyboard, font, etc. +-KERNEL=="tty0", RUN+="/lib/udev/console_init %k" ++# OLPC: commented out to remove tty0 udev initialization, which takes ++# place during pretty boot and makes the screen flash (dlo trac #3569). ++# We set up the console ourselves, both in ++# 96-olpc-keyboard.rules as well as in olpc-configure, and we ++# set the appropriate font in /etc/init.d/z-boot-anim-stop -- so ++# this is completely unnecessary. ++#KERNEL=="tty0", RUN+="/lib/udev/console_init %k" + + # Check and set up serial and serial-like consoles if necessary + KERNEL=="console", RUN+="/lib/udev/console_check %k" diff --git a/initscripts.spec b/initscripts.spec index e67db5f..0f49a49 100644 --- a/initscripts.spec +++ b/initscripts.spec @@ -6,12 +6,15 @@ Version: 8.76.2 # ppp-watch is GPLv2+, everything else is GPLv2 License: GPLv2 and GPLv2+ Group: System Environment/Base -Release: 1%{?dist}.6 +Release: 1%{?dist}.7 Source: initscripts-%{version}.tar.bz2 Patch0: olpc-initscripts.patch Patch1: olpc-autologin.patch Patch2: initscripts-8.76.2-readonly.patch Patch3: initscripts-8.76.2-prettyboot.patch +Patch4: olpc-xstartup.patch +Patch5: olpc-runlevel.patch +Patch6: olpc-setolpckeys.patch BuildRoot: /%{_tmppath}/%{name}-%{version}-%{release}-root Requires: mingetty, /bin/awk, /bin/sed, mktemp, e2fsprogs >= 1.15 Requires: /sbin/sysctl, syslog @@ -57,6 +60,13 @@ deactivate most network interfaces. %patch1 -p1 %patch2 -p1 -b .readonly %patch3 -p1 -b .prettyboot +%patch4 -p1 -b .xstartup +%patch5 -p1 -b .runlevel +%patch6 -p1 -b .setolpckeys +# clean up patch backup files which would otherwise get copied into the +# RPM. +rm -f udev/rules.d/*.prettyboot udev/rules.d/*.setolpckeys +rm -f event.d/*.xstartup %build make @@ -246,6 +256,17 @@ rm -rf $RPM_BUILD_ROOT %ghost %attr(0664,root,utmp) /var/run/utmp %changelog +* Wed Jul 23 2008 C. Scott Ananian - 8.76.2-1.7 +- Unfreeze DCON after failed X start, and fail more quickly when there + are problems. +- Change default runlevel to 5 (replacing an uglier patch to do this + in our image creation tool). +- Remove a redundant udev console initialization which causes the + screen to flash during prettyboot (dlo trac #3569). This replaces + an uglier patch to do this in our image creation tool. +- Set up keymap when hal sees an OLPC keyboard. This replaces an + uglier patch in our image creation tool. + * Sat Jun 28 2008 C. Scott Ananian - 8.76.2-1.6 - Turn on graphical boot by default to generate proper rhgb messages for pretty boot. diff --git a/olpc-runlevel.patch b/olpc-runlevel.patch new file mode 100644 index 0000000..cd90cb6 --- /dev/null +++ b/olpc-runlevel.patch @@ -0,0 +1,8 @@ +--- initscripts-8.76.2/inittab.upstart.orig 2008-07-23 13:47:33.000000000 -0400 ++++ initscripts-8.76.2/inittab.upstart 2008-07-23 13:47:51.000000000 -0400 +@@ -23,4 +23,4 @@ + # 5 - X11 + # 6 - reboot (Do NOT set initdefault to this) + # +-id:3:initdefault: ++id:5:initdefault: diff --git a/olpc-setolpckeys.patch b/olpc-setolpckeys.patch new file mode 100644 index 0000000..458fed5 --- /dev/null +++ b/olpc-setolpckeys.patch @@ -0,0 +1,5 @@ +diff -ruHpN initscripts-8.76.2.orig/udev/rules.d/96-olpc-keyboard.rules initscripts-8.76.2/udev/rules.d/96-olpc-keyboard.rules +--- initscripts-8.76.2.orig/udev/rules.d/96-olpc-keyboard.rules 1969-12-31 19:00:00.000000000 -0500 ++++ initscripts-8.76.2/udev/rules.d/96-olpc-keyboard.rules 2008-07-24 12:44:36.000000000 -0400 +@@ -0,0 +1 @@ ++ACTION=="add", SYSFS{name}=="AT Translated Set 2 keyboard", KERNEL=="event*", RUN+="/usr/sbin/setolpckeys /dev/input/%k" diff --git a/olpc-xstartup.patch b/olpc-xstartup.patch new file mode 100644 index 0000000..be74f03 --- /dev/null +++ b/olpc-xstartup.patch @@ -0,0 +1,14 @@ +--- initscripts-8.76.2/event.d/prefdm.orig 2008-07-23 19:34:18.000000000 -0400 ++++ initscripts-8.76.2/event.d/prefdm 2008-07-23 19:35:13.000000000 -0400 +@@ -8,5 +8,10 @@ + + console output + respawn +-respawn limit 10 120 ++respawn limit 3 120 + exec /usr/sbin/olpc-dm ++ ++# make sure dcon is unfrozen if something goes wrong. ++post-stop script ++ echo 0 > /sys/devices/platform/dcon/freeze ++end script