[Buildroot] [PATCH v3 2/7] boot/grub2: add support to build multiple Grub2 configurations in the same build
Yann E. MORIN
yann.morin.1998 at free.fr
Thu Oct 14 21:02:17 UTC 2021
Köry, All,
On 2021-10-14 22:02 +0200, Yann E. MORIN spake thusly:
> So, in the end, your original proposal, to install each and every tuples
> into target/, is probably the best option we have, [...]
Additionally, to test what was failing, I had instrumented the build
with the following patch (note that it mixes fixes, like no semi-colons
but separate lines, or using && not sime-colon, with the actual calls
to MESSAGE):
diff --git a/boot/grub2/grub2.mk b/boot/grub2/grub2.mk
index e01ebb2edb..5400538837 100644
--- a/boot/grub2/grub2.mk
+++ b/boot/grub2/grub2.mk
@@ -149,8 +149,9 @@ HOST_GRUB2_CONF_OPTS = \
define GRUB2_CONFIGURE_CMDS
$(foreach tuple, $(GRUB2_TUPLES-y), \
- mkdir -p $(@D)/build-$(tuple) ; \
- cd $(@D)/build-$(tuple) ; \
+ @$(call MESSAGE,Configuring $(tuple))
+ mkdir -p $(@D)/build-$(tuple)
+ cd $(@D)/build-$(tuple) && \
$(TARGET_CONFIGURE_OPTS) \
$(TARGET_CONFIGURE_ARGS) \
$(GRUB2_CONF_ENV) \
@@ -172,13 +173,15 @@ endef
define GRUB2_BUILD_CMDS
$(foreach tuple, $(GRUB2_TUPLES-y), \
+ @$(call MESSAGE,Building $(tuple))
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/build-$(tuple)
)
endef
define GRUB2_INSTALL_IMAGES_CMDS
$(foreach tuple, $(GRUB2_TUPLES-y), \
- mkdir -p $(dir $(GRUB2_IMAGE_$(tuple))) ; \
+ @$(call MESSAGE,Installing $(tuple) to images directory)
+ mkdir -p $(dir $(GRUB2_IMAGE_$(tuple)))
$(HOST_DIR)/usr/bin/grub-mkimage \
-d $(@D)/build-$(tuple)/grub-core/ \
-O $(tuple) \
@@ -186,12 +189,12 @@ define GRUB2_INSTALL_IMAGES_CMDS
-p "$(GRUB2_PREFIX_$(tuple))" \
$(if $(GRUB2_BUILTIN_CONFIG_$(tuple)), \
-c $(GRUB2_BUILTIN_CONFIG_$(tuple))) \
- $(GRUB2_BUILTIN_MODULES_$(tuple)) ; \
- $(INSTALL) -D -m 0644 boot/grub2/grub.cfg $(GRUB2_CFG_$(tuple)) ; \
+ $(GRUB2_BUILTIN_MODULES_$(tuple))
+ $(INSTALL) -D -m 0644 boot/grub2/grub.cfg $(GRUB2_CFG_$(tuple))
$(if $(findstring $(GRUB2_PLATFORM_$(tuple)), pc), \
cat $(HOST_DIR)/lib/grub/$(tuple)/cdboot.img $(GRUB2_IMAGE_$(tuple)) > \
- $(BINARIES_DIR)/grub-eltorito.img ; \
- ) \
+ $(BINARIES_DIR)/grub-eltorito.img \
+ )
)
endef
That way, it is easier to see what is going on, and the output when
filtered with brmake, looks nice ;-)
2021-10-14 22:52:36 >>> grub2 2.04 Extracting
2021-10-14 22:52:36 >>> grub2 2.04 Patching
2021-10-14 22:52:39 >>> grub2 2.04 Configuring
2021-10-14 22:52:39 >>> grub2 2.04 Configuring i386-pc
2021-10-14 22:52:56 >>> grub2 2.04 Configuring i386-efi
2021-10-14 22:53:13 >>> grub2 2.04 Building
2021-10-14 22:53:13 >>> grub2 2.04 Building i386-pc
2021-10-14 22:53:51 >>> grub2 2.04 Building i386-efi
2021-10-14 22:54:28 >>> grub2 2.04 Installing to target
2021-10-14 22:54:28 >>> grub2 2.04 Installing i386-pc to target
2021-10-14 22:54:31 >>> grub2 2.04 Installing i386-efi to target
2021-10-14 22:54:34 >>> grub2 2.04 Installing to images directory
2021-10-14 22:54:34 >>> grub2 2.04 Installing i386-pc to images directory
2021-10-14 22:54:34 >>> grub2 2.04 Installing i386-efi to images directory
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
More information about the buildroot
mailing list