2013-10-11 39 views
0

我已經成功地使用'本地站點'方法來包含需要構建並部署到目標平臺的項目特定代碼。Buildroot不能使用本地站點方法來定製主機軟件包

我需要構建/維護一個工具,該工具運行在將打包內核和文件系統以供部署到設備上的工作中。我想用本地站點的方法來維護這些代碼,但我沒有太多的運氣。

在xxxx.mk,我指定:

XXXX_SITE_METHOD = local 

,我使用:

$(eval $(host-autotools-package)) 

但是試圖建立與:

make host-xxxx 

導致的buildroot試圖獲取一個不存在的壓縮包(它會對非主機包的源進行rsynce)。

這是一個受支持的配置?

我xxxx.mk文件的內容是:

XXXX_VERSION= 1.0 
XXXX_SITE = $(TOPDIR)/../apps.git/xxxx 
XXXX_SITE_METHOD = local 
$(eval $(host-autotools-package)) 

define XXX_EXTRACT_CMDS 
     cp -r package/yyyy/xxxx/src/* $(@D) 
endef 

回答

1

啊哈,你說得對,有一個bug。下面的補丁修復了它。話雖如此,如果您遇到了Buildroot問題,您應該在項目郵件列表或項目錯誤跟蹤器上報告。對於錯誤報告,我們不一定會經常看Stack Overflow。

From 9cf6971b5e787375d418c4e34c10a89603e3e6e2 Mon Sep 17 00:00:00 2001 
From: Thomas Petazzoni <[email protected]> 
Date: Sat, 12 Oct 2013 12:10:13 +0200 
Subject: [PATCH] package: fix 'local' site method for host packages 

Using the 'local' site method works just fine for target 
packages. However, for host packages, when HOST_<pkg>_SITE is 
automatically defined by the package infrastructure to be equal to 
<pkg>_SITE, when defining the <pkg>_OVERRIDE_SRCDIR, the $($(2)_SITE) 
is empty, due to a missing additional dollar sign. 

This patch ensures that the <pkg>_OVERRIDE_SRCDIR gets the correct 
value, regardless of whether the HOST_<pkg>_SITE variable has been 
defined by the package itself, or inferred by the package 
infrastructure using the <pkg>_SITE value. 

Signed-off-by: Thomas Petazzoni <[email protected]> 
Reported-by: http://stackoverflow.com/questions/19311747/buildroot-cant-use-local-site-method-for-custom-host-packages 
--- 
package/pkg-generic.mk | 2 +- 
1 file changed, 1 insertion(+), 1 deletion(-) 

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk 
index a46457c..4bba4b5 100644 
--- a/package/pkg-generic.mk 
+++ b/package/pkg-generic.mk 
@@ -281,7 +281,7 @@ endif 

ifeq ($$($(2)_SITE_METHOD),local) 
ifeq ($$($(2)_OVERRIDE_SRCDIR),) 
-$(2)_OVERRIDE_SRCDIR = $($(2)_SITE) 
+$(2)_OVERRIDE_SRCDIR = $$($(2)_SITE) 
endif 
endif 

-- 
1.8.1.2 
相關問題