Skip to contentSkip to conversation

Add mkelfimage and support for generating kernel+initrd ELF payloads to OpenEmbedded

PATCH In review Raymond Danks 2 participants 5 messages Jul 15, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Add mkelfimage and support for generating kernel+initrd ELF payloads to OpenEmbedded

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

The first patch contains the meta files for the mkelfimage utility in OpenEmbedded.

---
 recipes/mkelfimage/files/no-stack-protector.patch |   11 +++++++++++
 recipes/mkelfimage/mkelfimage-native_git.bb       |   11 +++++++++++
 recipes/mkelfimage/mkelfimage.inc                 |    3 +++
 recipes/mkelfimage/mkelfimage_git.bb              |   17 +++++++++++++++++
 4 files changed, 42 insertions(+), 0 deletions(-)
 create mode 100644 recipes/mkelfimage/files/no-stack-protector.patch
 create mode 100644 recipes/mkelfimage/mkelfimage-native_git.bb
 create mode 100644 recipes/mkelfimage/mkelfimage.inc
 create mode 100644 recipes/mkelfimage/mkelfimage_git.bb
recipes/mkelfimage/files/no-stack-protector.patch new file +11 -0
new file mode 100644
index 0000000..135de8d
@@ -0,0 +1,11 @@
+--- 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
recipes/mkelfimage/mkelfimage-native_git.bb new file +11 -0
new file mode 100644
index 0000000..e2f251e
@@ -0,0 +1,11 @@
+require mkelfimage_${PV}.bb
+inherit native
+
+do_stage () {
+    install -m 0755 objdir/sbin/mkelfImage ${STAGING_BINDIR}/
+}
+
+do_install () {
+    :
+}
+
recipes/mkelfimage/mkelfimage.inc new file +3 -0
new file mode 100644
index 0000000..e06ed67
@@ -0,0 +1,3 @@
+LICENSE = "GPLv2"
+DESCRIPTION = "A utility to create ELF boot images from Linux kernel images"
+SECTION = "console/utils"
recipes/mkelfimage/mkelfimage_git.bb new file +17 -0
new file mode 100644
index 0000000..7855f58
@@ -0,0 +1,17 @@
+require mkelfimage.inc
+
+SRCREV = "c045b4cc458a62dbb1dd99ae6a9343e52d1fe1e0"
+PV = "1.0.0+gitr${SRCPV}"
+PR = "r1"
+
+S = "${WORKDIR}/git/util/mkelfImage"
+
+SRC_URI = "git://review.coreboot.org/p/coreboot;protocol=http;branch=master \
+       file://no-stack-protector.patch"
+
+DEFAULT_PREFERENCE = "1"
+
+inherit autotools
+
+SRC_URI[md5sum] = "719b22bdd34431203f9349250c67c5e3"
+SRC_URI[sha256sum] = "9186e6e7302f38c1f77b763f0f14843fabc873ac7c81ede8ee094a47055668b5"
Signature · 1 line
1.7.0.4
#1 lore raw

Dear Raymond,

I am putting you in CC not knowing if you read the lists.

Am Freitag, den 15.07.2011, 10:55 -0600 schrieb Raymond Danks:

The correct commit summary is

mkelfimage: Add version c045b4cc from Git (initial recipe)

Quoted 1 line

On x86, and ELF image file may be stored as a coreboot payload. This

s/and/an/

Quoted 8 lines

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

What is your build configuration for testing this recipe?

Quoted 2 lines

The first patch contains the meta files for the mkelfimage utility in OpenEmbedded.

Please remove that line above. The commit message should be describing the commit only.

Unfortunately we cannot commit your patch, especially because your Signed-off-by line is missing – you can add -s to the Git commands git commit or git format-patch and your mailer mangled the patch by automatic line breaks.

Please follow the commit policy [1] and it would be great if you could send us a corrected patch [2].

Quoted 18 lines
---
  recipes/mkelfimage/files/no-stack-protector.patch |   11 +++++++++++
  recipes/mkelfimage/mkelfimage-native_git.bb       |   11 +++++++++++
  recipes/mkelfimage/mkelfimage.inc                 |    3 +++
  recipes/mkelfimage/mkelfimage_git.bb              |   17 +++++++++++++++++
  4 files changed, 42 insertions(+), 0 deletions(-)

create mode 100644 recipes/mkelfimage/files/no-stack-protector.patch create mode 100644 recipes/mkelfimage/mkelfimage-native_git.bb create mode 100644 recipes/mkelfimage/mkelfimage.inc create mode 100644 recipes/mkelfimage/mkelfimage_git.bb

recipes/mkelfimage/files/no-stack-protector.patch new file +0 -0
new file mode 100644
index 0000000..135de8d

recipes/mkelfimage/files/no-stack-protector.patch line 2

Quoted 2 lines
recipes/mkelfimage/files/no-stack-protector.patch new file +2 -0
@@ -0,0 +1,11 @@
+--- mkelfImage/Makefile.orig    2011-06-17 15:20:46.816870941 -0600
++++ mkelfImage/Makefile    2011-06-17 15:20:59.619382362 -0600

Please add a header describing this patch [3].

recipes/mkelfimage/files/no-stack-protector.patch

Quoted 6 lines
recipes/mkelfimage/files/no-stack-protector.patch new file +5 -1
+@@ -14,7 +14,7 @@
+ pkglibdir = $(libdir)/$(PACKAGE)
+ pkgincludedir = $(includedir)/$(PACKAGE)
+
+-CPPFLAGS=-DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(RELEASE_DATE)"' 
-I include

Here you can see an automatic line break.

Quoted 5 lines

++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

Please send that patch separately to the coreboot list if it is useful for upstream. You should be able to use Gerrit and you also need a Signed-off-by line [4].

recipes/mkelfimage/mkelfimage-native_git.bb line 4

Quoted 11 lines
recipes/mkelfimage/mkelfimage-native_git.bb new file +4 -0
new file mode 100644
index 0000000..e2f251e
@@ -0,0 +1,11 @@
+require mkelfimage_${PV}.bb
+inherit native
+
+do_stage () {

Please follow the style guide [5], i. e., no space before ().

recipes/mkelfimage/mkelfimage-native_git.bb line 6

Quoted 2 lines
recipes/mkelfimage/mkelfimage-native_git.bb new file +2 -0
+    install -m 0755 objdir/sbin/mkelfImage ${STAGING_BINDIR}/
+}

do_stage () is deprecated [6].

Quoted 14 lines
recipes/mkelfimage/mkelfimage-native_git.bb new file +5 -0
+
+do_install () {
+    :
+}
+
recipes/mkelfimage/mkelfimage.inc new file +2 -0
new file mode 100644
index 0000000..e06ed67
@@ -0,0 +1,3 @@
+LICENSE = "GPLv2"
+DESCRIPTION = "A utility to create ELF boot images from Linux kernel 
Quoted 2 lines

images"
+SECTION = "console/utils"

Please order those as in the style guide and please also add the HOMEPAGE variable.

recipes/mkelfimage/mkelfimage_git.bb line 5

Quoted 12 lines
recipes/mkelfimage/mkelfimage_git.bb new file +5 -0
new file mode 100644
index 0000000..7855f58
@@ -0,0 +1,17 @@
+require mkelfimage.inc
+
+SRCREV = "c045b4cc458a62dbb1dd99ae6a9343e52d1fe1e0"
+PV = "1.0.0+gitr${SRCPV}"
+PR = "r1"

We start with r0.

recipes/mkelfimage/mkelfimage_git.bb line 12

Quoted 8 lines
recipes/mkelfimage/mkelfimage_git.bb new file +4 -0
+
+S = "${WORKDIR}/git/util/mkelfImage"
+
+SRC_URI = 

"git://review.coreboot.org/p/coreboot;protocol=http;branch=master \

recipes/mkelfimage/mkelfimage_git.bb new file +3 -0
+       file://no-stack-protector.patch"
+
+DEFAULT_PREFERENCE = "1"

Not needed since this is the only recipe.

Quoted 6 lines
recipes/mkelfimage/mkelfimage_git.bb new file +5 -0
+
+inherit autotools
+
+SRC_URI[md5sum] = "719b22bdd34431203f9349250c67c5e3"
+SRC_URI[sha256sum] = 

"9186e6e7302f38c1f77b763f0f14843fabc873ac7c81ede8ee094a47055668b5"

Is that needed? There is no archive as far as I know.

Thanks,

Paul

[1] http://openembedded.org/index.php/Commit_Policy
[2] http://openembedded.org/index.php/How_to_submit_a_patch_to_OpenEmbedded
[3] http://openembedded.org/index.php/Commit_Patch_Message_Guidelines
[4] http://www.coreboot.org/Development_Guidelines
[5] http://openembedded.org/index.php/Styleguide
[6] http://openembedded.org/index.php/Legacy_staging

#2 lore raw

Thanks Paul. I am putting together new patches to address your feedback on style guide, mailer line-feed, and patch format/commit policy.

As far as the build configuration this was tested on is concerned, this is 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.

Thanks again,
Ray

Quoted 157 lines · Paul Menzel

Dear Raymond,

I am putting you in CC not knowing if you read the lists.

Am Freitag, den 15.07.2011, 10:55 -0600 schrieb Raymond Danks:

The correct commit summary is

mkelfimage: Add version c045b4cc from Git (initial recipe)

Quoted 1 line

On x86, and ELF image file may be stored as a coreboot payload. This

s/and/an/

Quoted 8 lines

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

What is your build configuration for testing this recipe?

Quoted 2 lines

The first patch contains the meta files for the mkelfimage utility in OpenEmbedded.

Please remove that line above. The commit message should be describing the commit only.

Unfortunately we cannot commit your patch, especially because your Signed-off-by line is missing – you can add -s to the Git commands git commit or git format-patch and your mailer mangled the patch by automatic line breaks.

Please follow the commit policy [1] and it would be great if you could send us a corrected patch [2].

Quoted 18 lines
---
   recipes/mkelfimage/files/no-stack-protector.patch |   11 +++++++++++
   recipes/mkelfimage/mkelfimage-native_git.bb       |   11 +++++++++++
   recipes/mkelfimage/mkelfimage.inc                 |    3 +++
   recipes/mkelfimage/mkelfimage_git.bb              |   17 +++++++++++++++++
   4 files changed, 42 insertions(+), 0 deletions(-)

create mode 100644 recipes/mkelfimage/files/no-stack-protector.patch create mode 100644 recipes/mkelfimage/mkelfimage-native_git.bb create mode 100644 recipes/mkelfimage/mkelfimage.inc create mode 100644 recipes/mkelfimage/mkelfimage_git.bb

recipes/mkelfimage/files/no-stack-protector.patch new file +0 -0
new file mode 100644
index 0000000..135de8d

recipes/mkelfimage/files/no-stack-protector.patch line 2

Quoted 2 lines
recipes/mkelfimage/files/no-stack-protector.patch new file +2 -0
@@ -0,0 +1,11 @@
+--- mkelfImage/Makefile.orig    2011-06-17 15:20:46.816870941 -0600
++++ mkelfImage/Makefile    2011-06-17 15:20:59.619382362 -0600

Please add a header describing this patch [3].

recipes/mkelfimage/files/no-stack-protector.patch

Quoted 6 lines
recipes/mkelfimage/files/no-stack-protector.patch new file +5 -1
+@@ -14,7 +14,7 @@
+ pkglibdir = $(libdir)/$(PACKAGE)
+ pkgincludedir = $(includedir)/$(PACKAGE)
+
+-CPPFLAGS=-DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(RELEASE_DATE)"'
-I include

Here you can see an automatic line break.

Quoted 5 lines

++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

Please send that patch separately to the coreboot list if it is useful for upstream. You should be able to use Gerrit and you also need a Signed-off-by line [4].

recipes/mkelfimage/mkelfimage-native_git.bb line 4

Quoted 11 lines
recipes/mkelfimage/mkelfimage-native_git.bb new file +4 -0
new file mode 100644
index 0000000..e2f251e
@@ -0,0 +1,11 @@
+require mkelfimage_${PV}.bb
+inherit native
+
+do_stage () {

Please follow the style guide [5], i. e., no space before ().

recipes/mkelfimage/mkelfimage-native_git.bb line 6

Quoted 2 lines
recipes/mkelfimage/mkelfimage-native_git.bb new file +2 -0
+    install -m 0755 objdir/sbin/mkelfImage ${STAGING_BINDIR}/
+}

do_stage () is deprecated [6].

Quoted 14 lines
recipes/mkelfimage/mkelfimage-native_git.bb new file +5 -0
+
+do_install () {
+    :
+}
+
recipes/mkelfimage/mkelfimage.inc new file +2 -0
new file mode 100644
index 0000000..e06ed67
@@ -0,0 +1,3 @@
+LICENSE = "GPLv2"
+DESCRIPTION = "A utility to create ELF boot images from Linux kernel
Quoted 2 lines

images"
+SECTION = "console/utils"

Please order those as in the style guide and please also add the HOMEPAGE variable.

recipes/mkelfimage/mkelfimage_git.bb line 5

Quoted 12 lines
recipes/mkelfimage/mkelfimage_git.bb new file +5 -0
new file mode 100644
index 0000000..7855f58
@@ -0,0 +1,17 @@
+require mkelfimage.inc
+
+SRCREV = "c045b4cc458a62dbb1dd99ae6a9343e52d1fe1e0"
+PV = "1.0.0+gitr${SRCPV}"
+PR = "r1"

We start with r0.

recipes/mkelfimage/mkelfimage_git.bb line 12

Quoted 8 lines
recipes/mkelfimage/mkelfimage_git.bb new file +4 -0
+
+S = "${WORKDIR}/git/util/mkelfImage"
+
+SRC_URI =

"git://review.coreboot.org/p/coreboot;protocol=http;branch=master \

recipes/mkelfimage/mkelfimage_git.bb new file +3 -0
+       file://no-stack-protector.patch"
+
+DEFAULT_PREFERENCE = "1"

Not needed since this is the only recipe.

Quoted 6 lines
recipes/mkelfimage/mkelfimage_git.bb new file +5 -0
+
+inherit autotools
+
+SRC_URI[md5sum] = "719b22bdd34431203f9349250c67c5e3"
+SRC_URI[sha256sum] =

"9186e6e7302f38c1f77b763f0f14843fabc873ac7c81ede8ee094a47055668b5"

Is that needed? There is no archive as far as I know.

Thanks,

Paul

[1] http://openembedded.org/index.php/Commit_Policy
[2] http://openembedded.org/index.php/How_to_submit_a_patch_to_OpenEmbedded
[3] http://openembedded.org/index.php/Commit_Patch_Message_Guidelines
[4] http://www.coreboot.org/Development_Guidelines
[5] http://openembedded.org/index.php/Styleguide
[6] http://openembedded.org/index.php/Legacy_staging

#3 lore raw

PATCH v2 1/2 mkelfimage: Add version c045b4cc from Git (initial recipe)

In reply to Raymond Danks

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.

---
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
recipes/mkelfimage/files/no-stack-protector.patch new file +17 -0
new file mode 100644
index 0000000..f81bf16
@@ -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
recipes/mkelfimage/mkelfimage_git.bb new file +18 -0
new file mode 100644
index 0000000..2184f81
@@ -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"
Signature · 1 line
1.7.0.4
#4 lore raw

PATCH v2 2/2 conf/bitbake.conf: Add support for generating kernel+initrd ELF coreboot payloads

In reply to Raymond Danks

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

To use, set a new type "elf" to IMAGE_FSTYPES in conf/local.conf on x86 targets:
IMAGE_FSTYPES = "cpio.gz elf"

You may also override the kernel parameters that are embedded in the elf file:
IMAGE_KERNELPARAMS = "ramdisk_size=32768 root=/dev/ram0 rw console="

The image binary ${TMPDIR}/deploy/images/${MACHINE}/*.elf may be added to the coreboot configuration in Kconfig (CONFIG_PAYLOAD_FILE)

---
v2:
* Update commit summary and log.
- Include test and usage steps.
* Add Signed-off-by

 conf/bitbake.conf |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
conf/bitbake.conf +3 -0
index 66dfaba..1ab72e1 100644
@@ -375,6 +375,7 @@ IMAGE_BASENAME = "${PN}"
 IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DATETIME}"
 IMAGE_LINK_NAME = "${IMAGE_BASENAME}-${MACHINE}"
 IMAGE_EXTRA_SPACE = 10240
+IMAGE_KERNELPARAMS = "ramdisk_size=32768 root=/dev/ram0 rw console="
 
 UBI_VOLNAME ?= "${MACHINE}-rootfs"
 
@@ -406,6 +407,7 @@ IMAGE_CMD_cpio.gz.u-boot = "type cpio >/dev/null; cd ${IMAGE_ROOTFS} && (find .
 IMAGE_CMD_cpio.lzma = "type cpio >/dev/null; cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | xz --format=lzma -c ${XZ_COMPRESSION_LEVEL} --check=${XZ_INTEGRITY_CHECK} >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.lzma) ${EXTRA_IMAGECMD}"
 IMAGE_CMD_ubi = "echo \[ubifs\] > ubinize.cfg ; echo mode=ubi >> ubinize.cfg ; echo image=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ubifs.img >> ubinize.cfg ; echo vol_id=0 >> ubinize.cfg ; echo vol_type=dynamic >> ubinize.cfg ; echo vol_name=${UBI_VOLNAME} >> ubinize.cfg ; echo vol_flags=autoresize >> ubinize.cfg;mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ubifs.img ${MKUBIFS_ARGS} && ubinize -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubi ${UBINIZE_ARGS} ubinize.cfg"
 IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ubifs.img ${MKUBIFS_ARGS}"
+IMAGE_CMD_elf = "type cpio >/dev/null; cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | gzip -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz) ; rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf ;  mkelfImage --append='${IMAGE_KERNELPARAMS}' --kernel=${STAGING_DIR}/${MACHINE}${HOST_VENDOR}-${HOST_OS}/kernel/bzImage --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf ${EXTRA_IMAGECMD}"
 
 EXTRA_IMAGECMD = ""
 EXTRA_IMAGECMD_jffs2 = ""
@@ -440,6 +442,7 @@ IMAGE_DEPENDS_squashfs = "squashfs-tools-native"
 IMAGE_DEPENDS_squashfs-lzma = "squashfs-tools-native"
 IMAGE_DEPENDS_ubi = "mtd-utils-native"
 IMAGE_DEPENDS_ubifs = "mtd-utils-native"
+IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native"
 
 EXTRA_IMAGEDEPENDS = ""
 
Signature · 1 line
1.7.0.4