[oe-commits] [openembedded-core] 03/08: mkefidisk: fix installation of kernel image
git at git.openembedded.org
git at git.openembedded.org
Wed Oct 10 12:27:28 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch sumo
in repository openembedded-core.
commit a702a5efdaece4197ceefec2a3b4c1e872e82f11
Author: Chong Yi Chai <chong.yi.chai at intel.com>
AuthorDate: Thu Sep 6 11:29:08 2018 +0800
mkefidisk: fix installation of kernel image
Kernel image can be 'vmlinuz' for 'bzImage' but the script is written to
support 'vmlinuz' only. When building with meta-intel on sumo branch, the
kernel image is now bzImage and the installation will fail. Add option to
install bzImage as well.
Signed-off-by: Chong Yi Chai <chong.yi.chai at intel.com>
Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
scripts/contrib/mkefidisk.sh | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh
index ac4ec9c..39e4bcf 100755
--- a/scripts/contrib/mkefidisk.sh
+++ b/scripts/contrib/mkefidisk.sh
@@ -381,7 +381,15 @@ mount $BOOTFS $BOOTFS_MNT >$OUT 2>&1 || error "Failed to mount $BOOTFS on $BOOTF
info "Preparing boot partition"
EFIDIR="$BOOTFS_MNT/EFI/BOOT"
-cp $HDDIMG_MNT/vmlinuz $BOOTFS_MNT >$OUT 2>&1 || error "Failed to copy vmlinuz"
+# Get kernel image name
+if [ -e "$HDDIMG_MNT/vmlinuz" ]; then
+ kernel_image="vmlinuz"
+elif [ "$HDDIMG_MNT/bzImage" ]; then
+ kernel_image="bzImage"
+else
+ die "No kernel image found"
+fi
+cp $HDDIMG_MNT/${kernel_image} $BOOTFS_MNT >$OUT 2>&1 || error "Failed to copy ${kernel_image}"
# Copy the efi loader and configs (booti*.efi and grub.cfg if it exists)
cp -r $HDDIMG_MNT/EFI $BOOTFS_MNT >$OUT 2>&1 || error "Failed to copy EFI dir"
# Silently ignore a missing systemd-boot loader dir (we might just be a GRUB image)
@@ -407,7 +415,7 @@ if [ -e "$GRUB_CFG" ]; then
sed -i "s/ LABEL=[^ ]*/ /" $GRUB_CFG
sed -i "s@ root=[^ ]*@ @" $GRUB_CFG
- sed -i "s at vmlinuz @vmlinuz root=$TARGET_ROOTFS ro rootwait console=ttyS0 console=tty0 @" $GRUB_CFG
+ sed -i "s@${kernel_image} @${kernel_image} root=$TARGET_ROOTFS ro rootwait console=ttyS0 console=tty0 @" $GRUB_CFG
fi
# Look for a systemd-boot installation
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list