[Buildroot] [PATCH] configs/pc_x86_64_bios_defconfig: fix image generation after grub2 rework

Peter Korsgaard peter at korsgaard.com
Sun Dec 5 11:35:18 UTC 2021


>>>>> "Yann" == Yann E MORIN <yann.morin.1998 at free.fr> writes:

 > Commit 82d1e8c628cc (boot/grub2: use none platform when building for
 > host) changed host-grub2 to only install the tools, not the actual
 > bootloader or its modules, as they are of no use on the host.

 > It so hapenned that, when not isntructed to built for a specific
 > platform, the grub2 buildsystem would default to build the legacy bios
 > platform (at least when the build happens on an x86 or x86_64 host).

 > However, because the host is more often than not an x86 or x86_64, when
 > the target was also an x68 or x86_64, the modules built for the host
 > could be re-used for the target, and this is what was done for our
 > pc_x86_64_bios_defconfig.

 > But now that we explicitly tell the grub2 buildsystem to not build any
 > platform when we build host-grub2, we no longer have access to the grub2
 > modules from the host directory, adn the build fails when assembling the
 > final image.

 > We fix that in two way.

 > First, we ensure that individual modules from the target grub2 get
 > installed in target/; we can only do thatif the target grub2 tools are
 > also installed, so we enable that in the configuration.

 > Second, we fix the post-build script to look in target/ rather than in
 > host/.

 > All that, just for the 512-byte boot.img bootstrap, which pulls in all
 > the other modules (4.3MiB), the tools (8.8MiB)... But we are not going
 > to cherry-pick individual modules; this is error prone and
 > unmaintainable...

 > Reported-by: Adam Duskett <aduskett at gmail.com>
 > Signed-off-by: Yann E. MORIN <yann.morin.1998 at free.fr>
 > Cc: Köry Maincent <kory.maincent at bootlin.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard



More information about the buildroot mailing list