summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
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:35:42 -0800
commit93e0e5f5fcc7bddb1142f7c4f03fff639f27c253 (patch)
tree3dd3e49b402039553773334201ee71fd3abba0f7 /meta/recipes-core
parent46bb7646161c0021d17763b0d59e7e22916a9d58 (diff)
downloadpoky-93e0e5f5fcc7bddb1142f7c4f03fff639f27c253.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. (From OE-Core rev: 3d67edb695368bfa5917dca2aab6a8dc4c437efc) Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-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
244 sed -i "/initrd /d" $GRUBCFG 244 sed -i "/initrd /d" $GRUBCFG
245 # Delete any LABEL= strings 245 # Delete any LABEL= strings
246 sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG 246 sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG
247 # Delete any root= strings 247 # Replace root= and add additional standard boot options
248 sed -i "s/ root=[^ ]*/ /g" $GRUBCFG 248 # We use root as a sentinel value, as vmlinuz is no longer guaranteed
249 # Add the root= and other standard boot options 249 sed -i "s/ root=[^ ]*/ root=PARTUUID=$root_part_uuid rw $rootwait quiet /g" $GRUBCFG
250 sed -i "s@linux /vmlinuz *@linux /vmlinuz root=PARTUUID=$root_part_uuid rw $rootwait quiet @" $GRUBCFG
251fi 250fi
252 251
253if [ -d /run/media/$1/loader ]; then 252if [ -d /run/media/$1/loader ]; then
@@ -269,7 +268,13 @@ fi
269 268
270umount /tgt_root 269umount /tgt_root
271 270
272cp /run/media/$1/vmlinuz /boot 271# Copy kernel artifacts. To add more artifacts just add to types
272# For now just support kernel types already being used by something in OE-core
273for types in bzImage zImage vmlinux vmlinuz fitImage; do
274 for kernel in `find /run/media/$1/ -name $types*`; do
275 cp $kernel /boot
276 done
277done
273 278
274umount /boot 279umount /boot
275 280