endef
# Overwrite the default grub2 config files with the ones in this package.
+ifeq ($(BR2_TARGET_GRUB2_I386_PC)$(BR2_TARGET_GRUB2_ARM_UBOOT),y)
+define MENDER_GRUBENV_INSTALL_IMAGES_CMDS
+ mkdir -p $(BINARIES_DIR)/boot-part/grub
+ cp -dpfr $(TARGET_DIR)/boot/grub/grub.cfg \
+ $(TARGET_DIR)/boot/grub/mender_grubenv* \
+ $(BINARIES_DIR)/boot-part/grub
+endef
+else
define MENDER_GRUBENV_INSTALL_IMAGES_CMDS
mkdir -p $(BINARIES_DIR)/efi-part/EFI/BOOT
cp -dpfr $(TARGET_DIR)/boot/EFI/BOOT/grub.cfg \
$(TARGET_DIR)/boot/EFI/BOOT/mender_grubenv* \
$(BINARIES_DIR)/efi-part/EFI/BOOT
endef
+endif
$(eval $(generic-package))