public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] deb-pkg: Apply $(CROSS_COMPILE) when calling objcopy
@ 2014-06-02  6:47 Ian Campbell
  2014-06-02  7:32 ` maximilian attems
  2014-06-02  9:29 ` Fathi Boudra
  0 siblings, 2 replies; 4+ messages in thread
From: Ian Campbell @ 2014-06-02  6:47 UTC (permalink / raw)
  To: Michal Marek, linux-kbuild
  Cc: Ben Hutchings, maximilian attems, debian-kernel, Ian Campbell

Allows me to cross build an armhf package from amd64.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
---
 scripts/package/builddeb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index f46e4dd..c22ab79 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -155,11 +155,11 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
 			for module in $(find lib/modules/ -name *.ko); do
 				mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module)
 				# only keep debug symbols in the debug file
-				objcopy --only-keep-debug $module $dbg_dir/usr/lib/debug/$module
+				${CROSS_COMPILE}objcopy --only-keep-debug $module $dbg_dir/usr/lib/debug/$module
 				# strip original module from debug symbols
-				objcopy --strip-debug $module
+				${CROSS_COMPILE}objcopy --strip-debug $module
 				# then add a link to those
-				objcopy --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module
+				${CROSS_COMPILE}objcopy --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module
 			done
 		)
 	fi
-- 
1.9.0


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

* Re: [PATCH] deb-pkg: Apply $(CROSS_COMPILE) when calling objcopy
  2014-06-02  6:47 [PATCH] deb-pkg: Apply $(CROSS_COMPILE) when calling objcopy Ian Campbell
@ 2014-06-02  7:32 ` maximilian attems
  2014-06-02  9:29 ` Fathi Boudra
  1 sibling, 0 replies; 4+ messages in thread
From: maximilian attems @ 2014-06-02  7:32 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Michal Marek, linux-kbuild, Ben Hutchings, debian-kernel


On Mon, Jun 02, 2014 at 07:47:37AM +0100, Ian Campbell wrote:
> Allows me to cross build an armhf package from amd64.
> 
> Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Acked-by: maximilian attems <max@stro.at>
> ---
>  scripts/package/builddeb | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index f46e4dd..c22ab79 100644
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -155,11 +155,11 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
>  			for module in $(find lib/modules/ -name *.ko); do
>  				mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module)
>  				# only keep debug symbols in the debug file
> -				objcopy --only-keep-debug $module $dbg_dir/usr/lib/debug/$module
> +				${CROSS_COMPILE}objcopy --only-keep-debug $module $dbg_dir/usr/lib/debug/$module
>  				# strip original module from debug symbols
> -				objcopy --strip-debug $module
> +				${CROSS_COMPILE}objcopy --strip-debug $module
>  				# then add a link to those
> -				objcopy --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module
> +				${CROSS_COMPILE}objcopy --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module
>  			done
>  		)
>  	fi
> -- 
> 1.9.0
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: https://lists.debian.org/1401691657-12222-1-git-send-email-ijc@hellion.org.uk
> 

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

* Re: [PATCH] deb-pkg: Apply $(CROSS_COMPILE) when calling objcopy
  2014-06-02  6:47 [PATCH] deb-pkg: Apply $(CROSS_COMPILE) when calling objcopy Ian Campbell
  2014-06-02  7:32 ` maximilian attems
@ 2014-06-02  9:29 ` Fathi Boudra
  2014-06-02  9:39   ` Ian Campbell
  1 sibling, 1 reply; 4+ messages in thread
From: Fathi Boudra @ 2014-06-02  9:29 UTC (permalink / raw)
  To: Ian Campbell
  Cc: Michal Marek, linux-kbuild, Ben Hutchings, maximilian attems,
	debian-kernel

On 2 June 2014 09:47, Ian Campbell <ijc@hellion.org.uk> wrote:
> Allows me to cross build an armhf package from amd64.
>
> Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
> ---
>  scripts/package/builddeb | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index f46e4dd..c22ab79 100644
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -155,11 +155,11 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
>                         for module in $(find lib/modules/ -name *.ko); do
>                                 mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module)
>                                 # only keep debug symbols in the debug file
> -                               objcopy --only-keep-debug $module $dbg_dir/usr/lib/debug/$module
> +                               ${CROSS_COMPILE}objcopy --only-keep-debug $module $dbg_dir/usr/lib/debug/$module
>                                 # strip original module from debug symbols
> -                               objcopy --strip-debug $module
> +                               ${CROSS_COMPILE}objcopy --strip-debug $module
>                                 # then add a link to those
> -                               objcopy --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module
> +                               ${CROSS_COMPILE}objcopy --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module
>                         done
>                 )
>         fi
> --
> 1.9.0

I submitted it a month ago. It's already applied to kbuild.git#misc:
http://www.spinics.net/lists/linux-kbuild/msg09273.html

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

* Re: [PATCH] deb-pkg: Apply $(CROSS_COMPILE) when calling objcopy
  2014-06-02  9:29 ` Fathi Boudra
@ 2014-06-02  9:39   ` Ian Campbell
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Campbell @ 2014-06-02  9:39 UTC (permalink / raw)
  To: Fathi Boudra
  Cc: Michal Marek, linux-kbuild, Ben Hutchings, maximilian attems,
	debian-kernel

On Mon, 2014-06-02 at 12:29 +0300, Fathi Boudra wrote:
> I submitted it a month ago. It's already applied to kbuild.git#misc:
> http://www.spinics.net/lists/linux-kbuild/msg09273.html

I must have missed it, thanks!

Your version looks better (correctly uses $OBJCOPY)

Ian.



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

end of thread, other threads:[~2014-06-02  9:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-02  6:47 [PATCH] deb-pkg: Apply $(CROSS_COMPILE) when calling objcopy Ian Campbell
2014-06-02  7:32 ` maximilian attems
2014-06-02  9:29 ` Fathi Boudra
2014-06-02  9:39   ` Ian Campbell

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