summaryrefslogtreecommitdiff
path: root/meta/recipes-core/initrdscripts/files
diff options
context:
space:
mode:
authorUrs Fässler <urs.fassler@bbv.ch>2016-02-08 13:31:58 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-11 12:27:26 +0000
commit00a45d2e50c4f044ee4099940dd7d13ca44f7187 (patch)
tree28153e6fff8919b1cb5ac42dc217195a063c5ff7 /meta/recipes-core/initrdscripts/files
parent46c21d0b99de7cae5644151c879e10fe7f28b82d (diff)
downloadopenembedded-core-00a45d2e50c4f044ee4099940dd7d13ca44f7187.tar.gz
openembedded-core-00a45d2e50c4f044ee4099940dd7d13ca44f7187.tar.bz2
openembedded-core-00a45d2e50c4f044ee4099940dd7d13ca44f7187.zip
initrdscripts: fix mmc device as install target
Installing from USB to an internal SD Card did not work with Linux 4.4 in Yocto jethro. With this patch, consistent names are used for the paritions. Signed-off-by: Urs Fässler <urs.fassler@bbv.ch> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-core/initrdscripts/files')
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
index f9e9768e43..1925d90693 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -141,7 +141,7 @@ swap_start=$((rootfs_end))
# 2) they are detected asynchronously (need rootwait)
rootwait=""
part_prefix=""
-if [ ! "${device#mmcblk}" = "${device}" ]; then
+if [ ! "${device#/dev/mmcblk}" = "${device}" ]; then
part_prefix="p"
rootwait="rootwait"
fi
@@ -211,13 +211,13 @@ echo "Copying rootfs files..."
cp -a /src_root/* /tgt_root
if [ -d /tgt_root/etc/ ] ; then
if [ $grub_version -ne 0 ] ; then
- boot_uuid=$(blkid -o value -s UUID ${device}2)
- swap_part_uuid=$(blkid -o value -s PARTUUID ${device}4)
+ boot_uuid=$(blkid -o value -s UUID ${bootfs})
+ swap_part_uuid=$(blkid -o value -s PARTUUID ${swap})
bootdev="UUID=$boot_uuid"
swapdev=/dev/disk/by-partuuid/$swap_part_uuid
else
- bootdev=${device}2
- swapdev=${device}4
+ bootdev=${bootfs}
+ swapdev=${swap}
fi
echo "$swapdev swap swap defaults 0 0" >> /tgt_root/etc/fstab
echo "$bootdev /boot ext3 defaults 1 2" >> /tgt_root/etc/fstab
@@ -234,8 +234,8 @@ mount $bootfs /boot
echo "Preparing boot partition..."
if [ -f /etc/grub.d/00_header -a $grub_version -ne 0 ] ; then
echo "Preparing custom grub2 menu..."
- root_part_uuid=$(blkid -o value -s PARTUUID ${device}3)
- boot_uuid=$(blkid -o value -s UUID ${device}2)
+ root_part_uuid=$(blkid -o value -s PARTUUID ${rootfs})
+ boot_uuid=$(blkid -o value -s UUID ${bootfs})
GRUBCFG="/boot/grub/grub.cfg"
mkdir -p $(dirname $GRUBCFG)
cat >$GRUBCFG <<_EOF