aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Hart <dvhart@linux.intel.com>2014-07-16 14:16:03 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-19 00:08:48 +0100
commit38a485aabfb57d42fa4663386c22aa9260d0a944 (patch)
tree1f3aac997a5364868915e3dc2bfd8aadecb1dcb3
parent40fe82fecf7a94b24893862ac17ee2bc749fc5e8 (diff)
downloadopenembedded-core-contrib-38a485aabfb57d42fa4663386c22aa9260d0a944.tar.gz
mkefidisk.sh: Make the rootfs copy the last step
Copying the rootfs is the most time intensive task. Move it last so if we are to encounter other errors, we do so quickly and error out. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/contrib/mkefidisk.sh22
1 files changed, 12 insertions, 10 deletions
diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh
index 6cc6b78de2..85e58ef865 100755
--- a/scripts/contrib/mkefidisk.sh
+++ b/scripts/contrib/mkefidisk.sh
@@ -294,16 +294,6 @@ mount -o loop $HDDIMG_MNT/rootfs.img $HDDIMG_ROOTFS_MNT || error "Failed to moun
mount $ROOTFS $ROOTFS_MNT || error "Failed to mount $ROOTFS on $ROOTFS_MNT"
mount $BOOTFS $BOOTFS_MNT || error "Failed to mount $BOOTFS on $BOOTFS_MNT"
-echo "Copying ROOTFS files..."
-cp -a $HDDIMG_ROOTFS_MNT/* $ROOTFS_MNT || error "Root FS copy failed"
-
-echo "$TARGET_SWAP swap swap defaults 0 0" >> $ROOTFS_MNT/etc/fstab
-
-# We dont want udev to mount our root device while we're booting...
-if [ -d $ROOTFS_MNT/etc/udev/ ] ; then
- echo "$TARGET_DEVICE" >> $ROOTFS_MNT/etc/udev/mount.blacklist
-fi
-
echo "Preparing boot partition..."
EFIDIR="$BOOTFS_MNT/EFI/BOOT"
cp $HDDIMG_MNT/vmlinuz $BOOTFS_MNT || error "Failed to copy vmlinuz"
@@ -356,6 +346,18 @@ if [ ! -e $GRUB_CFG ] && [ ! -e $GUMMI_CFG ]; then
die "No EFI bootloader configuration found"
fi
+
+info "Copying ROOTFS files (this may take a while)"
+cp -a $HDDIMG_ROOTFS_MNT/* $ROOTFS_MNT || die "Root FS copy failed"
+
+echo "$TARGET_SWAP swap swap defaults 0 0" >> $ROOTFS_MNT/etc/fstab
+
+# We dont want udev to mount our root device while we're booting...
+if [ -d $ROOTFS_MNT/etc/udev/ ] ; then
+ echo "$TARGET_DEVICE" >> $ROOTFS_MNT/etc/udev/mount.blacklist
+fi
+
+
# Call cleanup to unmount devices and images and remove the TMPDIR
cleanup