diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/recipes-core/initrdscripts/files/init-install-efi.sh | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/common/recipes-core/initrdscripts/files/init-install-efi.sh b/common/recipes-core/initrdscripts/files/init-install-efi.sh index 0b2ee46b..71480055 100644 --- a/common/recipes-core/initrdscripts/files/init-install-efi.sh +++ b/common/recipes-core/initrdscripts/files/init-install-efi.sh | |||
@@ -208,21 +208,14 @@ fi | |||
208 | mount $bootfs /boot | 208 | mount $bootfs /boot |
209 | echo "Preparing boot partition..." | 209 | echo "Preparing boot partition..." |
210 | 210 | ||
211 | # RMC deployment | ||
212 | RMC_CMD=/src_root/usr/bin/rmc | ||
213 | RMC_DB=/run/media/$1/rmc.db | ||
214 | |||
215 | EFIDIR="/boot/EFI/BOOT" | 211 | EFIDIR="/boot/EFI/BOOT" |
216 | mkdir -p $EFIDIR | 212 | mkdir -p $EFIDIR |
217 | |||
218 | # Copy the efi loader | 213 | # Copy the efi loader |
219 | cp /run/media/$1/EFI/BOOT/*.efi $EFIDIR | 214 | cp /run/media/$1/EFI/BOOT/*.efi $EFIDIR |
220 | 215 | ||
221 | # We only support gummiboot/systemd-boot. Leave grub-efi not changed. | 216 | # RMC deployment |
222 | if [ -d /run/media/$1/loader ]; then | 217 | RMC_CMD=/src_root/usr/bin/rmc |
223 | # copy config files for gummiboot | 218 | RMC_DB=/run/media/$1/rmc.db |
224 | cp -dr /run/media/$1/loader /boot | ||
225 | fi | ||
226 | 219 | ||
227 | # We don't want to quit when a step failed. For example, | 220 | # We don't want to quit when a step failed. For example, |
228 | # a file system could not support some operations. | 221 | # a file system could not support some operations. |
@@ -298,9 +291,21 @@ fi | |||
298 | if [ -d /run/media/$1/loader ]; then | 291 | if [ -d /run/media/$1/loader ]; then |
299 | rootuuid=$(blkid -o value -s PARTUUID ${rootfs}) | 292 | rootuuid=$(blkid -o value -s PARTUUID ${rootfs}) |
300 | GUMMIBOOT_CFGS="/boot/loader/entries/*.conf" | 293 | GUMMIBOOT_CFGS="/boot/loader/entries/*.conf" |
301 | # delete the install entry | 294 | if [ -d /boot/loader ]; then |
302 | # fixme: If RMC did deploy install.conf at previous steps, it is purged here... | 295 | # Don't override loader.conf RMC already deployed |
303 | rm -f /boot/loader/entries/install.conf | 296 | if [ ! -f /boot/loader/loader.conf ]; then |
297 | cp /run/media/$1/loader/loader.conf /boot/loader/ | ||
298 | fi | ||
299 | # only copy built OE entries when RMC entries don't exist. | ||
300 | if [ ! -d /boot/loader/entries ] || [ ! ls /boot/loader/entries/*.conf &>/dev/null ]; then | ||
301 | cp -dr /run/media/$1/loader/entries /boot/loader | ||
302 | fi | ||
303 | else | ||
304 | # copy config files for gummiboot | ||
305 | cp -dr /run/media/$1/loader /boot | ||
306 | # delete the install entry | ||
307 | rm -f /boot/loader/entries/install.conf | ||
308 | fi | ||
304 | # delete the initrd lines | 309 | # delete the initrd lines |
305 | sed -i "/initrd /d" $GUMMIBOOT_CFGS | 310 | sed -i "/initrd /d" $GUMMIBOOT_CFGS |
306 | # delete any LABEL= strings | 311 | # delete any LABEL= strings |