diff options
author | Urs Fässler <urs.fassler@bbv.ch> | 2016-02-08 13:31:58 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-11 12:27:47 +0000 |
commit | 7edea7c0a48656e0279d0ac00bb6ad7ceac7100e (patch) | |
tree | a84d279aa40a86778b46df9ed81afa05df295b53 /meta | |
parent | c3ef2bb0bdaf8a08c1a2a1ba5543babe6f7be03a (diff) | |
download | poky-7edea7c0a48656e0279d0ac00bb6ad7ceac7100e.tar.gz |
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.
(From OE-Core rev: 00a45d2e50c4f044ee4099940dd7d13ca44f7187)
Signed-off-by: Urs Fässler <urs.fassler@bbv.ch>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/initrdscripts/files/init-install.sh | 14 |
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)) | |||
141 | # 2) they are detected asynchronously (need rootwait) | 141 | # 2) they are detected asynchronously (need rootwait) |
142 | rootwait="" | 142 | rootwait="" |
143 | part_prefix="" | 143 | part_prefix="" |
144 | if [ ! "${device#mmcblk}" = "${device}" ]; then | 144 | if [ ! "${device#/dev/mmcblk}" = "${device}" ]; then |
145 | part_prefix="p" | 145 | part_prefix="p" |
146 | rootwait="rootwait" | 146 | rootwait="rootwait" |
147 | fi | 147 | fi |
@@ -211,13 +211,13 @@ echo "Copying rootfs files..." | |||
211 | cp -a /src_root/* /tgt_root | 211 | cp -a /src_root/* /tgt_root |
212 | if [ -d /tgt_root/etc/ ] ; then | 212 | if [ -d /tgt_root/etc/ ] ; then |
213 | if [ $grub_version -ne 0 ] ; then | 213 | if [ $grub_version -ne 0 ] ; then |
214 | boot_uuid=$(blkid -o value -s UUID ${device}2) | 214 | boot_uuid=$(blkid -o value -s UUID ${bootfs}) |
215 | swap_part_uuid=$(blkid -o value -s PARTUUID ${device}4) | 215 | swap_part_uuid=$(blkid -o value -s PARTUUID ${swap}) |
216 | bootdev="UUID=$boot_uuid" | 216 | bootdev="UUID=$boot_uuid" |
217 | swapdev=/dev/disk/by-partuuid/$swap_part_uuid | 217 | swapdev=/dev/disk/by-partuuid/$swap_part_uuid |
218 | else | 218 | else |
219 | bootdev=${device}2 | 219 | bootdev=${bootfs} |
220 | swapdev=${device}4 | 220 | swapdev=${swap} |
221 | fi | 221 | fi |
222 | echo "$swapdev swap swap defaults 0 0" >> /tgt_root/etc/fstab | 222 | echo "$swapdev swap swap defaults 0 0" >> /tgt_root/etc/fstab |
223 | echo "$bootdev /boot ext3 defaults 1 2" >> /tgt_root/etc/fstab | 223 | echo "$bootdev /boot ext3 defaults 1 2" >> /tgt_root/etc/fstab |
@@ -234,8 +234,8 @@ mount $bootfs /boot | |||
234 | echo "Preparing boot partition..." | 234 | echo "Preparing boot partition..." |
235 | if [ -f /etc/grub.d/00_header -a $grub_version -ne 0 ] ; then | 235 | if [ -f /etc/grub.d/00_header -a $grub_version -ne 0 ] ; then |
236 | echo "Preparing custom grub2 menu..." | 236 | echo "Preparing custom grub2 menu..." |
237 | root_part_uuid=$(blkid -o value -s PARTUUID ${device}3) | 237 | root_part_uuid=$(blkid -o value -s PARTUUID ${rootfs}) |
238 | boot_uuid=$(blkid -o value -s UUID ${device}2) | 238 | boot_uuid=$(blkid -o value -s UUID ${bootfs}) |
239 | GRUBCFG="/boot/grub/grub.cfg" | 239 | GRUBCFG="/boot/grub/grub.cfg" |
240 | mkdir -p $(dirname $GRUBCFG) | 240 | mkdir -p $(dirname $GRUBCFG) |
241 | cat >$GRUBCFG <<_EOF | 241 | cat >$GRUBCFG <<_EOF |