diff --git a/meta-digi-dey/recipes-digi/swu-images/core-image-base-swu.bb b/meta-digi-dey/recipes-digi/swu-images/core-image-base-swu.bb index fbfb9f967..e877639bf 100644 --- a/meta-digi-dey/recipes-digi/swu-images/core-image-base-swu.bb +++ b/meta-digi-dey/recipes-digi/swu-images/core-image-base-swu.bb @@ -1,4 +1,4 @@ -# Copyright (C) 2016 Digi International. +# Copyright (C) 2016, 2017 Digi International Inc. SUMMARY = "Generate update package for SWUpdate" SECTION = "base" LICENSE = "GPL-2.0" @@ -19,6 +19,14 @@ BOOTFS_EXT_ccimx6ul ?= ".boot.ubifs" ROOTFS_EXT ?= ".ext4" ROOTFS_EXT_ccimx6ul ?= ".ubifs" +BOOT_DEV_NAME ?= "/dev/mmcblk0p1" +BOOT_DEV_NAME_ccimx6ul ?= "linux" +ROOTFS_DEV_NAME ?= "/dev/mmcblk0p3" +ROOTFS_DEV_NAME_ccimx6ul ?= "rootfs" +ROOTFS_ENC_DEV = "/dev/mapper/cryptroot" +ROOTFS_ENC_DEV_ccimx6ul = "${ROOTFS_DEV_NAME}" +ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_INITRAMFS_IMAGE', True), '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}" + python () { img_fstypes = d.getVar('BOOTFS_EXT', True) + " " + d.getVar('ROOTFS_EXT', True) d.setVarFlag("SWUPDATE_IMAGES_FSTYPES", "core-image-base", img_fstypes) @@ -28,6 +36,8 @@ do_unpack[postfuncs] += "fill_description" fill_description() { sed -i -e "s,##BOOTIMG_NAME##,core-image-base-${MACHINE}${BOOTFS_EXT},g" "${WORKDIR}/sw-description" + sed -i -e "s,##BOOT_DEV##,${BOOT_DEV_NAME},g" "${WORKDIR}/sw-description" sed -i -e "s,##ROOTIMG_NAME##,core-image-base-${MACHINE}${ROOTFS_EXT},g" "${WORKDIR}/sw-description" + sed -i -e "s,##ROOTFS_DEV##,${ROOTFS_DEV_NAME_FINAL},g" "${WORKDIR}/sw-description" sed -i -e "s,##SW_VERSION##,${SOFTWARE_VERSION},g" "${WORKDIR}/sw-description" } diff --git a/meta-digi-dey/recipes-digi/swu-images/dey-image-qt-swu.bb b/meta-digi-dey/recipes-digi/swu-images/dey-image-qt-swu.bb index 7932c1949..6bf4a1c11 100644 --- a/meta-digi-dey/recipes-digi/swu-images/dey-image-qt-swu.bb +++ b/meta-digi-dey/recipes-digi/swu-images/dey-image-qt-swu.bb @@ -1,4 +1,4 @@ -# Copyright (C) 2016 Digi International. +# Copyright (C) 2016, 2017 Digi International Inc. SUMMARY = "Generate update package for SWUpdate" SECTION = "base" LICENSE = "GPL-2.0" @@ -19,6 +19,14 @@ BOOTFS_EXT_ccimx6ul ?= ".boot.ubifs" ROOTFS_EXT ?= ".ext4" ROOTFS_EXT_ccimx6ul ?= ".ubifs" +BOOT_DEV_NAME ?= "/dev/mmcblk0p1" +BOOT_DEV_NAME_ccimx6ul ?= "linux" +ROOTFS_DEV_NAME ?= "/dev/mmcblk0p3" +ROOTFS_DEV_NAME_ccimx6ul ?= "rootfs" +ROOTFS_ENC_DEV = "/dev/mapper/cryptroot" +ROOTFS_ENC_DEV_ccimx6ul = "${ROOTFS_DEV_NAME}" +ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_INITRAMFS_IMAGE', True), '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}" + python () { img_fstypes = d.getVar('BOOTFS_EXT', True) + " " + d.getVar('ROOTFS_EXT', True) d.setVarFlag("SWUPDATE_IMAGES_FSTYPES", "dey-image-qt-" + d.getVar('GRAPHICAL_BACKEND', True), img_fstypes) @@ -28,6 +36,8 @@ do_unpack[postfuncs] += "fill_description" fill_description() { sed -i -e "s,##BOOTIMG_NAME##,dey-image-qt-${GRAPHICAL_BACKEND}-${MACHINE}${BOOTFS_EXT},g" "${WORKDIR}/sw-description" + sed -i -e "s,##BOOT_DEV##,${BOOT_DEV_NAME},g" "${WORKDIR}/sw-description" sed -i -e "s,##ROOTIMG_NAME##,dey-image-qt-${GRAPHICAL_BACKEND}-${MACHINE}${ROOTFS_EXT},g" "${WORKDIR}/sw-description" + sed -i -e "s,##ROOTFS_DEV##,${ROOTFS_DEV_NAME_FINAL},g" "${WORKDIR}/sw-description" sed -i -e "s,##SW_VERSION##,${SOFTWARE_VERSION},g" "${WORKDIR}/sw-description" } diff --git a/meta-digi-dey/recipes-digi/swu-images/files/ccimx6/sw-description b/meta-digi-dey/recipes-digi/swu-images/files/ccimx6/sw-description index 5bc0ea016..4f4884b62 100644 --- a/meta-digi-dey/recipes-digi/swu-images/files/ccimx6/sw-description +++ b/meta-digi-dey/recipes-digi/swu-images/files/ccimx6/sw-description @@ -5,13 +5,13 @@ software = images: ( { filename = "##BOOTIMG_NAME##"; - device = "/dev/mmcblk0p1"; + device = "##BOOT_DEV##"; type = "raw"; sha256 = "@##BOOTIMG_NAME##"; }, { filename = "##ROOTIMG_NAME##"; - device = "/dev/mmcblk0p3"; + device = "##ROOTFS_DEV##"; type = "raw"; sha256 = "@##ROOTIMG_NAME##"; } diff --git a/meta-digi-dey/recipes-digi/swu-images/files/ccimx6ul/sw-description b/meta-digi-dey/recipes-digi/swu-images/files/ccimx6ul/sw-description index fc1efe15c..c0754e389 100644 --- a/meta-digi-dey/recipes-digi/swu-images/files/ccimx6ul/sw-description +++ b/meta-digi-dey/recipes-digi/swu-images/files/ccimx6ul/sw-description @@ -5,13 +5,13 @@ software = images: ( { filename = "##BOOTIMG_NAME##"; - volume = "linux"; + volume = "##BOOT_DEV##"; type = "ubivol" sha256 = "@##BOOTIMG_NAME##"; }, { filename = "##ROOTIMG_NAME##"; - volume = "rootfs"; + volume = "##ROOTFS_DEV##"; type = "ubivol" sha256 = "@##ROOTIMG_NAME##"; }