From 9dcfcdb9aa2da833a3b86b87fbbb22b60e5d7e3c Mon Sep 17 00:00:00 2001 From: Yevgeny Popovych Date: Tue, 19 Jun 2018 13:08:50 +0300 Subject: 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 --- classes/image_types_ostree.bbclass | 6 ++---- classes/sota.bbclass | 4 ++-- classes/sota_qemux86-64.bbclass | 2 +- classes/sota_raspberrypi.bbclass | 1 + 4 files changed, 6 insertions(+), 7 deletions(-) (limited to 'classes') 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 \ coreutils-native:do_populate_sysroot \ unzip-native:do_populate_sysroot \ virtual/kernel:do_deploy \ - ${OSTREE_INITRAMFS_IMAGE}:do_image_complete" +" export OSTREE_REPO export OSTREE_BRANCHNAME export GARAGE_TARGET_NAME -RAMDISK_EXT ?= ".${OSTREE_INITRAMFS_FSTYPES}" - OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}" export SYSTEMD_USED = "${@oe.utils.ifelse(d.getVar('VIRTUAL-RUNTIME_init_manager', True) == 'systemd', 'true', '')}" @@ -124,7 +122,7 @@ IMAGE_CMD_ostree () { checksum=`sha256sum ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} | cut -f 1 -d " "` cp ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} boot/vmlinuz-${checksum} - cp ${DEPLOY_DIR_IMAGE}/${OSTREE_INITRAMFS_IMAGE}-${MACHINE}${RAMDISK_EXT} boot/initramfs-${checksum} + cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.${INITRAMFS_FSTYPES} boot/initramfs-${checksum} # Copy image manifest 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" EXTRA_IMAGEDEPENDS_append_sota = " parted-native mtools-native dosfstools-native" -OSTREE_INITRAMFS_FSTYPES ??= "${@oe.utils.ifelse(d.getVar('OSTREE_BOOTLOADER', True) == 'u-boot', 'ext4.gz.u-boot', 'ext4.gz')}" +INITRAMFS_FSTYPES ??= "${@oe.utils.ifelse(d.getVar('OSTREE_BOOTLOADER', True) == 'u-boot', 'ext4.gz.u-boot', 'ext4.gz')}" # Please redefine OSTREE_REPO in order to have a persistent OSTree repo OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo" OSTREE_BRANCHNAME ?= "${MACHINE}" OSTREE_OSNAME ?= "poky" -OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image" +INITRAMFS_IMAGE ?= "initramfs-ostree-image" OSTREE_BOOTLOADER ??= 'u-boot' GARAGE_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" PREFERRED_PROVIDER_virtual/bootloader_sota = "u-boot" UBOOT_MACHINE_sota = "qemu-x86_defconfig" OSTREE_BOOTLOADER ?= "u-boot" -OSTREE_INITRAMFS_FSTYPES ?= "ext4.gz" +INITRAMFS_FSTYPES ?= "ext4.gz" 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 index a5558b4..e69ccf8 100644 --- a/classes/sota_raspberrypi.bbclass +++ b/classes/sota_raspberrypi.bbclass @@ -2,6 +2,7 @@ RPI_USE_U_BOOT_sota = "1" KERNEL_CLASSES_append_sota = " kernel-fitimage" KERNEL_IMAGETYPE_sota = "fitImage" +OSTREE_KERNEL = "${KERNEL_IMAGETYPE}-${INITRAMFS_IMAGE}-${MACHINE}.bin" PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot" UBOOT_ENTRYPOINT_sota ?= "0x00008000" -- cgit v1.2.3-54-g00ecf