summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorNg, Mei Yeen <mei.yeen.ng@intel.com>2015-11-26 11:30:50 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-08 10:27:15 +0000
commitc3087bd977579cfe6736a7cb3c32f3f8a815dd29 (patch)
tree7f5f57852154ca9d76f7c27e4f6f7802df6c243e /meta/recipes-core
parentd2bf9fb2cafd4368e4796503c0ea3b8713efe4f3 (diff)
downloadpoky-c3087bd977579cfe6736a7cb3c32f3f8a815dd29.tar.gz
init-install-efi: fix script for eMMC installation
Running the install option from bootloader to install image to eMMC will fail with error: Formatting /dev/mmcblk01 to vfat... mkfs.fat 3.0.28 (2015-05-16) /dev/mmcblk01: No such file or directory This issue impacts both grub and gummiboot install option to eMMC device. The installation failure is due to the following: [1] Unable to partition eMMC as the partition prefix 'p' is not appended The condition checking failed with the additional /dev/ appended with the target device name. [2] The partition uuid for boot, root and swap partition is not captured for eMMC This fix updated the condition checking and changed the variables to reference the boot, root and swap partitions for UUID. [YOCTO #8710] (master rev: a7d081c3db776c8b0734942df6bf96f811f15bd3) (From OE-Core rev: 1be316beb5c2b1e32f11ab8ec5dee68f64defb2d) Signed-off-by: Ng, Mei Yeen <mei.yeen.ng@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-efi.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index fc4908ef91..ac26bceceb 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -134,7 +134,7 @@ swap_start=$((rootfs_end))
134# 2) they are detected asynchronously (need rootwait) 134# 2) they are detected asynchronously (need rootwait)
135rootwait="" 135rootwait=""
136part_prefix="" 136part_prefix=""
137if [ ! "${device#mmcblk}" = "${device}" ]; then 137if [ ! "${device#/dev/mmcblk}" = "${device}" ]; then
138 part_prefix="p" 138 part_prefix="p"
139 rootwait="rootwait" 139 rootwait="rootwait"
140fi 140fi
@@ -184,8 +184,8 @@ mount -o rw,loop,noatime,nodiratime /run/media/$1/$2 /src_root
184echo "Copying rootfs files..." 184echo "Copying rootfs files..."
185cp -a /src_root/* /tgt_root 185cp -a /src_root/* /tgt_root
186if [ -d /tgt_root/etc/ ] ; then 186if [ -d /tgt_root/etc/ ] ; then
187 boot_uuid=$(blkid -o value -s UUID ${device}1) 187 boot_uuid=$(blkid -o value -s UUID ${bootfs})
188 swap_part_uuid=$(blkid -o value -s PARTUUID ${device}3) 188 swap_part_uuid=$(blkid -o value -s PARTUUID ${swap})
189 echo "/dev/disk/by-partuuid/$swap_part_uuid swap swap defaults 0 0" >> /tgt_root/etc/fstab 189 echo "/dev/disk/by-partuuid/$swap_part_uuid swap swap defaults 0 0" >> /tgt_root/etc/fstab
190 echo "UUID=$boot_uuid /boot vfat defaults 1 2" >> /tgt_root/etc/fstab 190 echo "UUID=$boot_uuid /boot vfat defaults 1 2" >> /tgt_root/etc/fstab
191 # We dont want udev to mount our root device while we're booting... 191 # We dont want udev to mount our root device while we're booting...
@@ -206,7 +206,7 @@ mkdir -p $EFIDIR
206cp /run/media/$1/EFI/BOOT/*.efi $EFIDIR 206cp /run/media/$1/EFI/BOOT/*.efi $EFIDIR
207 207
208if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then 208if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then
209 root_part_uuid=$(blkid -o value -s PARTUUID ${device}2) 209 root_part_uuid=$(blkid -o value -s PARTUUID ${rootfs})
210 GRUBCFG="$EFIDIR/grub.cfg" 210 GRUBCFG="$EFIDIR/grub.cfg"
211 cp /run/media/$1/EFI/BOOT/grub.cfg $GRUBCFG 211 cp /run/media/$1/EFI/BOOT/grub.cfg $GRUBCFG
212 # Update grub config for the installed image 212 # Update grub config for the installed image