linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] fix make kernel rpm bug
       [not found] <3ACA40606221794F80A5670F0AF15F840254C76E@PDSMSX403.ccr.corp.intel.com>
@ 2003-12-25  6:58 ` Zhu, Yi
  2003-12-25  9:49   ` Russell King
  0 siblings, 1 reply; 5+ messages in thread
From: Zhu, Yi @ 2003-12-25  6:58 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-kernel

On Thu, 25 Dec 2003, Jeff Garzik wrote:

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

>From rpm man page --target PLATFORM will interpret PLATFORM as
arch-vendor-os and set %_target, %_target_cpu, %_target_os accordingly.
In this case only arch is set, so vendor and os will remain as default.

If you still think it is too implicit, how about change as below? In case
you want set RPM_VENDOR_OS to something like "-unknown-linux".


@@ -258,6 +258,7 @@
 AWK            = awk
 RPM            := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo
rpmbuild; \
                        else echo rpm; fi)
+RPM_VENDOR_OS  :=
 GENKSYMS       = scripts/genksyms/genksyms
 DEPMOD         = /sbin/depmod
 KALLSYMS       = scripts/kallsyms
@@ -872,7 +873,7 @@
        $(CONFIG_SHELL) $(srctree)/scripts/mkversion >
$(objtree)/.tmp_version;\
        mv -f $(objtree)/.tmp_version $(objtree)/.version;

-       $(RPM) -ta ../$(KERNELPATH).tar.gz
+       $(RPM) --target $(ARCH)$(RPM_VENDOR_OS) -ta ../$(KERNELPATH).tar.gz
        rm ../$(KERNELPATH).tar.gz

 # Brief documentation of the typical targets used


>         Jeff

-yi


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

* Re: [PATCH] fix make kernel rpm bug
  2003-12-25  6:58 ` [PATCH] fix make kernel rpm bug Zhu, Yi
@ 2003-12-25  9:49   ` Russell King
  0 siblings, 0 replies; 5+ messages in thread
From: Russell King @ 2003-12-25  9:49 UTC (permalink / raw)
  To: Zhu, Yi; +Cc: Jeff Garzik, linux-kernel

On Thu, Dec 25, 2003 at 02:58:14PM +0800, Zhu, Yi wrote:
> On Thu, 25 Dec 2003, Jeff Garzik wrote:
> > hmmm, I don't think $(ARCH) makes the rpm --target strings in all
> > cases..
> 
> From rpm man page --target PLATFORM will interpret PLATFORM as
> arch-vendor-os and set %_target, %_target_cpu, %_target_os accordingly.
> In this case only arch is set, so vendor and os will remain as default.
> 
> If you still think it is too implicit, how about change as below? In case
> you want set RPM_VENDOR_OS to something like "-unknown-linux".

What Jeff means is that $(ARCH) may not be what rpm calls the
architecture.  For instance, the kernel has "arm" but RPM has
"armv3l" "armv4l" etc, but doesn't know what "arm" is.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

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

* Re: [PATCH] fix make kernel rpm bug
       [not found] <3ACA40606221794F80A5670F0AF15F840254C793@PDSMSX403.ccr.corp.intel.com>
@ 2003-12-26  7:26 ` Zhu, Yi
  0 siblings, 0 replies; 5+ messages in thread
From: Zhu, Yi @ 2003-12-26  7:26 UTC (permalink / raw)
  To: Russell King; +Cc: Zhu, Yi, Jeff Garzik, linux-kernel

On Thu, 25 Dec 2003, Russell King wrote:

> What Jeff means is that $(ARCH) may not be what rpm calls the
> architecture.  For instance, the kernel has "arm" but RPM has
> "armv3l" "armv4l" etc, but doesn't know what "arm" is.

Thanks for the explain. How about change it as below? People can change
UTS_MACHINE to its own march like "armv5te" if it is not the same as
$(ARCH).


@@ -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

> 
> --
> Russell King
>  Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
>  maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
>                  2.6 Serial core

-yi


^ permalink raw reply	[flat|nested] 5+ 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
  0 siblings, 0 replies; 5+ 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] 5+ 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
  0 siblings, 1 reply; 5+ 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] 5+ messages in thread

end of thread, other threads:[~2003-12-26  7:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3ACA40606221794F80A5670F0AF15F840254C76E@PDSMSX403.ccr.corp.intel.com>
2003-12-25  6:58 ` [PATCH] fix make kernel rpm bug Zhu, Yi
2003-12-25  9:49   ` Russell King
     [not found] <3ACA40606221794F80A5670F0AF15F840254C793@PDSMSX403.ccr.corp.intel.com>
2003-12-26  7:26 ` Zhu, Yi
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

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).