diff options
author | William A. Kennington III <wak@google.com> | 2019-09-17 03:44:48 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-09-23 16:18:15 +0300 |
commit | c230ab38357abbac0fb284e27f16b3894b5af0b2 (patch) | |
tree | ba3329817a729b558734dd2753bcfeed13a55d4b | |
parent | a0924f60b5f8abec223e9cd0ba4f3b544d277f79 (diff) | |
download | openbmc-c230ab38357abbac0fb284e27f16b3894b5af0b2.tar.xz |
image_types_phosphor: Make rwfs name dependent
If we try and generate a `core-image-minimal` and `obmc-phosphor-image`
target in the same workspace we will currently encounter an error in
bitbake complaining about
```
obmc-phosphor-image-1.0-r0 do_image_complete: The recipe obmc-phosphor-image is trying to install files into a shared area when those files already exist. Those files and their manifest location are: rwfs.jffs2
```
This patch fixes the complaint by using a distinctly generated rwfs per
image type.
(From meta-phosphor rev: 8ba81f79c03e673e682079da1f2c62ebb1325645)
Change-Id: I5be72cc7d442f5c5853d87de27a57996a6af98e4
Signed-off-by: William A. Kennington III <wak@google.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
-rw-r--r-- | meta-phosphor/classes/image_types_phosphor.bbclass | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/meta-phosphor/classes/image_types_phosphor.bbclass b/meta-phosphor/classes/image_types_phosphor.bbclass index 1edf3a3be6..ae90c0e444 100644 --- a/meta-phosphor/classes/image_types_phosphor.bbclass +++ b/meta-phosphor/classes/image_types_phosphor.bbclass @@ -72,8 +72,8 @@ python() { DISTROOVERRIDES .= ":static-rwfs-${OVERLAY_BASETYPE}" DISTROOVERRIDES .= ":ubi-rwfs-${FLASH_UBI_OVERLAY_BASETYPE}" -JFFS2_RWFS_CMD = "mkfs.jffs2 --root=jffs2 --faketime --output=rwfs.jffs2" -UBIFS_RWFS_CMD = "mkfs.ubifs -r ubifs -c ${FLASH_UBI_RWFS_LEBS} -m ${FLASH_PAGE_SIZE} -e ${FLASH_LEB_SIZE} rwfs.ubifs" +JFFS2_RWFS_CMD = "mkfs.jffs2 --root=jffs2 --faketime --output=${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.jffs2" +UBIFS_RWFS_CMD = "mkfs.ubifs -r ubifs -c ${FLASH_UBI_RWFS_LEBS} -m ${FLASH_PAGE_SIZE} -e ${FLASH_LEB_SIZE} ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.ubifs" FLASH_STATIC_RWFS_CMD_static-rwfs-jffs2 = "${JFFS2_RWFS_CMD}" FLASH_UBI_RWFS_CMD_ubi-rwfs-jffs2 = "${JFFS2_RWFS_CMD}" @@ -93,7 +93,7 @@ make_rwfs() { shift opts="$@" - rm -f rwfs.$type + rm -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type rm -rf $type mkdir $type @@ -158,7 +158,7 @@ do_make_ubi() { add_volume $cfg 1 static rofs-${VERSION_ID} \ ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${FLASH_UBI_BASETYPE} - add_volume $cfg 2 dynamic rwfs rwfs.${FLASH_UBI_OVERLAY_BASETYPE} ${FLASH_UBI_RWFS_TXT_SIZE} + add_volume $cfg 2 dynamic rwfs ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${FLASH_UBI_OVERLAY_BASETYPE} ${FLASH_UBI_RWFS_TXT_SIZE} # Build the ubi partition image ubinize -p ${FLASH_PEB_SIZE}KiB -m ${FLASH_PAGE_SIZE} -o ubi-img $cfg @@ -223,7 +223,10 @@ python do_generate_static() { int(d.getVar('FLASH_ROFS_OFFSET', True)), int(d.getVar('FLASH_RWFS_OFFSET', True))) - _append_image('rwfs.%s' % d.getVar('OVERLAY_BASETYPE', True), + _append_image(os.path.join(d.getVar('IMGDEPLOYDIR', True), + '%s.%s' % ( + d.getVar('IMAGE_LINK_NAME', True), + d.getVar('OVERLAY_BASETYPE', True))), int(d.getVar('FLASH_RWFS_OFFSET', True)), int(d.getVar('FLASH_SIZE', True))) @@ -231,9 +234,6 @@ python do_generate_static() { } do_mk_static_symlinks() { - # File needed for generating non-standard legacy links below - cp rwfs.${OVERLAY_BASETYPE} ${IMGDEPLOYDIR}/rwfs.${OVERLAY_BASETYPE} - cd ${IMGDEPLOYDIR} ln -sf ${IMAGE_NAME}.static.mtd ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.static.mtd @@ -243,7 +243,7 @@ do_mk_static_symlinks() { ln -sf u-boot.${UBOOT_SUFFIX} ${IMGDEPLOYDIR}/image-u-boot ln -sf ${FLASH_KERNEL_IMAGE} ${IMGDEPLOYDIR}/image-kernel ln -sf ${IMAGE_LINK_NAME}.${IMAGE_BASETYPE} ${IMGDEPLOYDIR}/image-rofs - ln -sf rwfs.${OVERLAY_BASETYPE} ${IMGDEPLOYDIR}/image-rwfs + ln -sf ${IMAGE_LINK_NAME}.${OVERLAY_BASETYPE} ${IMGDEPLOYDIR}/image-rwfs } do_generate_static[dirs] = "${S}/static" do_generate_static[depends] += " \ @@ -299,7 +299,7 @@ make_image_links() { 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 + ln -sf ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$rwfs image-rwfs } make_tar_of_images() { |