* [PATCH 1/2] image_types: Add elf image type @ 2012-06-22 20:22 Raymond Danks 2012-06-22 20:22 ` [PATCH 2/2] mkelfimage: Add stable git build (initial recipe) Raymond Danks 2012-06-25 16:58 ` [PATCH 1/2] image_types: Add elf image type Darren Hart 0 siblings, 2 replies; 25+ messages in thread From: Raymond Danks @ 2012-06-22 20:22 UTC (permalink / raw) To: openembedded-core On x86, an ELF image file may be stored as a coreboot payload. The image file is constructed, using the mkelfimage utility, from a kernel and an initrd. Signed-off-by: Raymond Danks <ray.danks@se-eng.com> --- This was originally submitted to the openembedded project: http://patches.openembedded.org/patch/7689/ Resubmitting to oe-core for review prior to commit in openembedded-core. meta/classes/image_types.bbclass | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 55f122e..bbca20c 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass @@ -7,6 +7,12 @@ def get_imagecmds(d): ctypes = d.getVar('COMPRESSIONTYPES', True).split() cimages = {} + if "elf" in alltypes: + alltypes.remove("elf") + if "cpio.gz" not in alltypes: + alltypes.append("cpio.gz") + alltypes.append("elf") + # Filter out all the compressed images from types for type in alltypes: basetype = None @@ -173,6 +179,14 @@ IMAGE_CMD_cpio () { cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) } +ELF_KERNEL ?= ${STAGING_DIR_HOST}/kernel/bzImage +ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console=" + +IMAGE_CMD_elf () { + test -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf && rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf + mkelfImage --kernel=${ELF_KERNEL} --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf --append='${ELF_APPEND}' ${EXTRA_IMAGECMD} +} + UBI_VOLNAME ?= "${MACHINE}-rootfs" IMAGE_CMD_ubi () { @@ -199,6 +213,7 @@ EXTRA_IMAGECMD_ext2 ?= "-i 8192" EXTRA_IMAGECMD_ext3 ?= "-i 8192" EXTRA_IMAGECMD_ext4 ?= "-i 8192" EXTRA_IMAGECMD_btrfs ?= "" +EXTRA_IMAGECMD_elf ?= "" IMAGE_DEPENDS = "" IMAGE_DEPENDS_jffs2 = "mtd-utils-native" @@ -210,11 +225,12 @@ IMAGE_DEPENDS_ext4 = "genext2fs-native e2fsprogs-native" IMAGE_DEPENDS_btrfs = "btrfs-tools-native" IMAGE_DEPENDS_squashfs = "squashfs-tools-native" IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" +IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native" IMAGE_DEPENDS_ubi = "mtd-utils-native" IMAGE_DEPENDS_ubifs = "mtd-utils-native" # This variable is available to request which values are suitable for IMAGE_FSTYPES -IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk" +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf" COMPRESSIONTYPES = "gz bz2 lzma xz" COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}" -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH 2/2] mkelfimage: Add stable git build (initial recipe) 2012-06-22 20:22 [PATCH 1/2] image_types: Add elf image type Raymond Danks @ 2012-06-22 20:22 ` Raymond Danks 2012-06-29 12:19 ` Richard Purdie ` (3 more replies) 2012-06-25 16:58 ` [PATCH 1/2] image_types: Add elf image type Darren Hart 1 sibling, 4 replies; 25+ messages in thread From: Raymond Danks @ 2012-06-22 20:22 UTC (permalink / raw) To: openembedded-core Signed-off-by: Raymond Danks <ray.danks@se-eng.com> --- This was originally submitted to the openembedded project: http://patches.openembedded.org/patch/7687/ Resubmitting to oe-core for review prior to commit in openembedded-core. meta/recipes-devtools/mkelfimage/mkelfimage_git.bb | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-devtools/mkelfimage/mkelfimage_git.bb diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb new file mode 100644 index 0000000..b341213 --- /dev/null +++ b/meta/recipes-devtools/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" +LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a" + +SRCREV = "e13632a939e7dde8d7d44fc73e73a41dae8060c3" +PV = "1.0.0+gitr${SRCPV}" +PR = "r1" + +SRC_URI = "git://review.coreboot.org/p/coreboot;protocol=http;branch=master" + +S = "${WORKDIR}/git/util/mkelfImage" + +inherit autotools + +NATIVE_INSTALL_WORKS = "1" +BBCLASSEXTEND = "native" -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH 2/2] mkelfimage: Add stable git build (initial recipe) 2012-06-22 20:22 ` [PATCH 2/2] mkelfimage: Add stable git build (initial recipe) Raymond Danks @ 2012-06-29 12:19 ` Richard Purdie 2012-06-29 15:32 ` Raymond Danks 2012-06-29 15:41 ` [PATCH 1/2 v2] image_types: Add elf image type Raymond Danks ` (2 subsequent siblings) 3 siblings, 1 reply; 25+ messages in thread From: Richard Purdie @ 2012-06-29 12:19 UTC (permalink / raw) To: Patches and discussions about the oe-core layer On Fri, 2012-06-22 at 14:22 -0600, Raymond Danks wrote: > Signed-off-by: Raymond Danks <ray.danks@se-eng.com> > --- > This was originally submitted to the openembedded project: > http://patches.openembedded.org/patch/7687/ > > Resubmitting to oe-core for review prior to commit in openembedded-core. > > meta/recipes-devtools/mkelfimage/mkelfimage_git.bb | 18 ++++++++++++++++++ > 1 files changed, 18 insertions(+), 0 deletions(-) > create mode 100644 meta/recipes-devtools/mkelfimage/mkelfimage_git.bb > > diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb > new file mode 100644 > index 0000000..b341213 > --- /dev/null > +++ b/meta/recipes-devtools/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" > +LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a" > + > +SRCREV = "e13632a939e7dde8d7d44fc73e73a41dae8060c3" > +PV = "1.0.0+gitr${SRCPV}" > +PR = "r1" > + > +SRC_URI = "git://review.coreboot.org/p/coreboot;protocol=http;branch=master" > + > +S = "${WORKDIR}/git/util/mkelfImage" > + > +inherit autotools > + > +NATIVE_INSTALL_WORKS = "1" The above line is no longer needed, does nothing and should be removed. > +BBCLASSEXTEND = "native" Cheers, Richard ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 2/2] mkelfimage: Add stable git build (initial recipe) 2012-06-29 12:19 ` Richard Purdie @ 2012-06-29 15:32 ` Raymond Danks 0 siblings, 0 replies; 25+ messages in thread From: Raymond Danks @ 2012-06-29 15:32 UTC (permalink / raw) To: openembedded-core On 06/29/2012 06:19 AM, Richard Purdie wrote: > On Fri, 2012-06-22 at 14:22 -0600, Raymond Danks wrote: >> Signed-off-by: Raymond Danks<ray.danks@se-eng.com> >> --- >> This was originally submitted to the openembedded project: >> http://patches.openembedded.org/patch/7687/ >> >> Resubmitting to oe-core for review prior to commit in openembedded-core. >> >> meta/recipes-devtools/mkelfimage/mkelfimage_git.bb | 18 ++++++++++++++++++ >> 1 files changed, 18 insertions(+), 0 deletions(-) >> create mode 100644 meta/recipes-devtools/mkelfimage/mkelfimage_git.bb >> >> diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb >> new file mode 100644 >> index 0000000..b341213 >> --- /dev/null >> +++ b/meta/recipes-devtools/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" >> +LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a" >> + >> +SRCREV = "e13632a939e7dde8d7d44fc73e73a41dae8060c3" >> +PV = "1.0.0+gitr${SRCPV}" >> +PR = "r1" >> + >> +SRC_URI = "git://review.coreboot.org/p/coreboot;protocol=http;branch=master" >> + >> +S = "${WORKDIR}/git/util/mkelfImage" >> + >> +inherit autotools >> + >> +NATIVE_INSTALL_WORKS = "1" > The above line is no longer needed, does nothing and should be removed. > Thanks Richard. I'm sending updated patches momentarily. >> +BBCLASSEXTEND = "native" > Cheers, > > Richard > > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core ^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH 1/2 v2] image_types: Add elf image type 2012-06-22 20:22 ` [PATCH 2/2] mkelfimage: Add stable git build (initial recipe) Raymond Danks 2012-06-29 12:19 ` Richard Purdie @ 2012-06-29 15:41 ` Raymond Danks 2012-06-29 17:45 ` Darren Hart 2012-06-29 15:41 ` [PATCH 2/2 v2] mkelfimage: Add stable git build (initial recipe) Raymond Danks 2012-07-08 21:34 ` [PATCH 2/2] " Saul Wold 3 siblings, 1 reply; 25+ messages in thread From: Raymond Danks @ 2012-06-29 15:41 UTC (permalink / raw) To: openembedded-core On x86, an ELF image file may be stored as a coreboot payload. The image file is constructed, using the mkelfimage utility, from a kernel and an initrd. Signed-off-by: Raymond Danks <ray.danks@se-eng.com> --- This was originally submitted to the openembedded project: http://patches.openembedded.org/patch/7689/ v2: Include KERNEL_IMAGETYPE for location of ELF_KERNEL meta/classes/image_types.bbclass | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 55f122e..12419f4 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass @@ -7,6 +7,12 @@ def get_imagecmds(d): ctypes = d.getVar('COMPRESSIONTYPES', True).split() cimages = {} + if "elf" in alltypes: + alltypes.remove("elf") + if "cpio.gz" not in alltypes: + alltypes.append("cpio.gz") + alltypes.append("elf") + # Filter out all the compressed images from types for type in alltypes: basetype = None @@ -173,6 +179,14 @@ IMAGE_CMD_cpio () { cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) } +ELF_KERNEL ?= ${STAGING_DIR_HOST}/kernel/${KERNEL_IMAGETYPE} +ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console=" + +IMAGE_CMD_elf () { + test -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf && rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf + mkelfImage --kernel=${ELF_KERNEL} --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf --append='${ELF_APPEND}' ${EXTRA_IMAGECMD} +} + UBI_VOLNAME ?= "${MACHINE}-rootfs" IMAGE_CMD_ubi () { @@ -199,6 +213,7 @@ EXTRA_IMAGECMD_ext2 ?= "-i 8192" EXTRA_IMAGECMD_ext3 ?= "-i 8192" EXTRA_IMAGECMD_ext4 ?= "-i 8192" EXTRA_IMAGECMD_btrfs ?= "" +EXTRA_IMAGECMD_elf ?= "" IMAGE_DEPENDS = "" IMAGE_DEPENDS_jffs2 = "mtd-utils-native" @@ -210,11 +225,12 @@ IMAGE_DEPENDS_ext4 = "genext2fs-native e2fsprogs-native" IMAGE_DEPENDS_btrfs = "btrfs-tools-native" IMAGE_DEPENDS_squashfs = "squashfs-tools-native" IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" +IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native" IMAGE_DEPENDS_ubi = "mtd-utils-native" IMAGE_DEPENDS_ubifs = "mtd-utils-native" # This variable is available to request which values are suitable for IMAGE_FSTYPES -IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk" +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf" COMPRESSIONTYPES = "gz bz2 lzma xz" COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}" -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2 v2] image_types: Add elf image type 2012-06-29 15:41 ` [PATCH 1/2 v2] image_types: Add elf image type Raymond Danks @ 2012-06-29 17:45 ` Darren Hart 2012-06-29 20:01 ` Raymond Danks 0 siblings, 1 reply; 25+ messages in thread From: Darren Hart @ 2012-06-29 17:45 UTC (permalink / raw) To: Patches and discussions about the oe-core layer On 06/29/2012 08:41 AM, Raymond Danks wrote: > On x86, an ELF image file may be stored as a coreboot payload. > The image file is constructed, using the mkelfimage utility, > from a kernel and an initrd. > > Signed-off-by: Raymond Danks <ray.danks@se-eng.com> > --- > This was originally submitted to the openembedded project: > http://patches.openembedded.org/patch/7689/ > > v2: > Include KERNEL_IMAGETYPE for location of ELF_KERNEL > > meta/classes/image_types.bbclass | 18 +++++++++++++++++- > 1 files changed, 17 insertions(+), 1 deletions(-) > > diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass > index 55f122e..12419f4 100644 > --- a/meta/classes/image_types.bbclass > +++ b/meta/classes/image_types.bbclass > @@ -7,6 +7,12 @@ def get_imagecmds(d): > ctypes = d.getVar('COMPRESSIONTYPES', True).split() > cimages = {} > > + if "elf" in alltypes: > + alltypes.remove("elf") > + if "cpio.gz" not in alltypes: > + alltypes.append("cpio.gz") > + alltypes.append("elf") > + > # Filter out all the compressed images from types > for type in alltypes: > basetype = None > @@ -173,6 +179,14 @@ IMAGE_CMD_cpio () { > cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) > } > > +ELF_KERNEL ?= ${STAGING_DIR_HOST}/kernel/${KERNEL_IMAGETYPE} This should be ${STAGING_KERNEL_DIR} I believe. I have a patch series under review currently which would break the above as it is now in /usr/src/kernel-headers Note that you could also collect this from the DEPLOY_DIR_IMAGE, which is probably more appropriate for assembling images Thanks, -- Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2 v2] image_types: Add elf image type 2012-06-29 17:45 ` Darren Hart @ 2012-06-29 20:01 ` Raymond Danks 0 siblings, 0 replies; 25+ messages in thread From: Raymond Danks @ 2012-06-29 20:01 UTC (permalink / raw) To: Darren Hart; +Cc: Patches and discussions about the oe-core layer On 06/29/2012 11:45 AM, Darren Hart wrote: > > On 06/29/2012 08:41 AM, Raymond Danks wrote: >> On x86, an ELF image file may be stored as a coreboot payload. >> The image file is constructed, using the mkelfimage utility, >> from a kernel and an initrd. >> >> Signed-off-by: Raymond Danks<ray.danks@se-eng.com> >> --- >> This was originally submitted to the openembedded project: >> http://patches.openembedded.org/patch/7689/ >> >> v2: >> Include KERNEL_IMAGETYPE for location of ELF_KERNEL >> >> meta/classes/image_types.bbclass | 18 +++++++++++++++++- >> 1 files changed, 17 insertions(+), 1 deletions(-) >> >> diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass >> index 55f122e..12419f4 100644 >> --- a/meta/classes/image_types.bbclass >> +++ b/meta/classes/image_types.bbclass >> @@ -7,6 +7,12 @@ def get_imagecmds(d): >> ctypes = d.getVar('COMPRESSIONTYPES', True).split() >> cimages = {} >> >> + if "elf" in alltypes: >> + alltypes.remove("elf") >> + if "cpio.gz" not in alltypes: >> + alltypes.append("cpio.gz") >> + alltypes.append("elf") >> + >> # Filter out all the compressed images from types >> for type in alltypes: >> basetype = None >> @@ -173,6 +179,14 @@ IMAGE_CMD_cpio () { >> cd ${IMAGE_ROOTFS}&& (find . | cpio -o -H newc>${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) >> } >> >> +ELF_KERNEL ?= ${STAGING_DIR_HOST}/kernel/${KERNEL_IMAGETYPE} > This should be ${STAGING_KERNEL_DIR} I believe. I have a patch series > under review currently which would break the above as it is now in > /usr/src/kernel-headers > > Note that you could also collect this from the DEPLOY_DIR_IMAGE, which > is probably more appropriate for assembling images > > Thanks, > Yes. This appears to work: ELF_KERNEL ?= ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} I'm regenerating the patch now. ^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH 2/2 v2] mkelfimage: Add stable git build (initial recipe) 2012-06-22 20:22 ` [PATCH 2/2] mkelfimage: Add stable git build (initial recipe) Raymond Danks 2012-06-29 12:19 ` Richard Purdie 2012-06-29 15:41 ` [PATCH 1/2 v2] image_types: Add elf image type Raymond Danks @ 2012-06-29 15:41 ` Raymond Danks 2012-06-29 17:47 ` Darren Hart ` (2 more replies) 2012-07-08 21:34 ` [PATCH 2/2] " Saul Wold 3 siblings, 3 replies; 25+ messages in thread From: Raymond Danks @ 2012-06-29 15:41 UTC (permalink / raw) To: openembedded-core Signed-off-by: Raymond Danks <ray.danks@se-eng.com> --- This was originally submitted to the openembedded project: http://patches.openembedded.org/patch/7687/ v2: Remove depreciated NATIVE_INSTALL_WORKS meta/recipes-devtools/mkelfimage/mkelfimage_git.bb | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-devtools/mkelfimage/mkelfimage_git.bb diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb new file mode 100644 index 0000000..1224a63 --- /dev/null +++ b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "A utility to create ELF boot images from Linux kernel images" +HOMEPAGE = "http://www.coreboot.org/Mkelfimage" +SECTION = "devel" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a" + +SRCREV = "e13632a939e7dde8d7d44fc73e73a41dae8060c3" +PV = "1.0.0+gitr${SRCPV}" +PR = "r1" + +SRC_URI = "git://review.coreboot.org/p/coreboot;protocol=http;branch=master" + +S = "${WORKDIR}/git/util/mkelfImage" + +inherit autotools + +BBCLASSEXTEND = "native" -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH 2/2 v2] mkelfimage: Add stable git build (initial recipe) 2012-06-29 15:41 ` [PATCH 2/2 v2] mkelfimage: Add stable git build (initial recipe) Raymond Danks @ 2012-06-29 17:47 ` Darren Hart 2012-06-29 20:03 ` Raymond Danks 2012-06-29 20:19 ` [PATCH 1/2 v3] image_types: Add elf image type Raymond Danks 2012-06-29 20:30 ` [PATCH 2/2 v3] mkelfimage: Add stable git build (initial recipe) Raymond Danks 2 siblings, 1 reply; 25+ messages in thread From: Darren Hart @ 2012-06-29 17:47 UTC (permalink / raw) To: Patches and discussions about the oe-core layer On 06/29/2012 08:41 AM, Raymond Danks wrote: > Signed-off-by: Raymond Danks <ray.danks@se-eng.com> > --- > This was originally submitted to the openembedded project: > http://patches.openembedded.org/patch/7687/ > > v2: > Remove depreciated NATIVE_INSTALL_WORKS > > meta/recipes-devtools/mkelfimage/mkelfimage_git.bb | 17 +++++++++++++++++ > 1 files changed, 17 insertions(+), 0 deletions(-) > create mode 100644 meta/recipes-devtools/mkelfimage/mkelfimage_git.bb > > diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb > new file mode 100644 > index 0000000..1224a63 > --- /dev/null > +++ b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb > @@ -0,0 +1,17 @@ > +DESCRIPTION = "A utility to create ELF boot images from Linux kernel images" > +HOMEPAGE = "http://www.coreboot.org/Mkelfimage" > +SECTION = "devel" > +LICENSE = "GPLv2" > +LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a" > + > +SRCREV = "e13632a939e7dde8d7d44fc73e73a41dae8060c3" > +PV = "1.0.0+gitr${SRCPV}" > +PR = "r1" Minor, but I believe this should be "r0" for the initial creation of a recipe. -- Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 2/2 v2] mkelfimage: Add stable git build (initial recipe) 2012-06-29 17:47 ` Darren Hart @ 2012-06-29 20:03 ` Raymond Danks 0 siblings, 0 replies; 25+ messages in thread From: Raymond Danks @ 2012-06-29 20:03 UTC (permalink / raw) To: Darren Hart; +Cc: Patches and discussions about the oe-core layer On 06/29/2012 11:47 AM, Darren Hart wrote: > > On 06/29/2012 08:41 AM, Raymond Danks wrote: >> Signed-off-by: Raymond Danks<ray.danks@se-eng.com> >> --- >> This was originally submitted to the openembedded project: >> http://patches.openembedded.org/patch/7687/ >> >> v2: >> Remove depreciated NATIVE_INSTALL_WORKS >> >> meta/recipes-devtools/mkelfimage/mkelfimage_git.bb | 17 +++++++++++++++++ >> 1 files changed, 17 insertions(+), 0 deletions(-) >> create mode 100644 meta/recipes-devtools/mkelfimage/mkelfimage_git.bb >> >> diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb >> new file mode 100644 >> index 0000000..1224a63 >> --- /dev/null >> +++ b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb >> @@ -0,0 +1,17 @@ >> +DESCRIPTION = "A utility to create ELF boot images from Linux kernel images" >> +HOMEPAGE = "http://www.coreboot.org/Mkelfimage" >> +SECTION = "devel" >> +LICENSE = "GPLv2" >> +LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a" >> + >> +SRCREV = "e13632a939e7dde8d7d44fc73e73a41dae8060c3" >> +PV = "1.0.0+gitr${SRCPV}" >> +PR = "r1" > Minor, but I believe this should be "r0" for the initial creation of a > recipe. > > Yeah. That's debatable. I did send this to openembedded at one point. Yes, this is the first time this is included in openembedded-core, but it is different in that the patches that were applied in the previous version are already upstreamed to coreboot in this version. ^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH 1/2 v3] image_types: Add elf image type 2012-06-29 15:41 ` [PATCH 2/2 v2] mkelfimage: Add stable git build (initial recipe) Raymond Danks 2012-06-29 17:47 ` Darren Hart @ 2012-06-29 20:19 ` Raymond Danks 2012-06-30 13:38 ` Darren Hart ` (2 more replies) 2012-06-29 20:30 ` [PATCH 2/2 v3] mkelfimage: Add stable git build (initial recipe) Raymond Danks 2 siblings, 3 replies; 25+ messages in thread From: Raymond Danks @ 2012-06-29 20:19 UTC (permalink / raw) To: openembedded-core On x86, an ELF image file may be stored as a coreboot payload. The image file is constructed, using the mkelfimage utility, from a kernel and an initrd. Signed-off-by: Raymond Danks <ray.danks@se-eng.com> --- This was originally submitted to the openembedded project: http://patches.openembedded.org/patch/7689/ v3: Include DEPLOY_DIR_IMAGE and KERNEL_IMAGETYPE for location of ELF_KERNEL meta/classes/image_types.bbclass | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 55f122e..64fa14a 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass @@ -7,6 +7,12 @@ def get_imagecmds(d): ctypes = d.getVar('COMPRESSIONTYPES', True).split() cimages = {} + if "elf" in alltypes: + alltypes.remove("elf") + if "cpio.gz" not in alltypes: + alltypes.append("cpio.gz") + alltypes.append("elf") + # Filter out all the compressed images from types for type in alltypes: basetype = None @@ -173,6 +179,14 @@ IMAGE_CMD_cpio () { cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) } +ELF_KERNEL ?= ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} +ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console=" + +IMAGE_CMD_elf () { + test -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf && rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf + mkelfImage --kernel=${ELF_KERNEL} --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf --append='${ELF_APPEND}' ${EXTRA_IMAGECMD} +} + UBI_VOLNAME ?= "${MACHINE}-rootfs" IMAGE_CMD_ubi () { @@ -199,6 +213,7 @@ EXTRA_IMAGECMD_ext2 ?= "-i 8192" EXTRA_IMAGECMD_ext3 ?= "-i 8192" EXTRA_IMAGECMD_ext4 ?= "-i 8192" EXTRA_IMAGECMD_btrfs ?= "" +EXTRA_IMAGECMD_elf ?= "" IMAGE_DEPENDS = "" IMAGE_DEPENDS_jffs2 = "mtd-utils-native" @@ -210,11 +225,12 @@ IMAGE_DEPENDS_ext4 = "genext2fs-native e2fsprogs-native" IMAGE_DEPENDS_btrfs = "btrfs-tools-native" IMAGE_DEPENDS_squashfs = "squashfs-tools-native" IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" +IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native" IMAGE_DEPENDS_ubi = "mtd-utils-native" IMAGE_DEPENDS_ubifs = "mtd-utils-native" # This variable is available to request which values are suitable for IMAGE_FSTYPES -IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk" +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf" COMPRESSIONTYPES = "gz bz2 lzma xz" COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}" -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2 v3] image_types: Add elf image type 2012-06-29 20:19 ` [PATCH 1/2 v3] image_types: Add elf image type Raymond Danks @ 2012-06-30 13:38 ` Darren Hart 2012-07-02 4:22 ` Saul Wold 2012-07-02 20:51 ` [PATCH 1/2 v4] " Raymond Danks 2 siblings, 0 replies; 25+ messages in thread From: Darren Hart @ 2012-06-30 13:38 UTC (permalink / raw) To: Patches and discussions about the oe-core layer On 06/29/2012 01:19 PM, Raymond Danks wrote: > On x86, an ELF image file may be stored as a coreboot payload. > The image file is constructed, using the mkelfimage utility, > from a kernel and an initrd. > > Signed-off-by: Raymond Danks <ray.danks@se-eng.com> Acked-by: Darren Hart <dvhart@linux.intel.com> > --- > This was originally submitted to the openembedded project: > http://patches.openembedded.org/patch/7689/ > > v3: > Include DEPLOY_DIR_IMAGE and KERNEL_IMAGETYPE for location of ELF_KERNEL > > meta/classes/image_types.bbclass | 18 +++++++++++++++++- > 1 files changed, 17 insertions(+), 1 deletions(-) > > diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass > index 55f122e..64fa14a 100644 > --- a/meta/classes/image_types.bbclass > +++ b/meta/classes/image_types.bbclass > @@ -7,6 +7,12 @@ def get_imagecmds(d): > ctypes = d.getVar('COMPRESSIONTYPES', True).split() > cimages = {} > > + if "elf" in alltypes: > + alltypes.remove("elf") > + if "cpio.gz" not in alltypes: > + alltypes.append("cpio.gz") > + alltypes.append("elf") > + > # Filter out all the compressed images from types > for type in alltypes: > basetype = None > @@ -173,6 +179,14 @@ IMAGE_CMD_cpio () { > cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) > } > > +ELF_KERNEL ?= ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} > +ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console=" > + > +IMAGE_CMD_elf () { > + test -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf && rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf > + mkelfImage --kernel=${ELF_KERNEL} --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf --append='${ELF_APPEND}' ${EXTRA_IMAGECMD} > +} > + > UBI_VOLNAME ?= "${MACHINE}-rootfs" > > IMAGE_CMD_ubi () { > @@ -199,6 +213,7 @@ EXTRA_IMAGECMD_ext2 ?= "-i 8192" > EXTRA_IMAGECMD_ext3 ?= "-i 8192" > EXTRA_IMAGECMD_ext4 ?= "-i 8192" > EXTRA_IMAGECMD_btrfs ?= "" > +EXTRA_IMAGECMD_elf ?= "" > > IMAGE_DEPENDS = "" > IMAGE_DEPENDS_jffs2 = "mtd-utils-native" > @@ -210,11 +225,12 @@ IMAGE_DEPENDS_ext4 = "genext2fs-native e2fsprogs-native" > IMAGE_DEPENDS_btrfs = "btrfs-tools-native" > IMAGE_DEPENDS_squashfs = "squashfs-tools-native" > IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" > +IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native" > IMAGE_DEPENDS_ubi = "mtd-utils-native" > IMAGE_DEPENDS_ubifs = "mtd-utils-native" > > # This variable is available to request which values are suitable for IMAGE_FSTYPES > -IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk" > +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf" > > COMPRESSIONTYPES = "gz bz2 lzma xz" > COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}" > -- Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2 v3] image_types: Add elf image type 2012-06-29 20:19 ` [PATCH 1/2 v3] image_types: Add elf image type Raymond Danks 2012-06-30 13:38 ` Darren Hart @ 2012-07-02 4:22 ` Saul Wold 2012-07-02 15:05 ` Raymond Danks 2012-07-02 20:51 ` [PATCH 1/2 v4] " Raymond Danks 2 siblings, 1 reply; 25+ messages in thread From: Saul Wold @ 2012-07-02 4:22 UTC (permalink / raw) To: Patches and discussions about the oe-core layer On 06/29/2012 01:19 PM, Raymond Danks wrote: > On x86, an ELF image file may be stored as a coreboot payload. > The image file is constructed, using the mkelfimage utility, > from a kernel and an initrd. > > Signed-off-by: Raymond Danks<ray.danks@se-eng.com> > --- > This was originally submitted to the openembedded project: > http://patches.openembedded.org/patch/7689/ > > v3: > Include DEPLOY_DIR_IMAGE and KERNEL_IMAGETYPE for location of ELF_KERNEL > > meta/classes/image_types.bbclass | 18 +++++++++++++++++- > 1 files changed, 17 insertions(+), 1 deletions(-) > > diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass > index 55f122e..64fa14a 100644 > --- a/meta/classes/image_types.bbclass > +++ b/meta/classes/image_types.bbclass > @@ -7,6 +7,12 @@ def get_imagecmds(d): > ctypes = d.getVar('COMPRESSIONTYPES', True).split() > cimages = {} > > + if "elf" in alltypes: > + alltypes.remove("elf") > + if "cpio.gz" not in alltypes: > + alltypes.append("cpio.gz") > + alltypes.append("elf") > + > # Filter out all the compressed images from types > for type in alltypes: > basetype = None > @@ -173,6 +179,14 @@ IMAGE_CMD_cpio () { > cd ${IMAGE_ROOTFS}&& (find . | cpio -o -H newc>${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) > } > > +ELF_KERNEL ?= ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} I guess this was not tested very well, as this failed right out of the gate. Please let me know what kind of testing you have done. Thanks Sau! > +ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console=" > + > +IMAGE_CMD_elf () { > + test -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf&& rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf > + mkelfImage --kernel=${ELF_KERNEL} --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf --append='${ELF_APPEND}' ${EXTRA_IMAGECMD} > +} > + > UBI_VOLNAME ?= "${MACHINE}-rootfs" > > IMAGE_CMD_ubi () { > @@ -199,6 +213,7 @@ EXTRA_IMAGECMD_ext2 ?= "-i 8192" > EXTRA_IMAGECMD_ext3 ?= "-i 8192" > EXTRA_IMAGECMD_ext4 ?= "-i 8192" > EXTRA_IMAGECMD_btrfs ?= "" > +EXTRA_IMAGECMD_elf ?= "" > > IMAGE_DEPENDS = "" > IMAGE_DEPENDS_jffs2 = "mtd-utils-native" > @@ -210,11 +225,12 @@ IMAGE_DEPENDS_ext4 = "genext2fs-native e2fsprogs-native" > IMAGE_DEPENDS_btrfs = "btrfs-tools-native" > IMAGE_DEPENDS_squashfs = "squashfs-tools-native" > IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" > +IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native" > IMAGE_DEPENDS_ubi = "mtd-utils-native" > IMAGE_DEPENDS_ubifs = "mtd-utils-native" > > # This variable is available to request which values are suitable for IMAGE_FSTYPES > -IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk" > +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf" > > COMPRESSIONTYPES = "gz bz2 lzma xz" > COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}" ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2 v3] image_types: Add elf image type 2012-07-02 4:22 ` Saul Wold @ 2012-07-02 15:05 ` Raymond Danks 2012-07-02 16:51 ` Saul Wold 0 siblings, 1 reply; 25+ messages in thread From: Raymond Danks @ 2012-07-02 15:05 UTC (permalink / raw) To: Saul Wold; +Cc: Patches and discussions about the oe-core layer On 07/01/2012 10:22 PM, Saul Wold wrote: > On 06/29/2012 01:19 PM, Raymond Danks wrote: >> On x86, an ELF image file may be stored as a coreboot payload. >> The image file is constructed, using the mkelfimage utility, >> from a kernel and an initrd. >> >> Signed-off-by: Raymond Danks<ray.danks@se-eng.com> >> --- >> This was originally submitted to the openembedded project: >> http://patches.openembedded.org/patch/7689/ >> >> v3: >> Include DEPLOY_DIR_IMAGE and KERNEL_IMAGETYPE for location of >> ELF_KERNEL >> >> meta/classes/image_types.bbclass | 18 +++++++++++++++++- >> 1 files changed, 17 insertions(+), 1 deletions(-) >> >> diff --git a/meta/classes/image_types.bbclass >> b/meta/classes/image_types.bbclass >> index 55f122e..64fa14a 100644 >> --- a/meta/classes/image_types.bbclass >> +++ b/meta/classes/image_types.bbclass >> @@ -7,6 +7,12 @@ def get_imagecmds(d): >> ctypes = d.getVar('COMPRESSIONTYPES', True).split() >> cimages = {} >> >> + if "elf" in alltypes: >> + alltypes.remove("elf") >> + if "cpio.gz" not in alltypes: >> + alltypes.append("cpio.gz") >> + alltypes.append("elf") >> + >> # Filter out all the compressed images from types >> for type in alltypes: >> basetype = None >> @@ -173,6 +179,14 @@ IMAGE_CMD_cpio () { >> cd ${IMAGE_ROOTFS}&& (find . | cpio -o -H >> newc>${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) >> } >> >> +ELF_KERNEL ?= ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} > > I guess this was not tested very well, as this failed right out of the > gate. Thanks for giving this a shot Sau. Could you be more specific regarding the failure you are seeing? > > Please let me know what kind of testing you have done. This was tested rather exhaustively on an x86_64->x86_64 configuration prior to the latest changes to the above line. I have only tested this using the bzImage kernel type. I did feel that I had tested the above line as well, but it's possible I had something cached somewhere. I'll kick off a clean build and see if anything surfaces. > > Thanks > Sau! >> +ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console=" >> + >> +IMAGE_CMD_elf () { >> + test -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf&& rm -f >> ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf >> + mkelfImage --kernel=${ELF_KERNEL} >> --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz >> --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf >> --append='${ELF_APPEND}' ${EXTRA_IMAGECMD} >> +} >> + >> UBI_VOLNAME ?= "${MACHINE}-rootfs" >> >> IMAGE_CMD_ubi () { >> @@ -199,6 +213,7 @@ EXTRA_IMAGECMD_ext2 ?= "-i 8192" >> EXTRA_IMAGECMD_ext3 ?= "-i 8192" >> EXTRA_IMAGECMD_ext4 ?= "-i 8192" >> EXTRA_IMAGECMD_btrfs ?= "" >> +EXTRA_IMAGECMD_elf ?= "" >> >> IMAGE_DEPENDS = "" >> IMAGE_DEPENDS_jffs2 = "mtd-utils-native" >> @@ -210,11 +225,12 @@ IMAGE_DEPENDS_ext4 = "genext2fs-native >> e2fsprogs-native" >> IMAGE_DEPENDS_btrfs = "btrfs-tools-native" >> IMAGE_DEPENDS_squashfs = "squashfs-tools-native" >> IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" >> +IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native" >> IMAGE_DEPENDS_ubi = "mtd-utils-native" >> IMAGE_DEPENDS_ubifs = "mtd-utils-native" >> >> # This variable is available to request which values are suitable >> for IMAGE_FSTYPES >> -IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 >> ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz >> tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk" >> +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 >> ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz >> tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf" >> >> COMPRESSIONTYPES = "gz bz2 lzma xz" >> COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}" ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2 v3] image_types: Add elf image type 2012-07-02 15:05 ` Raymond Danks @ 2012-07-02 16:51 ` Saul Wold 2012-07-02 19:00 ` Raymond Danks 0 siblings, 1 reply; 25+ messages in thread From: Saul Wold @ 2012-07-02 16:51 UTC (permalink / raw) To: ray.danks; +Cc: Patches and discussions about the oe-core layer On 07/02/2012 08:05 AM, Raymond Danks wrote: > On 07/01/2012 10:22 PM, Saul Wold wrote: >> On 06/29/2012 01:19 PM, Raymond Danks wrote: >>> On x86, an ELF image file may be stored as a coreboot payload. >>> The image file is constructed, using the mkelfimage utility, >>> from a kernel and an initrd. >>> >>> Signed-off-by: Raymond Danks<ray.danks@se-eng.com> >>> --- >>> This was originally submitted to the openembedded project: >>> http://patches.openembedded.org/patch/7689/ >>> >>> v3: >>> Include DEPLOY_DIR_IMAGE and KERNEL_IMAGETYPE for location of ELF_KERNEL >>> >>> meta/classes/image_types.bbclass | 18 +++++++++++++++++- >>> 1 files changed, 17 insertions(+), 1 deletions(-) >>> >>> diff --git a/meta/classes/image_types.bbclass >>> b/meta/classes/image_types.bbclass >>> index 55f122e..64fa14a 100644 >>> --- a/meta/classes/image_types.bbclass >>> +++ b/meta/classes/image_types.bbclass >>> @@ -7,6 +7,12 @@ def get_imagecmds(d): >>> ctypes = d.getVar('COMPRESSIONTYPES', True).split() >>> cimages = {} >>> >>> + if "elf" in alltypes: >>> + alltypes.remove("elf") >>> + if "cpio.gz" not in alltypes: >>> + alltypes.append("cpio.gz") >>> + alltypes.append("elf") >>> + >>> # Filter out all the compressed images from types >>> for type in alltypes: >>> basetype = None >>> @@ -173,6 +179,14 @@ IMAGE_CMD_cpio () { >>> cd ${IMAGE_ROOTFS}&& (find . | cpio -o -H >>> newc>${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) >>> } >>> >>> +ELF_KERNEL ?= ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} >> >> I guess this was not tested very well, as this failed right out of the >> gate. > Thanks for giving this a shot Sau. Could you be more specific regarding > the failure you are seeing? Sorry, It was Sunday evening and I was a little grumpy at the failure occuring after all the version. ERROR: ParseError at /intel/poky/distro/meta/classes/image_types.bbclass:182: unparsed line: 'ELF_KERNEL ?= ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}' My guess is because you forgot the quotes on that line, now why I hit it instantly and you did not see it I am not sure. bitbake world and it will fail >> >> Please let me know what kind of testing you have done. > This was tested rather exhaustively on an x86_64->x86_64 configuration > prior to the latest changes to the above line. I have only tested this > using the bzImage kernel type. I did feel that I had tested the above > line as well, but it's possible I had something cached somewhere. I'll > kick off a clean build and see if anything surfaces. > >> >> Thanks >> Sau! >>> +ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console=" >>> + >>> +IMAGE_CMD_elf () { >>> + test -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf&& rm -f >>> ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf >>> + mkelfImage --kernel=${ELF_KERNEL} >>> --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz >>> --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf >>> --append='${ELF_APPEND}' ${EXTRA_IMAGECMD} >>> +} >>> + >>> UBI_VOLNAME ?= "${MACHINE}-rootfs" >>> >>> IMAGE_CMD_ubi () { >>> @@ -199,6 +213,7 @@ EXTRA_IMAGECMD_ext2 ?= "-i 8192" >>> EXTRA_IMAGECMD_ext3 ?= "-i 8192" >>> EXTRA_IMAGECMD_ext4 ?= "-i 8192" >>> EXTRA_IMAGECMD_btrfs ?= "" >>> +EXTRA_IMAGECMD_elf ?= "" >>> >>> IMAGE_DEPENDS = "" >>> IMAGE_DEPENDS_jffs2 = "mtd-utils-native" >>> @@ -210,11 +225,12 @@ IMAGE_DEPENDS_ext4 = "genext2fs-native >>> e2fsprogs-native" >>> IMAGE_DEPENDS_btrfs = "btrfs-tools-native" >>> IMAGE_DEPENDS_squashfs = "squashfs-tools-native" >>> IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" >>> +IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native" >>> IMAGE_DEPENDS_ubi = "mtd-utils-native" >>> IMAGE_DEPENDS_ubifs = "mtd-utils-native" >>> >>> # This variable is available to request which values are suitable for >>> IMAGE_FSTYPES >>> -IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 >>> ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz >>> tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk" >>> +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 >>> ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz >>> tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf" >>> >>> COMPRESSIONTYPES = "gz bz2 lzma xz" >>> COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}" > > > ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2 v3] image_types: Add elf image type 2012-07-02 16:51 ` Saul Wold @ 2012-07-02 19:00 ` Raymond Danks 0 siblings, 0 replies; 25+ messages in thread From: Raymond Danks @ 2012-07-02 19:00 UTC (permalink / raw) To: Saul Wold; +Cc: Patches and discussions about the oe-core layer On 07/02/2012 10:51 AM, Saul Wold wrote: > On 07/02/2012 08:05 AM, Raymond Danks wrote: >> On 07/01/2012 10:22 PM, Saul Wold wrote: >>> On 06/29/2012 01:19 PM, Raymond Danks wrote: >>>> On x86, an ELF image file may be stored as a coreboot payload. >>>> The image file is constructed, using the mkelfimage utility, >>>> from a kernel and an initrd. >>>> >>>> Signed-off-by: Raymond Danks<ray.danks@se-eng.com> >>>> --- >>>> This was originally submitted to the openembedded project: >>>> http://patches.openembedded.org/patch/7689/ >>>> >>>> v3: >>>> Include DEPLOY_DIR_IMAGE and KERNEL_IMAGETYPE for location of >>>> ELF_KERNEL >>>> >>>> meta/classes/image_types.bbclass | 18 +++++++++++++++++- >>>> 1 files changed, 17 insertions(+), 1 deletions(-) >>>> >>>> diff --git a/meta/classes/image_types.bbclass >>>> b/meta/classes/image_types.bbclass >>>> index 55f122e..64fa14a 100644 >>>> --- a/meta/classes/image_types.bbclass >>>> +++ b/meta/classes/image_types.bbclass >>>> @@ -7,6 +7,12 @@ def get_imagecmds(d): >>>> ctypes = d.getVar('COMPRESSIONTYPES', True).split() >>>> cimages = {} >>>> >>>> + if "elf" in alltypes: >>>> + alltypes.remove("elf") >>>> + if "cpio.gz" not in alltypes: >>>> + alltypes.append("cpio.gz") >>>> + alltypes.append("elf") >>>> + >>>> # Filter out all the compressed images from types >>>> for type in alltypes: >>>> basetype = None >>>> @@ -173,6 +179,14 @@ IMAGE_CMD_cpio () { >>>> cd ${IMAGE_ROOTFS}&& (find . | cpio -o -H >>>> newc>${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) >>>> } >>>> >>>> +ELF_KERNEL ?= ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} >>> >>> I guess this was not tested very well, as this failed right out of the >>> gate. >> Thanks for giving this a shot Sau. Could you be more specific regarding >> the failure you are seeing? > > Sorry, It was Sunday evening and I was a little grumpy at the failure > occuring after all the version. > > > ERROR: ParseError at > /intel/poky/distro/meta/classes/image_types.bbclass:182: unparsed > line: 'ELF_KERNEL ?= ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}' > > My guess is because you forgot the quotes on that line, now why I hit > it instantly and you did not see it I am not sure. Yes. I see. I was using bitbake 1.15.1. I have updated bitbake to current and now see the issue. I'm submitting an updated version of this patch with quotes around this definition. Thanks, Ray > > bitbake world and it will fail > >>> >>> Please let me know what kind of testing you have done. >> This was tested rather exhaustively on an x86_64->x86_64 configuration >> prior to the latest changes to the above line. I have only tested this >> using the bzImage kernel type. I did feel that I had tested the above >> line as well, but it's possible I had something cached somewhere. I'll >> kick off a clean build and see if anything surfaces. >> >>> >>> Thanks >>> Sau! >>>> +ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console=" >>>> + >>>> +IMAGE_CMD_elf () { >>>> + test -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf&& rm -f >>>> ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf >>>> + mkelfImage --kernel=${ELF_KERNEL} >>>> --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz >>>> --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf >>>> --append='${ELF_APPEND}' ${EXTRA_IMAGECMD} >>>> +} >>>> + >>>> UBI_VOLNAME ?= "${MACHINE}-rootfs" >>>> >>>> IMAGE_CMD_ubi () { >>>> @@ -199,6 +213,7 @@ EXTRA_IMAGECMD_ext2 ?= "-i 8192" >>>> EXTRA_IMAGECMD_ext3 ?= "-i 8192" >>>> EXTRA_IMAGECMD_ext4 ?= "-i 8192" >>>> EXTRA_IMAGECMD_btrfs ?= "" >>>> +EXTRA_IMAGECMD_elf ?= "" >>>> >>>> IMAGE_DEPENDS = "" >>>> IMAGE_DEPENDS_jffs2 = "mtd-utils-native" >>>> @@ -210,11 +225,12 @@ IMAGE_DEPENDS_ext4 = "genext2fs-native >>>> e2fsprogs-native" >>>> IMAGE_DEPENDS_btrfs = "btrfs-tools-native" >>>> IMAGE_DEPENDS_squashfs = "squashfs-tools-native" >>>> IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" >>>> +IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native" >>>> IMAGE_DEPENDS_ubi = "mtd-utils-native" >>>> IMAGE_DEPENDS_ubifs = "mtd-utils-native" >>>> >>>> # This variable is available to request which values are suitable for >>>> IMAGE_FSTYPES >>>> -IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 >>>> ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz >>>> tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk" >>>> +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 >>>> ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz >>>> tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf" >>>> >>>> COMPRESSIONTYPES = "gz bz2 lzma xz" >>>> COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}" >> >> >> ^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH 1/2 v4] image_types: Add elf image type 2012-06-29 20:19 ` [PATCH 1/2 v3] image_types: Add elf image type Raymond Danks 2012-06-30 13:38 ` Darren Hart 2012-07-02 4:22 ` Saul Wold @ 2012-07-02 20:51 ` Raymond Danks 2012-07-05 17:35 ` Saul Wold 2 siblings, 1 reply; 25+ messages in thread From: Raymond Danks @ 2012-07-02 20:51 UTC (permalink / raw) To: openembedded-core On x86, an ELF image file may be stored as a coreboot payload. The image file is constructed, using the mkelfimage utility, from a kernel and an initrd. Signed-off-by: Raymond Danks <ray.danks@se-eng.com> Acked-by: Darren Hart <dvhart@linux.intel.com> --- This was originally submitted to the openembedded project: http://patches.openembedded.org/patch/7689/ v3: Include DEPLOY_DIR_IMAGE and KERNEL_IMAGETYPE for location of ELF_KERNEL v4: Quotes must surround ELF_KERNEL defintion with newer versions of bitbake. meta/classes/image_types.bbclass | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 55f122e..2873273 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass @@ -7,6 +7,12 @@ def get_imagecmds(d): ctypes = d.getVar('COMPRESSIONTYPES', True).split() cimages = {} + if "elf" in alltypes: + alltypes.remove("elf") + if "cpio.gz" not in alltypes: + alltypes.append("cpio.gz") + alltypes.append("elf") + # Filter out all the compressed images from types for type in alltypes: basetype = None @@ -173,6 +179,14 @@ IMAGE_CMD_cpio () { cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) } +ELF_KERNEL ?= "${STAGING_DIR_HOST}/kernel/${KERNEL_IMAGETYPE}" +ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console=" + +IMAGE_CMD_elf () { + test -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf && rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf + mkelfImage --kernel=${ELF_KERNEL} --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf --append='${ELF_APPEND}' ${EXTRA_IMAGECMD} +} + UBI_VOLNAME ?= "${MACHINE}-rootfs" IMAGE_CMD_ubi () { @@ -199,6 +213,7 @@ EXTRA_IMAGECMD_ext2 ?= "-i 8192" EXTRA_IMAGECMD_ext3 ?= "-i 8192" EXTRA_IMAGECMD_ext4 ?= "-i 8192" EXTRA_IMAGECMD_btrfs ?= "" +EXTRA_IMAGECMD_elf ?= "" IMAGE_DEPENDS = "" IMAGE_DEPENDS_jffs2 = "mtd-utils-native" @@ -210,11 +225,12 @@ IMAGE_DEPENDS_ext4 = "genext2fs-native e2fsprogs-native" IMAGE_DEPENDS_btrfs = "btrfs-tools-native" IMAGE_DEPENDS_squashfs = "squashfs-tools-native" IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" +IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native" IMAGE_DEPENDS_ubi = "mtd-utils-native" IMAGE_DEPENDS_ubifs = "mtd-utils-native" # This variable is available to request which values are suitable for IMAGE_FSTYPES -IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk" +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf" COMPRESSIONTYPES = "gz bz2 lzma xz" COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}" -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2 v4] image_types: Add elf image type 2012-07-02 20:51 ` [PATCH 1/2 v4] " Raymond Danks @ 2012-07-05 17:35 ` Saul Wold 0 siblings, 0 replies; 25+ messages in thread From: Saul Wold @ 2012-07-05 17:35 UTC (permalink / raw) To: Patches and discussions about the oe-core layer On 07/02/2012 01:51 PM, Raymond Danks wrote: > On x86, an ELF image file may be stored as a coreboot payload. > The image file is constructed, using the mkelfimage utility, > from a kernel and an initrd. > > Signed-off-by: Raymond Danks <ray.danks@se-eng.com> > Acked-by: Darren Hart <dvhart@linux.intel.com> > --- > This was originally submitted to the openembedded project: > http://patches.openembedded.org/patch/7689/ > > v3: > Include DEPLOY_DIR_IMAGE and KERNEL_IMAGETYPE for location of ELF_KERNEL > > v4: > Quotes must surround ELF_KERNEL defintion with newer versions of bitbake. > > meta/classes/image_types.bbclass | 18 +++++++++++++++++- > 1 files changed, 17 insertions(+), 1 deletions(-) > Merged both parts of this patch set (v4 from here and v3 2/2) Thanks Sau! > diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass > index 55f122e..2873273 100644 > --- a/meta/classes/image_types.bbclass > +++ b/meta/classes/image_types.bbclass > @@ -7,6 +7,12 @@ def get_imagecmds(d): > ctypes = d.getVar('COMPRESSIONTYPES', True).split() > cimages = {} > > + if "elf" in alltypes: > + alltypes.remove("elf") > + if "cpio.gz" not in alltypes: > + alltypes.append("cpio.gz") > + alltypes.append("elf") > + > # Filter out all the compressed images from types > for type in alltypes: > basetype = None > @@ -173,6 +179,14 @@ IMAGE_CMD_cpio () { > cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) > } > > +ELF_KERNEL ?= "${STAGING_DIR_HOST}/kernel/${KERNEL_IMAGETYPE}" > +ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console=" > + > +IMAGE_CMD_elf () { > + test -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf && rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf > + mkelfImage --kernel=${ELF_KERNEL} --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf --append='${ELF_APPEND}' ${EXTRA_IMAGECMD} > +} > + > UBI_VOLNAME ?= "${MACHINE}-rootfs" > > IMAGE_CMD_ubi () { > @@ -199,6 +213,7 @@ EXTRA_IMAGECMD_ext2 ?= "-i 8192" > EXTRA_IMAGECMD_ext3 ?= "-i 8192" > EXTRA_IMAGECMD_ext4 ?= "-i 8192" > EXTRA_IMAGECMD_btrfs ?= "" > +EXTRA_IMAGECMD_elf ?= "" > > IMAGE_DEPENDS = "" > IMAGE_DEPENDS_jffs2 = "mtd-utils-native" > @@ -210,11 +225,12 @@ IMAGE_DEPENDS_ext4 = "genext2fs-native e2fsprogs-native" > IMAGE_DEPENDS_btrfs = "btrfs-tools-native" > IMAGE_DEPENDS_squashfs = "squashfs-tools-native" > IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" > +IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native" > IMAGE_DEPENDS_ubi = "mtd-utils-native" > IMAGE_DEPENDS_ubifs = "mtd-utils-native" > > # This variable is available to request which values are suitable for IMAGE_FSTYPES > -IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk" > +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf" > > COMPRESSIONTYPES = "gz bz2 lzma xz" > COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}" > ^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH 2/2 v3] mkelfimage: Add stable git build (initial recipe) 2012-06-29 15:41 ` [PATCH 2/2 v2] mkelfimage: Add stable git build (initial recipe) Raymond Danks 2012-06-29 17:47 ` Darren Hart 2012-06-29 20:19 ` [PATCH 1/2 v3] image_types: Add elf image type Raymond Danks @ 2012-06-29 20:30 ` Raymond Danks 2 siblings, 0 replies; 25+ messages in thread From: Raymond Danks @ 2012-06-29 20:30 UTC (permalink / raw) To: openembedded-core Signed-off-by: Raymond Danks <ray.danks@se-eng.com> Acked-by: Darren Hart <dvhart@linux.intel.com> --- This was originally submitted to the openembedded project: http://patches.openembedded.org/patch/7687/ v2: Remove depreciated NATIVE_INSTALL_WORKS v3: No changes from v2 meta/recipes-devtools/mkelfimage/mkelfimage_git.bb | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-devtools/mkelfimage/mkelfimage_git.bb diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb new file mode 100644 index 0000000..1224a63 --- /dev/null +++ b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "A utility to create ELF boot images from Linux kernel images" +HOMEPAGE = "http://www.coreboot.org/Mkelfimage" +SECTION = "devel" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a" + +SRCREV = "e13632a939e7dde8d7d44fc73e73a41dae8060c3" +PV = "1.0.0+gitr${SRCPV}" +PR = "r1" + +SRC_URI = "git://review.coreboot.org/p/coreboot;protocol=http;branch=master" + +S = "${WORKDIR}/git/util/mkelfImage" + +inherit autotools + +BBCLASSEXTEND = "native" -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH 2/2] mkelfimage: Add stable git build (initial recipe) 2012-06-22 20:22 ` [PATCH 2/2] mkelfimage: Add stable git build (initial recipe) Raymond Danks ` (2 preceding siblings ...) 2012-06-29 15:41 ` [PATCH 2/2 v2] mkelfimage: Add stable git build (initial recipe) Raymond Danks @ 2012-07-08 21:34 ` Saul Wold 2012-07-09 19:20 ` Raymond Danks 3 siblings, 1 reply; 25+ messages in thread From: Saul Wold @ 2012-07-08 21:34 UTC (permalink / raw) To: Patches and discussions about the oe-core layer On 06/22/2012 01:22 PM, Raymond Danks wrote: > Signed-off-by: Raymond Danks <ray.danks@se-eng.com> > --- > This was originally submitted to the openembedded project: > http://patches.openembedded.org/patch/7687/ > > Resubmitting to oe-core for review prior to commit in openembedded-core. > > meta/recipes-devtools/mkelfimage/mkelfimage_git.bb | 18 ++++++++++++++++++ > 1 files changed, 18 insertions(+), 0 deletions(-) > create mode 100644 meta/recipes-devtools/mkelfimage/mkelfimage_git.bb > > diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb > new file mode 100644 > index 0000000..b341213 > --- /dev/null > +++ b/meta/recipes-devtools/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" > +LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a" > + > +SRCREV = "e13632a939e7dde8d7d44fc73e73a41dae8060c3" > +PV = "1.0.0+gitr${SRCPV}" > +PR = "r1" > + > +SRC_URI = "git://review.coreboot.org/p/coreboot;protocol=http;branch=master" > + > +S = "${WORKDIR}/git/util/mkelfImage" > + > +inherit autotools > + > +NATIVE_INSTALL_WORKS = "1" > +BBCLASSEXTEND = "native" > I found this packaging issue: > ERROR: QA Issue: mkelfimage: Files/directories were installed but not shipped > /usr/share/mkelfImage > /usr/share/mkelfImage/elf32-i386 When I did a world build for x86 Can you please address it. Thanks Sau! ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 2/2] mkelfimage: Add stable git build (initial recipe) 2012-07-08 21:34 ` [PATCH 2/2] " Saul Wold @ 2012-07-09 19:20 ` Raymond Danks 0 siblings, 0 replies; 25+ messages in thread From: Raymond Danks @ 2012-07-09 19:20 UTC (permalink / raw) To: Saul Wold; +Cc: Patches and discussions about the oe-core layer On 07/08/2012 03:34 PM, Saul Wold wrote: > On 06/22/2012 01:22 PM, Raymond Danks wrote: >> Signed-off-by: Raymond Danks <ray.danks@se-eng.com> >> --- >> This was originally submitted to the openembedded project: >> http://patches.openembedded.org/patch/7687/ >> >> Resubmitting to oe-core for review prior to commit in openembedded-core. >> >> meta/recipes-devtools/mkelfimage/mkelfimage_git.bb | 18 >> ++++++++++++++++++ >> 1 files changed, 18 insertions(+), 0 deletions(-) >> create mode 100644 meta/recipes-devtools/mkelfimage/mkelfimage_git.bb >> >> diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb >> b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb >> new file mode 100644 >> index 0000000..b341213 >> --- /dev/null >> +++ b/meta/recipes-devtools/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" >> +LIC_FILES_CHKSUM = >> "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a" >> + >> +SRCREV = "e13632a939e7dde8d7d44fc73e73a41dae8060c3" >> +PV = "1.0.0+gitr${SRCPV}" >> +PR = "r1" >> + >> +SRC_URI = >> "git://review.coreboot.org/p/coreboot;protocol=http;branch=master" >> + >> +S = "${WORKDIR}/git/util/mkelfImage" >> + >> +inherit autotools >> + >> +NATIVE_INSTALL_WORKS = "1" >> +BBCLASSEXTEND = "native" >> > > I found this packaging issue: >> ERROR: QA Issue: mkelfimage: Files/directories were installed but not >> shipped >> /usr/share/mkelfImage >> /usr/share/mkelfImage/elf32-i386 > > When I did a world build for x86 > > Can you please address it. Yes. I'll send a patch and the corresponding patch to coreboot. Thanks, Ray > > Thanks > > Sau! > ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2] image_types: Add elf image type 2012-06-22 20:22 [PATCH 1/2] image_types: Add elf image type Raymond Danks 2012-06-22 20:22 ` [PATCH 2/2] mkelfimage: Add stable git build (initial recipe) Raymond Danks @ 2012-06-25 16:58 ` Darren Hart 2012-06-27 20:34 ` Raymond Danks 1 sibling, 1 reply; 25+ messages in thread From: Darren Hart @ 2012-06-25 16:58 UTC (permalink / raw) To: Patches and discussions about the oe-core layer Hi Raymond, On 06/22/2012 01:22 PM, Raymond Danks wrote: > On x86, an ELF image file may be stored as a coreboot payload. > The image file is constructed, using the mkelfimage utility, > from a kernel and an initrd. > Is this usable solely as a coreboot payload? The reason I ask is there have been requests to be able to build the kernel+initramfs that the Linux make system supports. The coreboot wiki suggests that this may be sufficient in lieu of the mkelfimage format. http://www.coreboot.org/Mkelfimage If we can satisfy both goals with one image type, I would prefer we do that, at least for the core. > Signed-off-by: Raymond Danks <ray.danks@se-eng.com> > --- > This was originally submitted to the openembedded project: > http://patches.openembedded.org/patch/7689/ > > Resubmitting to oe-core for review prior to commit in openembedded-core. > > meta/classes/image_types.bbclass | 18 +++++++++++++++++- > 1 files changed, 17 insertions(+), 1 deletions(-) > > diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass > index 55f122e..bbca20c 100644 > --- a/meta/classes/image_types.bbclass > +++ b/meta/classes/image_types.bbclass > @@ -7,6 +7,12 @@ def get_imagecmds(d): > ctypes = d.getVar('COMPRESSIONTYPES', True).split() > cimages = {} > > + if "elf" in alltypes: > + alltypes.remove("elf") > + if "cpio.gz" not in alltypes: > + alltypes.append("cpio.gz") > + alltypes.append("elf") > + What is the goal of this? Do you just need cpio.gz to appear before elf in the list? If so, can that just be checked for at the time of adding elf the first time? > # Filter out all the compressed images from types > for type in alltypes: > basetype = None > @@ -173,6 +179,14 @@ IMAGE_CMD_cpio () { > cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) > } > > +ELF_KERNEL ?= ${STAGING_DIR_HOST}/kernel/bzImage There are various kernel image types. Is the elf format only valid with bzImage? > +ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console=" We would need to parameterize ramdisk_size. -- Darren > + > +IMAGE_CMD_elf () { > + test -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf && rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf > + mkelfImage --kernel=${ELF_KERNEL} --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf --append='${ELF_APPEND}' ${EXTRA_IMAGECMD} > +} > + > UBI_VOLNAME ?= "${MACHINE}-rootfs" > > IMAGE_CMD_ubi () { > @@ -199,6 +213,7 @@ EXTRA_IMAGECMD_ext2 ?= "-i 8192" > EXTRA_IMAGECMD_ext3 ?= "-i 8192" > EXTRA_IMAGECMD_ext4 ?= "-i 8192" > EXTRA_IMAGECMD_btrfs ?= "" > +EXTRA_IMAGECMD_elf ?= "" > > IMAGE_DEPENDS = "" > IMAGE_DEPENDS_jffs2 = "mtd-utils-native" > @@ -210,11 +225,12 @@ IMAGE_DEPENDS_ext4 = "genext2fs-native e2fsprogs-native" > IMAGE_DEPENDS_btrfs = "btrfs-tools-native" > IMAGE_DEPENDS_squashfs = "squashfs-tools-native" > IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" > +IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native" > IMAGE_DEPENDS_ubi = "mtd-utils-native" > IMAGE_DEPENDS_ubifs = "mtd-utils-native" > > # This variable is available to request which values are suitable for IMAGE_FSTYPES > -IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk" > +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf" > > COMPRESSIONTYPES = "gz bz2 lzma xz" > COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}" > -- Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2] image_types: Add elf image type 2012-06-25 16:58 ` [PATCH 1/2] image_types: Add elf image type Darren Hart @ 2012-06-27 20:34 ` Raymond Danks 2012-06-27 20:43 ` Raymond Danks 0 siblings, 1 reply; 25+ messages in thread From: Raymond Danks @ 2012-06-27 20:34 UTC (permalink / raw) To: Darren Hart; +Cc: Patches and discussions about the oe-core layer Hi Darren, Thanks for the feedback. On 06/25/2012 10:58 AM, Darren Hart wrote: > Hi Raymond, > > On 06/22/2012 01:22 PM, Raymond Danks wrote: >> On x86, an ELF image file may be stored as a coreboot payload. >> The image file is constructed, using the mkelfimage utility, >> from a kernel and an initrd. >> > Is this usable solely as a coreboot payload? > > The reason I ask is there have been requests to be able to build the > kernel+initramfs that the Linux make system supports. The coreboot wiki > suggests that this may be sufficient in lieu of the mkelfimage format. > > http://www.coreboot.org/Mkelfimage > > If we can satisfy both goals with one image type, I would prefer we do > that, at least for the core. I have not tried this. I prefer the mkelfimage mechanism over the linux kernel's mechanism due to the manner in which the OpenEmbedded build process is laid out. In my experience, the rootfs/initrd is constructed *after* the kernel and is not necessarily available for inclusion by the kernel build. Of course, if you have a patch for this, I'd be happy to give that a try. >> Signed-off-by: Raymond Danks<ray.danks@se-eng.com> >> --- >> This was originally submitted to the openembedded project: >> http://patches.openembedded.org/patch/7689/ >> >> Resubmitting to oe-core for review prior to commit in openembedded-core. >> >> meta/classes/image_types.bbclass | 18 +++++++++++++++++- >> 1 files changed, 17 insertions(+), 1 deletions(-) >> >> diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass >> index 55f122e..bbca20c 100644 >> --- a/meta/classes/image_types.bbclass >> +++ b/meta/classes/image_types.bbclass >> @@ -7,6 +7,12 @@ def get_imagecmds(d): >> ctypes = d.getVar('COMPRESSIONTYPES', True).split() >> cimages = {} >> >> + if "elf" in alltypes: >> + alltypes.remove("elf") >> + if "cpio.gz" not in alltypes: >> + alltypes.append("cpio.gz") >> + alltypes.append("elf") >> + > What is the goal of this? Do you just need cpio.gz to appear before elf > in the list? Yes. The cpio.gz is an input to the mkelfimage command below. > If so, can that just be checked for at the time of adding > elf the first time? Possibly. Can you tell me where this is done? > >> # Filter out all the compressed images from types >> for type in alltypes: >> basetype = None >> @@ -173,6 +179,14 @@ IMAGE_CMD_cpio () { >> cd ${IMAGE_ROOTFS}&& (find . | cpio -o -H newc>${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) >> } >> >> +ELF_KERNEL ?= ${STAGING_DIR_HOST}/kernel/bzImage > There are various kernel image types. Is the elf format only valid with > bzImage? The mkelfimage documentation indicates that bzImage and vmlinux are supported. I have only worked with bzImage. That said, I agree that this is more appropriate: ELF_KERNEL ?= ${STAGING_DIR_HOST}/kernel/${KERNEL_IMAGETYPE} > >> +ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console=" > We would need to parameterize ramdisk_size. I am hoping that this initial patch will satisfy most needs. I agree that changes may need to be made as needs become more specific. > > -- > Darren > >> + >> +IMAGE_CMD_elf () { >> + test -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf&& rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf >> + mkelfImage --kernel=${ELF_KERNEL} --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf --append='${ELF_APPEND}' ${EXTRA_IMAGECMD} >> +} >> + >> UBI_VOLNAME ?= "${MACHINE}-rootfs" >> >> IMAGE_CMD_ubi () { >> @@ -199,6 +213,7 @@ EXTRA_IMAGECMD_ext2 ?= "-i 8192" >> EXTRA_IMAGECMD_ext3 ?= "-i 8192" >> EXTRA_IMAGECMD_ext4 ?= "-i 8192" >> EXTRA_IMAGECMD_btrfs ?= "" >> +EXTRA_IMAGECMD_elf ?= "" >> >> IMAGE_DEPENDS = "" >> IMAGE_DEPENDS_jffs2 = "mtd-utils-native" >> @@ -210,11 +225,12 @@ IMAGE_DEPENDS_ext4 = "genext2fs-native e2fsprogs-native" >> IMAGE_DEPENDS_btrfs = "btrfs-tools-native" >> IMAGE_DEPENDS_squashfs = "squashfs-tools-native" >> IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" >> +IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native" >> IMAGE_DEPENDS_ubi = "mtd-utils-native" >> IMAGE_DEPENDS_ubifs = "mtd-utils-native" >> >> # This variable is available to request which values are suitable for IMAGE_FSTYPES >> -IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk" >> +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf" >> >> COMPRESSIONTYPES = "gz bz2 lzma xz" >> COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}" >> ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2] image_types: Add elf image type 2012-06-27 20:34 ` Raymond Danks @ 2012-06-27 20:43 ` Raymond Danks 2012-06-27 21:32 ` Darren Hart 0 siblings, 1 reply; 25+ messages in thread From: Raymond Danks @ 2012-06-27 20:43 UTC (permalink / raw) To: Darren Hart; +Cc: Patches and discussions about the oe-core layer On 06/27/2012 02:34 PM, Raymond Danks wrote: > Hi Darren, > > Thanks for the feedback. > > On 06/25/2012 10:58 AM, Darren Hart wrote: >> Hi Raymond, >> >> On 06/22/2012 01:22 PM, Raymond Danks wrote: >>> On x86, an ELF image file may be stored as a coreboot payload. >>> The image file is constructed, using the mkelfimage utility, >>> from a kernel and an initrd. >>> >> Is this usable solely as a coreboot payload? >> >> The reason I ask is there have been requests to be able to build the >> kernel+initramfs that the Linux make system supports. The coreboot wiki >> suggests that this may be sufficient in lieu of the mkelfimage format. >> >> http://www.coreboot.org/Mkelfimage >> >> If we can satisfy both goals with one image type, I would prefer we do >> that, at least for the core. > I have not tried this. > > I prefer the mkelfimage mechanism over the linux kernel's mechanism > due to the manner in which the OpenEmbedded build process is laid > out. In my experience, the rootfs/initrd is constructed *after* the > kernel and is not necessarily available for inclusion by the kernel > build. > > Of course, if you have a patch for this, I'd be happy to give that a try. One more point of interest I guess: I was able to boot this elf file using syslinux and mboot.c32. So, depending upon your use case, it may be possible to use this elf file instead of the kernel+initramfs. >>> Signed-off-by: Raymond Danks<ray.danks@se-eng.com> >>> --- >>> This was originally submitted to the openembedded project: >>> http://patches.openembedded.org/patch/7689/ >>> >>> Resubmitting to oe-core for review prior to commit in >>> openembedded-core. >>> >>> meta/classes/image_types.bbclass | 18 +++++++++++++++++- >>> 1 files changed, 17 insertions(+), 1 deletions(-) >>> >>> diff --git a/meta/classes/image_types.bbclass >>> b/meta/classes/image_types.bbclass >>> index 55f122e..bbca20c 100644 >>> --- a/meta/classes/image_types.bbclass >>> +++ b/meta/classes/image_types.bbclass >>> @@ -7,6 +7,12 @@ def get_imagecmds(d): >>> ctypes = d.getVar('COMPRESSIONTYPES', True).split() >>> cimages = {} >>> >>> + if "elf" in alltypes: >>> + alltypes.remove("elf") >>> + if "cpio.gz" not in alltypes: >>> + alltypes.append("cpio.gz") >>> + alltypes.append("elf") >>> + >> What is the goal of this? Do you just need cpio.gz to appear before elf >> in the list? > Yes. The cpio.gz is an input to the mkelfimage command below. >> If so, can that just be checked for at the time of adding >> elf the first time? > Possibly. Can you tell me where this is done? >> >>> # Filter out all the compressed images from types >>> for type in alltypes: >>> basetype = None >>> @@ -173,6 +179,14 @@ IMAGE_CMD_cpio () { >>> cd ${IMAGE_ROOTFS}&& (find . | cpio -o -H >>> newc>${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) >>> } >>> >>> +ELF_KERNEL ?= ${STAGING_DIR_HOST}/kernel/bzImage >> There are various kernel image types. Is the elf format only valid with >> bzImage? > The mkelfimage documentation indicates that bzImage and vmlinux are > supported. I have only worked with bzImage. That said, I agree that > this is more appropriate: > > ELF_KERNEL ?= ${STAGING_DIR_HOST}/kernel/${KERNEL_IMAGETYPE} >> >>> +ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console=" >> We would need to parameterize ramdisk_size. > I am hoping that this initial patch will satisfy most needs. I agree > that changes may need to be made as needs become more specific. >> >> -- >> Darren >> >>> + >>> +IMAGE_CMD_elf () { >>> + test -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf&& rm -f >>> ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf >>> + mkelfImage --kernel=${ELF_KERNEL} >>> --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz >>> --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf >>> --append='${ELF_APPEND}' ${EXTRA_IMAGECMD} >>> +} >>> + >>> UBI_VOLNAME ?= "${MACHINE}-rootfs" >>> >>> IMAGE_CMD_ubi () { >>> @@ -199,6 +213,7 @@ EXTRA_IMAGECMD_ext2 ?= "-i 8192" >>> EXTRA_IMAGECMD_ext3 ?= "-i 8192" >>> EXTRA_IMAGECMD_ext4 ?= "-i 8192" >>> EXTRA_IMAGECMD_btrfs ?= "" >>> +EXTRA_IMAGECMD_elf ?= "" >>> >>> IMAGE_DEPENDS = "" >>> IMAGE_DEPENDS_jffs2 = "mtd-utils-native" >>> @@ -210,11 +225,12 @@ IMAGE_DEPENDS_ext4 = "genext2fs-native >>> e2fsprogs-native" >>> IMAGE_DEPENDS_btrfs = "btrfs-tools-native" >>> IMAGE_DEPENDS_squashfs = "squashfs-tools-native" >>> IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" >>> +IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native" >>> IMAGE_DEPENDS_ubi = "mtd-utils-native" >>> IMAGE_DEPENDS_ubifs = "mtd-utils-native" >>> >>> # This variable is available to request which values are suitable >>> for IMAGE_FSTYPES >>> -IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 >>> ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz >>> tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk" >>> +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 >>> ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz >>> tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf" >>> >>> COMPRESSIONTYPES = "gz bz2 lzma xz" >>> COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}" >>> > ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 1/2] image_types: Add elf image type 2012-06-27 20:43 ` Raymond Danks @ 2012-06-27 21:32 ` Darren Hart 0 siblings, 0 replies; 25+ messages in thread From: Darren Hart @ 2012-06-27 21:32 UTC (permalink / raw) To: ray.danks; +Cc: Patches and discussions about the oe-core layer On 06/27/2012 01:43 PM, Raymond Danks wrote: > On 06/27/2012 02:34 PM, Raymond Danks wrote: >> Hi Darren, >> >> Thanks for the feedback. >> >> On 06/25/2012 10:58 AM, Darren Hart wrote: >>> Hi Raymond, >>> >>> On 06/22/2012 01:22 PM, Raymond Danks wrote: >>>> On x86, an ELF image file may be stored as a coreboot payload. >>>> The image file is constructed, using the mkelfimage utility, >>>> from a kernel and an initrd. >>>> >>> Is this usable solely as a coreboot payload? >>> >>> The reason I ask is there have been requests to be able to build the >>> kernel+initramfs that the Linux make system supports. The coreboot wiki >>> suggests that this may be sufficient in lieu of the mkelfimage format. >>> >>> http://www.coreboot.org/Mkelfimage >>> >>> If we can satisfy both goals with one image type, I would prefer we do >>> that, at least for the core. >> I have not tried this. >> >> I prefer the mkelfimage mechanism over the linux kernel's mechanism >> due to the manner in which the OpenEmbedded build process is laid >> out. In my experience, the rootfs/initrd is constructed *after* the >> kernel and is not necessarily available for inclusion by the kernel >> build. >> >> Of course, if you have a patch for this, I'd be happy to give that a try. > > One more point of interest I guess: > > I was able to boot this elf file using syslinux and mboot.c32. So, > depending upon your use case, it may be possible to use this elf file > instead of the kernel+initramfs. That is excellent news. It is certainly better suited to our workflow than the Linux Kernel mechanism. -- Darren > >>>> Signed-off-by: Raymond Danks<ray.danks@se-eng.com> >>>> --- >>>> This was originally submitted to the openembedded project: >>>> http://patches.openembedded.org/patch/7689/ >>>> >>>> Resubmitting to oe-core for review prior to commit in >>>> openembedded-core. >>>> >>>> meta/classes/image_types.bbclass | 18 +++++++++++++++++- >>>> 1 files changed, 17 insertions(+), 1 deletions(-) >>>> >>>> diff --git a/meta/classes/image_types.bbclass >>>> b/meta/classes/image_types.bbclass >>>> index 55f122e..bbca20c 100644 >>>> --- a/meta/classes/image_types.bbclass >>>> +++ b/meta/classes/image_types.bbclass >>>> @@ -7,6 +7,12 @@ def get_imagecmds(d): >>>> ctypes = d.getVar('COMPRESSIONTYPES', True).split() >>>> cimages = {} >>>> >>>> + if "elf" in alltypes: >>>> + alltypes.remove("elf") >>>> + if "cpio.gz" not in alltypes: >>>> + alltypes.append("cpio.gz") >>>> + alltypes.append("elf") >>>> + >>> What is the goal of this? Do you just need cpio.gz to appear before elf >>> in the list? >> Yes. The cpio.gz is an input to the mkelfimage command below. >>> If so, can that just be checked for at the time of adding >>> elf the first time? >> Possibly. Can you tell me where this is done? >>> >>>> # Filter out all the compressed images from types >>>> for type in alltypes: >>>> basetype = None >>>> @@ -173,6 +179,14 @@ IMAGE_CMD_cpio () { >>>> cd ${IMAGE_ROOTFS}&& (find . | cpio -o -H >>>> newc>${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) >>>> } >>>> >>>> +ELF_KERNEL ?= ${STAGING_DIR_HOST}/kernel/bzImage >>> There are various kernel image types. Is the elf format only valid with >>> bzImage? >> The mkelfimage documentation indicates that bzImage and vmlinux are >> supported. I have only worked with bzImage. That said, I agree that >> this is more appropriate: >> >> ELF_KERNEL ?= ${STAGING_DIR_HOST}/kernel/${KERNEL_IMAGETYPE} >>> >>>> +ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console=" >>> We would need to parameterize ramdisk_size. >> I am hoping that this initial patch will satisfy most needs. I agree >> that changes may need to be made as needs become more specific. >>> >>> -- >>> Darren >>> >>>> + >>>> +IMAGE_CMD_elf () { >>>> + test -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf&& rm -f >>>> ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf >>>> + mkelfImage --kernel=${ELF_KERNEL} >>>> --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz >>>> --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf >>>> --append='${ELF_APPEND}' ${EXTRA_IMAGECMD} >>>> +} >>>> + >>>> UBI_VOLNAME ?= "${MACHINE}-rootfs" >>>> >>>> IMAGE_CMD_ubi () { >>>> @@ -199,6 +213,7 @@ EXTRA_IMAGECMD_ext2 ?= "-i 8192" >>>> EXTRA_IMAGECMD_ext3 ?= "-i 8192" >>>> EXTRA_IMAGECMD_ext4 ?= "-i 8192" >>>> EXTRA_IMAGECMD_btrfs ?= "" >>>> +EXTRA_IMAGECMD_elf ?= "" >>>> >>>> IMAGE_DEPENDS = "" >>>> IMAGE_DEPENDS_jffs2 = "mtd-utils-native" >>>> @@ -210,11 +225,12 @@ IMAGE_DEPENDS_ext4 = "genext2fs-native >>>> e2fsprogs-native" >>>> IMAGE_DEPENDS_btrfs = "btrfs-tools-native" >>>> IMAGE_DEPENDS_squashfs = "squashfs-tools-native" >>>> IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" >>>> +IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native" >>>> IMAGE_DEPENDS_ubi = "mtd-utils-native" >>>> IMAGE_DEPENDS_ubifs = "mtd-utils-native" >>>> >>>> # This variable is available to request which values are suitable >>>> for IMAGE_FSTYPES >>>> -IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 >>>> ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz >>>> tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk" >>>> +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 >>>> ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz >>>> tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf" >>>> >>>> COMPRESSIONTYPES = "gz bz2 lzma xz" >>>> COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}" >>>> >> > -- Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel ^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2012-07-09 19:30 UTC | newest] Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-06-22 20:22 [PATCH 1/2] image_types: Add elf image type Raymond Danks 2012-06-22 20:22 ` [PATCH 2/2] mkelfimage: Add stable git build (initial recipe) Raymond Danks 2012-06-29 12:19 ` Richard Purdie 2012-06-29 15:32 ` Raymond Danks 2012-06-29 15:41 ` [PATCH 1/2 v2] image_types: Add elf image type Raymond Danks 2012-06-29 17:45 ` Darren Hart 2012-06-29 20:01 ` Raymond Danks 2012-06-29 15:41 ` [PATCH 2/2 v2] mkelfimage: Add stable git build (initial recipe) Raymond Danks 2012-06-29 17:47 ` Darren Hart 2012-06-29 20:03 ` Raymond Danks 2012-06-29 20:19 ` [PATCH 1/2 v3] image_types: Add elf image type Raymond Danks 2012-06-30 13:38 ` Darren Hart 2012-07-02 4:22 ` Saul Wold 2012-07-02 15:05 ` Raymond Danks 2012-07-02 16:51 ` Saul Wold 2012-07-02 19:00 ` Raymond Danks 2012-07-02 20:51 ` [PATCH 1/2 v4] " Raymond Danks 2012-07-05 17:35 ` Saul Wold 2012-06-29 20:30 ` [PATCH 2/2 v3] mkelfimage: Add stable git build (initial recipe) Raymond Danks 2012-07-08 21:34 ` [PATCH 2/2] " Saul Wold 2012-07-09 19:20 ` Raymond Danks 2012-06-25 16:58 ` [PATCH 1/2] image_types: Add elf image type Darren Hart 2012-06-27 20:34 ` Raymond Danks 2012-06-27 20:43 ` Raymond Danks 2012-06-27 21:32 ` Darren Hart
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.