meta-digi-dey: swupdate: add recipes for update packages

These recipes allow to generate the .swu update packages to be used with
SWUpdate. The packages can be generated using:

bitbake dey-image-qt-swu
bitbake core-image-base-swu

https://jira.digi.com/browse/DEL-3272

Signed-off-by: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>
This commit is contained in:
Diaz de Grenu, Jose 2016-12-22 16:06:45 +01:00
parent 96f6849668
commit dacfe128b6
4 changed files with 100 additions and 0 deletions

View File

@ -0,0 +1,33 @@
# Copyright (C) 2016 Digi International.
SUMMARY = "Generate update package for SWUpdate"
SECTION = "base"
LICENSE = "GPL-2.0"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
SRC_URI = "file://sw-description"
inherit swupdate
IMAGE_DEPENDS = "core-image-base"
SWUPDATE_IMAGES = "core-image-base"
SOFTWARE_VERSION ?= "0.0.1"
BOOTFS_EXT ?= ".boot.vfat"
BOOTFS_EXT_ccimx6ul ?= ".boot.ubifs"
ROOTFS_EXT ?= ".ext4"
ROOTFS_EXT_ccimx6ul ?= ".ubifs"
python () {
img_fstypes = d.getVar('BOOTFS_EXT', True) + " " + d.getVar('ROOTFS_EXT', True)
d.setVarFlag("SWUPDATE_IMAGES_FSTYPES", "core-image-base", img_fstypes)
}
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,##ROOTIMG_NAME##,core-image-base-${MACHINE}${ROOTFS_EXT},g" "${WORKDIR}/sw-description"
sed -i -e "s,##SW_VERSION##,${SOFTWARE_VERSION},g" "${WORKDIR}/sw-description"
}

View File

@ -0,0 +1,33 @@
# Copyright (C) 2016 Digi International.
SUMMARY = "Generate update package for SWUpdate"
SECTION = "base"
LICENSE = "GPL-2.0"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
SRC_URI = "file://sw-description"
inherit swupdate
IMAGE_DEPENDS = "dey-image-qt"
SWUPDATE_IMAGES = "dey-image-qt-${GRAPHICAL_BACKEND}"
SOFTWARE_VERSION ?= "0.0.1"
BOOTFS_EXT ?= ".boot.vfat"
BOOTFS_EXT_ccimx6ul ?= ".boot.ubifs"
ROOTFS_EXT ?= ".ext4"
ROOTFS_EXT_ccimx6ul ?= ".ubifs"
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)
}
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,##ROOTIMG_NAME##,dey-image-qt-${GRAPHICAL_BACKEND}-${MACHINE}${ROOTFS_EXT},g" "${WORKDIR}/sw-description"
sed -i -e "s,##SW_VERSION##,${SOFTWARE_VERSION},g" "${WORKDIR}/sw-description"
}

View File

@ -0,0 +1,17 @@
software =
{
version = "##SW_VERSION##";
images: (
{
filename = "##BOOTIMG_NAME##";
device = "/dev/mmcblk0p1";
types = "raw";
},
{
filename = "##ROOTIMG_NAME##";
device = "/dev/mmcblk0p3";
types = "raw";
}
);
}

View File

@ -0,0 +1,17 @@
software =
{
version = "##SW_VERSION##";
images: (
{
filename = "##BOOTIMG_NAME##";
volume = "linux";
type = "ubivol"
},
{
filename = "##ROOTIMG_NAME##";
volume = "rootfs";
type = "ubivol"
}
);
}