summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYevgeny Popovych <yevgenyp@pointgrab.com>2018-06-19 13:08:50 +0300
committerPhil Wise <philip.wise@here.com>2018-08-14 16:03:10 +0200
commit9dcfcdb9aa2da833a3b86b87fbbb22b60e5d7e3c (patch)
tree8104f83346f60e500dcfe328b27cb5c607801f0c
parentc4902394cc6673b07ad5ee87570e02afbdf7b022 (diff)
downloadmeta-updater-9dcfcdb9aa2da833a3b86b87fbbb22b60e5d7e3c.tar.gz
classes, images: Use standard variables for initramfs
This will reduce the level of indirection and improve compatibility with the rest of OE. For example, FIT that includes initramfs may now be built. Signed-off-by: Yevgeny Popovych <yevgenyp@pointgrab.com>
-rw-r--r--README.adoc2
-rw-r--r--classes/image_types_ostree.bbclass6
-rw-r--r--classes/sota.bbclass4
-rw-r--r--classes/sota_qemux86-64.bbclass2
-rw-r--r--classes/sota_raspberrypi.bbclass1
-rw-r--r--recipes-core/images/initramfs-ostree-image.bb2
6 files changed, 8 insertions, 9 deletions
diff --git a/README.adoc b/README.adoc
index d2bd4b5..7ffdde2 100644
--- a/README.adoc
+++ b/README.adoc
@@ -78,7 +78,7 @@ Although we have used U-Boot so far, other boot loaders can be configured work w
78 78
79* `OSTREE_REPO` - path to your OSTree repository. Defaults to `$\{DEPLOY_DIR_IMAGE}/ostree_repo` 79* `OSTREE_REPO` - path to your OSTree repository. Defaults to `$\{DEPLOY_DIR_IMAGE}/ostree_repo`
80* `OSTREE_OSNAME` - OS deployment name on your target device. For more information about deployments and osnames see the https://ostree.readthedocs.io/en/latest/manual/deployment/[OSTree documentation]. Defaults to "poky". 80* `OSTREE_OSNAME` - OS deployment name on your target device. For more information about deployments and osnames see the https://ostree.readthedocs.io/en/latest/manual/deployment/[OSTree documentation]. Defaults to "poky".
81* `OSTREE_INITRAMFS_IMAGE` - initramfs/initrd image that is used as a proxy while booting into OSTree deployment. Do not change this setting unless you are sure that your initramfs can serve as such a proxy. 81* `INITRAMFS_IMAGE` - initramfs/initrd image that is used as a proxy while booting into OSTree deployment. Do not change this setting unless you are sure that your initramfs can serve as such a proxy.
82* `SOTA_PACKED_CREDENTIALS` - when set, your ostree commit will be pushed to a remote repo as a bitbake step. This should be the path to a zipped credentials file in https://github.com/advancedtelematic/aktualizr/blob/master/docs/credentials.adoc[the format accepted by garage-push]. 82* `SOTA_PACKED_CREDENTIALS` - when set, your ostree commit will be pushed to a remote repo as a bitbake step. This should be the path to a zipped credentials file in https://github.com/advancedtelematic/aktualizr/blob/master/docs/credentials.adoc[the format accepted by garage-push].
83* `SOTA_CLIENT_PROV` - which provisioning method to use. Valid options are https://github.com/advancedtelematic/aktualizr/blob/master/docs/automatic-provisioning.adoc[`aktualizr-auto-prov`], https://github.com/advancedtelematic/aktualizr/blob/master/docs/implicit-provisioning.adoc[`aktualizr-implicit-prov`], and https://github.com/advancedtelematic/aktualizr/blob/master/docs/hsm-provisioning.adoc[`aktualizr-hsm-prov`]. The default is `aktualizr-auto-prov`. This can also be set to an empty string to avoid using a provisioning recipe. 83* `SOTA_CLIENT_PROV` - which provisioning method to use. Valid options are https://github.com/advancedtelematic/aktualizr/blob/master/docs/automatic-provisioning.adoc[`aktualizr-auto-prov`], https://github.com/advancedtelematic/aktualizr/blob/master/docs/implicit-provisioning.adoc[`aktualizr-implicit-prov`], and https://github.com/advancedtelematic/aktualizr/blob/master/docs/hsm-provisioning.adoc[`aktualizr-hsm-prov`]. The default is `aktualizr-auto-prov`. This can also be set to an empty string to avoid using a provisioning recipe.
84* `SOTA_CLIENT_FEATURES` - extensions to aktualizr. The only valid options are `hsm` (to build with HSM support) and `secondary-network` (to set up a simulated 'in-vehicle' network with support for a primary node with a DHCP server and a secondary node with a DHCP client). 84* `SOTA_CLIENT_FEATURES` - extensions to aktualizr. The only valid options are `hsm` (to build with HSM support) and `secondary-network` (to set up a simulated 'in-vehicle' network with support for a primary node with a DHCP server and a secondary node with a DHCP client).
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index ca8aee3..ba3e868 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -5,14 +5,12 @@ do_image_ostree[depends] += "ostree-native:do_populate_sysroot \
5 coreutils-native:do_populate_sysroot \ 5 coreutils-native:do_populate_sysroot \
6 unzip-native:do_populate_sysroot \ 6 unzip-native:do_populate_sysroot \
7 virtual/kernel:do_deploy \ 7 virtual/kernel:do_deploy \
8 ${OSTREE_INITRAMFS_IMAGE}:do_image_complete" 8"
9 9
10export OSTREE_REPO 10export OSTREE_REPO
11export OSTREE_BRANCHNAME 11export OSTREE_BRANCHNAME
12export GARAGE_TARGET_NAME 12export GARAGE_TARGET_NAME
13 13
14RAMDISK_EXT ?= ".${OSTREE_INITRAMFS_FSTYPES}"
15
16OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}" 14OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}"
17 15
18export SYSTEMD_USED = "${@oe.utils.ifelse(d.getVar('VIRTUAL-RUNTIME_init_manager', True) == 'systemd', 'true', '')}" 16export SYSTEMD_USED = "${@oe.utils.ifelse(d.getVar('VIRTUAL-RUNTIME_init_manager', True) == 'systemd', 'true', '')}"
@@ -124,7 +122,7 @@ IMAGE_CMD_ostree () {
124 checksum=`sha256sum ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} | cut -f 1 -d " "` 122 checksum=`sha256sum ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} | cut -f 1 -d " "`
125 123
126 cp ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} boot/vmlinuz-${checksum} 124 cp ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} boot/vmlinuz-${checksum}
127 cp ${DEPLOY_DIR_IMAGE}/${OSTREE_INITRAMFS_IMAGE}-${MACHINE}${RAMDISK_EXT} boot/initramfs-${checksum} 125 cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.${INITRAMFS_FSTYPES} boot/initramfs-${checksum}
128 126
129 # Copy image manifest 127 # Copy image manifest
130 cat ${IMAGE_MANIFEST} | cut -d " " -f1,3 > usr/package.manifest 128 cat ${IMAGE_MANIFEST} | cut -d " " -f1,3 > usr/package.manifest
diff --git a/classes/sota.bbclass b/classes/sota.bbclass
index 3aca92c..0eb8981 100644
--- a/classes/sota.bbclass
+++ b/classes/sota.bbclass
@@ -23,13 +23,13 @@ WKS_FILE_sota ?= "sdimage-sota.wks"
23 23
24EXTRA_IMAGEDEPENDS_append_sota = " parted-native mtools-native dosfstools-native" 24EXTRA_IMAGEDEPENDS_append_sota = " parted-native mtools-native dosfstools-native"
25 25
26OSTREE_INITRAMFS_FSTYPES ??= "${@oe.utils.ifelse(d.getVar('OSTREE_BOOTLOADER', True) == 'u-boot', 'ext4.gz.u-boot', 'ext4.gz')}" 26INITRAMFS_FSTYPES ??= "${@oe.utils.ifelse(d.getVar('OSTREE_BOOTLOADER', True) == 'u-boot', 'ext4.gz.u-boot', 'ext4.gz')}"
27 27
28# Please redefine OSTREE_REPO in order to have a persistent OSTree repo 28# Please redefine OSTREE_REPO in order to have a persistent OSTree repo
29OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo" 29OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo"
30OSTREE_BRANCHNAME ?= "${MACHINE}" 30OSTREE_BRANCHNAME ?= "${MACHINE}"
31OSTREE_OSNAME ?= "poky" 31OSTREE_OSNAME ?= "poky"
32OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image" 32INITRAMFS_IMAGE ?= "initramfs-ostree-image"
33OSTREE_BOOTLOADER ??= 'u-boot' 33OSTREE_BOOTLOADER ??= 'u-boot'
34 34
35GARAGE_SIGN_REPO ?= "${DEPLOY_DIR_IMAGE}/garage_sign_repo" 35GARAGE_SIGN_REPO ?= "${DEPLOY_DIR_IMAGE}/garage_sign_repo"
diff --git a/classes/sota_qemux86-64.bbclass b/classes/sota_qemux86-64.bbclass
index 82efe52..9ef531d 100644
--- a/classes/sota_qemux86-64.bbclass
+++ b/classes/sota_qemux86-64.bbclass
@@ -4,7 +4,7 @@ IMAGE_FSTYPES_remove = "wic"
4PREFERRED_PROVIDER_virtual/bootloader_sota = "u-boot" 4PREFERRED_PROVIDER_virtual/bootloader_sota = "u-boot"
5UBOOT_MACHINE_sota = "qemu-x86_defconfig" 5UBOOT_MACHINE_sota = "qemu-x86_defconfig"
6OSTREE_BOOTLOADER ?= "u-boot" 6OSTREE_BOOTLOADER ?= "u-boot"
7OSTREE_INITRAMFS_FSTYPES ?= "ext4.gz" 7INITRAMFS_FSTYPES ?= "ext4.gz"
8 8
9OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 ostree_root=/dev/hda" 9OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 ostree_root=/dev/hda"
10 10
diff --git a/classes/sota_raspberrypi.bbclass b/classes/sota_raspberrypi.bbclass
index a5558b4..e69ccf8 100644
--- a/classes/sota_raspberrypi.bbclass
+++ b/classes/sota_raspberrypi.bbclass
@@ -2,6 +2,7 @@ RPI_USE_U_BOOT_sota = "1"
2 2
3KERNEL_CLASSES_append_sota = " kernel-fitimage" 3KERNEL_CLASSES_append_sota = " kernel-fitimage"
4KERNEL_IMAGETYPE_sota = "fitImage" 4KERNEL_IMAGETYPE_sota = "fitImage"
5OSTREE_KERNEL = "${KERNEL_IMAGETYPE}-${INITRAMFS_IMAGE}-${MACHINE}.bin"
5 6
6PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot" 7PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot"
7UBOOT_ENTRYPOINT_sota ?= "0x00008000" 8UBOOT_ENTRYPOINT_sota ?= "0x00008000"
diff --git a/recipes-core/images/initramfs-ostree-image.bb b/recipes-core/images/initramfs-ostree-image.bb
index b2d9e27..e77499e 100644
--- a/recipes-core/images/initramfs-ostree-image.bb
+++ b/recipes-core/images/initramfs-ostree-image.bb
@@ -13,7 +13,7 @@ IMAGE_LINGUAS = ""
13 13
14LICENSE = "MIT" 14LICENSE = "MIT"
15 15
16IMAGE_FSTYPES = "${OSTREE_INITRAMFS_FSTYPES}" 16IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
17 17
18inherit core-image 18inherit core-image
19 19