summaryrefslogtreecommitdiff
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2012-05-03 15:48:48 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-01 14:57:46 +0000
commite3cdd0aafb9081cd7f1f98490087c1157a3d7403 (patch)
tree8f9d95376c8e99df17e153514bd511179044b5bd /meta/classes/kernel.bbclass
parentb18c61bae4d7161c087a004bba3c696006f7a2f6 (diff)
downloadopenembedded-core-e3cdd0aafb9081cd7f1f98490087c1157a3d7403.tar.gz
openembedded-core-e3cdd0aafb9081cd7f1f98490087c1157a3d7403.tar.bz2
openembedded-core-e3cdd0aafb9081cd7f1f98490087c1157a3d7403.zip
Add KERNEL_EXTRA_ARGS parameter
With recent kernel versions, some ARM configurations need may fail to build with errors like this: multiple load addresses: 0x80008000 0x80008000 This is incompatible with uImages Specify LOADADDR on the commandline to build an uImage We cannot pass this information in EXTRA_OEMAKE, as "meta/classes/kernel.bbclass" explicitly ignores all EXTRA_OEMAKE settings. So add KERNEL_EXTRA_ARGS parameter so affected boards can add for example KERNEL_EXTRA_ARGS = "LOADADDR=0x80008000" to their configuration. We make this general enough so other needed command line options can be passed as well when compiling the kernel. Signed-off-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r--meta/classes/kernel.bbclass7
1 files changed, 5 insertions, 2 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 2bdc2fcdc5..5fe435681a 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -57,6 +57,9 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
UBOOT_ENTRYPOINT ?= "20008000"
UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}"
+# Some Linux kenrel configurations need additional parameters on the command line
+KERNEL_EXTRA_ARGS ?= ""
+
# For the kernel, we don't want the '-e MAKEFLAGS=' in EXTRA_OEMAKE.
# We don't want to override kernel Makefile variables from the environment
EXTRA_OEMAKE = ""
@@ -71,7 +74,7 @@ KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] == ".gz" else s)(d.g
kernel_do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
- oe_runmake ${KERNEL_IMAGETYPE_FOR_MAKE} ${KERNEL_ALT_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}"
+ oe_runmake ${KERNEL_IMAGETYPE_FOR_MAKE} ${KERNEL_ALT_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" = "${KERNEL_IMAGETYPE}"; then
gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}"
fi
@@ -80,7 +83,7 @@ kernel_do_compile() {
do_compile_kernelmodules() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
- oe_runmake ${PARALLEL_MAKE} modules CC="${KERNEL_CC}" LD="${KERNEL_LD}"
+ oe_runmake ${PARALLEL_MAKE} modules CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
else
bbnote "no modules to compile"
fi