summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorcajun-rat <p@beta16.co.uk>2017-04-26 12:36:38 +0200
committerGitHub <noreply@github.com>2017-04-26 12:36:38 +0200
commitbae52014b6e3a49e7adf49373238dab9f5f3b4a2 (patch)
tree4c2f39cc49525698ef8197646bd652db270df8b8 /classes
parent4ebfc44b3eff288b8cc2f6b2b4251159cbeab14b (diff)
parent4d610e9f230dd23589b18588446c2368f3a99446 (diff)
downloadmeta-updater-bae52014b6e3a49e7adf49373238dab9f5f3b4a2.tar.gz
Merge pull request #57 from advancedtelematic/bugfix/machinc
Replace includes with bblcasses
Diffstat (limited to 'classes')
-rw-r--r--classes/sota.bbclass33
-rw-r--r--classes/sota_bleeding.inc1
-rw-r--r--classes/sota_minnowboard.bbclass7
-rw-r--r--classes/sota_minnowboard_uboot.inc8
-rw-r--r--classes/sota_none.bbclass1
-rw-r--r--classes/sota_porter.bbclass10
-rw-r--r--classes/sota_qemux86-64.bbclass9
-rw-r--r--classes/sota_raspberrypi.bbclass12
8 files changed, 81 insertions, 0 deletions
diff --git a/classes/sota.bbclass b/classes/sota.bbclass
new file mode 100644
index 0000000..0697932
--- /dev/null
+++ b/classes/sota.bbclass
@@ -0,0 +1,33 @@
1DISTRO_FEATURES_append = " sota"
2OVERRIDES .= ":sota"
3
4IMAGE_INSTALL_append = " ostree os-release"
5
6# live image for OSTree-enabled systems
7IMAGE_CLASSES += "image_types_ostree image_types_ota"
8IMAGE_FSTYPES += "ostreepush otaimg"
9
10# if don't build wic image unless IMAGE_BOOT_FILES is set. Prevents build from failing
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
16EXTRA_IMAGEDEPENDS += " parted-native mtools-native dosfstools-native"
17
18# Please redefine OSTREE_REPO in order to have a persistent OSTree repo
19OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo"
20OSTREE_BRANCHNAME ?= "ota-${MACHINE}"
21OSTREE_OSNAME ?= "poky"
22OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image"
23
24# Prelinking increases the size of downloads and causes build errors
25USER_CLASSES_remove = "image-prelink"
26
27SOTA_MACHINE ?= "none"
28SOTA_MACHINE_raspberrypi = "raspberrypi"
29SOTA_MACHINE_raspberrypi3 = "raspberrypi"
30SOTA_MACHINE_porter = "porter"
31SOTA_MACHINE_intel-corei7-64 = "minnowboard"
32SOTA_MACHINE_qemux86-64 = "qemux86-64"
33inherit sota_${SOTA_MACHINE}
diff --git a/classes/sota_bleeding.inc b/classes/sota_bleeding.inc
new file mode 100644
index 0000000..fc5947d
--- /dev/null
+++ b/classes/sota_bleeding.inc
@@ -0,0 +1 @@
SRCREV_pn-aktualizr ?= "${AUTOREV}"
diff --git a/classes/sota_minnowboard.bbclass b/classes/sota_minnowboard.bbclass
new file mode 100644
index 0000000..970bd6a
--- /dev/null
+++ b/classes/sota_minnowboard.bbclass
@@ -0,0 +1,7 @@
1OSTREE_BOOTLOADER ?= "grub"
2EFI_PROVIDER = "grub-efi"
3
4WKS_FILE = "efiimage-sota.wks"
5IMAGE_BOOT_FILES = ""
6
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
new file mode 100644
index 0000000..5097e9d
--- /dev/null
+++ b/classes/sota_minnowboard_uboot.inc
@@ -0,0 +1,8 @@
1PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ota"
2UBOOT_MACHINE = "minnowmax_defconfig"
3
4EXTRA_IMAGEDEPENDS_append = " minnowboard-bootfiles"
5IMAGE_BOOT_FILES = "minnowboard-bootfiles/*"
6
7OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 ostree_root=/dev/hda console=ttyS0,115200 console=tty0"
8
diff --git a/classes/sota_none.bbclass b/classes/sota_none.bbclass
new file mode 100644
index 0000000..dc72a07
--- /dev/null
+++ b/classes/sota_none.bbclass
@@ -0,0 +1 @@
# null machine it's here to make bitbake happy when SOTA_MACHINE is undefined
diff --git a/classes/sota_porter.bbclass b/classes/sota_porter.bbclass
new file mode 100644
index 0000000..a8f5ba1
--- /dev/null
+++ b/classes/sota_porter.bbclass
@@ -0,0 +1,10 @@
1# Commit united image to OSTree, not just uImage
2OSTREE_KERNEL = "uImage+dtb"
3
4EXTRA_IMAGEDEPENDS_append_sota = " porter-bootfiles"
5IMAGE_CLASSES_append_sota = " image_types_uboot "
6IMAGE_BOOT_FILES_sota += "porter-bootfiles/*"
7
8OSTREE_BOOTLOADER ?= "u-boot"
9UBOOT_MACHINE_sota = "porter_config"
10
diff --git a/classes/sota_qemux86-64.bbclass b/classes/sota_qemux86-64.bbclass
new file mode 100644
index 0000000..533c11c
--- /dev/null
+++ b/classes/sota_qemux86-64.bbclass
@@ -0,0 +1,9 @@
1# See https://advancedtelematic.atlassian.net/browse/PRO-2693
2PREFERRED_VERSION_linux-yocto_qemux86-64_sota = "4.4%"
3
4# U-Boot support for SOTA
5PREFERRED_PROVIDER_virtual/bootloader_sota = "u-boot-ota"
6UBOOT_MACHINE_sota = "qemu-x86_defconfig"
7OSTREE_BOOTLOADER ?= "u-boot"
8
9OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 ostree_root=/dev/hda"
diff --git a/classes/sota_raspberrypi.bbclass b/classes/sota_raspberrypi.bbclass
new file mode 100644
index 0000000..1d23d1f
--- /dev/null
+++ b/classes/sota_raspberrypi.bbclass
@@ -0,0 +1,12 @@
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)}"
3
4### both rpi-sdimg and rpi-sdimg-ota broken
5IMAGE_FSTYPES += "ext4.xz ext4.bmap tar.xz"
6
7KERNEL_IMAGETYPE_sota = "uImage"
8PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot"
9UBOOT_MACHINE_raspberrypi2_sota ?= "rpi_2_defconfig"
10UBOOT_MACHINE_raspberrypi3_sota ?= "rpi_3_32b_defconfig"
11
12OSTREE_BOOTLOADER ?= "u-boot"