diff options
| -rw-r--r-- | classes/image_types_ostree.bbclass | 7 | ||||
| -rw-r--r-- | classes/image_types_ota.bbclass | 4 | ||||
| -rw-r--r-- | classes/sota.bbclass | 4 | ||||
| -rw-r--r-- | recipes-bsp/grub/grub-efi_%.bbappend | 2 | ||||
| -rw-r--r-- | recipes-core/images/initramfs-ostree-image.bb | 3 | ||||
| -rw-r--r-- | recipes-sota/ostree/ostree_git.bb | 4 | ||||
| -rw-r--r-- | scripts/lib/wic/canned-wks/sdimage-sota.wks | 2 |
7 files changed, 10 insertions, 16 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index dc14e4a..e6d6fe0 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass | |||
| @@ -1,7 +1,5 @@ | |||
| 1 | # OSTree deployment | 1 | # OSTree deployment |
| 2 | 2 | ||
| 3 | inherit image | ||
| 4 | |||
| 5 | do_image_ostree[depends] += "ostree-native:do_populate_sysroot \ | 3 | do_image_ostree[depends] += "ostree-native:do_populate_sysroot \ |
| 6 | openssl-native:do_populate_sysroot \ | 4 | openssl-native:do_populate_sysroot \ |
| 7 | coreutils-native:do_populate_sysroot \ | 5 | coreutils-native:do_populate_sysroot \ |
| @@ -13,12 +11,11 @@ export OSTREE_REPO | |||
| 13 | export OSTREE_BRANCHNAME | 11 | export OSTREE_BRANCHNAME |
| 14 | export GARAGE_TARGET_NAME | 12 | export GARAGE_TARGET_NAME |
| 15 | 13 | ||
| 16 | RAMDISK_EXT ?= ".ext4.gz" | 14 | RAMDISK_EXT ?= ".${OSTREE_INITRAMFS_FSTYPES}" |
| 17 | RAMDISK_EXT_arm ?= ".ext4.gz.u-boot" | ||
| 18 | 15 | ||
| 19 | OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}" | 16 | OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}" |
| 20 | 17 | ||
| 21 | 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', '')}" |
| 22 | 19 | ||
| 23 | IMAGE_CMD_ostree () { | 20 | IMAGE_CMD_ostree () { |
| 24 | 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 d21441d..b14faf3 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 | inherit image | ||
| 11 | |||
| 12 | OSTREE_BOOTLOADER ??= 'u-boot' | 10 | OSTREE_BOOTLOADER ??= 'u-boot' |
| 13 | 11 | ||
| 14 | do_image_otaimg[depends] += "e2fsprogs-native:do_populate_sysroot \ | 12 | do_image_otaimg[depends] += "e2fsprogs-native:do_populate_sysroot \ |
| @@ -80,7 +78,7 @@ IMAGE_CMD_otaimg () { | |||
| 80 | 78 | ||
| 81 | if [ "${OSTREE_BOOTLOADER}" = "grub" ]; then | 79 | if [ "${OSTREE_BOOTLOADER}" = "grub" ]; then |
| 82 | mkdir -p ${PHYS_SYSROOT}/boot/grub2 | 80 | mkdir -p ${PHYS_SYSROOT}/boot/grub2 |
| 83 | touch ${PHYS_SYSROOT}/boot/grub2/grub.cfg | 81 | ln -s ../loader/grub.cfg ${PHYS_SYSROOT}/boot/grub2/grub.cfg |
| 84 | elif [ "${OSTREE_BOOTLOADER}" = "u-boot" ]; then | 82 | elif [ "${OSTREE_BOOTLOADER}" = "u-boot" ]; then |
| 85 | touch ${PHYS_SYSROOT}/boot/loader/uEnv.txt | 83 | touch ${PHYS_SYSROOT}/boot/loader/uEnv.txt |
| 86 | else | 84 | else |
diff --git a/classes/sota.bbclass b/classes/sota.bbclass index bbb9ac9..6531809 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/recipes-bsp/grub/grub-efi_%.bbappend b/recipes-bsp/grub/grub-efi_%.bbappend deleted file mode 100644 index bebb006..0000000 --- a/recipes-bsp/grub/grub-efi_%.bbappend +++ /dev/null | |||
| @@ -1,2 +0,0 @@ | |||
| 1 | |||
| 2 | GRUB_BUILDIN_append_sota = " configfile" | ||
diff --git a/recipes-core/images/initramfs-ostree-image.bb b/recipes-core/images/initramfs-ostree-image.bb index 4ab9da8..b2d9e27 100644 --- a/recipes-core/images/initramfs-ostree-image.bb +++ b/recipes-core/images/initramfs-ostree-image.bb | |||
| @@ -13,8 +13,7 @@ IMAGE_LINGUAS = "" | |||
| 13 | 13 | ||
| 14 | LICENSE = "MIT" | 14 | LICENSE = "MIT" |
| 15 | 15 | ||
| 16 | IMAGE_FSTYPES = "ext4.gz" | 16 | IMAGE_FSTYPES = "${OSTREE_INITRAMFS_FSTYPES}" |
| 17 | IMAGE_FSTYPES_append_arm = " ext4.gz.u-boot" | ||
| 18 | 17 | ||
| 19 | inherit core-image | 18 | inherit core-image |
| 20 | 19 | ||
diff --git a/recipes-sota/ostree/ostree_git.bb b/recipes-sota/ostree/ostree_git.bb index ad85775..2db96e4 100644 --- a/recipes-sota/ostree/ostree_git.bb +++ b/recipes-sota/ostree/ostree_git.bb | |||
| @@ -63,8 +63,8 @@ export SYSTEMD_REQUIRED | |||
| 63 | 63 | ||
| 64 | do_install_append() { | 64 | do_install_append() { |
| 65 | if [ -n ${SYSTEMD_REQUIRED} ]; then | 65 | if [ -n ${SYSTEMD_REQUIRED} ]; then |
| 66 | install -p -D ${S}/src/boot/ostree-prepare-root.service ${D}${systemd_unitdir}/system/ostree-prepare-root.service | 66 | install -m 0644 -D ${S}/src/boot/ostree-prepare-root.service ${D}${systemd_unitdir}/system/ostree-prepare-root.service |
| 67 | install -p -D ${S}/src/boot/ostree-remount.service ${D}${systemd_unitdir}/system/ostree-remount.service | 67 | install -m 0644 -D ${S}/src/boot/ostree-remount.service ${D}${systemd_unitdir}/system/ostree-remount.service |
| 68 | fi | 68 | fi |
| 69 | } | 69 | } |
| 70 | 70 | ||
diff --git a/scripts/lib/wic/canned-wks/sdimage-sota.wks b/scripts/lib/wic/canned-wks/sdimage-sota.wks index c31c3a5..f396526 100644 --- a/scripts/lib/wic/canned-wks/sdimage-sota.wks +++ b/scripts/lib/wic/canned-wks/sdimage-sota.wks | |||
| @@ -4,4 +4,4 @@ | |||
| 4 | # first vfat partition. | 4 | # first vfat partition. |
| 5 | 5 | ||
| 6 | part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 20 | 6 | part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 20 |
| 7 | part / --source otaimage --ondisk mmcblk --fstype=ext4 --label root --align 4096 | 7 | part / --source otaimage --ondisk mmcblk --fstype=ext4 --align 4096 |
