diff options
| author | lbonn <lbonn@users.noreply.github.com> | 2018-05-16 16:23:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-16 16:23:48 +0200 |
| commit | a694dc7ff1dc08cef9ddade0327befa155a3a853 (patch) | |
| tree | 3ec6119050fe4362d9604d168daa8ed527029af7 /classes | |
| parent | 41c2df71f443047ea6d6adb988f17eb493f10f89 (diff) | |
| parent | 7e6ffbce3f8717d91142d1e80d7cda279f24145a (diff) | |
| download | meta-updater-a694dc7ff1dc08cef9ddade0327befa155a3a853.tar.gz | |
Merge pull request #311 from advancedtelematic/fix/PRO-5376/backport-master-fixes
Backport from master to rocko
Diffstat (limited to 'classes')
| -rw-r--r-- | classes/image_types_ostree.bbclass | 5 | ||||
| -rw-r--r-- | classes/image_types_ota.bbclass | 10 | ||||
| -rw-r--r-- | classes/sota.bbclass | 4 | ||||
| -rw-r--r-- | classes/sota_qemux86-64.bbclass | 1 |
4 files changed, 12 insertions, 8 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 9e3bc6f..bc44e33 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass | |||
| @@ -11,12 +11,11 @@ export OSTREE_REPO | |||
| 11 | export OSTREE_BRANCHNAME | 11 | export OSTREE_BRANCHNAME |
| 12 | export GARAGE_TARGET_NAME | 12 | export GARAGE_TARGET_NAME |
| 13 | 13 | ||
| 14 | RAMDISK_EXT ?= ".ext4.gz" | 14 | RAMDISK_EXT ?= ".${OSTREE_INITRAMFS_FSTYPES}" |
| 15 | RAMDISK_EXT_arm ?= ".ext4.gz.u-boot" | ||
| 16 | 15 | ||
| 17 | OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}" | 16 | OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}" |
| 18 | 17 | ||
| 19 | export SYSTEMD_USED = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', '', d)}" | 18 | export SYSTEMD_USED = "${@oe.utils.ifelse(d.getVar('VIRTUAL-RUNTIME_init_manager', True) == 'systemd', 'true', '')}" |
| 20 | 19 | ||
| 21 | IMAGE_CMD_ostree () { | 20 | IMAGE_CMD_ostree () { |
| 22 | if [ -z "$OSTREE_REPO" ]; then | 21 | if [ -z "$OSTREE_REPO" ]; then |
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass index 17fe4e8..9581971 100644 --- a/classes/image_types_ota.bbclass +++ b/classes/image_types_ota.bbclass | |||
| @@ -7,8 +7,6 @@ | |||
| 7 | # boot scripts, kernel and initramfs images | 7 | # boot scripts, kernel and initramfs images |
| 8 | # | 8 | # |
| 9 | 9 | ||
| 10 | OSTREE_BOOTLOADER ??= 'u-boot' | ||
| 11 | |||
| 12 | do_image_otaimg[depends] += "e2fsprogs-native:do_populate_sysroot \ | 10 | do_image_otaimg[depends] += "e2fsprogs-native:do_populate_sysroot \ |
| 13 | ${@'grub:do_populate_sysroot' if d.getVar('OSTREE_BOOTLOADER', True) == 'grub' else ''} \ | 11 | ${@'grub:do_populate_sysroot' if d.getVar('OSTREE_BOOTLOADER', True) == 'grub' else ''} \ |
| 14 | ${@'virtual/bootloader:do_deploy' if d.getVar('OSTREE_BOOTLOADER', True) == 'u-boot' else ''}" | 12 | ${@'virtual/bootloader:do_deploy' if d.getVar('OSTREE_BOOTLOADER', True) == 'u-boot' else ''}" |
| @@ -78,7 +76,7 @@ IMAGE_CMD_otaimg () { | |||
| 78 | 76 | ||
| 79 | if [ "${OSTREE_BOOTLOADER}" = "grub" ]; then | 77 | if [ "${OSTREE_BOOTLOADER}" = "grub" ]; then |
| 80 | mkdir -p ${PHYS_SYSROOT}/boot/grub2 | 78 | mkdir -p ${PHYS_SYSROOT}/boot/grub2 |
| 81 | touch ${PHYS_SYSROOT}/boot/grub2/grub.cfg | 79 | ln -s ../loader/grub.cfg ${PHYS_SYSROOT}/boot/grub2/grub.cfg |
| 82 | elif [ "${OSTREE_BOOTLOADER}" = "u-boot" ]; then | 80 | elif [ "${OSTREE_BOOTLOADER}" = "u-boot" ]; then |
| 83 | touch ${PHYS_SYSROOT}/boot/loader/uEnv.txt | 81 | touch ${PHYS_SYSROOT}/boot/loader/uEnv.txt |
| 84 | else | 82 | else |
| @@ -109,7 +107,11 @@ IMAGE_CMD_otaimg () { | |||
| 109 | # Ensure that /var/local exists (AGL symlinks /usr/local to /var/local) | 107 | # Ensure that /var/local exists (AGL symlinks /usr/local to /var/local) |
| 110 | install -d ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/local | 108 | install -d ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/local |
| 111 | # Set package version for the first deployment | 109 | # Set package version for the first deployment |
| 112 | echo "{\"${ostree_target_hash}\":\"${GARAGE_TARGET_NAME}-${ostree_target_hash}\"}" > ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota/installed_versions | 110 | target_version=${ostree_target_hash} |
| 111 | if [ -n "${GARAGE_TARGET_VERSION}" ]; then | ||
| 112 | target_version=${GARAGE_TARGET_VERSION} | ||
| 113 | fi | ||
| 114 | echo "{\"${ostree_target_hash}\":\"${GARAGE_TARGET_NAME}-${target_version}\"}" > ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota/installed_versions | ||
| 113 | 115 | ||
| 114 | rm -rf ${HOME_TMP} | 116 | rm -rf ${HOME_TMP} |
| 115 | 117 | ||
diff --git a/classes/sota.bbclass b/classes/sota.bbclass index 1e765f0..38d4ce5 100644 --- a/classes/sota.bbclass +++ b/classes/sota.bbclass | |||
| @@ -20,13 +20,15 @@ WKS_FILE_sota ?= "sdimage-sota.wks" | |||
| 20 | 20 | ||
| 21 | EXTRA_IMAGEDEPENDS_append_sota = " parted-native mtools-native dosfstools-native" | 21 | EXTRA_IMAGEDEPENDS_append_sota = " parted-native mtools-native dosfstools-native" |
| 22 | 22 | ||
| 23 | OSTREE_INITRAMFS_FSTYPES ??= "${@oe.utils.ifelse(d.getVar('OSTREE_BOOTLOADER', True) == 'u-boot', 'ext4.gz.u-boot', 'ext4.gz')}" | ||
| 24 | |||
| 23 | # Please redefine OSTREE_REPO in order to have a persistent OSTree repo | 25 | # Please redefine OSTREE_REPO in order to have a persistent OSTree repo |
| 24 | OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo" | 26 | OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo" |
| 25 | # For UPTANE operation, OSTREE_BRANCHNAME must start with "${MACHINE}-" | 27 | # For UPTANE operation, OSTREE_BRANCHNAME must start with "${MACHINE}-" |
| 26 | OSTREE_BRANCHNAME ?= "${MACHINE}" | 28 | OSTREE_BRANCHNAME ?= "${MACHINE}" |
| 27 | OSTREE_OSNAME ?= "poky" | 29 | OSTREE_OSNAME ?= "poky" |
| 28 | OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image" | 30 | OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image" |
| 29 | 31 | OSTREE_BOOTLOADER ??= 'u-boot' | |
| 30 | 32 | ||
| 31 | GARAGE_SIGN_REPO ?= "${DEPLOY_DIR_IMAGE}/garage_sign_repo" | 33 | GARAGE_SIGN_REPO ?= "${DEPLOY_DIR_IMAGE}/garage_sign_repo" |
| 32 | GARAGE_SIGN_KEYNAME ?= "garage-key" | 34 | GARAGE_SIGN_KEYNAME ?= "garage-key" |
diff --git a/classes/sota_qemux86-64.bbclass b/classes/sota_qemux86-64.bbclass index a5fd6a4..15b2043 100644 --- a/classes/sota_qemux86-64.bbclass +++ b/classes/sota_qemux86-64.bbclass | |||
| @@ -4,6 +4,7 @@ IMAGE_FSTYPES_remove = "wic" | |||
| 4 | PREFERRED_PROVIDER_virtual/bootloader_sota = "u-boot" | 4 | PREFERRED_PROVIDER_virtual/bootloader_sota = "u-boot" |
| 5 | UBOOT_MACHINE_sota = "qemu-x86_defconfig" | 5 | UBOOT_MACHINE_sota = "qemu-x86_defconfig" |
| 6 | OSTREE_BOOTLOADER ?= "u-boot" | 6 | OSTREE_BOOTLOADER ?= "u-boot" |
| 7 | OSTREE_INITRAMFS_FSTYPES ?= "ext4.gz" | ||
| 7 | 8 | ||
| 8 | OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 ostree_root=/dev/hda" | 9 | OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 ostree_root=/dev/hda" |
| 9 | 10 | ||
