@@ -156,6 +156,19 @@ IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_
EXTRA_IMAGECMD = ""
+FASTBOOT_PARTITION_SIZE ?= "16384"
+
+IMAGE_CMD_ext4.fastboot () {
+ if [ ${ROOTFS_SIZE} -lt ${FASTBOOT_PARTITION_SIZE} ]; then
+ make_ext4fs -l `expr ${FASTBOOT_PARTITION_SIZE} \* 1024` \
+ ${EXTRA_IMAGECMD} \
+ ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext4.fastboot \
+ ${IMAGE_ROOTFS}
+ else
+ bbfatal "Rootfs is too small for partition (Rootfs Actual Size: ${ROOTFS_SIZE}, Partition size: ${FASTBOOT_PARTITION_SIZE})"
+ fi
+}
+
inherit siteinfo
JFFS2_ENDIANNESS ?= "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-l', '-b', d)}"
JFFS2_ERASEBLOCK ?= "0x40000"
@@ -167,6 +180,7 @@ EXTRA_IMAGECMD_ext3 ?= "-i 4096"
EXTRA_IMAGECMD_ext4 ?= "-i 4096"
EXTRA_IMAGECMD_btrfs ?= ""
EXTRA_IMAGECMD_elf ?= ""
+EXTRA_IMAGECMD_ext4.fastboot ?= "-s -b 4096"
IMAGE_DEPENDS = ""
IMAGE_DEPENDS_jffs2 = "mtd-utils-native"
@@ -182,6 +196,7 @@ IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native"
IMAGE_DEPENDS_ubi = "mtd-utils-native"
IMAGE_DEPENDS_ubifs = "mtd-utils-native"
IMAGE_DEPENDS_multiubi = "mtd-utils-native"
+IMAGE_DEPENDS_ext4.fastboot = "android-tools-native"
# This variable is available to request which values are suitable for IMAGE_FSTYPES
IMAGE_TYPES = " \
@@ -201,6 +216,7 @@ IMAGE_TYPES = " \
vdi \
qcow2 \
elf \
+ ext4.fastboot \
"
COMPRESSIONTYPES = "gz bz2 lzma xz lz4 sum"
Fastboot images are images that can be flashed using the fastboot protocol implemented in many popular bootloader for SBCs or even real world products (such as Android phones and tablets). This image type was implemented in meta-smartphone, and is being moved in oe-core. Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> --- meta/classes/image_types.bbclass | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)