diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/image_types_ostree.bbclass | 23 | ||||
-rw-r--r-- | classes/image_types_ota.bbclass | 2 | ||||
-rw-r--r-- | classes/sota.bbclass | 9 | ||||
-rw-r--r-- | classes/sota_m3ulcb.bbclass | 4 | ||||
-rw-r--r-- | classes/sota_minnowboard.bbclass | 4 | ||||
-rw-r--r-- | classes/sota_porter.bbclass | 4 | ||||
-rw-r--r-- | classes/sota_qemux86-64.bbclass | 2 | ||||
-rw-r--r-- | classes/sota_raspberrypi.bbclass | 2 |
8 files changed, 16 insertions, 34 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index fd38d28..0b928a3 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass | |||
@@ -3,13 +3,11 @@ inherit features_check | |||
3 | 3 | ||
4 | REQUIRED_DISTRO_FEATURES = "usrmerge" | 4 | REQUIRED_DISTRO_FEATURES = "usrmerge" |
5 | 5 | ||
6 | OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}" | ||
7 | OSTREE_ROOTFS ??= "${WORKDIR}/ostree-rootfs" | 6 | OSTREE_ROOTFS ??= "${WORKDIR}/ostree-rootfs" |
8 | OSTREE_COMMIT_SUBJECT ??= "Commit-id: ${IMAGE_NAME}" | 7 | OSTREE_COMMIT_SUBJECT ??= "Commit-id: ${IMAGE_NAME}" |
9 | OSTREE_COMMIT_BODY ??= "" | 8 | OSTREE_COMMIT_BODY ??= "" |
10 | OSTREE_COMMIT_VERSION ??= "${DISTRO_VERSION}" | 9 | OSTREE_COMMIT_VERSION ??= "${DISTRO_VERSION}" |
11 | OSTREE_UPDATE_SUMMARY ??= "0" | 10 | OSTREE_UPDATE_SUMMARY ??= "0" |
12 | OSTREE_DEPLOY_DEVICETREE ??= "0" | ||
13 | 11 | ||
14 | BUILD_OSTREE_TARBALL ??= "1" | 12 | BUILD_OSTREE_TARBALL ??= "1" |
15 | 13 | ||
@@ -134,27 +132,6 @@ IMAGE_CMD_ostree () { | |||
134 | 132 | ||
135 | ln -sf ../var/usrlocal usr/local | 133 | ln -sf ../var/usrlocal usr/local |
136 | 134 | ||
137 | if [ "${KERNEL_IMAGETYPE}" = "fitImage" ]; then | ||
138 | # this is a hack for ostree not to override init= in kernel cmdline - | ||
139 | # make it think that the initramfs is present (while it is in FIT image) | ||
140 | # since initramfs is fake file, it does not need to be included in checksum | ||
141 | checksum=$(sha256sum ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} | cut -f 1 -d " ") | ||
142 | touch boot/initramfs-${checksum} | ||
143 | else | ||
144 | if [ ${@ oe.types.boolean('${OSTREE_DEPLOY_DEVICETREE}')} = True ] && [ -n "${KERNEL_DEVICETREE}" ]; then | ||
145 | checksum=$(cat ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES} ${KERNEL_DEVICETREE} | sha256sum | cut -f 1 -d " ") | ||
146 | for DTS_FILE in ${KERNEL_DEVICETREE}; do | ||
147 | DTS_FILE_BASENAME=$(basename ${DTS_FILE}) | ||
148 | cp ${DEPLOY_DIR_IMAGE}/${DTS_FILE_BASENAME} boot/devicetree-${DTS_FILE_BASENAME}-${checksum} | ||
149 | done | ||
150 | else | ||
151 | checksum=$(cat ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES} | sha256sum | cut -f 1 -d " ") | ||
152 | fi | ||
153 | cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES} boot/initramfs-${checksum} | ||
154 | fi | ||
155 | |||
156 | cp ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} boot/vmlinuz-${checksum} | ||
157 | |||
158 | # Copy image manifest | 135 | # Copy image manifest |
159 | cat ${IMAGE_MANIFEST} | cut -d " " -f1,3 > usr/package.manifest | 136 | cat ${IMAGE_MANIFEST} | cut -d " " -f1,3 > usr/package.manifest |
160 | } | 137 | } |
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass index a8a19b5..36a6a64 100644 --- a/classes/image_types_ota.bbclass +++ b/classes/image_types_ota.bbclass | |||
@@ -128,4 +128,4 @@ IMAGE_CMD_ota-ext4 () { | |||
128 | mkfs.ext4 -O ^64bit ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 -L otaroot -d ${OTA_SYSROOT} | 128 | mkfs.ext4 -O ^64bit ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 -L otaroot -d ${OTA_SYSROOT} |
129 | } | 129 | } |
130 | 130 | ||
131 | do_image_wic[depends] += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', '%s:do_image_ota_ext4' % d.getVar('IMAGE_BASENAME'), '', d)}" | 131 | do_image_wic[depends] += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', '%s:do_image_ota_ext4' % d.getVar('PN'), '', d)}" |
diff --git a/classes/sota.bbclass b/classes/sota.bbclass index 71bd303..fde00cd 100644 --- a/classes/sota.bbclass +++ b/classes/sota.bbclass | |||
@@ -1,12 +1,14 @@ | |||
1 | DISTROOVERRIDES .= "${@bb.utils.contains('DISTRO_FEATURES', 'sota', ':sota', '', d)}" | 1 | DISTROOVERRIDES .= "${@bb.utils.contains('DISTRO_FEATURES', 'sota', ':sota', '', d)}" |
2 | 2 | ||
3 | SOTA_CLIENT ??= "aktualizr" | ||
4 | SOTA_CLIENT_PROV ??= "aktualizr-shared-prov" | 3 | SOTA_CLIENT_PROV ??= "aktualizr-shared-prov" |
5 | SOTA_DEPLOY_CREDENTIALS ?= "1" | 4 | SOTA_DEPLOY_CREDENTIALS ?= "1" |
6 | SOTA_HARDWARE_ID ??= "${MACHINE}" | 5 | SOTA_HARDWARE_ID ??= "${MACHINE}" |
7 | 6 | ||
8 | IMAGE_INSTALL_append_sota = " ostree os-release ${SOTA_CLIENT} ${SOTA_CLIENT_PROV}" | ||
9 | IMAGE_CLASSES += " image_types_ostree image_types_ota image_repo_manifest" | 7 | IMAGE_CLASSES += " image_types_ostree image_types_ota image_repo_manifest" |
8 | IMAGE_INSTALL_append_sota = " aktualizr aktualizr-info ${SOTA_CLIENT_PROV} \ | ||
9 | ostree os-release ostree-kernel \ | ||
10 | ${@'ostree-initramfs' if d.getVar('KERNEL_IMAGETYPE') != 'fitImage' else ''} \ | ||
11 | ${@'ostree-devicetrees' if oe.types.boolean('${OSTREE_DEPLOY_DEVICETREE}') else ''}" | ||
10 | 12 | ||
11 | IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'ostreepush garagesign garagecheck ota-ext4 wic', ' ', d)}" | 13 | IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'ostreepush garagesign garagecheck ota-ext4 wic', ' ', d)}" |
12 | IMAGE_FSTYPES += "${@bb.utils.contains('BUILD_OSTREE_TARBALL', '1', 'ostree.tar.bz2', ' ', d)}" | 14 | IMAGE_FSTYPES += "${@bb.utils.contains('BUILD_OSTREE_TARBALL', '1', 'ostree.tar.bz2', ' ', d)}" |
@@ -27,6 +29,9 @@ OSTREE_BRANCHNAME ?= "${SOTA_HARDWARE_ID}" | |||
27 | OSTREE_OSNAME ?= "poky" | 29 | OSTREE_OSNAME ?= "poky" |
28 | OSTREE_BOOTLOADER ??= 'u-boot' | 30 | OSTREE_BOOTLOADER ??= 'u-boot' |
29 | OSTREE_BOOT_PARTITION ??= "/boot" | 31 | OSTREE_BOOT_PARTITION ??= "/boot" |
32 | OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}" | ||
33 | OSTREE_DEPLOY_DEVICETREE ??= "0" | ||
34 | OSTREE_DEVICETREE ??= "${KERNEL_DEVICETREE}" | ||
30 | 35 | ||
31 | INITRAMFS_IMAGE ?= "initramfs-ostree-image" | 36 | INITRAMFS_IMAGE ?= "initramfs-ostree-image" |
32 | 37 | ||
diff --git a/classes/sota_m3ulcb.bbclass b/classes/sota_m3ulcb.bbclass index e7fa9c2..7ea273d 100644 --- a/classes/sota_m3ulcb.bbclass +++ b/classes/sota_m3ulcb.bbclass | |||
@@ -8,5 +8,5 @@ OSTREE_BOOTLOADER ?= "u-boot" | |||
8 | 8 | ||
9 | UBOOT_MACHINE_sota = "${@d.getVar('SOC_FAMILY').split(':')[1]}_ulcb_defconfig" | 9 | UBOOT_MACHINE_sota = "${@d.getVar('SOC_FAMILY').split(':')[1]}_ulcb_defconfig" |
10 | 10 | ||
11 | PREFERRED_RPROVIDER_virtual/network-configuration ?= "connman" | 11 | PREFERRED_RPROVIDER_network-configuration ?= "connman" |
12 | IMAGE_INSTALL_append_sota = " virtual/network-configuration " | 12 | IMAGE_INSTALL_append_sota = " network-configuration " |
diff --git a/classes/sota_minnowboard.bbclass b/classes/sota_minnowboard.bbclass index a907217..3128965 100644 --- a/classes/sota_minnowboard.bbclass +++ b/classes/sota_minnowboard.bbclass | |||
@@ -8,5 +8,5 @@ IMAGE_FSTYPES_remove_sota = "live hddimg" | |||
8 | OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 console=ttyS0,115200 console=tty0" | 8 | OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 console=ttyS0,115200 console=tty0" |
9 | IMAGE_INSTALL_append = " minnowboard-efi-startup" | 9 | IMAGE_INSTALL_append = " minnowboard-efi-startup" |
10 | 10 | ||
11 | PREFERRED_RPROVIDER_virtual/network-configuration ?= "connman" | 11 | PREFERRED_RPROVIDER_network-configuration ?= "connman" |
12 | IMAGE_INSTALL_append_sota = " virtual/network-configuration " | 12 | IMAGE_INSTALL_append_sota = " network-configuration " |
diff --git a/classes/sota_porter.bbclass b/classes/sota_porter.bbclass index 80062e1..6c6fe70 100644 --- a/classes/sota_porter.bbclass +++ b/classes/sota_porter.bbclass | |||
@@ -7,5 +7,5 @@ IMAGE_BOOT_FILES_sota += "porter-bootfiles/*" | |||
7 | OSTREE_BOOTLOADER ?= "u-boot" | 7 | OSTREE_BOOTLOADER ?= "u-boot" |
8 | UBOOT_MACHINE_sota = "porter_config" | 8 | UBOOT_MACHINE_sota = "porter_config" |
9 | 9 | ||
10 | PREFERRED_RPROVIDER_virtual/network-configuration ?= "connman" | 10 | PREFERRED_RPROVIDER_network-configuration ?= "connman" |
11 | IMAGE_INSTALL_append_sota = " virtual/network-configuration " | 11 | IMAGE_INSTALL_append_sota = " network-configuration " |
diff --git a/classes/sota_qemux86-64.bbclass b/classes/sota_qemux86-64.bbclass index fc4aa7c..3dc2428 100644 --- a/classes/sota_qemux86-64.bbclass +++ b/classes/sota_qemux86-64.bbclass | |||
@@ -13,4 +13,4 @@ IMAGE_ROOTFS_EXTRA_SPACE = "${@bb.utils.contains('DISTRO_FEATURES', 'sota', '655 | |||
13 | # fix for u-boot/swig build issue | 13 | # fix for u-boot/swig build issue |
14 | HOSTTOOLS_NONFATAL += "x86_64-linux-gnu-gcc" | 14 | HOSTTOOLS_NONFATAL += "x86_64-linux-gnu-gcc" |
15 | 15 | ||
16 | IMAGE_INSTALL_append_sota = " virtual/network-configuration " | 16 | IMAGE_INSTALL_append_sota = " network-configuration " |
diff --git a/classes/sota_raspberrypi.bbclass b/classes/sota_raspberrypi.bbclass index d5d89a9..744ba22 100644 --- a/classes/sota_raspberrypi.bbclass +++ b/classes/sota_raspberrypi.bbclass | |||
@@ -13,7 +13,7 @@ UBOOT_DTBO_LOADADDRESS = "0x06000000" | |||
13 | IMAGE_INSTALL_append = " fit-conf" | 13 | IMAGE_INSTALL_append = " fit-conf" |
14 | 14 | ||
15 | DEV_MATCH_DIRECTIVE_pn-networkd-dhcp-conf = "Driver=smsc95xx lan78xx" | 15 | DEV_MATCH_DIRECTIVE_pn-networkd-dhcp-conf = "Driver=smsc95xx lan78xx" |
16 | IMAGE_INSTALL_append_sota = " virtual/network-configuration " | 16 | IMAGE_INSTALL_append_sota = " network-configuration " |
17 | 17 | ||
18 | PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot" | 18 | PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot" |
19 | UBOOT_ENTRYPOINT_sota ?= "0x00080000" | 19 | UBOOT_ENTRYPOINT_sota ?= "0x00080000" |