diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-03-30 08:46:16 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-03-30 19:40:17 +0300 |
commit | de65938120aa728fe3e66a7cbda76d61b8ac3466 (patch) | |
tree | a5d4920c0ecf1d4cd17db27b8865de7d771ff541 /meta-phosphor | |
parent | 048de7c6bd8f1ab07678bb349b3897ae4f67dca0 (diff) | |
download | openbmc-de65938120aa728fe3e66a7cbda76d61b8ac3466.tar.xz |
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 <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor')
-rw-r--r-- | meta-phosphor/classes/image_types_phosphor.bbclass | 20 |
1 files changed, 13 insertions, 7 deletions
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] += " \ |