Thanks. I will add the test for TARGET_OS in a separate patch. > -----Original Message----- > From: Khem Raj [mailto:[email protected]] > Sent: Tuesday, October 18, 2016 10:53 AM > To: Bystricky, Juro <[email protected]> > Cc: [email protected]; [email protected] > Subject: Re: [OE-core] [PATCH] kernel-arch.bbclass: Add xtensa and arc into > valid_archs table > > > > On Oct 18, 2016, at 9:13 AM, Bystricky, Juro <[email protected]> > wrote: > > > > The single purpose of "map_kernel_arch" is to set > > > > export ARCH = "arch_xxx" > > > > Presently, we must set ARCH even when building baremetal toolchains only, > > without any need to build kernel. However, in this case we may > > encounter a bogus error such as "cannot map arch_xxx to a linux kernel > architecture". > > The simplest way to avoid this is to place arch_xxx into the table > > "valid_archs". (That was the main reason for the patch). > > > > A better but more complex way would be to modify the code so > > map_kernel_arch is not called at all when NOT building kernel or kernel > > modules. This would also allow building baremetal cross-toolchains for > arches > > that don't have Linux kernels at all. > > > > Another way to consider is perhaps just getting rid of the table > > "valid_archs" entirely. > > > > "map_kernel_arch" maps arch_aaa -> arch_xxx for some cases. > > If there is no explicit mapping, then it could simply map > > > > arch_aaa->arch_aaa > > > > resulting in export ARCH="arch_aaa" > > There would be no error generated. If ARCH is not a valid > > arch for a Linux kernel, we would encounter a build error at some point. > > But that, I believe is the same case now if we try to build a kernel > > with a valid kernel ARCH but not supported actively in OE or extended OE > ecosystem. > > I think you should add a check for testing TARGET_OS and if its not linux > then > ignore the valid kernel arches check. > > > > > > > > > > >> -----Original Message----- > >> From: Khem Raj [mailto:[email protected]] > >> Sent: Monday, October 17, 2016 4:40 PM > >> To: Bystricky, Juro <[email protected]> > >> Cc: [email protected]; [email protected] > >> Subject: Re: [OE-core] [PATCH] kernel-arch.bbclass: Add xtensa and arc > into > >> valid_archs table > >> > >> > >>> On Oct 11, 2016, at 9:31 AM, Juro Bystricky <[email protected]> > >> wrote: > >>> > >>> Both "arc" and "xtensa" are valid Linux architectures, add > >>> them into valid_archs table. > >>> > >>> Signed-off-by: Juro Bystricky <[email protected]> > >>> --- > >>> meta/classes/kernel-arch.bbclass | 2 +- > >>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>> > >>> diff --git a/meta/classes/kernel-arch.bbclass b/meta/classes/kernel- > >> arch.bbclass > >>> index 8a4bef1..ea976c6 100644 > >>> --- a/meta/classes/kernel-arch.bbclass > >>> +++ b/meta/classes/kernel-arch.bbclass > >>> @@ -14,7 +14,7 @@ valid_archs = "alpha cris ia64 \ > >>> parisc s390 v850 \ > >>> avr32 blackfin \ > >>> microblaze \ > >>> - nios2" > >>> + nios2 arc xtensa” > >> > >> there parisc etc as well so in essence patch is ok but I wonder if we > >> should > >> remove the arches we dont actively support in OE or extended OE > ecosystem. > >> > >>> > >>> def map_kernel_arch(a, d): > >>> import re > >>> -- > >>> 2.7.4 > >>> > >>> -- > >>> _______________________________________________ > >>> Openembedded-core mailing list > >>> [email protected] > >>> http://lists.openembedded.org/mailman/listinfo/openembedded-core > >
-- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
