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. > -----Original Message----- > From: Khem Raj [mailto:raj.k...@gmail.com] > Sent: Monday, October 17, 2016 4:40 PM > To: Bystricky, Juro <juro.bystri...@intel.com> > Cc: openembedded-core@lists.openembedded.org; jurobystri...@hotmail.com > 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 <juro.bystri...@intel.com> > wrote: > > > > Both "arc" and "xtensa" are valid Linux architectures, add > > them into valid_archs table. > > > > Signed-off-by: Juro Bystricky <juro.bystri...@intel.com> > > --- > > 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 > > Openembedded-core@lists.openembedded.org > > http://lists.openembedded.org/mailman/listinfo/openembedded-core -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core