diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/image_types_ota.bbclass | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass index a67cc80..9820724 100644 --- a/classes/image_types_ota.bbclass +++ b/classes/image_types_ota.bbclass | |||
@@ -1,6 +1,6 @@ | |||
1 | # Image to use with u-boot as BIOS and OSTree deployment system | 1 | # Image to use with u-boot as BIOS and OSTree deployment system |
2 | 2 | ||
3 | inherit image_types | 3 | #inherit image_types |
4 | 4 | ||
5 | # Boot filesystem size in MiB | 5 | # Boot filesystem size in MiB |
6 | # OSTree updates may require some space on boot file system for | 6 | # OSTree updates may require some space on boot file system for |
@@ -9,12 +9,15 @@ inherit image_types | |||
9 | BOOTFS_EXTRA_SIZE ?= "512" | 9 | BOOTFS_EXTRA_SIZE ?= "512" |
10 | export BOOTFS_EXTRA_SIZE | 10 | export BOOTFS_EXTRA_SIZE |
11 | 11 | ||
12 | IMAGE_TYPES += " otaimg" | 12 | do_otaimg[depends] += "e2fsprogs-native:do_populate_sysroot \ |
13 | IMAGE_DEPENDS_ota = "e2fsprogs-native \ | 13 | parted-native:do_populate_sysroot \ |
14 | virtual/bootloader \ | 14 | virtual/kernel:do_deploy \ |
15 | virtual/kernel \ | 15 | ${INITRD_IMAGE}:do_rootfs \ |
16 | parted-native \ | 16 | ${PN}:do_rootfs" |
17 | ${INITRD_IMAGE}" | 17 | |
18 | ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.ext4" | ||
19 | INITRD_IMAGE ?= "core-image-minimal-initramfs" | ||
20 | INITRD ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}-${MACHINE}.cpio.gz" | ||
18 | 21 | ||
19 | build_bootfs () { | 22 | build_bootfs () { |
20 | KERNEL_FILE=${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} | 23 | KERNEL_FILE=${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} |
@@ -36,7 +39,7 @@ build_bootfs () { | |||
36 | rm -rf $BOOTTMP | 39 | rm -rf $BOOTTMP |
37 | } | 40 | } |
38 | 41 | ||
39 | IMAGE_CMD_otaimg () { | 42 | do_otaimg () { |
40 | BOOTIMG=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaboot.ext4 | 43 | BOOTIMG=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaboot.ext4 |
41 | rm -f $BOOTIMG | 44 | rm -f $BOOTIMG |
42 | build_bootfs $BOOTIMG | 45 | build_bootfs $BOOTIMG |
@@ -70,4 +73,8 @@ IMAGE_CMD_otaimg () { | |||
70 | ln -s ${IMAGE_NAME}.otaimg ${IMAGE_LINK_NAME}.otaimg | 73 | ln -s ${IMAGE_NAME}.otaimg ${IMAGE_LINK_NAME}.otaimg |
71 | } | 74 | } |
72 | 75 | ||
76 | addtask otaimg before do_build | ||
77 | |||
78 | IMAGE_TYPES += " otaimg" | ||
79 | IMAGE_TYPES_MASKED += "otaimg" | ||
73 | IMAGE_TYPEDEP_otaimg = "ext4" | 80 | IMAGE_TYPEDEP_otaimg = "ext4" |