Re: update8 [PATCH 2/5] init: bzip2 or lzma -compressed kernels and initrds

H. Peter Anvin
2009-01-04T23:15:06Z

[-- Attachment #1: Type: text/plain, Size: 642 bytes --]

Alain Knaff wrote:
>
> What do you mean "parametrized by the arch Kconfig files"? Does this
> mean that it would still be in the global files, but would be enabled by
> some kind of switch or preprocessor macro in the arch dependant file? If
> easily doable, this would IMHO be preferable.
>

Yes, that's what I mean. Basically it'd use a dependency of some sort.
It's not really clear to me right at the moment which is best, too.

Also attached another followon bug fix patch; again, you don't need to
resubmit for this.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.

[-- Attachment #2: 0001-bzip2-lzma-handle-failures-from-bzip2-and-lzma-corr.patch --]
[-- Type: text/x-patch, Size: 1282 bytes --]

>From 6493358cca94a096f1672a393fd70c90dbe91d37 Mon Sep 17 00:00:00 2001
From: H. Peter Anvin <hpa@zytor.com>
Date: Sun, 4 Jan 2009 15:10:40 -0800
Subject: [PATCH] bzip2/lzma: handle failures from bzip2 and lzma correctly

Impact: Bug fix

If bzip2 or lzma fails (for example, if they aren't installed on the
system), we need to propagate the failure out to "make". However,
they were masked by being followed by a semicolon.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
scripts/Makefile.lib | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 70b4676..3b949a3 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -193,10 +193,10 @@ cmd_gzip = gzip -f -9 < $< > $@
size_append=$(CONFIG_SHELL) $(srctree)/scripts/bin_size

quiet_cmd_bzip2 = BZIP2 $@
-cmd_bzip2 = (bzip2 -9 < $< ; $(size_append) $<) > $@ || (rm -f $@ ; false)
+cmd_bzip2 = (bzip2 -9 < $< && $(size_append) $<) > $@ || (rm -f $@ ; false)

# Lzma
# ---------------------------------------------------------------------------

quiet_cmd_lzma = LZMA $@
-cmd_lzma = (lzma -9 -c $< ; $(size_append) $<) >$@ || (rm -f $@ ; false)
+cmd_lzma = (lzma -9 -c $< && $(size_append) $<) >$@ || (rm -f $@ ; false)
--
1.5.6.6