linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Make rpm patch for cross compile 2.6.0-test11
@ 2003-12-10  9:06 Zhu, Yi
  2003-12-25  2:43 ` [PATCH] fix make kernel rpm bug Zhu, Yi
  0 siblings, 1 reply; 4+ messages in thread
From: Zhu, Yi @ 2003-12-10  9:06 UTC (permalink / raw)
  To: linux-kernel


Hi,

I found the rpm rule in top Makefile has some problem when I was cross
compiling a ia64 kernel in a ia32 build machine. Below patch can fix this
bug.


diff -Nru a/Makefile b/Makefile
--- a/Makefile	Wed Dec 10 13:47:52 2003
+++ b/Makefile	Wed Dec 10 13:47:52 2003
@@ -872,7 +872,7 @@
 	$(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version;\
 	mv -f $(objtree)/.tmp_version $(objtree)/.version;
 
-	$(RPM) -ta ../$(KERNELPATH).tar.gz
+	$(RPM) --target $(ARCH) -ta ../$(KERNELPATH).tar.gz
 	rm ../$(KERNELPATH).tar.gz
 
 # Brief documentation of the typical targets used
diff -Nru a/scripts/mkspec b/scripts/mkspec
--- a/scripts/mkspec	Wed Dec 10 13:47:52 2003
+++ b/scripts/mkspec	Wed Dec 10 13:47:52 2003
@@ -9,7 +9,7 @@
 #	Patched for non-x86 by Opencon (L) 2002 <opencon@rio.skydome.net>
 #
 # That's the voodoo to see if it's a x86.
-ISX86=`arch | grep -ie i.86`
+ISX86=`echo ${ARCH:=\`arch\`} | grep -ie i.86`
 if [ ! -z $ISX86 ]; then
 	PC=1
 else


Thanks,
-- 
-----------------------------------------------------------------
Opinions expressed are those of the author and do not represent
Intel Corp.

Zhu Yi (Chuyee)

GnuPG v1.0.6 (GNU/Linux)
http://cn.geocities.com/chewie_chuyee/gpg.txt or
$ gpg --keyserver wwwkeys.pgp.net --recv-keys 71C34820
1024D/71C34820 C939 2B0B FBCE 1D51 109A  55E5 8650 DB90 71C3 4820


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

* [PATCH] fix make kernel rpm bug
  2003-12-10  9:06 Make rpm patch for cross compile 2.6.0-test11 Zhu, Yi
@ 2003-12-25  2:43 ` Zhu, Yi
  2003-12-25  4:12   ` Jeff Garzik
  2003-12-29  3:19   ` [PATCH] fix make kernel rpm bug (revised) Zhu, Yi
  0 siblings, 2 replies; 4+ messages in thread
From: Zhu, Yi @ 2003-12-25  2:43 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

Hi Andrew,

Below two lines patch makes the rpm rule in top Makefile be aware of
$(ARCH). The old rule will make wrong rpm if ARCH is not the same as
the build machine.


diff -Nru a/Makefile b/Makefile
--- a/Makefile	Wed Dec 10 13:47:52 2003
+++ b/Makefile	Wed Dec 10 13:47:52 2003
@@ -872,7 +872,7 @@
 	$(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version;\
 	mv -f $(objtree)/.tmp_version $(objtree)/.version;
 
-	$(RPM) -ta ../$(KERNELPATH).tar.gz
+	$(RPM) --target $(ARCH) -ta ../$(KERNELPATH).tar.gz
 	rm ../$(KERNELPATH).tar.gz
 
 # Brief documentation of the typical targets used
diff -Nru a/scripts/mkspec b/scripts/mkspec
--- a/scripts/mkspec	Wed Dec 10 13:47:52 2003
+++ b/scripts/mkspec	Wed Dec 10 13:47:52 2003
@@ -9,7 +9,7 @@
 #	Patched for non-x86 by Opencon (L) 2002 <opencon@rio.skydome.net>
 #
 # That's the voodoo to see if it's a x86.
-ISX86=`arch | grep -ie i.86`
+ISX86=`echo ${ARCH:=\`arch\`} | grep -ie i.86`
 if [ ! -z $ISX86 ]; then
 	PC=1
 else


Thanks,


-- 
-----------------------------------------------------------------
Opinions expressed are those of the author and do not represent
Intel Corp.

Zhu Yi (Chuyee)

GnuPG v1.0.6 (GNU/Linux)
http://cn.geocities.com/chewie_chuyee/gpg.txt or
$ gpg --keyserver wwwkeys.pgp.net --recv-keys 71C34820
1024D/71C34820 C939 2B0B FBCE 1D51 109A  55E5 8650 DB90 71C3 4820


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

* Re: [PATCH] fix make kernel rpm bug
  2003-12-25  2:43 ` [PATCH] fix make kernel rpm bug Zhu, Yi
@ 2003-12-25  4:12   ` Jeff Garzik
  2003-12-29  3:19   ` [PATCH] fix make kernel rpm bug (revised) Zhu, Yi
  1 sibling, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2003-12-25  4:12 UTC (permalink / raw)
  To: Zhu, Yi; +Cc: Andrew Morton, linux-kernel

On Thu, Dec 25, 2003 at 10:43:52AM +0800, Zhu, Yi wrote:
> Hi Andrew,
> 
> Below two lines patch makes the rpm rule in top Makefile be aware of
> $(ARCH). The old rule will make wrong rpm if ARCH is not the same as
> the build machine.
> 
> 
> diff -Nru a/Makefile b/Makefile
> --- a/Makefile	Wed Dec 10 13:47:52 2003
> +++ b/Makefile	Wed Dec 10 13:47:52 2003
> @@ -872,7 +872,7 @@
>  	$(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version;\
>  	mv -f $(objtree)/.tmp_version $(objtree)/.version;
>  
> -	$(RPM) -ta ../$(KERNELPATH).tar.gz
> +	$(RPM) --target $(ARCH) -ta ../$(KERNELPATH).tar.gz
>  	rm ../$(KERNELPATH).tar.gz
>  
>  # Brief documentation of the typical targets used
> diff -Nru a/scripts/mkspec b/scripts/mkspec
> --- a/scripts/mkspec	Wed Dec 10 13:47:52 2003
> +++ b/scripts/mkspec	Wed Dec 10 13:47:52 2003
> @@ -9,7 +9,7 @@
>  #	Patched for non-x86 by Opencon (L) 2002 <opencon@rio.skydome.net>
>  #
>  # That's the voodoo to see if it's a x86.
> -ISX86=`arch | grep -ie i.86`
> +ISX86=`echo ${ARCH:=\`arch\`} | grep -ie i.86`

hmmm, I don't think $(ARCH) makes the rpm --target strings in all
cases..

	Jeff




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

* [PATCH] fix make kernel rpm bug (revised)
  2003-12-25  2:43 ` [PATCH] fix make kernel rpm bug Zhu, Yi
  2003-12-25  4:12   ` Jeff Garzik
@ 2003-12-29  3:19   ` Zhu, Yi
  1 sibling, 0 replies; 4+ messages in thread
From: Zhu, Yi @ 2003-12-29  3:19 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel


Thanks for Jeff and Russell King's help, I now revised the patch as
below.


diff -Nru a/Makefile b/Makefile
--- a/Makefile	Wed Dec 10 13:47:52 2003
+++ b/Makefile	Wed Dec 10 13:47:52 2003
@@ -872,7 +872,7 @@
 	$(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version;\
 	mv -f $(objtree)/.tmp_version $(objtree)/.version;
 
-	$(RPM) -ta ../$(KERNELPATH).tar.gz
+	$(RPM) --target $(UTS_MACHINE) -ta ../$(KERNELPATH).tar.gz
 	rm ../$(KERNELPATH).tar.gz
 
 # Brief documentation of the typical targets used
diff -Nru a/scripts/mkspec b/scripts/mkspec
--- a/scripts/mkspec	Wed Dec 10 13:47:52 2003
+++ b/scripts/mkspec	Wed Dec 10 13:47:52 2003
@@ -9,7 +9,7 @@
 #	Patched for non-x86 by Opencon (L) 2002 <opencon@rio.skydome.net>
 #
 # That's the voodoo to see if it's a x86.
-ISX86=`arch | grep -ie i.86`
+ISX86=`echo ${ARCH:=\`arch\`} | grep -ie i.86`
 if [ ! -z $ISX86 ]; then
 	PC=1
 else


Thanks,
-- 
-----------------------------------------------------------------
Opinions expressed are those of the author and do not represent
Intel Corp.

-yi


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

end of thread, other threads:[~2003-12-29  3:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-10  9:06 Make rpm patch for cross compile 2.6.0-test11 Zhu, Yi
2003-12-25  2:43 ` [PATCH] fix make kernel rpm bug Zhu, Yi
2003-12-25  4:12   ` Jeff Garzik
2003-12-29  3:19   ` [PATCH] fix make kernel rpm bug (revised) Zhu, Yi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).