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>
diff --git a/meta-phosphor/classes/image_types_phosphor.bbclass b/meta-phosphor/classes/image_types_phosphor.bbclass
index 87381fa..8c1599c 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[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 @@
}
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_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] += " \