[PATCH] x86: use mkfs.fat, sed, mmd and mcopy from staging_dir
Florian Eckert
fe at dev.tdt.de
Fri Jan 20 00:36:09 PST 2023
During image generation, the host tools should not be used but the tools
from the staging_dir.
- mkfs.fat
- sed
- mmd
- mcopy
Signed-off-by: Florian Eckert <fe at dev.tdt.de>
---
target/linux/x86/image/Makefile | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile
index 322131c2a4..66d914681d 100644
--- a/target/linux/x86/image/Makefile
+++ b/target/linux/x86/image/Makefile
@@ -59,7 +59,7 @@ endef
define Build/grub-config
rm -fR $@.boot
$(INSTALL_DIR) $@.boot/boot/grub
- sed \
+ $(STAGING_DIR_HOST)/bin/sed \
-e 's#@SERIAL_CONFIG@#$(strip $(GRUB_SERIAL_CONFIG))#g' \
-e 's#@TERMINAL_CONFIG@#$(strip $(GRUB_TERMINAL_CONFIG))#g' \
-e 's#@ROOTPART@#root=$(ROOTPART) rootwait#g' \
@@ -91,9 +91,12 @@ define Build/iso
> $@.boot/boot/grub/eltorito.img
-$(CP) $(STAGING_DIR_ROOT)/boot/. $@.boot/boot/
$(if $(filter $(1),efi),
- mkfs.fat -C $@.boot/boot/grub/isoboot.img -S 512 1440
- mmd -i $@.boot/boot/grub/isoboot.img ::/efi ::/efi/boot
- mcopy -i $@.boot/boot/grub/isoboot.img \
+ $(STAGING_DIR_HOST)/bin/mkfs.fat \
+ -C $@.boot/boot/grub/isoboot.img -S 512 1440
+ $(STAGING_DIR_HOST)/bin/mmd \
+ -i $@.boot/boot/grub/isoboot.img ::/efi ::/efi/boot
+ $(STAGING_DIR_HOST)/bin/mcopy \
+ -i $@.boot/boot/grub/isoboot.img \
$(STAGING_DIR_IMAGE)/grub2/iso-boot$(if $(CONFIG_x86_64),x64,ia32).efi \
::/efi/boot/boot$(if $(CONFIG_x86_64),x64,ia32).efi
)
--
2.30.2
More information about the openwrt-devel
mailing list