* big endian builds
@ 2016-03-11 6:47 Vineet Gupta
2016-03-11 6:52 ` Vineet Gupta
0 siblings, 1 reply; 3+ messages in thread
From: Vineet Gupta @ 2016-03-11 6:47 UTC (permalink / raw)
To: linux-snps-arc
So for big endian kernel builds, just selecting the CONFIG_CPU_BIG_ENDIAN is not
sufficient, we also need to manually change the CROSS_COMPILE prefix to arceb-xxx.
@Anton, is that what you do for verification builds !
@Noam I presume your defconfig has CONFIG_CROSS_COMPILE or you have set in env
variable ?
The kernel build system needs to take take care of that. Do you guys have issues
with patch below
------------>
diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index c8230f3395f2..4abcdb89e391 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -9,8 +9,12 @@
UTS_MACHINE := arc
ifeq ($(CROSS_COMPILE),)
+ifndef CONFIG_CPU_BIG_ENDIAN
+CROSS_COMPILE := arceb-linux-
+else
CROSS_COMPILE := arc-linux-
endif
+endif
^ permalink raw reply related [flat|nested] 3+ messages in thread
* big endian builds
2016-03-11 6:47 big endian builds Vineet Gupta
@ 2016-03-11 6:52 ` Vineet Gupta
2016-03-11 12:13 ` Anton Kolesov
0 siblings, 1 reply; 3+ messages in thread
From: Vineet Gupta @ 2016-03-11 6:52 UTC (permalink / raw)
To: linux-snps-arc
On Friday 11 March 2016 12:18 PM, Vineet Gupta wrote:
> So for big endian kernel builds, just selecting the CONFIG_CPU_BIG_ENDIAN is not
> sufficient, we also need to manually change the CROSS_COMPILE prefix to arceb-xxx.
>
> @Anton, is that what you do for verification builds !
>
> @Noam I presume your defconfig has CONFIG_CROSS_COMPILE or you have set in env
> variable ?
>
>
> The kernel build system needs to take take care of that. Do you guys have issues
> with patch below
>
> ------------>
> diff --git a/arch/arc/Makefile b/arch/arc/Makefile
> index c8230f3395f2..4abcdb89e391 100644
> --- a/arch/arc/Makefile
> +++ b/arch/arc/Makefile
> @@ -9,8 +9,12 @@
> UTS_MACHINE := arc
>
> ifeq ($(CROSS_COMPILE),)
> +ifndef CONFIG_CPU_BIG_ENDIAN
> +CROSS_COMPILE := arceb-linux-
> +else
Please pardon this nonsense as lack of caffeine - despite the obvious fixup, I
still need to change the .config.
I think we need to revert the defconfig patch for fixing the CROSS_COMPILE prefix
after all !
> CROSS_COMPILE := arc-linux-
> endif
> +endif
>
>
> _______________________________________________
> linux-snps-arc mailing list
> linux-snps-arc at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-snps-arc
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* big endian builds
2016-03-11 6:52 ` Vineet Gupta
@ 2016-03-11 12:13 ` Anton Kolesov
0 siblings, 0 replies; 3+ messages in thread
From: Anton Kolesov @ 2016-03-11 12:13 UTC (permalink / raw)
To: linux-snps-arc
Nightly verification script modifies CONFIG_CROSS_COMPILE in the .config file before build Linux - little or big endian doesn't matter, so path to tools is always correct. It sets full path in .config, instead of prepending PATH. CONFIG_CPU_BIG_ENDIAN is set accordingly.
--------8<--------
# Generate proper .config file from defconfig
make $MAKEFLAGS -C $src_dir/linux O=$odir ARCH=arc olddefconfig
# Set toolchain path
sed -i \
-e "s|CONFIG_CROSS_COMPILE=\".*\"|CONFIG_CROSS_COMPILE=\"$build_dir/$target_toolchain/bin/$target_prefix\"|" \
$odir/.config
# Set proper endianness. It's necessary to set it explicitly because
# we are not sure what value for CONFIG_CPU_BIG_ENDIAN flag is set
# because of impact of allnoconfig or allyesconfig configurations.
if [ $target_endian = eb ]; then
kconfig_enable_option $odir CONFIG_CPU_BIG_ENDIAN
else
kconfig_disable_option $odir CONFIG_CPU_BIG_ENDIAN
fi
# Regenerate .config with new CONFIG_CPU_BIG_ENDIAN option value. It's
# necessary because this option may be not presented in platforms defconfigs
# thus sed cannot fix it before generating the first version of .config.
make $MAKEFLAGS -C $src_dir/linux O=$odir ARCH=arc olddefconfig
--------8<--------
Anton
> -----Original Message-----
> From: Vineet Gupta [mailto:vgupta at synopsys.com]
> Sent: Friday, March 11, 2016 9:53 AM
> To: Vineet Gupta <Vineet.Gupta1 at synopsys.com>; Anton Kolesov <Anton.Kolesov at synopsys.com>; Alexey
> Brodkin <Alexey.Brodkin at synopsys.com>; Noam Camus <noamc at ezchip.com>
> Cc: arcml <linux-snps-arc at lists.infradead.org>
> Subject: Re: big endian builds
>
> On Friday 11 March 2016 12:18 PM, Vineet Gupta wrote:
> > So for big endian kernel builds, just selecting the CONFIG_CPU_BIG_ENDIAN is not
> > sufficient, we also need to manually change the CROSS_COMPILE prefix to arceb-xxx.
> >
> > @Anton, is that what you do for verification builds !
> >
> > @Noam I presume your defconfig has CONFIG_CROSS_COMPILE or you have set in env
> > variable ?
> >
> >
> > The kernel build system needs to take take care of that. Do you guys have issues
> > with patch below
> >
> > ------------>
> > diff --git a/arch/arc/Makefile b/arch/arc/Makefile
> > index c8230f3395f2..4abcdb89e391 100644
> > --- a/arch/arc/Makefile
> > +++ b/arch/arc/Makefile
> > @@ -9,8 +9,12 @@
> > UTS_MACHINE := arc
> >
> > ifeq ($(CROSS_COMPILE),)
> > +ifndef CONFIG_CPU_BIG_ENDIAN
> > +CROSS_COMPILE := arceb-linux-
> > +else
>
> Please pardon this nonsense as lack of caffeine - despite the obvious fixup, I
> still need to change the .config.
> I think we need to revert the defconfig patch for fixing the CROSS_COMPILE prefix
> after all !
>
> > CROSS_COMPILE := arc-linux-
> > endif
> > +endif
> >
> >
> > _______________________________________________
> > linux-snps-arc mailing list
> > linux-snps-arc at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-snps-arc
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-11 12:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-11 6:47 big endian builds Vineet Gupta
2016-03-11 6:52 ` Vineet Gupta
2016-03-11 12:13 ` Anton Kolesov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.