On x86, and ELF image file may be stored as a coreboot payload. This image file may be a kernel or a kernel+initrd.
Documentation on this has been started on the coreboot wiki: http://www.coreboot.org/Mkelfimage We have seen success using the mkelfimage utility to construct a kernel+initrd image using the micro-image OpenEmbedded image as an initrd. http://www.se-eng.com/wiki/index.php/Open_Embedded_Setup Build tested using Ubuntu 10.04 x86_64-linux targeting i686-oe-linux using a one-off of the i686-generic.conf machine targeting a 4MB flash part. Signed-off-by: Raymond Danks <[email protected]> --- v2: * Updated meta files to adhere to StyleGuide - No need for separate target and native .bb files anymore. - Remove .inc * Document no-stack-protector.patch * Update commit summary and log. * Add Signed-off-by recipes/mkelfimage/files/no-stack-protector.patch | 17 +++++++++++++++++ recipes/mkelfimage/mkelfimage_git.bb | 18 ++++++++++++++++++ 2 files changed, 35 insertions(+), 0 deletions(-) create mode 100644 recipes/mkelfimage/files/no-stack-protector.patch create mode 100644 recipes/mkelfimage/mkelfimage_git.bb diff --git a/recipes/mkelfimage/files/no-stack-protector.patch b/recipes/mkelfimage/files/no-stack-protector.patch new file mode 100644 index 0000000..f81bf16 --- /dev/null +++ b/recipes/mkelfimage/files/no-stack-protector.patch @@ -0,0 +1,17 @@ +Gcc 4.1 comes with an SSP https://wiki.ubuntu.com/GccSsp + +This is disabled to work around '__stack_chk_fail' symbol not found failures in the mkelfimage build. + +http://www.coreboot.org/FAQ/Obsolete#How_do_I_fix_stack_chk_fail_errors.3F + +--- mkelfImage/Makefile.orig 2011-06-17 15:20:46.816870941 -0600 ++++ mkelfImage/Makefile 2011-06-17 15:20:59.619382362 -0600 +@@ -14,7 +14,7 @@ + pkglibdir = $(libdir)/$(PACKAGE) + pkgincludedir = $(includedir)/$(PACKAGE) + +-CPPFLAGS=-DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(RELEASE_DATE)"' -I include ++CPPFLAGS=-fno-stack-protector -DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(RELEASE_DATE)"' -I include $(CFLAGS) $(LDFLAGS) + HOST_CPPFLAGS=$(CPPFLAGS) + I386_CPPFLAGS=$(CPPFLAGS) -I arch/i386/include + IA64_CPPFLAGS=$(CPPFLAGS) -I arch/ia64/include diff --git a/recipes/mkelfimage/mkelfimage_git.bb b/recipes/mkelfimage/mkelfimage_git.bb new file mode 100644 index 0000000..2184f81 --- /dev/null +++ b/recipes/mkelfimage/mkelfimage_git.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "A utility to create ELF boot images from Linux kernel images" +HOMEPAGE = "http://www.coreboot.org/Mkelfimage" +SECTION = "devel" +LICENSE = "GPLv2" + +SRCREV = "c045b4cc458a62dbb1dd99ae6a9343e52d1fe1e0" +PV = "1.0.0+gitr${SRCPV}" +PR = "r0" + +SRC_URI = "git://review.coreboot.org/p/coreboot;protocol=http;branch=master \ + file://no-stack-protector.patch" + +S = "${WORKDIR}/git/util/mkelfImage" + +inherit autotools + +NATIVE_INSTALL_WORKS = "1" +BBCLASSEXTEND = "native" -- 1.7.0.4 _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
