x86: fix bios mkimage during efi image generation
authorAlif M. Ahmad <alive4ever@live.com>
Sun, 4 Mar 2018 01:40:21 +0000 (01:40 +0000)
committerJo-Philipp Wich <jo@mein.io>
Wed, 14 Aug 2019 06:09:27 +0000 (08:09 +0200)
commitb4a9418606658ce14c71ad8cbee75ad3eeedc9d4
treee48493755d36d91c24ed98d33863197831d9d000
parent252559414f76a5cb881b9f9d2e3c8035e2211861
x86: fix bios mkimage during efi image generation

Previously, grub-mkimage embeds full-featured grub.cfg inside core.img
during efi image generation phase (target/linux/install).

This causes grub to not passing kernel command line to the kernel, which
causes kernel panic when the generated gpt image is booted on bios mode
because the kernel doesn't find the root partition.

Fixing the problem involves using minimal grub-early.cfg to embed inside
grub's core.img to load the full-featured grub.cfg later.

grub-early.cfg contains one configuration line:

  configfile (hd0,gpt1)/boot/grub/grub.cfg

With this change, the generated gpt image should be bootable on both
bios and UEFI based systems.

Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
target/linux/x86/image/Makefile