aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
Diffstat (limited to 'target')
-rw-r--r--target/linux/x86/base-files/lib/upgrade/platform.sh2
-rw-r--r--target/linux/x86/image/Makefile3
2 files changed, 4 insertions, 1 deletions
diff --git a/target/linux/x86/base-files/lib/upgrade/platform.sh b/target/linux/x86/base-files/lib/upgrade/platform.sh
index ee88dfb082..829834471d 100644
--- a/target/linux/x86/base-files/lib/upgrade/platform.sh
+++ b/target/linux/x86/base-files/lib/upgrade/platform.sh
@@ -63,7 +63,7 @@ platform_do_bootloader_upgrade() {
-d "/tmp/boot/boot/grub" \
-r "hd0,${parttable}1" \
"/dev/$diskdev" \
- && touch /boot/grub/upgraded
+ && touch /tmp/boot/grub/upgraded
umount /tmp/boot
fi
diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile
index 7864dfa1f8..7a474e7a6e 100644
--- a/target/linux/x86/image/Makefile
+++ b/target/linux/x86/image/Makefile
@@ -49,6 +49,9 @@ BOOTOPTS:=$(call qstrip,$(CONFIG_GRUB_BOOTOPTS))
define Build/combined
$(CP) $(KDIR)/$(KERNEL_NAME) $@.boot/boot/vmlinuz
-$(CP) $(STAGING_DIR_ROOT)/boot/. $@.boot/boot/
+ $(CP) $(STAGING_DIR_IMAGE)/grub2/boot.img $@.boot/boot/grub/
+ $(CP) $(STAGING_DIR_IMAGE)/grub2/$(if $(filter $(1),efi),gpt,$(GRUB2_VARIANT))-core.img \
+ $@.boot/boot/grub/core.img
$(if $(filter $(1),efi),
$(INSTALL_DIR) $@.boot/efi/boot
$(CP) $(STAGING_DIR_IMAGE)/grub2/boot$(if $(CONFIG_x86_64),x64,ia32).efi $@.boot/efi/boot/