diff options
author | cajun-rat <p@beta16.co.uk> | 2017-05-22 08:34:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-22 08:34:20 +0200 |
commit | 7f79a6cd2542bcb01b5232aa7011e78683141d2c (patch) | |
tree | b57f1c89076a32fee4acfdea890a5ae740acfcf2 /classes | |
parent | 108c545b5843ce6a3ed2c7484440c981a3b4a038 (diff) | |
parent | c82a50cbd3814b3d779fdf7e5cb024e2db27e243 (diff) | |
download | meta-updater-7f79a6cd2542bcb01b5232aa7011e78683141d2c.tar.gz |
Merge pull request #61 from advancedtelematic/feat/noop
Make layer inclusion a neutral operation
Diffstat (limited to 'classes')
-rw-r--r-- | classes/sota.bbclass | 38 | ||||
-rw-r--r-- | classes/sota_minnowboard.bbclass | 6 | ||||
-rw-r--r-- | classes/sota_minnowboard_uboot.inc | 8 | ||||
-rw-r--r-- | classes/sota_none.bbclass | 3 | ||||
-rw-r--r-- | classes/sota_qemux86-64.bbclass | 2 | ||||
-rw-r--r-- | classes/sota_raspberrypi.bbclass | 2 |
6 files changed, 32 insertions, 27 deletions
diff --git a/classes/sota.bbclass b/classes/sota.bbclass index a1a5028..6fbba26 100644 --- a/classes/sota.bbclass +++ b/classes/sota.bbclass | |||
@@ -1,19 +1,17 @@ | |||
1 | DISTRO_FEATURES_append = " sota" | 1 | python __anonymous() { |
2 | OVERRIDES .= ":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 | ||
4 | IMAGE_INSTALL_append = " ostree os-release" | 6 | OVERRIDES .= "${@bb.utils.contains('DISTRO_FEATURES', 'sota', ':sota', '', d)}" |
5 | 7 | ||
6 | # live image for OSTree-enabled systems | 8 | IMAGE_INSTALL_append_sota = " ostree os-release" |
7 | IMAGE_CLASSES += "image_types_ostree image_types_ota" | 9 | IMAGE_CLASSES += " image_types_ostree image_types_ota" |
8 | IMAGE_FSTYPES += "ostreepush otaimg" | 10 | IMAGE_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 | 12 | WKS_FILE_sota ?= "sdimage-sota.wks" |
11 | # on machines that don't support updater yet | ||
12 | IMAGE_FSTYPES += "${@' wic' if (d.getVar("IMAGE_BOOT_FILES", True)) else ''}" | ||
13 | WKS_FILE ?= "sdimage-sota.wks" | ||
14 | do_image_wic[depends] += "${IMAGE_BASENAME}:do_image_otaimg" | ||
15 | 13 | ||
16 | EXTRA_IMAGEDEPENDS += " parted-native mtools-native dosfstools-native" | 14 | EXTRA_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 |
19 | OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo" | 17 | OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo" |
@@ -21,12 +19,12 @@ OSTREE_BRANCHNAME ?= "ota-${MACHINE}" | |||
21 | OSTREE_OSNAME ?= "poky" | 19 | OSTREE_OSNAME ?= "poky" |
22 | OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image" | 20 | OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image" |
23 | 21 | ||
24 | SOTA_MACHINE ?= "none" | 22 | SOTA_MACHINE ??="none" |
25 | SOTA_MACHINE_raspberrypi = "raspberrypi" | 23 | SOTA_MACHINE_raspberrypi2 ?= "raspberrypi" |
26 | SOTA_MACHINE_raspberrypi3 = "raspberrypi" | 24 | SOTA_MACHINE_rarpberrypi3 ?= "raspberrypi" |
27 | SOTA_MACHINE_porter = "porter" | 25 | SOTA_MACHINE_porter ?= "porter" |
28 | SOTA_MACHINE_intel-corei7-64 = "minnowboard" | 26 | SOTA_MACHINE_intel-corei7-64 ?= "minnowboard" |
29 | SOTA_MACHINE_qemux86-64 = "qemux86-64" | 27 | SOTA_MACHINE_qemux86-64 ?= "qemux86-64" |
30 | SOTA_MACHINE_qemux86-64 = "qemux86-64" | 28 | SOTA_MACHINE_am335x-evm ?= "am335x-evm-wifi" |
31 | SOTA_MACHINE_am335x-evm = "am335x-evm-wifi" | 29 | |
32 | inherit sota_${SOTA_MACHINE} | 30 | inherit 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 @@ | |||
1 | OSTREE_BOOTLOADER ?= "grub" | 1 | OSTREE_BOOTLOADER ?= "grub" |
2 | EFI_PROVIDER = "grub-efi" | 2 | EFI_PROVIDER_sota = "grub-efi" |
3 | 3 | ||
4 | WKS_FILE = "efiimage-sota.wks" | 4 | WKS_FILE_sota = "efiimage-sota.wks" |
5 | IMAGE_BOOT_FILES = "" | 5 | IMAGE_BOOT_FILES_sota = "" |
6 | 6 | ||
7 | OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 console=ttyS0,115200 console=tty0" | 7 | OSTREE_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 @@ | |||
1 | PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ota" | 1 | PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot-ota" |
2 | UBOOT_MACHINE = "minnowmax_defconfig" | 2 | UBOOT_MACHINE_sota ?= "minnowmax_defconfig" |
3 | 3 | ||
4 | EXTRA_IMAGEDEPENDS_append = " minnowboard-bootfiles" | 4 | EXTRA_IMAGEDEPENDS_append_sota = " minnowboard-bootfiles" |
5 | IMAGE_BOOT_FILES = "minnowboard-bootfiles/*" | 5 | IMAGE_BOOT_FILES_sota ?= "minnowboard-bootfiles/*" |
6 | 6 | ||
7 | OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 ostree_root=/dev/hda console=ttyS0,115200 console=tty0" | 7 | OSTREE_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 |
2 | python __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 |
2 | PREFERRED_VERSION_linux-yocto_qemux86-64_sota = "4.4%" | 2 | PREFERRED_VERSION_linux-yocto_qemux86-64_sota = "4.4%" |
3 | 3 | ||
4 | IMAGE_FSTYPES_remove = "wic" | ||
5 | |||
4 | # U-Boot support for SOTA | 6 | # U-Boot support for SOTA |
5 | PREFERRED_PROVIDER_virtual/bootloader_sota = "u-boot-ota" | 7 | PREFERRED_PROVIDER_virtual/bootloader_sota = "u-boot-ota" |
6 | UBOOT_MACHINE_sota = "qemu-x86_defconfig" | 8 | UBOOT_MACHINE_sota = "qemu-x86_defconfig" |
diff --git a/classes/sota_raspberrypi.bbclass b/classes/sota_raspberrypi.bbclass index 1d23d1f..7b67c0f 100644 --- a/classes/sota_raspberrypi.bbclass +++ b/classes/sota_raspberrypi.bbclass | |||
@@ -4,6 +4,8 @@ IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'rpi-sdimg-ota | |||
4 | ### both rpi-sdimg and rpi-sdimg-ota broken | 4 | ### both rpi-sdimg and rpi-sdimg-ota broken |
5 | IMAGE_FSTYPES += "ext4.xz ext4.bmap tar.xz" | 5 | IMAGE_FSTYPES += "ext4.xz ext4.bmap tar.xz" |
6 | 6 | ||
7 | IMAGE_FSTYPES_remove = "wic" | ||
8 | |||
7 | KERNEL_IMAGETYPE_sota = "uImage" | 9 | KERNEL_IMAGETYPE_sota = "uImage" |
8 | PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot" | 10 | PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot" |
9 | UBOOT_MACHINE_raspberrypi2_sota ?= "rpi_2_defconfig" | 11 | UBOOT_MACHINE_raspberrypi2_sota ?= "rpi_2_defconfig" |