【问题标题】:Buildroot can't use local site method for custom host packagesBuildroot 无法对自定义主机包使用本地站点方法
【发布时间】:2013-10-11 06:36:17
【问题描述】:

我已成功使用“本地站点”方法来包含需要构建并部署到目标平台的项目特定代码。

我需要构建/维护一个在主机上运行的工具,该工具的工作是打包内核和文件系统以部署到设备。我想使用本地站点方法来维护此代码,但我运气不佳。

在 xxxx.mk 中,我指定了:

XXXX_SITE_METHOD = local

我正在使用:

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

但是尝试构建:

make host-xxxx

导致 buildroot 尝试获取不存在的 tarball(它会 rsync 非主机包的源)。

这是受支持的配置吗?

我的 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

【问题讨论】:

    标签: buildroot


    【解决方案1】:

    啊,你是对的,有一个错误。下面的补丁为我修复了它。话虽如此,如果您对 Buildroot 有问题,您应该在项目邮件列表或项目错误跟踪器上报告它们。我们不一定会经常查看 Stack Overflow 上的错误报告。

    From 9cf6971b5e787375d418c4e34c10a89603e3e6e2 Mon Sep 17 00:00:00 2001
    From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
    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 <thomas.petazzoni@free-electrons.com>
    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
    

    【讨论】:

      猜你喜欢
      • 2014-11-23
      • 2020-09-14
      • 2014-10-18
      • 1970-01-01
      • 1970-01-01
      • 2018-07-21
      • 2019-11-30
      • 2015-08-05
      • 2020-10-10
      相关资源
      最近更新 更多