[OpenWrt-Devel] Merged: x86: fix bios mkimage during efi image generation

Alif M. Ahmad alive4ever at live.com
Thu Mar 15 21:53:36 EDT 2018


On Wed, Mar 14, 2018 at 07:18:10PM +0100, Jo-Philipp Wich wrote:
> Merged into my staging tree at
> http://git.openwrt.org/?p=openwrt/staging/jow.git.
> 
> Thank you!
> 
The next patch in series is not yet applied.
https://patchwork.ozlabs.org/patch/881132/

My reason to simplify the image generation is as follows.
1. grub-bios-setup on ptgen-generated disk image is really unnecessary,
since the resulting image will be converted to gpt later. No need for
mbr boot sector here, since grub will use BIOS boot partition (EF02)
instead of MBR when the performing grub-bios-install on the gpt disk
image.

Avoiding grub-bios-setup before gpt image has been generated saves
several seconds on target/linux/install as well.

Actually, grub-bios-install behaves the same to grub-bios-install-efi:
setting up bios boot loader for legacy bios boot for both gpt and mbr
disk.

2. There is no need to have 3 grub configurations.

The previous fix for bios mkimage leaves grub-early.cfg inside
/boot/grub. There is a cleanup performed on the next patch to remove
grub-early.cfg, since it has been embedded inside grub-core.img.

The grub-early.cfg should also be embedded for bootx64.efi, similar to
how grub-early.cfg is embedded for bios core.img, so the resulting gpt
image will have identical grub configuration for both bios and efi
setup.

With grub-early.cfg embedded inside bootx64.efi, the $(SIGNATURE).cfg is
not needed anymore. grub.cfg is available and the content of
$(SIGNATURE).cfg is identical to grub.cfg.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list