diff options
author | Raymond Tan <raymond.tan@intel.com> | 2016-05-17 13:41:09 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-19 09:05:18 +0100 |
commit | 37abaa362c8e9139859a1767c98be588f5ee41dd (patch) | |
tree | 947bdd51fe3a28fbe58825965848bf7bf193f145 /scripts/contrib/mkefidisk.sh | |
parent | e44c849769088c0522872aff7408abae1797808f (diff) | |
download | poky-37abaa362c8e9139859a1767c98be588f5ee41dd.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>
Diffstat (limited to 'scripts/contrib/mkefidisk.sh')
-rwxr-xr-x | scripts/contrib/mkefidisk.sh | 4 |
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" | |||
369 | # Installing to $DEVICE | 369 | # Installing to $DEVICE |
370 | # | 370 | # |
371 | debug "Mounting images and device in preparation for installation" | 371 | debug "Mounting images and device in preparation for installation" |
372 | mount -o loop $HDDIMG $HDDIMG_MNT >$OUT 2>&1 || error "Failed to mount $HDDIMG" | 372 | mount -o ro,loop $HDDIMG $HDDIMG_MNT >$OUT 2>&1 || error "Failed to mount $HDDIMG" |
373 | mount -o loop $HDDIMG_MNT/rootfs.img $HDDIMG_ROOTFS_MNT >$OUT 2>&1 || error "Failed to mount rootfs.img" | 373 | mount -o ro,loop $HDDIMG_MNT/rootfs.img $HDDIMG_ROOTFS_MNT >$OUT 2>&1 || error "Failed to mount rootfs.img" |
374 | mount $ROOTFS $ROOTFS_MNT >$OUT 2>&1 || error "Failed to mount $ROOTFS on $ROOTFS_MNT" | 374 | mount $ROOTFS $ROOTFS_MNT >$OUT 2>&1 || error "Failed to mount $ROOTFS on $ROOTFS_MNT" |
375 | mount $BOOTFS $BOOTFS_MNT >$OUT 2>&1 || error "Failed to mount $BOOTFS on $BOOTFS_MNT" | 375 | mount $BOOTFS $BOOTFS_MNT >$OUT 2>&1 || error "Failed to mount $BOOTFS on $BOOTFS_MNT" |
376 | 376 | ||