* [PATCH 0/2] meta: fix installation issue with install-efi.sh script
@ 2015-11-26 2:25 Mei Yeen Ng
2015-11-26 2:25 ` [PATCH 1/2] meta: fix install-efi script for gummiboot loader Mei Yeen Ng
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Mei Yeen Ng @ 2015-11-26 2:25 UTC (permalink / raw)
To: openembedded-core; +Cc: Mei Yeen Ng
From: "Ng, Mei Yeen" <mei.yeen.ng@intel.com>
Hi maintainers and communities,
These two patches fix the below two bugs:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=8709
https://bugzilla.yoctoproject.org/show_bug.cgi?id=8710
When running the install option in Gummiboot and GRUB boot loader results in
boot failure on target device:
1/ After installing image to SATA using Gummiboot, image fail to boot from SATA
due to missing root=PARTUUID= in the boot parameter. Addressed this by
assigning the root uuid for non-grub boot loader in install-efi script.
2/ Installing image to eMMC via GRUB and Gummiboot boot loader install option
due to partition prefix and uuid for boot, root, and swap partition are
are not captured for eMMC. Addressed this by referencing the another variable
which captures the prefix assignment.
These patches are applied, build and tested on 2 different Intel platforms
The tests results passed for the following scenarios:
GRUB loader + install to SATA = Passed
GRUB loader + install to eMMC = Passed
Gummiboot loader + install to SATA = Passed
Gummiboot loader + install to eMMC = Passed
Ng, Mei Yeen (2):
meta: fix install-efi script for gummiboot loader
meta: fix install-efi script for emmc installation
meta/recipes-core/initrdscripts/files/init-install-efi.sh | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/2] meta: fix install-efi script for gummiboot loader
2015-11-26 2:25 [PATCH 0/2] meta: fix installation issue with install-efi.sh script Mei Yeen Ng
@ 2015-11-26 2:25 ` Mei Yeen Ng
2015-11-26 2:25 ` [PATCH 2/2] meta: fix install-efi script for emmc installation Mei Yeen Ng
2015-11-26 2:41 ` [PATCH 0/2] meta: fix installation issue with install-efi.sh script Saul Wold
2 siblings, 0 replies; 4+ messages in thread
From: Mei Yeen Ng @ 2015-11-26 2:25 UTC (permalink / raw)
To: openembedded-core; +Cc: Mei Yeen Ng
From: "Ng, Mei Yeen" <mei.yeen.ng@intel.com>
After running gummiboot loader install option, the installed target
storage device boot parameter for root=PARTUUID is empty causing boot failure.
This issue is only observed with gummiboot and not with GRUB loader.
This fix assigs the rootuuid of the rootfs partition for gummiboot loader.
[YOCTO #8709]
Signed-off-by: Ng, Mei Yeen <mei.yeen.ng@intel.com>
---
meta/recipes-core/initrdscripts/files/init-install-efi.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index fc4908e..3c79a0d 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -223,6 +223,7 @@ if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then
fi
if [ -d /run/media/$1/loader ]; then
+ rootuuid=$(blkid -o value -s PARTUUID ${rootfs})
GUMMIBOOT_CFGS="/boot/loader/entries/*.conf"
# copy config files for gummiboot
cp -dr /run/media/$1/loader /boot
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] meta: fix install-efi script for emmc installation
2015-11-26 2:25 [PATCH 0/2] meta: fix installation issue with install-efi.sh script Mei Yeen Ng
2015-11-26 2:25 ` [PATCH 1/2] meta: fix install-efi script for gummiboot loader Mei Yeen Ng
@ 2015-11-26 2:25 ` Mei Yeen Ng
2015-11-26 2:41 ` [PATCH 0/2] meta: fix installation issue with install-efi.sh script Saul Wold
2 siblings, 0 replies; 4+ messages in thread
From: Mei Yeen Ng @ 2015-11-26 2:25 UTC (permalink / raw)
To: openembedded-core; +Cc: Mei Yeen Ng
From: "Ng, Mei Yeen" <mei.yeen.ng@intel.com>
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 options 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 to
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]
Signed-off-by: Ng, Mei Yeen <mei.yeen.ng@intel.com>
---
meta/recipes-core/initrdscripts/files/init-install-efi.sh | 8 ++++----
1 file 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 3c79a0d..0443a9d 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))
# 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
@@ -184,8 +184,8 @@ mount -o rw,loop,noatime,nodiratime /run/media/$1/$2 /src_root
echo "Copying rootfs files..."
cp -a /src_root/* /tgt_root
if [ -d /tgt_root/etc/ ] ; then
- boot_uuid=$(blkid -o value -s UUID ${device}1)
- swap_part_uuid=$(blkid -o value -s PARTUUID ${device}3)
+ boot_uuid=$(blkid -o value -s UUID ${bootfs})
+ swap_part_uuid=$(blkid -o value -s PARTUUID ${swap})
echo "/dev/disk/by-partuuid/$swap_part_uuid swap swap defaults 0 0" >> /tgt_root/etc/fstab
echo "UUID=$boot_uuid /boot vfat defaults 1 2" >> /tgt_root/etc/fstab
# We dont want udev to mount our root device while we're booting...
@@ -206,7 +206,7 @@ mkdir -p $EFIDIR
cp /run/media/$1/EFI/BOOT/*.efi $EFIDIR
if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then
- root_part_uuid=$(blkid -o value -s PARTUUID ${device}2)
+ root_part_uuid=$(blkid -o value -s PARTUUID ${rootfs})
GRUBCFG="$EFIDIR/grub.cfg"
cp /run/media/$1/EFI/BOOT/grub.cfg $GRUBCFG
# Update grub config for the installed image
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 0/2] meta: fix installation issue with install-efi.sh script
2015-11-26 2:25 [PATCH 0/2] meta: fix installation issue with install-efi.sh script Mei Yeen Ng
2015-11-26 2:25 ` [PATCH 1/2] meta: fix install-efi script for gummiboot loader Mei Yeen Ng
2015-11-26 2:25 ` [PATCH 2/2] meta: fix install-efi script for emmc installation Mei Yeen Ng
@ 2015-11-26 2:41 ` Saul Wold
2 siblings, 0 replies; 4+ messages in thread
From: Saul Wold @ 2015-11-26 2:41 UTC (permalink / raw)
To: Mei Yeen Ng, openembedded-core
On Thu, 2015-11-26 at 10:25 +0800, Mei Yeen Ng wrote:
> From: "Ng, Mei Yeen" <mei.yeen.ng@intel.com>
>
> Hi maintainers and communities,
>
> These two patches fix the below two bugs:
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=8709
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=8710
>
> When running the install option in Gummiboot and GRUB boot loader
> results in
> boot failure on target device:
> 1/ After installing image to SATA using Gummiboot, image fail to
> boot from SATA
> due to missing root=PARTUUID= in the boot parameter. Addressed
> this by
> assigning the root uuid for non-grub boot loader in install-efi
> script.
>
> 2/ Installing image to eMMC via GRUB and Gummiboot boot loader
> install option
> due to partition prefix and uuid for boot, root, and swap
> partition are
> are not captured for eMMC. Addressed this by referencing the
> another variable
> which captures the prefix assignment.
>
> These patches are applied, build and tested on 2 different Intel
> platforms
> The tests results passed for the following scenarios:
> GRUB loader + install to SATA = Passed
> GRUB loader + install to eMMC = Passed
> Gummiboot loader + install to SATA = Passed
> Gummiboot loader + install to eMMC = Passed
>
> Ng, Mei Yeen (2):
> meta: fix install-efi script for gummiboot loader
> meta: fix install-efi script for emmc installation
>
The titles of this should be
init-install-efi: fix script for gummiboot loader
init-install-efi: fix script for eMMC installation
Also these should be considered for backporting once they are included
in master.
Sau!
> meta/recipes-core/initrdscripts/files/init-install-efi.sh | 9 +++++-
> ---
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-11-26 2:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-26 2:25 [PATCH 0/2] meta: fix installation issue with install-efi.sh script Mei Yeen Ng
2015-11-26 2:25 ` [PATCH 1/2] meta: fix install-efi script for gummiboot loader Mei Yeen Ng
2015-11-26 2:25 ` [PATCH 2/2] meta: fix install-efi script for emmc installation Mei Yeen Ng
2015-11-26 2:41 ` [PATCH 0/2] meta: fix installation issue with install-efi.sh script Saul Wold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox