yocto-第7篇-开发工具devtool实操(helloyocto)

devtool前言

做过yocto开发的朋友都有过这种认识,很多开源项目都是从其他网站下载或者git网站下载下来的,并放到了一个编译的中间目录里面,你去里面修改,然后编译搞不好就什么都没有了,白忙活了。自己打补丁又有很多不知道如何做的困扰。今天就给大家简单讲解下devtool。

devtool干什么的

devtool命令行工具提供了许多功能,可帮助您构建,测试和打包软件。该命令与bitbake命令一起使用。此外,devtool命令是可扩展SDK的关键部分。

获取帮助

devtool命令行的组织方式与Git相似,因为每个功能都有许多子命令。您可以运行devtool --help来查看所有命令:

poky]$ 
<div class="post-text" itemprop="text"> <p>I wish to add InfluxDB version 1.7.6 to my Single Board Computer from PHYTEC and did the following initially:</p> <ol> <li><p>create initial recipe using <code>devtool</code></p> <pre><code>devtool add influxdb https://github.com/influxdata/influxdb/archive/v1.7.6.tar.gz </code></pre></li> <li><p>Edit the recipe. I correlate it to a <a href="https://github.com/nefethael/meta-random/blob/master/recipes-dbs/influxdb/github.com-influxdata-influxdb_1.7.5.bb" rel="nofollow noreferrer">recipe</a> for a random layer for <code>thud</code> and add necessary lines to it. The recipe is as follows:</p></li> </ol> <pre><code># Recipe created by recipetool # This is the basis of a recipe and may need further editing in order to be fully functional. # (Feel free to remove these comments when editing.) # WARNING: the following LICENSE and LIC_FILES_CHKSUM values are best guesses - it is # your responsibility to verify that the values are complete and correct. LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=ba8146ad9cc2a128209983265136e06a" SRC_URI = "https://github.com/influxdata/influxdb/archive/v${PV}.tar.gz" SRC_URI[md5sum] = "0c9e9ada13672bc923390b0cbcf1189c" SRC_URI[sha256sum] = "b3393e4c9bc66dcbf7607f389377ba549628e80f6fd9dca598ce5ad68a696885" # NOTE: no Makefile found, unable to determine what needs to be done inherit go systemd FILES_${PN} += "${GOBIN_FINAL}/*" RDEPENDS_${PN} += "bash python-core" SRC_URI += "file://influxdb.conf file://influxdb.service" do_install_append () { install -d ${D}${sysconfdir}/influxdb/ install -m 0644 ${WORKDIR}/influxdb.conf ${D}${sysconfdir}/influxdb/ install -d ${D}${systemd_unitdir}/system/ install -m 0644 ${WORKDIR}/influxdb.service ${D}${systemd_unitdir}/system/ } SYSTEMD_SERVICE_${PN} = "influxdb.service" </code></pre> <ol start="3"> <li>I added the <code>.conf</code> and <code>influxdb.service</code> file in a folder <code>files</code> and the recipe folder looks like the following:</li> </ol> <pre><code> . ├── files │   ├── influxdb.conf │   └── influxdb.service └── influxdb_1.7.6.bb </code></pre> <ol start="4"> <li><p>I tried the following to build the recipe:</p> <pre><code>devtool build influxdb </code></pre></li> </ol> <p>And I get the following errors:</p> <pre><code>DEBUG: Executing python function externalsrc_compile_prefunc NOTE: influxdb: compiling from external source tree /home/des/Yocto/PHYTEC_BSPs/yocto_fsl_update/build/workspace/sources/influxdb DEBUG: Python function externalsrc_compile_prefunc finished DEBUG: Executing shell function do_compile GOARCH="arm" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/des/Yocto/PHYTEC_BSPs/yocto_fsl_update/build/workspace/sources/influxdb" GORACE="" GOROOT="/home/des/Yocto/PHYTEC_BSPs/yocto_fsl_update/build/tmp/work/cortexa9hf-neon-phytec-linux-gnueabi/influxdb/1.7.6-r0/recipe-sysroot/usr/lib/go" GOTOOLDIR="/home/des/Yocto/PHYTEC_BSPs/yocto_fsl_update/build/tmp/work/cortexa9hf-neon-phytec-linux-gnueabi/influxdb/1.7.6-r0/recipe-sysroot-native/usr/lib/arm-phytec-linux-gnueabi/go/pkg/tool/linux_amd64" GCCGO="gccgo" GOARM="7" CC="arm-phytec-linux-gnueabi-gcc -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/home/des/Yocto/PHYTEC_BSPs/yocto_fsl_update/build/tmp/work/cortexa9hf-neon-phytec-linux-gnueabi/influx db/1.7.6-r0/recipe-sysroot" GOGCCFLAGS="-march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/home/des/Yocto/PHYTEC_BSPs/yocto_fsl_update/build/tmp/work/cortexa9hf-neon-phytec-linux-gnueabi/influxdb/1.7.6-r0/recipe-sy sroot -fPIC -marm -pthread -fmessage-length=0 -fdebug-prefix-map=/home/des/Yocto/PHYTEC_BSPs/yocto_fsl_update/build/tmp/work/cortexa9hf-neon-phytec-linux-gnueabi/influxdb/1.7.6-r0/go-tmp/go-build548794802=/tmp/g o-build -gno-record-gcc-switches" CXX="arm-phytec-linux-gnueabi-g++ -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/home/des/Yocto/PHYTEC_BSPs/yocto_fsl_update/build/tmp/work/cortexa9hf-neon-phytec-linux-gnueabi/influ xdb/1.7.6-r0/recipe-sysroot" CGO_ENABLED="1" CGO_CFLAGS="-O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/des/Yocto/PHYTEC_BSPs/yocto_fsl_update/build/tmp/work/cortexa9hf-neon-phytec-linux-gnueabi/influxdb/1.7.6-r0=/usr/src/debug/influx db/1.7.6-r0 -fdebug-prefix-map=/home/des/Yocto/PHYTEC_BSPs/yocto_fsl_update/build/tmp/work/cortexa9hf-neon-phytec-linux-gnueabi/influxdb/1.7.6-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/des/Yocto/PHYTEC_ BSPs/yocto_fsl_update/build/tmp/work/cortexa9hf-neon-phytec-linux-gnueabi/influxdb/1.7.6-r0/recipe-sysroot=" CGO_CPPFLAGS="" CGO_CXXFLAGS="-O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/des/Yocto/PHYTEC_BSPs/yocto_fsl_update/build/tmp/work/cortexa9hf-neon-phytec-linux-gnueabi/influxdb/1.7.6-r0=/usr/src/debug/infl uxdb/1.7.6-r0 -fdebug-prefix-map=/home/des/Yocto/PHYTEC_BSPs/yocto_fsl_update/build/tmp/work/cortexa9hf-neon-phytec-linux-gnueabi/influxdb/1.7.6-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/des/Yocto/PHYTE C_BSPs/yocto_fsl_update/build/tmp/work/cortexa9hf-neon-phytec-linux-gnueabi/influxdb/1.7.6-r0/recipe-sysroot= -fvisibility-inlines-hidden" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed" PKG_CONFIG="pkg-config" warning: "/..." matched no packages go install: no install location for directory /home/des/Yocto/PHYTEC_BSPs/yocto_fsl_update/build/workspace/sources/influxdb outside GOPATH For more details see: 'go help gopath' WARNING: /home/des/Yocto/PHYTEC_BSPs/yocto_fsl_update/build/tmp/work/cortexa9hf-neon-phytec-linux-gnueabi/influxdb/1.7.6-r0/temp/run.do_compile.28359:1 exit 1 from 'arm-phytec-linux-gnueabi-go install -linkshare d -p 4 -v -ldflags="-r /usr/lib/go/pkg/linux_arm_dynlink -extldflags '-march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/home/des/Yocto/PHYTEC_BSPs/yocto_fsl_update/build/tmp/work/corte xa9hf-neon-phytec-linux-gnueabi/influxdb/1.7.6-r0/recipe-sysroot -Wl,-rpath-link=/home/des/Yocto/PHYTEC_BSPs/yocto_fsl_update/build/tmp/work/cortexa9hf-neon-phytec-linux-gnueabi/influxdb/1.7.6-r0/recipe-sysroot/ usr/lib/go/pkg/linux_arm_dynlink -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed'" `go_list_packages`' ERROR: Function failed: do_compile (log file is located at /home/des/Yocto/PHYTEC_BSPs/yocto_fsl_update/build/tmp/work/cortexa9hf-neon-phytec-linux-gnueabi/influxdb/1.7.6-r0/temp/log.do_compile.28359) </code></pre> <p>I am unable to understand why does the <code>go install</code> error persist here. On the local server I have all the correct <code>PATH</code> parameters for go in the <code>~/.bashrc</code> file which I assume is not the root cause of the error.</p> <p>P.S. I have added the <code>meta-golang</code> with branch <code>rocko</code> with all my other meta layers to my <code>bblayers.conf</code></p> </div>
©️2020 CSDN 皮肤主题: Age of Ai 设计师:meimeiellie 返回首页
实付 29.90元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值