Openembedded Core Discussions
 help / color / mirror / Atom feed
* [RFC] [PATCH] Add KERNEL_EXTRA_ARGS parameter
@ 2012-04-29 10:03 Wolfgang Denk
  2012-04-29 15:41 ` Khem Raj
  2012-05-03 13:48 ` Wolfgang Denk
  0 siblings, 2 replies; 8+ messages in thread
From: Wolfgang Denk @ 2012-04-29 10:03 UTC (permalink / raw)
  To: openembedded-core

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

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>
---
 meta/classes/kernel.bbclass |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 139bad9..7a554f0 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -71,6 +71,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 = ""
@@ -82,7 +85,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 include/linux/version.h CC="${KERNEL_CC}" LD="${KERNEL_LD}"
-	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
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-05-08 15:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-29 10:03 [RFC] [PATCH] Add KERNEL_EXTRA_ARGS parameter Wolfgang Denk
2012-04-29 15:41 ` Khem Raj
2012-04-30 21:03   ` Wolfgang Denk
2012-05-03 13:48 ` Wolfgang Denk
2012-05-03 14:02   ` Koen Kooi
2012-05-03 14:28     ` Richard Purdie
2012-05-08 15:20       ` Darren Hart
2012-05-03 14:23   ` Eric Bénard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox