aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRaymond Tan <raymond.tan@intel.com>2016-05-17 13:41:09 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-29 19:34:42 +0100
commit97c447ba39a6c81f13f02b7abd43138c538285e6 (patch)
treeab5d5d3e89bfe519bdf0949c2bb4be93798230ba /scripts
parentdf76bd9ff6289d2b561d8f79a39bc90ba3c6a488 (diff)
downloadopenembedded-core-97c447ba39a6c81f13f02b7abd43138c538285e6.tar.gz
mkefidisk.sh: mount images as read-only
Mount the hddimg and rootfs.img as read-only when creating the bootable image on the medium. Otherwise, the md5 checksum values of the hddimg will be altered. As this changed checksum value might cause issue for users whom would reuse the hddimg. (From OE-Core rev: a1391c8a603f0ed972ee0bcc8c74999f5f43be43) Signed-off-by: Raymond Tan <raymond.tan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/contrib/mkefidisk.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh
index 333284ff50..d8db3c0165 100755
--- a/scripts/contrib/mkefidisk.sh
+++ b/scripts/contrib/mkefidisk.sh
@@ -369,8 +369,8 @@ mkswap $SWAP >$OUT 2>&1 || die "Failed to prepare swap"
# Installing to $DEVICE
#
debug "Mounting images and device in preparation for installation"
-mount -o loop $HDDIMG $HDDIMG_MNT >$OUT 2>&1 || error "Failed to mount $HDDIMG"
-mount -o loop $HDDIMG_MNT/rootfs.img $HDDIMG_ROOTFS_MNT >$OUT 2>&1 || error "Failed to mount rootfs.img"
+mount -o ro,loop $HDDIMG $HDDIMG_MNT >$OUT 2>&1 || error "Failed to mount $HDDIMG"
+mount -o ro,loop $HDDIMG_MNT/rootfs.img $HDDIMG_ROOTFS_MNT >$OUT 2>&1 || error "Failed to mount rootfs.img"
mount $ROOTFS $ROOTFS_MNT >$OUT 2>&1 || error "Failed to mount $ROOTFS on $ROOTFS_MNT"
mount $BOOTFS $BOOTFS_MNT >$OUT 2>&1 || error "Failed to mount $BOOTFS on $BOOTFS_MNT"