Skip to contentSkip to conversation

lzop: add host build

PATCH New Fabio Porcedda 2 participants 5 messages Dec 13, 2012 – Jan 7, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 lzop: add host build

Barebox needs host-lzop.

---
 package/lzop/lzop.mk | 1 +
 1 file changed, 1 insertion(+)
package/lzop/lzop.mk +1 -0
index 4ab8a4a..1f7c835 100644
@@ -11,3 +11,4 @@ LZOP_LICENSE_FILES = COPYING
 LZOP_DEPENDENCIES = lzo
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
1.8.0
#1 lore raw

PATCH 1/2 lzop: add host build

Quoted 17 lines · Fabio Porcedda

Barebox needs host-lzop.

---
 package/lzop/lzop.mk | 1 +
 1 file changed, 1 insertion(+)
package/lzop/lzop.mk +1 -1
index 4ab8a4a..1f7c835 100644
@@ -11,3 +11,4 @@ LZOP_LICENSE_FILES = COPYING
 LZOP_DEPENDENCIES = lzo
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
--
Quoted 2 lines

1.8.0

ping

--
Fabio Porcedda

#2 lore raw

PATCH 2/2 barebox: needs host-lzop

In reply to Fabio Porcedda

Add host-lzop dependency.
Use $(TARGET_MAKE_ENV) when calling $(MAKE)
to able to use binaries built for host.

---
 boot/barebox/barebox.mk | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
boot/barebox/barebox.mk +5 -4
index 6cc4976..2aff7e6 100644
@@ -20,6 +20,7 @@ BAREBOX_SOURCE = barebox-$(BAREBOX_VERSION).tar.bz2
 BAREBOX_SITE = http://www.barebox.org/download/
 endif
 
+BAREBOX_DEPENDENCIES = host-lzop
 BAREBOX_LICENSE = GPLv2 with exceptions
 BAREBOX_LICENSE_FILES = COPYING
 
@@ -56,7 +57,7 @@ endif
 
 define BAREBOX_CONFIGURE_CMDS
 	cp $(BAREBOX_SOURCE_CONFIG) $(@D)/arch/$(BAREBOX_ARCH)/configs/buildroot_defconfig
-	$(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) buildroot_defconfig
+	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) buildroot_defconfig
 endef
 
 ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
@@ -68,7 +69,7 @@ endif
 
 define BAREBOX_BUILD_CMDS
 	$(BAREBOX_BUILD_BAREBOXENV_CMDS)
-	$(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D)
+	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D)
 endef
 
 define BAREBOX_INSTALL_IMAGES_CMDS
@@ -96,12 +97,12 @@ endif
 endif
 
 barebox-menuconfig barebox-xconfig barebox-gconfig barebox-nconfig: barebox-configure
-	$(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(BAREBOX_DIR) \
+	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(BAREBOX_DIR) \
 		$(subst barebox-,,$@)
 	rm -f $(BAREBOX_DIR)/.stamp_{built,target_installed,images_installed}
 
 barebox-savedefconfig: barebox-configure
-	$(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(BAREBOX_DIR) \
+	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(BAREBOX_DIR) \
 		$(subst barebox-,,$@)
 
 ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y)
Signature · 1 line
1.8.0
#3 lore raw

PATCH 2/2 barebox: needs host-lzop

Dear Fabio Porcedda,

Quoted 3 lines · Fabio Porcedda

Add host-lzop dependency.
Use $(TARGET_MAKE_ENV) when calling $(MAKE)
to able to use binaries built for host.

Does Barebox always need lzop? If not, under what conditions does it need lzop?

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#4 lore raw

PATCH 2/2 barebox: needs host-lzop

Hi Thomas,
thanks for the review.

Quoted 9 lines · Thomas Petazzoni

Dear Fabio Porcedda,

Quoted 3 lines · Fabio Porcedda

Add host-lzop dependency.
Use $(TARGET_MAKE_ENV) when calling $(MAKE)
to able to use binaries built for host.

Does Barebox always need lzop? If not, under what conditions does it need lzop?

Barebox doesn't always need lzop.
I think the dependency is determined by the barebox configuration (barebox/.config),
so I think it's impractical/impossible to know beforehand.

We can check the dependency only after the barebox configuration phase it's done.
IMHO it's too late.

Best regards
--
Fabio Porcedda