summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDarren Hart <dvhart@linux.intel.com>2014-07-21 22:45:57 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-23 21:59:14 +0100
commitce3857994a0055a0e47b97771ec8ffc5b28e32f4 (patch)
tree1fb550d1cb9820daee9ce41c7a5e7e38b7902689 /scripts
parentacfe054e32b9e60db3970d7546e759b37fde74c2 (diff)
downloadpoky-ce3857994a0055a0e47b97771ec8ffc5b28e32f4.tar.gz
mkefidisk.sh: Fix redirection to 1
The current script intends to redirect stderr to stdout, but instead redirects to a file named 1. No doubt a regex replace error. Replace all instances of 2>1 with 2>&1. (From OE-Core rev: 1864ca9751c28cca248cfba77a3d23fc58ff43bb) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/contrib/mkefidisk.sh38
1 files changed, 19 insertions, 19 deletions
diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh
index ba2b56393b..28cfb6dd54 100755
--- a/scripts/contrib/mkefidisk.sh
+++ b/scripts/contrib/mkefidisk.sh
@@ -257,22 +257,22 @@ echo ""
257info "Partitioning installation media ($DEVICE)" 257info "Partitioning installation media ($DEVICE)"
258 258
259debug "Deleting partition table on $DEVICE" 259debug "Deleting partition table on $DEVICE"
260dd if=/dev/zero of=$DEVICE bs=512 count=2 >$OUT 2>1 || die "Failed to zero beginning of $DEVICE" 260dd if=/dev/zero of=$DEVICE bs=512 count=2 >$OUT 2>&1 || die "Failed to zero beginning of $DEVICE"
261 261
262debug "Creating new partition table (MSDOS) on $DEVICE" 262debug "Creating new partition table (MSDOS) on $DEVICE"
263parted $DEVICE mklabel msdos >$OUT 2>1 || die "Failed to create MSDOS partition table" 263parted $DEVICE mklabel msdos >$OUT 2>&1 || die "Failed to create MSDOS partition table"
264 264
265debug "Creating boot partition on $BOOTFS" 265debug "Creating boot partition on $BOOTFS"
266parted $DEVICE mkpart primary 0% $BOOT_SIZE >$OUT 2>1 || die "Failed to create BOOT partition" 266parted $DEVICE mkpart primary 0% $BOOT_SIZE >$OUT 2>&1 || die "Failed to create BOOT partition"
267 267
268debug "Enabling boot flag on $BOOTFS" 268debug "Enabling boot flag on $BOOTFS"
269parted $DEVICE set 1 boot on >$OUT 2>1 || die "Failed to enable boot flag" 269parted $DEVICE set 1 boot on >$OUT 2>&1 || die "Failed to enable boot flag"
270 270
271debug "Creating ROOTFS partition on $ROOTFS" 271debug "Creating ROOTFS partition on $ROOTFS"
272parted $DEVICE mkpart primary $ROOTFS_START $ROOTFS_END >$OUT 2>1 || die "Failed to create ROOTFS partition" 272parted $DEVICE mkpart primary $ROOTFS_START $ROOTFS_END >$OUT 2>&1 || die "Failed to create ROOTFS partition"
273 273
274debug "Creating swap partition on $SWAP" 274debug "Creating swap partition on $SWAP"
275parted $DEVICE mkpart primary $SWAP_START 100% >$OUT 2>1 || die "Failed to create SWAP partition" 275parted $DEVICE mkpart primary $SWAP_START 100% >$OUT 2>&1 || die "Failed to create SWAP partition"
276 276
277if [ $DEBUG -eq 1 ]; then 277if [ $DEBUG -eq 1 ]; then
278 parted $DEVICE print 278 parted $DEVICE print
@@ -291,34 +291,34 @@ unmount_device || die "Failed to unmount $DEVICE partitions"
291info "Formating partitions" 291info "Formating partitions"
292debug "Formatting $BOOTFS as vfat" 292debug "Formatting $BOOTFS as vfat"
293if [ ! "${DEVICE#/dev/loop}" = "${DEVICE}" ]; then 293if [ ! "${DEVICE#/dev/loop}" = "${DEVICE}" ]; then
294 mkfs.vfat -I $BOOTFS -n "EFI" >$OUT 2>1 || die "Failed to format $BOOTFS" 294 mkfs.vfat -I $BOOTFS -n "EFI" >$OUT 2>&1 || die "Failed to format $BOOTFS"
295else 295else
296 mkfs.vfat $BOOTFS -n "EFI" >$OUT 2>1 || die "Failed to format $BOOTFS" 296 mkfs.vfat $BOOTFS -n "EFI" >$OUT 2>&1 || die "Failed to format $BOOTFS"
297fi 297fi
298 298
299debug "Formatting $ROOTFS as ext3" 299debug "Formatting $ROOTFS as ext3"
300mkfs.ext3 -F $ROOTFS -L "ROOT" >$OUT 2>1 || die "Failed to format $ROOTFS" 300mkfs.ext3 -F $ROOTFS -L "ROOT" >$OUT 2>&1 || die "Failed to format $ROOTFS"
301 301
302debug "Formatting swap partition ($SWAP)" 302debug "Formatting swap partition ($SWAP)"
303mkswap $SWAP >$OUT 2>1 || die "Failed to prepare swap" 303mkswap $SWAP >$OUT 2>&1 || die "Failed to prepare swap"
304 304
305 305
306# 306#
307# Installing to $DEVICE 307# Installing to $DEVICE
308# 308#
309debug "Mounting images and device in preparation for installation" 309debug "Mounting images and device in preparation for installation"
310mount -o loop $HDDIMG $HDDIMG_MNT >$OUT 2>1 || error "Failed to mount $HDDIMG" 310mount -o loop $HDDIMG $HDDIMG_MNT >$OUT 2>&1 || error "Failed to mount $HDDIMG"
311mount -o loop $HDDIMG_MNT/rootfs.img $HDDIMG_ROOTFS_MNT >$OUT 2>1 || error "Failed to mount rootfs.img" 311mount -o loop $HDDIMG_MNT/rootfs.img $HDDIMG_ROOTFS_MNT >$OUT 2>&1 || error "Failed to mount rootfs.img"
312mount $ROOTFS $ROOTFS_MNT >$OUT 2>1 || error "Failed to mount $ROOTFS on $ROOTFS_MNT" 312mount $ROOTFS $ROOTFS_MNT >$OUT 2>&1 || error "Failed to mount $ROOTFS on $ROOTFS_MNT"
313mount $BOOTFS $BOOTFS_MNT >$OUT 2>1 || error "Failed to mount $BOOTFS on $BOOTFS_MNT" 313mount $BOOTFS $BOOTFS_MNT >$OUT 2>&1 || error "Failed to mount $BOOTFS on $BOOTFS_MNT"
314 314
315info "Preparing boot partition" 315info "Preparing boot partition"
316EFIDIR="$BOOTFS_MNT/EFI/BOOT" 316EFIDIR="$BOOTFS_MNT/EFI/BOOT"
317cp $HDDIMG_MNT/vmlinuz $BOOTFS_MNT >$OUT 2>1 || error "Failed to copy vmlinuz" 317cp $HDDIMG_MNT/vmlinuz $BOOTFS_MNT >$OUT 2>&1 || error "Failed to copy vmlinuz"
318# Copy the efi loader and configs (booti*.efi and grub.cfg if it exists) 318# Copy the efi loader and configs (booti*.efi and grub.cfg if it exists)
319cp -r $HDDIMG_MNT/EFI $BOOTFS_MNT >$OUT 2>1 || error "Failed to copy EFI dir" 319cp -r $HDDIMG_MNT/EFI $BOOTFS_MNT >$OUT 2>&1 || error "Failed to copy EFI dir"
320# Silently ignore a missing gummiboot loader dir (we might just be a GRUB image) 320# Silently ignore a missing gummiboot loader dir (we might just be a GRUB image)
321cp -r $HDDIMG_MNT/loader $BOOTFS_MNT >$OUT 2>1 321cp -r $HDDIMG_MNT/loader $BOOTFS_MNT >$OUT 2>&1
322 322
323# Update the boot loaders configurations for an installed image 323# Update the boot loaders configurations for an installed image
324# Remove any existing root= kernel parameters and: 324# Remove any existing root= kernel parameters and:
@@ -349,7 +349,7 @@ GUMMI_CFG="$GUMMI_ENTRIES/boot.conf"
349if [ -d "$GUMMI_ENTRIES" ]; then 349if [ -d "$GUMMI_ENTRIES" ]; then
350 info "Configuring Gummiboot" 350 info "Configuring Gummiboot"
351 # remove the install target if it exists 351 # remove the install target if it exists
352 rm $GUMMI_ENTRIES/install.conf >$OUT 2>1 352 rm $GUMMI_ENTRIES/install.conf >$OUT 2>&1
353 353
354 if [ ! -e "$GUMMI_CFG" ]; then 354 if [ ! -e "$GUMMI_CFG" ]; then
355 echo "ERROR: $GUMMI_CFG not found" 355 echo "ERROR: $GUMMI_CFG not found"
@@ -367,7 +367,7 @@ fi
367 367
368 368
369info "Copying ROOTFS files (this may take a while)" 369info "Copying ROOTFS files (this may take a while)"
370cp -a $HDDIMG_ROOTFS_MNT/* $ROOTFS_MNT >$OUT 2>1 || die "Root FS copy failed" 370cp -a $HDDIMG_ROOTFS_MNT/* $ROOTFS_MNT >$OUT 2>&1 || die "Root FS copy failed"
371 371
372echo "$TARGET_SWAP swap swap defaults 0 0" >> $ROOTFS_MNT/etc/fstab 372echo "$TARGET_SWAP swap swap defaults 0 0" >> $ROOTFS_MNT/etc/fstab
373 373