summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/image_types_ota.bbclass4
-rw-r--r--classes/sdcard_image-rpi-ota.bbclass1
-rw-r--r--classes/sota.bbclass41
-rw-r--r--classes/sota_minnowboard.bbclass6
-rw-r--r--classes/sota_minnowboard_uboot.inc8
-rw-r--r--classes/sota_none.bbclass3
-rw-r--r--classes/sota_qemux86-64.bbclass2
-rw-r--r--classes/sota_raspberrypi.bbclass3
8 files changed, 38 insertions, 30 deletions
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass
index cb71899..8108d51 100644
--- a/classes/image_types_ota.bbclass
+++ b/classes/image_types_ota.bbclass
@@ -98,7 +98,11 @@ IMAGE_CMD_otaimg () {
98 HOME_TMP=`mktemp -d ${WORKDIR}/home-tmp-XXXXX` 98 HOME_TMP=`mktemp -d ${WORKDIR}/home-tmp-XXXXX`
99 tar --xattrs --xattrs-include='*' -C ${HOME_TMP} -xf ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.ostree.tar.bz2 ./usr/homedirs ./var/sota || true 99 tar --xattrs --xattrs-include='*' -C ${HOME_TMP} -xf ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.ostree.tar.bz2 ./usr/homedirs ./var/sota || true
100 mv ${HOME_TMP}/var/sota ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/ || true 100 mv ${HOME_TMP}/var/sota ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/ || true
101 # Create /var/sota if it doesn't exist yet
102 mkdir -p ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota || true
101 mv ${HOME_TMP}/usr/homedirs/home ${PHYS_SYSROOT}/ || true 103 mv ${HOME_TMP}/usr/homedirs/home ${PHYS_SYSROOT}/ || true
104 # Ensure that /var/local exists (AGL symlinks /usr/local to /var/local)
105 install -d ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/local
102 rm -rf ${HOME_TMP} 106 rm -rf ${HOME_TMP}
103 107
104 # Calculate image type 108 # Calculate image type
diff --git a/classes/sdcard_image-rpi-ota.bbclass b/classes/sdcard_image-rpi-ota.bbclass
index f5c35a2..9022aaf 100644
--- a/classes/sdcard_image-rpi-ota.bbclass
+++ b/classes/sdcard_image-rpi-ota.bbclass
@@ -35,6 +35,7 @@ KERNEL_INITRAMFS ?= ""
35# Kernel image name 35# Kernel image name
36SDIMG_OTA_KERNELIMAGE_raspberrypi ?= "kernel.img" 36SDIMG_OTA_KERNELIMAGE_raspberrypi ?= "kernel.img"
37SDIMG_OTA_KERNELIMAGE_raspberrypi2 ?= "kernel7.img" 37SDIMG_OTA_KERNELIMAGE_raspberrypi2 ?= "kernel7.img"
38SDIMG_OTA_KERNELIMAGE_raspberrypi3 ?= "kernel7.img"
38 39
39# Boot partition volume id 40# Boot partition volume id
40BOOTDD_VOLUME_ID ?= "${MACHINE}" 41BOOTDD_VOLUME_ID ?= "${MACHINE}"
diff --git a/classes/sota.bbclass b/classes/sota.bbclass
index a1a5028..d786b69 100644
--- a/classes/sota.bbclass
+++ b/classes/sota.bbclass
@@ -1,32 +1,31 @@
1DISTRO_FEATURES_append = " sota" 1python __anonymous() {
2OVERRIDES .= ":sota" 2 if bb.utils.contains('DISTRO_FEATURES', 'sota', True, False, d):
3 d.appendVarFlag("do_image_wic", "depends", " %s:do_image_otaimg" % d.getVar("IMAGE_BASENAME", True))
4}
3 5
4IMAGE_INSTALL_append = " ostree os-release" 6OVERRIDES .= "${@bb.utils.contains('DISTRO_FEATURES', 'sota', ':sota', '', d)}"
5 7
6# live image for OSTree-enabled systems 8IMAGE_INSTALL_append_sota = " ostree os-release"
7IMAGE_CLASSES += "image_types_ostree image_types_ota" 9IMAGE_CLASSES += " image_types_ostree image_types_ota"
8IMAGE_FSTYPES += "ostreepush otaimg" 10IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'ostreepush otaimg wic', ' ', d)}"
9 11
10# if don't build wic image unless IMAGE_BOOT_FILES is set. Prevents build from failing 12WKS_FILE_sota ?= "sdimage-sota.wks"
11# on machines that don't support updater yet
12IMAGE_FSTYPES += "${@' wic' if (d.getVar("IMAGE_BOOT_FILES", True)) else ''}"
13WKS_FILE ?= "sdimage-sota.wks"
14do_image_wic[depends] += "${IMAGE_BASENAME}:do_image_otaimg"
15 13
16EXTRA_IMAGEDEPENDS += " parted-native mtools-native dosfstools-native" 14EXTRA_IMAGEDEPENDS_append_sota = " parted-native mtools-native dosfstools-native"
17 15
18# Please redefine OSTREE_REPO in order to have a persistent OSTree repo 16# Please redefine OSTREE_REPO in order to have a persistent OSTree repo
19OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo" 17OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo"
20OSTREE_BRANCHNAME ?= "ota-${MACHINE}" 18# For UPTANE operation, OSTREE_BRANCHNAME must start with "${MACHINE}-"
19OSTREE_BRANCHNAME ?= "${MACHINE}-ota"
21OSTREE_OSNAME ?= "poky" 20OSTREE_OSNAME ?= "poky"
22OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image" 21OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image"
23 22
24SOTA_MACHINE ?= "none" 23SOTA_MACHINE ??="none"
25SOTA_MACHINE_raspberrypi = "raspberrypi" 24SOTA_MACHINE_raspberrypi2 ?= "raspberrypi"
26SOTA_MACHINE_raspberrypi3 = "raspberrypi" 25SOTA_MACHINE_raspberrypi3 ?= "raspberrypi"
27SOTA_MACHINE_porter = "porter" 26SOTA_MACHINE_porter ?= "porter"
28SOTA_MACHINE_intel-corei7-64 = "minnowboard" 27SOTA_MACHINE_intel-corei7-64 ?= "minnowboard"
29SOTA_MACHINE_qemux86-64 = "qemux86-64" 28SOTA_MACHINE_qemux86-64 ?= "qemux86-64"
30SOTA_MACHINE_qemux86-64 = "qemux86-64" 29SOTA_MACHINE_am335x-evm ?= "am335x-evm-wifi"
31SOTA_MACHINE_am335x-evm = "am335x-evm-wifi" 30
32inherit sota_${SOTA_MACHINE} 31inherit sota_${SOTA_MACHINE}
diff --git a/classes/sota_minnowboard.bbclass b/classes/sota_minnowboard.bbclass
index 970bd6a..8417348 100644
--- a/classes/sota_minnowboard.bbclass
+++ b/classes/sota_minnowboard.bbclass
@@ -1,7 +1,7 @@
1OSTREE_BOOTLOADER ?= "grub" 1OSTREE_BOOTLOADER ?= "grub"
2EFI_PROVIDER = "grub-efi" 2EFI_PROVIDER_sota = "grub-efi"
3 3
4WKS_FILE = "efiimage-sota.wks" 4WKS_FILE_sota = "efiimage-sota.wks"
5IMAGE_BOOT_FILES = "" 5IMAGE_BOOT_FILES_sota = ""
6 6
7OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 console=ttyS0,115200 console=tty0" 7OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 console=ttyS0,115200 console=tty0"
diff --git a/classes/sota_minnowboard_uboot.inc b/classes/sota_minnowboard_uboot.inc
index 5097e9d..85d6a60 100644
--- a/classes/sota_minnowboard_uboot.inc
+++ b/classes/sota_minnowboard_uboot.inc
@@ -1,8 +1,8 @@
1PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ota" 1PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot-ota"
2UBOOT_MACHINE = "minnowmax_defconfig" 2UBOOT_MACHINE_sota ?= "minnowmax_defconfig"
3 3
4EXTRA_IMAGEDEPENDS_append = " minnowboard-bootfiles" 4EXTRA_IMAGEDEPENDS_append_sota = " minnowboard-bootfiles"
5IMAGE_BOOT_FILES = "minnowboard-bootfiles/*" 5IMAGE_BOOT_FILES_sota ?= "minnowboard-bootfiles/*"
6 6
7OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 ostree_root=/dev/hda console=ttyS0,115200 console=tty0" 7OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 ostree_root=/dev/hda console=ttyS0,115200 console=tty0"
8 8
diff --git a/classes/sota_none.bbclass b/classes/sota_none.bbclass
index dc72a07..86eaf0b 100644
--- a/classes/sota_none.bbclass
+++ b/classes/sota_none.bbclass
@@ -1 +1,4 @@
1# null machine it's here to make bitbake happy when SOTA_MACHINE is undefined 1# null machine it's here to make bitbake happy when SOTA_MACHINE is undefined
2python __anonymous() {
3 bb.warn("SOTA functionality is not yet supported for your machine")
4}
diff --git a/classes/sota_qemux86-64.bbclass b/classes/sota_qemux86-64.bbclass
index 533c11c..5ec4f69 100644
--- a/classes/sota_qemux86-64.bbclass
+++ b/classes/sota_qemux86-64.bbclass
@@ -1,6 +1,8 @@
1# See https://advancedtelematic.atlassian.net/browse/PRO-2693 1# See https://advancedtelematic.atlassian.net/browse/PRO-2693
2PREFERRED_VERSION_linux-yocto_qemux86-64_sota = "4.4%" 2PREFERRED_VERSION_linux-yocto_qemux86-64_sota = "4.4%"
3 3
4IMAGE_FSTYPES_remove = "wic"
5
4# U-Boot support for SOTA 6# U-Boot support for SOTA
5PREFERRED_PROVIDER_virtual/bootloader_sota = "u-boot-ota" 7PREFERRED_PROVIDER_virtual/bootloader_sota = "u-boot-ota"
6UBOOT_MACHINE_sota = "qemu-x86_defconfig" 8UBOOT_MACHINE_sota = "qemu-x86_defconfig"
diff --git a/classes/sota_raspberrypi.bbclass b/classes/sota_raspberrypi.bbclass
index 1d23d1f..b6cf639 100644
--- a/classes/sota_raspberrypi.bbclass
+++ b/classes/sota_raspberrypi.bbclass
@@ -1,8 +1,7 @@
1IMAGE_CLASSES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'image_types_uboot sdcard_image-rpi-ota', '', d)}" 1IMAGE_CLASSES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'image_types_uboot sdcard_image-rpi-ota', '', d)}"
2IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'rpi-sdimg-ota', 'rpi-sdimg', d)}" 2IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'rpi-sdimg-ota', 'rpi-sdimg', d)}"
3 3
4### both rpi-sdimg and rpi-sdimg-ota broken 4IMAGE_FSTYPES_remove = "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'wic rpi-sdimg', '', d)}"
5IMAGE_FSTYPES += "ext4.xz ext4.bmap tar.xz"
6 5
7KERNEL_IMAGETYPE_sota = "uImage" 6KERNEL_IMAGETYPE_sota = "uImage"
8PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot" 7PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot"