summaryrefslogtreecommitdiff
path: root/meta/classes/kernel-arch.bbclass
AgeCommit message (Collapse)AuthorFiles
2017-04-20kernel-arch.bbclass: conditional error messageJuro Bystricky1
The single purpose of "map_kernel_arch" is to set export ARCH = "some-arch" The case when "some-arch" is not a valid Linux architecture results in an error. This makes sense if the TARGET_OS is Linux, but that is not always the case. kernel-arch is also inherited by toolchain-script, which may be used to build toolchains for architectures not supported by Linux. Rather than modifying toolchain-script to provide its own version of "map_arch" this patch bypasses the error if the TARGET_OS is not linux. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-08kernel-arch: Lock the toolchain to use gcc compilerKhem Raj1
kernel and external modules are still using gcc to build Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-16meta: remove True option to getVar callsJoshua Lock1
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-10-15kernel-arch.bbclass: Add xtensa and arc into valid_archs tableJuro Bystricky1
Both "arc" and "xtensa" are valid Linux architectures, add them into valid_archs table. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-10-07kernel-arch.bbclass: Add mipsisa{32, 64}r6{el, } supportZubair Lutfullah Kakakhel1
Add support for MIPS Release 6 ISA Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04Revert "kernel/kernel-arch: Explicitly mapping between i386/x86_64 and x86 ↵Ioan-Adrian Ratiu1
for kernel ARCH" This reverts commit 8d310b24927d0f348fb431895f0583733db2aad0. That commit completely breaks KBUILD_DEFCONFIG because it relies on $ARCH to match between the target OE arch and the kernel subdirectory containing the defconfigs. In the kernel all defconfigs for everything x86-based (including x86_64) is stored in dir arch/x86/configs/ kernel-yocto.bbclass correctly searches for all the defconfigs inside ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} Commit 8d310b249 makes it search in wrong places and _only_ if you define TARGET_ARCH = "athlon" will it search x86 which is nonsensical. The commit further adds an if clause to hack the mungled kernel arches back to their original values (ugh) in do_shared_workdir which is run after do compile, but of course the build breaks before that in do_kernel_metadata because of the KBUILD_DEFCONFIG mentioned above (so that hack is useless). Please fix that corner case bug in another way which does not completely screw up the kernel arch mapping & defconfig logic. If 64bit configs are generated in the kernel for 32bit machines because the host is asked, then it it a bug in the kernel, it is of no use to hack around it in OE. Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-01-15kernel/kernel-arch: Explicitly mapping between i386/x86_64 and x86 for ↵Jianxun Zhang1
kernel ARCH For a bare-bone kernel recipe which specifies 32 bit x86 target, a 64 bit .config will be generated from do_configure task when building 32-bit qemux86, once all of these conditions are true: * arch of host is x86_64 * kernel source tree used in build has commit ffee0de41 which actually chooses i386 or x86_64 defconfig by asking host when ARCH is "x86" (arch/x86/Makefile) * bare-bone kernel recipe inherits directly from kernel without other special treatments. Build will fail because of the mismatched kernel architecture. The patch sets ARCH i386 or x86_64 explicitly to configure task to avoid this host contamination. Kernel artifact is also changed so that it can map i386 and x64 back to arch/x86 when needed. Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-21kernel-arch: Add nios2 to valid archsMarek Vasut1
Add nios2 target to valid arch list definition. Based on previous work by Walter Goossens <waltergoossens@home.nl> at https://github.com/wgoossens/meta-nios2 . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Walter Goossens <waltergoossens@home.nl> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-24kernel-arch: Force BFD kernel when using gcc for linkingKhem Raj1
We redefine LD to point to ld.bfd when building kernel, which works in most cases since kbuild system calls out for bare LD most of the time, however some of newer kernels e.g. 4.1+ have some code added which can call gcc directly to do the linking job e.g. arm vdso code This causes build failures when we have configured the default cross toolchain to use gold linker as default. Errors like BFD: arch/arm/vdso/vdso.so: Not enough room for program headers, try linking with -N | arm-angstrom-linux-gnueabi-objcopy:arch/arm/vdso/vdso.so[.hash]: Bad value start happening. With this patch we force gcc to choose bfd linker as well Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-05-05kernel-arch: Update mapping for MicroBlaze architecturesNathan Rossi1
* Add pattern matching for the 'microblazeeb' architecture which maps to 'microblaze' in the same way as 'microblazeel' Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-21Revert "kernel-arch.bbclass: add arm64 support to U-Boot architecture map"Nathan Rossi1
This reverts commit 0b891265716c414ade29d587fc1a3c4ea7beadbe. U-Boot does support AArch64, this however was only added to newer versions of U-Boot and at the time of this original commit the U-Boot in OE-Core did not support the 'arm64' architecture. OE-Core now has a newer version of U-Boot for the mkimage recipe and thus supports the 'arm64' architecture. Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-03-21kernel-arch.bbclass: add arm64 support to U-Boot architecture mapFathi Boudra1
to define UBOOT_ARCH, we map kernel architectures to U-Boot architectures. In the case of arm64 kernel, we should map to arm U-boot architecture. This patch add the exception rule to the map_uboot_arch function. Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-14classes: add aarch64_be targetVictor Kamensky1
Add big endian ARMv8 target to OE infrastructure Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org> Signed-off-by: Koen Kooi <koen.kooi@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-28kernel-arch: Always use ld.bfd to link the kernelPhil Blundell1
The kernel's penchant for custom linker scripts means that it doesn't generally get on very well with gold. Make sure we are using the BFD linker here no matter what the distro default is set to. Signed-off-by: Phil Blundell <philb@gnu.org> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-03-04kernel-arch.bbclass: don't pass extra args to KERNEL_{CC, LD, AR}Matthew McClintock1
Commit a3ca06c3b45c791dd38dbf154ad0fc62b4063475 added extra args to KERNEL_CC, these revert that bit while maintaining machine additions in TARGET_??_KERNEL_ARCH Producing incorrect instructions and generating the following errors: CC arch/powerpc/kernel/init_task.o | {standard input}: Assembler messages: | {standard input}:384: Error: junk at end of line: `1' | {standard input}:949: Error: junk at end of line: `1' | {standard input}:1428: Error: junk at end of line: `1' | {standard input}:1526: Error: junk at end of line: `1' | {standard input}:1626: Error: junk at end of line: `1' | {standard input}:1685: Error: junk at end of line: `1' | {standard input}:1973: Error: junk at end of line: `1' | {standard input}:2001: Error: junk at end of line: `1' | {standard input}:2100: Error: junk at end of line: `1' | {standard input}:2168: Error: junk at end of line: `1' | {standard input}:2520: Error: junk at end of line: `1' | CC arch/powerpc/lib/locks.o Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-20kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CCKhem Raj1
kernel compiler is not special and we currently have it so we want to pass -march and -mtune options as CFLAGS to kernel build so that compiler picks the right subarch flags when compiling assembly files in particular. Otherwise defaults are chosen which may not be right in many case e.g. when compiling kernel for collie machine we should use arch=armv4 but it uses toolchain/as defaults which is armv5te in some case e.g. thumb1 we know that kernel can not be compiled in thumb1 mode so we can provide that information e.g. -marm option through KERNEL_HOST_CC_ARCH variable as we do now Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-18kernel-arch.bblass: add AArch64 supportMarcin Juszkiewicz1
Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-07-19Convert tab indentation in python functions into four-spaceRichard Purdie1
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-02kernel-arch: Remove test for long-dead arm26 architecture.Robert P. J. Day1
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-20kernel-arch.bbclass: Map mips64{el} to mips KARCHKhem Raj1
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2012-03-05meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)Richard Purdie1
Using "1" with getVar is bad coding style and "True" is preferred. This patch is a sed over the meta directory of the form: sed \ -e 's:\(\.getVar([^,()]*, \)1 *):\1True):g' \ -e 's:\(\.getVarFlag([^,()]*, [^,()]*, \)1 *):\1True):g' \ -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10Convert to use direct access to the data store (instead of bb.data.*Var*())Richard Purdie1
This is the result of running the following over the metadata: sed \ -e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \ -e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-22kernel-arch: Add handling of powerpc64Kumar Gala1
Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-07kernel-arch: microblaze little endian fix kernel archAdrian Alonso1
* In map_kernel_arch function return valid arch for microblazeel target arch. if TARGET_ARCH = "microblazeel" return "microblaze" Signed-off-by: Adrian Alonso <aalonso@secretlab.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-10kernel-arch: add microblaze to valid archsAdrian Alonso1
* Add Microblaze target to valid arch list definition Signed-off-by: Adrian Alonso <aalonso@secretlab.ca>
2010-08-13kernel-arch: x86-64 is no longer a valid architecture, map it to x86Joshua Lock1
Also use the exported (and re-mapped) ARCH rather than TARGET_ARCH in the linux-wrs recipe. Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-07-19qemu: update kernel mapping to return x86 for i586 TARGET_ARCHBruce Ashfield1
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-05-20kernel-arch.bbclass: merge improved arch detection from OE.devJoshua Lock1
Signed-off-by: Joshua Lock <josh@linux.intel.com>
2009-11-13classes: Remove and sanitise import statementsRichard Purdie1
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2008-04-08kernel-arch.bbclass: Sync with OE.devRichard Purdie1
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4210 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-08-08classes: Sync various classes with OE for various bugfixesRichard Purdie1
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2407 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-08-27classes: Sync with OERichard Purdie1
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@651 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-07-21Rename /openembedded/ -> /meta/Richard Purdie1
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966