* [RFC] broken installkernel.sh with CROSS_COMPILE
@ 2005-09-02 20:39 Dave Hansen
2005-09-03 8:50 ` Ian Campbell
2005-09-07 22:35 ` linas
0 siblings, 2 replies; 6+ messages in thread
From: Dave Hansen @ 2005-09-02 20:39 UTC (permalink / raw)
To: icampbell; +Cc: Linux Kernel Mailing List, PPC64 External List
I noticed that my cross-compilation 'make install' broke with 2.6.13 (I
don't use it horribly often). It's from this commit:
http://www.kernel.org/git/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0f8e2d62fa04441cd12c08ce521e84e5bd3f8a46
Which added CROSS_COMPILE to each arch's install.sh:
if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi
However, I don't just have a simple arch name as my CROSS_COMPILE, I
have a whole path, so that line expands like this for me:
+ '[' -x /home/dave/bin//home/services/cross_compile/ppc64/bin/ppc64-linux-gnu-installkernel ']'
Needless to say, that doesn't work :)
Could we do something that's guaranteed to not have lots of extra path
elements in it, like ARCH? Something like this?
That way, people like me who have a single installkernel script that
does all of the fancy arch-detection can just do this:
for i in `ls linux-2.6.git/arch/`; do
ln -s ~/bin/installkernel ~/bin/$i-installkernel
fi
And be done with it forever.
--- linux-2.6/arch/ppc64/boot/install.sh.orig 2005-09-02 13:34:16.000000000 -0700
+++ linux-2.6/arch/ppc64/boot/install.sh 2005-09-02 13:34:52.000000000 -0700
@@ -22,6 +22,7 @@
# User may have a custom install script
+if [ -x ~/bin/${ARCH}-installkernel ]; then exec ~/bin/${ARCH}-installkernel "$@"; fi
if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi
if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi
-- Dave
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [RFC] broken installkernel.sh with CROSS_COMPILE
2005-09-02 20:39 [RFC] broken installkernel.sh with CROSS_COMPILE Dave Hansen
@ 2005-09-03 8:50 ` Ian Campbell
2005-09-03 12:31 ` Dave Hansen
2005-09-07 22:35 ` linas
1 sibling, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2005-09-03 8:50 UTC (permalink / raw)
To: Dave Hansen; +Cc: Linux Kernel Mailing List, PPC64 External List
On Fri, 2005-09-02 at 13:39 -0700, Dave Hansen wrote:
> I noticed that my cross-compilation 'make install' broke with 2.6.13 (I
> don't use it horribly often). It's from this commit:
>
> http://www.kernel.org/git/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0f8e2d62fa04441cd12c08ce521e84e5bd3f8a46
>
> Which added CROSS_COMPILE to each arch's install.sh:
>
> if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi
>
> However, I don't just have a simple arch name as my CROSS_COMPILE, I
> have a whole path
Ah, I didn't consider that case, sorry.
> , so that line expands like this for me:
>
> + '[' -x /home/dave/bin//home/services/cross_compile/ppc64/bin/ppc64-linux-gnu-installkernel ']'
>
> Needless to say, that doesn't work :)
>
> Could we do something that's guaranteed to not have lots of extra path
> elements in it, like ARCH?
Or perhaps basename ${CROSSCOMPILE}?
Ian.
--
Ian Campbell
Campbell's Law:
Nature abhors a vacuous experimenter.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [RFC] broken installkernel.sh with CROSS_COMPILE
2005-09-03 8:50 ` Ian Campbell
@ 2005-09-03 12:31 ` Dave Hansen
2005-09-03 14:35 ` Ian Campbell
0 siblings, 1 reply; 6+ messages in thread
From: Dave Hansen @ 2005-09-03 12:31 UTC (permalink / raw)
To: Ian Campbell; +Cc: Linux Kernel Mailing List, PPC64 External List
On Sat, 2005-09-03 at 09:50 +0100, Ian Campbell wrote:
> > Could we do something that's guaranteed to not have lots of extra
> path
> > elements in it, like ARCH?
>
> Or perhaps basename ${CROSSCOMPILE}?
The only problem with that is that some people do really have a cross
compiler named /usr/ppc64/bin/gcc. So, basename will just give you
something useless like "bin".
-- Dave
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [RFC] broken installkernel.sh with CROSS_COMPILE
2005-09-03 12:31 ` Dave Hansen
@ 2005-09-03 14:35 ` Ian Campbell
0 siblings, 0 replies; 6+ messages in thread
From: Ian Campbell @ 2005-09-03 14:35 UTC (permalink / raw)
To: Dave Hansen; +Cc: Linux Kernel Mailing List, PPC64 External List
On Sat, 2005-09-03 at 05:31 -0700, Dave Hansen wrote:
> On Sat, 2005-09-03 at 09:50 +0100, Ian Campbell wrote:
> > > Could we do something that's guaranteed to not have lots of extra
> > path
> > > elements in it, like ARCH?
> >
> > Or perhaps basename ${CROSSCOMPILE}?
>
> The only problem with that is that some people do really have a cross
> compiler named /usr/ppc64/bin/gcc. So, basename will just give you
> something useless like "bin".
Of course, that makes perfect sense.
Ian.
--
Ian Campbell
It seems to make an auto driver mad if he misses you.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC] broken installkernel.sh with CROSS_COMPILE
2005-09-02 20:39 [RFC] broken installkernel.sh with CROSS_COMPILE Dave Hansen
2005-09-03 8:50 ` Ian Campbell
@ 2005-09-07 22:35 ` linas
2005-09-07 22:53 ` Dave Hansen
1 sibling, 1 reply; 6+ messages in thread
From: linas @ 2005-09-07 22:35 UTC (permalink / raw)
To: Dave Hansen; +Cc: icampbell, PPC64 External List, Linux Kernel Mailing List
On Fri, Sep 02, 2005 at 01:39:13PM -0700, Dave Hansen was heard to remark:
> I noticed that my cross-compilation 'make install' broke with 2.6.13 (I
> don't use it horribly often). It's from this commit:
>
> Which added CROSS_COMPILE to each arch's install.sh:
>
> if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi
>
> However, I don't just have a simple arch name as my CROSS_COMPILE, I
> have a whole path, so that line expands like this for me:
Try this:
# path to compilers and binutils, user may override by setting
# CROSS_PATH in environment
CROSS_PATH=${CROSS_PATH:-/opt/cross-3.3.2/bin}
CROSS_COMPILE=powerpc64-linux-
export PATH=$CROSS_PATH:$PATH
echo "using toolchain from $CROSS_PATH"
--linas
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [RFC] broken installkernel.sh with CROSS_COMPILE
2005-09-07 22:35 ` linas
@ 2005-09-07 22:53 ` Dave Hansen
0 siblings, 0 replies; 6+ messages in thread
From: Dave Hansen @ 2005-09-07 22:53 UTC (permalink / raw)
To: linas; +Cc: icampbell, PPC64 External List, Linux Kernel Mailing List
On Wed, 2005-09-07 at 17:35 -0500, linas wrote:
> On Fri, Sep 02, 2005 at 01:39:13PM -0700, Dave Hansen was heard to remark:
> > I noticed that my cross-compilation 'make install' broke with 2.6.13 (I
> > don't use it horribly often). It's from this commit:
> >
> > Which added CROSS_COMPILE to each arch's install.sh:
> >
> > if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi
> >
> > However, I don't just have a simple arch name as my CROSS_COMPILE, I
> > have a whole path, so that line expands like this for me:
>
> Try this:
>
> # path to compilers and binutils, user may override by setting
> # CROSS_PATH in environment
> CROSS_PATH=${CROSS_PATH:-/opt/cross-3.3.2/bin}
>
> CROSS_COMPILE=powerpc64-linux-
>
> export PATH=$CROSS_PATH:$PATH
>
> echo "using toolchain from $CROSS_PATH"
I'm not sure I understand. Where should that be done?
-- Dave
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-09-07 22:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-02 20:39 [RFC] broken installkernel.sh with CROSS_COMPILE Dave Hansen
2005-09-03 8:50 ` Ian Campbell
2005-09-03 12:31 ` Dave Hansen
2005-09-03 14:35 ` Ian Campbell
2005-09-07 22:35 ` linas
2005-09-07 22:53 ` Dave Hansen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox