mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Makefile: Fix size_append issue for bzip2/lzma kernel
@ 2009-08-19  9:38 Alek Du
  2009-08-19  9:52 ` Amerigo Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Alek Du @ 2009-08-19  9:38 UTC (permalink / raw)
  To: Kernel Mailing List, linux-kbuild, Sam Ravnborg

>From 6d755cbd7a136a4314f6976275aaa6c9d10bf3e4 Mon Sep 17 00:00:00 2001
From: Alek Du <alek.du@intel.com>
Date: Wed, 19 Aug 2009 17:18:39 +0800
Subject: [PATCH] Makefile: Fix size_append issue for bzip2/lzma kernel

The Makefile.lib will call "echo -ne" to append uncompressed kernel size to
bzip2/lzma kernel image. The "echo" here depends on the shell that /bin/sh pointing
to. On Ubuntu system, the /bin/sh is pointing to dash, which does not support
"echo -e" at all. Use /bin/echo instead of shell echo should always be safe.

Signed-off-by: Alek Du <alek.du@intel.com>
---
 scripts/Makefile.lib |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 7a77787..c63c941 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -208,7 +208,7 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \
 
 # Bzip2 and LZMA do not include size in file... so we have to fake that;
 # append the size as a 32-bit littleendian number as gzip does.
-size_append = echo -ne $(shell						\
+size_append = /bin/echo -ne $(shell						\
 dec_size=0;								\
 for F in $1; do								\
 	fsize=$$(stat -c "%s" $$F);					\
-- 
1.6.0.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Makefile: Fix size_append issue for bzip2/lzma kernel
  2009-08-19  9:38 [PATCH] Makefile: Fix size_append issue for bzip2/lzma kernel Alek Du
@ 2009-08-19  9:52 ` Amerigo Wang
  2009-08-19 10:19 ` [PATCH] scripts: use non-builtin echo for '-e' Amerigo Wang
  2009-09-27  8:38 ` [PATCH] Makefile: Fix size_append issue for bzip2/lzma kernel Sam Ravnborg
  2 siblings, 0 replies; 5+ messages in thread
From: Amerigo Wang @ 2009-08-19  9:52 UTC (permalink / raw)
  To: Alek Du; +Cc: Kernel Mailing List, linux-kbuild, Sam Ravnborg

On Wed, Aug 19, 2009 at 05:38:54PM +0800, Alek Du wrote:
>From 6d755cbd7a136a4314f6976275aaa6c9d10bf3e4 Mon Sep 17 00:00:00 2001
>From: Alek Du <alek.du@intel.com>
>Date: Wed, 19 Aug 2009 17:18:39 +0800
>Subject: [PATCH] Makefile: Fix size_append issue for bzip2/lzma kernel
>
>The Makefile.lib will call "echo -ne" to append uncompressed kernel size to
>bzip2/lzma kernel image. The "echo" here depends on the shell that /bin/sh pointing
>to. On Ubuntu system, the /bin/sh is pointing to dash, which does not support
>"echo -e" at all. Use /bin/echo instead of shell echo should always be safe.
>
>Signed-off-by: Alek Du <alek.du@intel.com>

Agree.

Acked-by: WANG Cong <xiyou.wangcong@gmail.com>


>---
> scripts/Makefile.lib |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
>index 7a77787..c63c941 100644
>--- a/scripts/Makefile.lib
>+++ b/scripts/Makefile.lib
>@@ -208,7 +208,7 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \
> 
> # Bzip2 and LZMA do not include size in file... so we have to fake that;
> # append the size as a 32-bit littleendian number as gzip does.
>-size_append = echo -ne $(shell						\
>+size_append = /bin/echo -ne $(shell						\
> dec_size=0;								\
> for F in $1; do								\
> 	fsize=$$(stat -c "%s" $$F);					\
>-- 
>1.6.0.4
>--
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] scripts: use non-builtin echo for '-e'
  2009-08-19  9:38 [PATCH] Makefile: Fix size_append issue for bzip2/lzma kernel Alek Du
  2009-08-19  9:52 ` Amerigo Wang
@ 2009-08-19 10:19 ` Amerigo Wang
  2009-09-27  8:38   ` Sam Ravnborg
  2009-09-27  8:38 ` [PATCH] Makefile: Fix size_append issue for bzip2/lzma kernel Sam Ravnborg
  2 siblings, 1 reply; 5+ messages in thread
From: Amerigo Wang @ 2009-08-19 10:19 UTC (permalink / raw)
  To: Alek Du; +Cc: Kernel Mailing List, linux-kbuild, Sam Ravnborg


Alek reported that on Ubuntu, where dash is used, 'echo -e'
can't work, so let's use non-builtin echo in this case.

Reported-by: Alek Du <alek.du@intel.com>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>

---
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index c29be8f..bace250 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -99,7 +99,7 @@ as-option = $(call try-run,\
 # Usage: cflags-y += $(call as-instr,instr,option1,option2)
 
 as-instr = $(call try-run,\
-	echo -e "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -xassembler -o "$$TMP" -,$(2),$(3))
+	/bin/echo -e "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -xassembler -o "$$TMP" -,$(2),$(3))
 
 # cc-option
 # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
diff --git a/scripts/checkkconfigsymbols.sh b/scripts/checkkconfigsymbols.sh
index 39677c8..46be3c5 100755
--- a/scripts/checkkconfigsymbols.sh
+++ b/scripts/checkkconfigsymbols.sh
@@ -9,7 +9,7 @@ paths="$@"
 # Doing this once at the beginning saves a lot of time, on a cache-hot tree.
 Kconfigs="`find . -name 'Kconfig' -o -name 'Kconfig*[^~]'`"
 
-echo -e "File list \tundefined symbol used"
+/bin/echo -e "File list \tundefined symbol used"
 find $paths -name '*.[chS]' -o -name 'Makefile' -o -name 'Makefile*[^~]'| while read i
 do
 	# Output the bare Kconfig variable and the filename; the _MODULE part at
@@ -54,6 +54,6 @@ while read symb files; do
 	# beyond the purpose of this script.
 	symb_bare=`echo $symb | sed -e 's/_MODULE//'`
 	if ! grep -q "\<$symb_bare\>" $Kconfigs; then
-		echo -e "$files: \t$symb"
+		/bin/echo -e "$files: \t$symb"
 	fi
 done|sort


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Makefile: Fix size_append issue for bzip2/lzma kernel
  2009-08-19  9:38 [PATCH] Makefile: Fix size_append issue for bzip2/lzma kernel Alek Du
  2009-08-19  9:52 ` Amerigo Wang
  2009-08-19 10:19 ` [PATCH] scripts: use non-builtin echo for '-e' Amerigo Wang
@ 2009-09-27  8:38 ` Sam Ravnborg
  2 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2009-09-27  8:38 UTC (permalink / raw)
  To: Alek Du; +Cc: Kernel Mailing List, linux-kbuild

On Wed, Aug 19, 2009 at 05:38:54PM +0800, Alek Du wrote:
> From 6d755cbd7a136a4314f6976275aaa6c9d10bf3e4 Mon Sep 17 00:00:00 2001
> From: Alek Du <alek.du@intel.com>
> Date: Wed, 19 Aug 2009 17:18:39 +0800
> Subject: [PATCH] Makefile: Fix size_append issue for bzip2/lzma kernel
> 
> The Makefile.lib will call "echo -ne" to append uncompressed kernel size to
> bzip2/lzma kernel image. The "echo" here depends on the shell that /bin/sh pointing
> to. On Ubuntu system, the /bin/sh is pointing to dash, which does not support
> "echo -e" at all. Use /bin/echo instead of shell echo should always be safe.
> 
> Signed-off-by: Alek Du <alek.du@intel.com>

Applied.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scripts: use non-builtin echo for '-e'
  2009-08-19 10:19 ` [PATCH] scripts: use non-builtin echo for '-e' Amerigo Wang
@ 2009-09-27  8:38   ` Sam Ravnborg
  0 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2009-09-27  8:38 UTC (permalink / raw)
  To: Amerigo Wang; +Cc: Alek Du, Kernel Mailing List, linux-kbuild

On Wed, Aug 19, 2009 at 06:19:55PM +0800, Amerigo Wang wrote:
> 
> Alek reported that on Ubuntu, where dash is used, 'echo -e'
> can't work, so let's use non-builtin echo in this case.
> 
> Reported-by: Alek Du <alek.du@intel.com>
> Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>

Applied.

	Sam

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-09-27  8:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-19  9:38 [PATCH] Makefile: Fix size_append issue for bzip2/lzma kernel Alek Du
2009-08-19  9:52 ` Amerigo Wang
2009-08-19 10:19 ` [PATCH] scripts: use non-builtin echo for '-e' Amerigo Wang
2009-09-27  8:38   ` Sam Ravnborg
2009-09-27  8:38 ` [PATCH] Makefile: Fix size_append issue for bzip2/lzma kernel Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®