summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/image_types.bbclass18
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
182ELF_KERNEL ?= "${STAGING_DIR_HOST}/kernel/${KERNEL_IMAGETYPE}"
183ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console="
184
185IMAGE_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
176UBI_VOLNAME ?= "${MACHINE}-rootfs" 190UBI_VOLNAME ?= "${MACHINE}-rootfs"
177 191
178IMAGE_CMD_ubi () { 192IMAGE_CMD_ubi () {
@@ -199,6 +213,7 @@ EXTRA_IMAGECMD_ext2 ?= "-i 8192"
199EXTRA_IMAGECMD_ext3 ?= "-i 8192" 213EXTRA_IMAGECMD_ext3 ?= "-i 8192"
200EXTRA_IMAGECMD_ext4 ?= "-i 8192" 214EXTRA_IMAGECMD_ext4 ?= "-i 8192"
201EXTRA_IMAGECMD_btrfs ?= "" 215EXTRA_IMAGECMD_btrfs ?= ""
216EXTRA_IMAGECMD_elf ?= ""
202 217
203IMAGE_DEPENDS = "" 218IMAGE_DEPENDS = ""
204IMAGE_DEPENDS_jffs2 = "mtd-utils-native" 219IMAGE_DEPENDS_jffs2 = "mtd-utils-native"
@@ -210,11 +225,12 @@ IMAGE_DEPENDS_ext4 = "genext2fs-native e2fsprogs-native"
210IMAGE_DEPENDS_btrfs = "btrfs-tools-native" 225IMAGE_DEPENDS_btrfs = "btrfs-tools-native"
211IMAGE_DEPENDS_squashfs = "squashfs-tools-native" 226IMAGE_DEPENDS_squashfs = "squashfs-tools-native"
212IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" 227IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native"
228IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native"
213IMAGE_DEPENDS_ubi = "mtd-utils-native" 229IMAGE_DEPENDS_ubi = "mtd-utils-native"
214IMAGE_DEPENDS_ubifs = "mtd-utils-native" 230IMAGE_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
217IMAGE_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" 233IMAGE_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
219COMPRESSIONTYPES = "gz bz2 lzma xz" 235COMPRESSIONTYPES = "gz bz2 lzma xz"
220COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}" 236COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}"