summaryrefslogtreecommitdiffstats
path: root/scripts/contrib
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:09:00 +0100
commit049100a9a7a6d2da18f8f85017313b890e9d02cc (patch)
tree83c5219e72d93abbef9161175a9fdeed921892a5 /scripts/contrib
parentdb162c6f564218b678b68f72e1dd4cdab3c3110f (diff)
downloadpoky-049100a9a7a6d2da18f8f85017313b890e9d02cc.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. (From OE-Core rev: 38a485aabfb57d42fa4663386c22aa9260d0a944) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/contrib')
-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
294mount $ROOTFS $ROOTFS_MNT || error "Failed to mount $ROOTFS on $ROOTFS_MNT" 294mount $ROOTFS $ROOTFS_MNT || error "Failed to mount $ROOTFS on $ROOTFS_MNT"
295mount $BOOTFS $BOOTFS_MNT || error "Failed to mount $BOOTFS on $BOOTFS_MNT" 295mount $BOOTFS $BOOTFS_MNT || error "Failed to mount $BOOTFS on $BOOTFS_MNT"
296 296
297echo "Copying ROOTFS files..."
298cp -a $HDDIMG_ROOTFS_MNT/* $ROOTFS_MNT || error "Root FS copy failed"
299
300echo "$TARGET_SWAP swap swap defaults 0 0" >> $ROOTFS_MNT/etc/fstab
301
302# We dont want udev to mount our root device while we're booting...
303if [ -d $ROOTFS_MNT/etc/udev/ ] ; then
304 echo "$TARGET_DEVICE" >> $ROOTFS_MNT/etc/udev/mount.blacklist
305fi
306
307echo "Preparing boot partition..." 297echo "Preparing boot partition..."
308EFIDIR="$BOOTFS_MNT/EFI/BOOT" 298EFIDIR="$BOOTFS_MNT/EFI/BOOT"
309cp $HDDIMG_MNT/vmlinuz $BOOTFS_MNT || error "Failed to copy vmlinuz" 299cp $HDDIMG_MNT/vmlinuz $BOOTFS_MNT || error "Failed to copy vmlinuz"
@@ -356,6 +346,18 @@ if [ ! -e $GRUB_CFG ] && [ ! -e $GUMMI_CFG ]; then
356 die "No EFI bootloader configuration found" 346 die "No EFI bootloader configuration found"
357fi 347fi
358 348
349
350info "Copying ROOTFS files (this may take a while)"
351cp -a $HDDIMG_ROOTFS_MNT/* $ROOTFS_MNT || die "Root FS copy failed"
352
353echo "$TARGET_SWAP swap swap defaults 0 0" >> $ROOTFS_MNT/etc/fstab
354
355# We dont want udev to mount our root device while we're booting...
356if [ -d $ROOTFS_MNT/etc/udev/ ] ; then
357 echo "$TARGET_DEVICE" >> $ROOTFS_MNT/etc/udev/mount.blacklist
358fi
359
360
359# Call cleanup to unmount devices and images and remove the TMPDIR 361# Call cleanup to unmount devices and images and remove the TMPDIR
360cleanup 362cleanup
361 363