diff options
| author | California Sullivan <california.l.sullivan@intel.com> | 2018-02-28 18:15:06 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-06 06:35:42 -0800 |
| commit | 93e0e5f5fcc7bddb1142f7c4f03fff639f27c253 (patch) | |
| tree | 3dd3e49b402039553773334201ee71fd3abba0f7 /meta/recipes-core | |
| parent | 46bb7646161c0021d17763b0d59e7e22916a9d58 (diff) | |
| download | poky-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.sh | 15 |
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 | ||
| 251 | fi | 250 | fi |
| 252 | 251 | ||
| 253 | if [ -d /run/media/$1/loader ]; then | 252 | if [ -d /run/media/$1/loader ]; then |
| @@ -269,7 +268,13 @@ fi | |||
| 269 | 268 | ||
| 270 | umount /tgt_root | 269 | umount /tgt_root |
| 271 | 270 | ||
| 272 | cp /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 | ||
| 273 | for 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 | ||
| 277 | done | ||
| 273 | 278 | ||
| 274 | umount /boot | 279 | umount /boot |
| 275 | 280 | ||
