diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/sota.bbclass | 33 | ||||
-rw-r--r-- | classes/sota_bleeding.inc | 1 | ||||
-rw-r--r-- | classes/sota_minnowboard.bbclass | 7 | ||||
-rw-r--r-- | classes/sota_minnowboard_uboot.inc | 8 | ||||
-rw-r--r-- | classes/sota_none.bbclass | 1 | ||||
-rw-r--r-- | classes/sota_porter.bbclass | 10 | ||||
-rw-r--r-- | classes/sota_qemux86-64.bbclass | 9 | ||||
-rw-r--r-- | classes/sota_raspberrypi.bbclass | 12 |
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 @@ | |||
1 | DISTRO_FEATURES_append = " sota" | ||
2 | OVERRIDES .= ":sota" | ||
3 | |||
4 | IMAGE_INSTALL_append = " ostree os-release" | ||
5 | |||
6 | # live image for OSTree-enabled systems | ||
7 | IMAGE_CLASSES += "image_types_ostree image_types_ota" | ||
8 | IMAGE_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 | ||
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 | |||
16 | EXTRA_IMAGEDEPENDS += " parted-native mtools-native dosfstools-native" | ||
17 | |||
18 | # Please redefine OSTREE_REPO in order to have a persistent OSTree repo | ||
19 | OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo" | ||
20 | OSTREE_BRANCHNAME ?= "ota-${MACHINE}" | ||
21 | OSTREE_OSNAME ?= "poky" | ||
22 | OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image" | ||
23 | |||
24 | # Prelinking increases the size of downloads and causes build errors | ||
25 | USER_CLASSES_remove = "image-prelink" | ||
26 | |||
27 | SOTA_MACHINE ?= "none" | ||
28 | SOTA_MACHINE_raspberrypi = "raspberrypi" | ||
29 | SOTA_MACHINE_raspberrypi3 = "raspberrypi" | ||
30 | SOTA_MACHINE_porter = "porter" | ||
31 | SOTA_MACHINE_intel-corei7-64 = "minnowboard" | ||
32 | SOTA_MACHINE_qemux86-64 = "qemux86-64" | ||
33 | inherit 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 @@ | |||
1 | OSTREE_BOOTLOADER ?= "grub" | ||
2 | EFI_PROVIDER = "grub-efi" | ||
3 | |||
4 | WKS_FILE = "efiimage-sota.wks" | ||
5 | IMAGE_BOOT_FILES = "" | ||
6 | |||
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 new file mode 100644 index 0000000..5097e9d --- /dev/null +++ b/classes/sota_minnowboard_uboot.inc | |||
@@ -0,0 +1,8 @@ | |||
1 | PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ota" | ||
2 | UBOOT_MACHINE = "minnowmax_defconfig" | ||
3 | |||
4 | EXTRA_IMAGEDEPENDS_append = " minnowboard-bootfiles" | ||
5 | IMAGE_BOOT_FILES = "minnowboard-bootfiles/*" | ||
6 | |||
7 | OSTREE_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 | ||
2 | OSTREE_KERNEL = "uImage+dtb" | ||
3 | |||
4 | EXTRA_IMAGEDEPENDS_append_sota = " porter-bootfiles" | ||
5 | IMAGE_CLASSES_append_sota = " image_types_uboot " | ||
6 | IMAGE_BOOT_FILES_sota += "porter-bootfiles/*" | ||
7 | |||
8 | OSTREE_BOOTLOADER ?= "u-boot" | ||
9 | UBOOT_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 | ||
2 | PREFERRED_VERSION_linux-yocto_qemux86-64_sota = "4.4%" | ||
3 | |||
4 | # U-Boot support for SOTA | ||
5 | PREFERRED_PROVIDER_virtual/bootloader_sota = "u-boot-ota" | ||
6 | UBOOT_MACHINE_sota = "qemu-x86_defconfig" | ||
7 | OSTREE_BOOTLOADER ?= "u-boot" | ||
8 | |||
9 | OSTREE_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 @@ | |||
1 | IMAGE_CLASSES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'image_types_uboot sdcard_image-rpi-ota', '', d)}" | ||
2 | IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'rpi-sdimg-ota', 'rpi-sdimg', d)}" | ||
3 | |||
4 | ### both rpi-sdimg and rpi-sdimg-ota broken | ||
5 | IMAGE_FSTYPES += "ext4.xz ext4.bmap tar.xz" | ||
6 | |||
7 | KERNEL_IMAGETYPE_sota = "uImage" | ||
8 | PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot" | ||
9 | UBOOT_MACHINE_raspberrypi2_sota ?= "rpi_2_defconfig" | ||
10 | UBOOT_MACHINE_raspberrypi3_sota ?= "rpi_3_32b_defconfig" | ||
11 | |||
12 | OSTREE_BOOTLOADER ?= "u-boot" | ||