diff options
author | Chong Yi Chai <chong.yi.chai@intel.com> | 2018-09-06 11:29:08 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-10-10 13:26:25 +0100 |
commit | b747e9e61a19753db54f43888623b9f15b8c5441 (patch) | |
tree | f3b1218f993cb4c80e948d7ff4a86ec16b3dad9a | |
parent | 3acc7a6e28a980cf662a7aa600d5503780c522e8 (diff) | |
download | poky-b747e9e61a19753db54f43888623b9f15b8c5441.tar.gz |
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.
(From OE-Core rev: a702a5efdaece4197ceefec2a3b4c1e872e82f11)
Signed-off-by: Chong Yi Chai <chong.yi.chai@intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | scripts/contrib/mkefidisk.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh index ac4ec9c7fb..39e4bcf08a 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 | |||
381 | 381 | ||
382 | info "Preparing boot partition" | 382 | info "Preparing boot partition" |
383 | EFIDIR="$BOOTFS_MNT/EFI/BOOT" | 383 | EFIDIR="$BOOTFS_MNT/EFI/BOOT" |
384 | cp $HDDIMG_MNT/vmlinuz $BOOTFS_MNT >$OUT 2>&1 || error "Failed to copy vmlinuz" | 384 | # Get kernel image name |
385 | if [ -e "$HDDIMG_MNT/vmlinuz" ]; then | ||
386 | kernel_image="vmlinuz" | ||
387 | elif [ "$HDDIMG_MNT/bzImage" ]; then | ||
388 | kernel_image="bzImage" | ||
389 | else | ||
390 | die "No kernel image found" | ||
391 | fi | ||
392 | cp $HDDIMG_MNT/${kernel_image} $BOOTFS_MNT >$OUT 2>&1 || error "Failed to copy ${kernel_image}" | ||
385 | # Copy the efi loader and configs (booti*.efi and grub.cfg if it exists) | 393 | # Copy the efi loader and configs (booti*.efi and grub.cfg if it exists) |
386 | cp -r $HDDIMG_MNT/EFI $BOOTFS_MNT >$OUT 2>&1 || error "Failed to copy EFI dir" | 394 | cp -r $HDDIMG_MNT/EFI $BOOTFS_MNT >$OUT 2>&1 || error "Failed to copy EFI dir" |
387 | # Silently ignore a missing systemd-boot loader dir (we might just be a GRUB image) | 395 | # Silently ignore a missing systemd-boot loader dir (we might just be a GRUB image) |
@@ -407,7 +415,7 @@ if [ -e "$GRUB_CFG" ]; then | |||
407 | sed -i "s/ LABEL=[^ ]*/ /" $GRUB_CFG | 415 | sed -i "s/ LABEL=[^ ]*/ /" $GRUB_CFG |
408 | 416 | ||
409 | sed -i "s@ root=[^ ]*@ @" $GRUB_CFG | 417 | sed -i "s@ root=[^ ]*@ @" $GRUB_CFG |
410 | sed -i "s@vmlinuz @vmlinuz root=$TARGET_ROOTFS ro rootwait console=ttyS0 console=tty0 @" $GRUB_CFG | 418 | sed -i "s@${kernel_image} @${kernel_image} root=$TARGET_ROOTFS ro rootwait console=ttyS0 console=tty0 @" $GRUB_CFG |
411 | fi | 419 | fi |
412 | 420 | ||
413 | # Look for a systemd-boot installation | 421 | # Look for a systemd-boot installation |