rpms/kernel/devel linux-2.6-silence-x86-decompressor.patch, NONE, 1.1 kernel.spec, 1.666, 1.667
Kristian Høgsberg (krh)
fedora-extras-commits at redhat.com
Thu May 29 17:12:34 UTC 2008
Author: krh
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13465
Modified Files:
kernel.spec
Added Files:
linux-2.6-silence-x86-decompressor.patch
Log Message:
* Thu May 29 2008 Kristian Høgsberg <krh at redhat.com>
- Add linux-2.6-silence-x86-decompressor.patch to silence the
decompressor spew when 'quiet' is passed.
linux-2.6-silence-x86-decompressor.patch:
--- NEW FILE linux-2.6-silence-x86-decompressor.patch ---
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
index 90456ce..b548379 100644
--- a/arch/x86/boot/compressed/misc.c
+++ b/arch/x86/boot/compressed/misc.c
@@ -30,6 +30,7 @@
#include <asm/io.h>
#include <asm/page.h>
#include <asm/boot.h>
+#include <asm/bootparam.h>
/* WARNING!!
* This code is compiled with -fPIC and it is relocated dynamically
@@ -187,13 +188,9 @@ static void gzip_release(void **);
/*
* This is set up by the setup-routine at boot-time
*/
-static unsigned char *real_mode; /* Pointer to real-mode data */
-
-#define RM_EXT_MEM_K (*(unsigned short *)(real_mode + 0x2))
-#ifndef STANDARD_MEMORY_BIOS_CALL
-#define RM_ALT_MEM_K (*(unsigned long *)(real_mode + 0x1e0))
-#endif
-#define RM_SCREEN_INFO (*(struct screen_info *)(real_mode+0))
+static struct boot_params *real_mode; /* Pointer to real-mode data */
+#define RM_SCREEN_INFO (real_mode->screen_info)
+static int quiet;
extern unsigned char input_data[];
extern int input_len;
@@ -395,7 +392,8 @@ static void parse_elf(void *output)
return;
}
- putstr("Parsing ELF... ");
+ if (!quiet)
+ putstr("Parsing ELF... ");
phdrs = malloc(sizeof(*phdrs) * ehdr.e_phnum);
if (!phdrs)
@@ -423,11 +421,28 @@ static void parse_elf(void *output)
}
}
+static const char *strnstr(const char *string, int len, const char *s)
+{
+ int i, j;
+
+ for (i = 0; i < len; i++) {
+ for (j = 0; i + j < len && s[j]; j++)
+ if (string[i + j] != s[j])
+ break;
+ if (s[j] == '\0')
+ return string + i;
+ }
+
+ return NULL;
+}
+
asmlinkage void decompress_kernel(void *rmode, memptr heap,
unsigned char *input_data,
unsigned long input_len,
unsigned char *output)
{
+ const char * cmdline;
+
real_mode = rmode;
if (RM_SCREEN_INFO.orig_video_mode == 7) {
@@ -441,6 +456,10 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap,
lines = RM_SCREEN_INFO.orig_video_lines;
cols = RM_SCREEN_INFO.orig_video_cols;
+ cmdline = (char *) real_mode->hdr.cmd_line_ptr;
+ if (strnstr(cmdline, real_mode->hdr.cmdline_size, "quiet"))
+ quiet = 1;
+
window = output; /* Output buffer (Normally at 1M) */
free_mem_ptr = heap; /* Heap */
free_mem_end_ptr = heap + BOOT_HEAP_SIZE;
@@ -465,9 +484,11 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap,
#endif
makecrc();
- putstr("\nDecompressing Linux... ");
+ if (!quiet)
+ putstr("\nDecompressing Linux... ");
gunzip();
parse_elf(output);
- putstr("done.\nBooting the kernel.\n");
+ if (!quiet)
+ putstr("done.\nBooting the kernel.\n");
return;
}
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.666
retrieving revision 1.667
diff -u -r1.666 -r1.667
--- kernel.spec 29 May 2008 01:21:43 -0000 1.666
+++ kernel.spec 29 May 2008 17:11:50 -0000 1.667
@@ -602,6 +602,7 @@
Patch450: linux-2.6-input-kill-stupid-messages.patch
Patch460: linux-2.6-serial-460800.patch
Patch510: linux-2.6-silence-noise.patch
+Patch620: linux-2.6-silence-x86-decompressor.patch
Patch570: linux-2.6-selinux-mprotect-checks.patch
Patch580: linux-2.6-sparc-selinux-mprotect-checks.patch
Patch610: linux-2.6-defaults-fat-utf8.patch
@@ -1106,6 +1107,9 @@
# Silence some useless messages that still get printed with 'quiet'
ApplyPatch linux-2.6-silence-noise.patch
+# Make the real mode boot decompressor understand and honor 'quiet'
+ApplyPatch linux-2.6-silence-x86-decompressor.patch
+
# Fix the SELinux mprotect checks on executable mappings
ApplyPatch linux-2.6-selinux-mprotect-checks.patch
# Fix SELinux for sparc
@@ -1772,6 +1776,10 @@
%kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
%changelog
+* Thu May 29 2008 Kristian Høgsberg <krh at redhat.com>
+- Add linux-2.6-silence-x86-decompressor.patch to silence the
+ decompressor spew when 'quiet' is passed.
+
* Wed May 28 2008 Dave Jones <davej at redhat.com>
- Make the OQO2 use polled IO for its ethernet.
More information about the fedora-extras-commits
mailing list