From de65938120aa728fe3e66a7cbda76d61b8ac3466 Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Fri, 30 Mar 2018 01:46:16 -0400 Subject: image_types_phosphor: split make_tar_of_images Move image symlink creation for phosphor-bmc-code-mgmt out of make_tar_of_images into its own function, so we can run additional code in between symlink creation and tar file creation. Tested: Built witherspoon and palmetto images Change-Id: I3025db6bb788d7c2bcf5c2a400af647c7c957164 Signed-off-by: Brad Bishop --- meta-phosphor/classes/image_types_phosphor.bbclass | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'meta-phosphor/classes/image_types_phosphor.bbclass') diff --git a/meta-phosphor/classes/image_types_phosphor.bbclass b/meta-phosphor/classes/image_types_phosphor.bbclass index 87381faaa..8c1599c5b 100644 --- a/meta-phosphor/classes/image_types_phosphor.bbclass +++ b/meta-phosphor/classes/image_types_phosphor.bbclass @@ -233,20 +233,24 @@ do_generate_static_alltar() { do_generate_static_alltar[vardepsexclude] = "DATETIME" do_generate_static_alltar[dirs] = "${S}/static" -make_tar_of_images() { +make_image_links() { rwfs=$1 rofs=$2 - type=$3 - shift shift shift - extra_files="$@" - # Create some links to help make the tar archive + # Create some links to help make the tar archive in the format + # expected by phosphor-bmc-code-mgmt. ln -sf ${DEPLOY_DIR_IMAGE}/u-boot.${UBOOT_SUFFIX} image-u-boot ln -sf ${DEPLOY_DIR_IMAGE}/${FLASH_KERNEL_IMAGE} image-kernel ln -sf ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$rofs image-rofs ln -sf rwfs.$rwfs image-rwfs +} + +make_tar_of_images() { + type=$1 + shift + extra_files="$@" # Create the tar archive tar -h -cvf ${IMGDEPLOYDIR}/${IMAGE_NAME}.$type.mtd.tar \ @@ -257,7 +261,8 @@ make_tar_of_images() { } do_generate_static_tar() { - make_tar_of_images ${OVERLAY_BASETYPE} ${IMAGE_BASETYPE} static + make_image_links ${OVERLAY_BASETYPE} ${IMAGE_BASETYPE} + make_tar_of_images static # Maintain non-standard legacy link. cd ${IMGDEPLOYDIR} @@ -273,7 +278,8 @@ do_generate_static_tar[vardepsexclude] = "DATETIME" do_generate_ubi_tar() { ln -sf ${S}/MANIFEST MANIFEST - make_tar_of_images ${FLASH_UBI_OVERLAY_BASETYPE} ${FLASH_UBI_BASETYPE} ubi MANIFEST + make_image_links ${FLASH_UBI_OVERLAY_BASETYPE} ${FLASH_UBI_BASETYPE} + make_tar_of_images ubi MANIFEST } do_generate_ubi_tar[dirs] = " ${S}/ubi" do_generate_ubi_tar[depends] += " \ -- cgit v1.2.3