aboutsummaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorCalifornia Sullivan <california.l.sullivan@intel.com>2018-02-28 18:15:06 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-06 06:23:06 -0800
commit3d67edb695368bfa5917dca2aab6a8dc4c437efc (patch)
tree13553c7051ff527a716a5f995b6b064ce327f050 /meta
parentdb904053e8ee80fb6930c5e7e22287927e0f25e2 (diff)
downloadopenembedded-core-contrib-3d67edb695368bfa5917dca2aab6a8dc4c437efc.tar.gz
init-install-efi.sh: Update to support installing multiple kernels
We can no longer rely on the kernel having a static name of "vmlinuz". This means we can't use it as a sentinel value in our sed commands, and we can't just copy vmlinuz to the boot directory. Instead, we'll use "root=" as the sentinel value for our sed commands, and we'll search for common kernel names to copy into our boot directory. Signed-off-by: California Sullivan <california.l.sullivan@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-efi.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 706418fa9c..f946d971d1 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -244,10 +244,9 @@ if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then
sed -i "/initrd /d" $GRUBCFG
# Delete any LABEL= strings
sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG
- # Delete any root= strings
- sed -i "s/ root=[^ ]*/ /g" $GRUBCFG
- # Add the root= and other standard boot options
- sed -i "s@linux /vmlinuz *@linux /vmlinuz root=PARTUUID=$root_part_uuid rw $rootwait quiet @" $GRUBCFG
+ # Replace root= and add additional standard boot options
+ # We use root as a sentinel value, as vmlinuz is no longer guaranteed
+ sed -i "s/ root=[^ ]*/ root=PARTUUID=$root_part_uuid rw $rootwait quiet /g" $GRUBCFG
fi
if [ -d /run/media/$1/loader ]; then
@@ -269,7 +268,13 @@ fi
umount /tgt_root
-cp /run/media/$1/vmlinuz /boot
+# Copy kernel artifacts. To add more artifacts just add to types
+# For now just support kernel types already being used by something in OE-core
+for types in bzImage zImage vmlinux vmlinuz fitImage; do
+ for kernel in `find /run/media/$1/ -name $types*`; do
+ cp $kernel /boot
+ done
+done
umount /boot