diff options
author | Raymond Danks <ray.danks@se-eng.com> | 2012-07-02 14:51:25 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-04 17:40:35 +0100 |
commit | c9b01af84b64edba056f959c349895e0698324e6 (patch) | |
tree | 839079c85c788a40419bd245caff54c662398c5a /meta/classes | |
parent | 0a1d5f59773228c17c1872c42f2ce3ad15b521bc (diff) | |
download | poky-c9b01af84b64edba056f959c349895e0698324e6.tar.gz |
image_types: Add elf image type
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.
(From OE-Core rev: 93e9de4e27919f59b6783d53f314df6e49ccb436)
Signed-off-by: Raymond Danks <ray.danks@se-eng.com>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | 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 55f122eb8c..5734edfb22 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass | |||
@@ -7,6 +7,12 @@ def get_imagecmds(d): | |||
7 | ctypes = d.getVar('COMPRESSIONTYPES', True).split() | 7 | ctypes = d.getVar('COMPRESSIONTYPES', True).split() |
8 | cimages = {} | 8 | cimages = {} |
9 | 9 | ||
10 | if "elf" in alltypes: | ||
11 | alltypes.remove("elf") | ||
12 | if "cpio.gz" not in alltypes: | ||
13 | alltypes.append("cpio.gz") | ||
14 | alltypes.append("elf") | ||
15 | |||
10 | # Filter out all the compressed images from types | 16 | # Filter out all the compressed images from types |
11 | for type in alltypes: | 17 | for type in alltypes: |
12 | basetype = None | 18 | basetype = None |
@@ -173,6 +179,14 @@ IMAGE_CMD_cpio () { | |||
173 | cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) | 179 | cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) |
174 | } | 180 | } |
175 | 181 | ||
182 | ELF_KERNEL ?= "${STAGING_DIR_HOST}/kernel/${KERNEL_IMAGETYPE}" | ||
183 | ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console=" | ||
184 | |||
185 | IMAGE_CMD_elf () { | ||
186 | test -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf && rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf | ||
187 | 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} | ||
188 | } | ||
189 | |||
176 | UBI_VOLNAME ?= "${MACHINE}-rootfs" | 190 | UBI_VOLNAME ?= "${MACHINE}-rootfs" |
177 | 191 | ||
178 | IMAGE_CMD_ubi () { | 192 | IMAGE_CMD_ubi () { |
@@ -199,6 +213,7 @@ EXTRA_IMAGECMD_ext2 ?= "-i 8192" | |||
199 | EXTRA_IMAGECMD_ext3 ?= "-i 8192" | 213 | EXTRA_IMAGECMD_ext3 ?= "-i 8192" |
200 | EXTRA_IMAGECMD_ext4 ?= "-i 8192" | 214 | EXTRA_IMAGECMD_ext4 ?= "-i 8192" |
201 | EXTRA_IMAGECMD_btrfs ?= "" | 215 | EXTRA_IMAGECMD_btrfs ?= "" |
216 | EXTRA_IMAGECMD_elf ?= "" | ||
202 | 217 | ||
203 | IMAGE_DEPENDS = "" | 218 | IMAGE_DEPENDS = "" |
204 | IMAGE_DEPENDS_jffs2 = "mtd-utils-native" | 219 | IMAGE_DEPENDS_jffs2 = "mtd-utils-native" |
@@ -210,11 +225,12 @@ IMAGE_DEPENDS_ext4 = "genext2fs-native e2fsprogs-native" | |||
210 | IMAGE_DEPENDS_btrfs = "btrfs-tools-native" | 225 | IMAGE_DEPENDS_btrfs = "btrfs-tools-native" |
211 | IMAGE_DEPENDS_squashfs = "squashfs-tools-native" | 226 | IMAGE_DEPENDS_squashfs = "squashfs-tools-native" |
212 | IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" | 227 | IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" |
228 | IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native" | ||
213 | IMAGE_DEPENDS_ubi = "mtd-utils-native" | 229 | IMAGE_DEPENDS_ubi = "mtd-utils-native" |
214 | IMAGE_DEPENDS_ubifs = "mtd-utils-native" | 230 | IMAGE_DEPENDS_ubifs = "mtd-utils-native" |
215 | 231 | ||
216 | # This variable is available to request which values are suitable for IMAGE_FSTYPES | 232 | # This variable is available to request which values are suitable for IMAGE_FSTYPES |
217 | 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" | 233 | 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" |
218 | 234 | ||
219 | COMPRESSIONTYPES = "gz bz2 lzma xz" | 235 | COMPRESSIONTYPES = "gz bz2 lzma xz" |
220 | COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}" | 236 | COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}" |