yocto-第9篇-将软件包打包到qemux86-64机器的文件系统中

<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: 9;go help gopath9; 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 9;arm-phytec-linux-gnueabi-go install -linkshare d -p 4 -v -ldflags="-r /usr/lib/go/pkg/linux_arm_dynlink -extldflags 9;-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-needed9;" `go_list_packages`9; 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>
<div class="post-text" itemprop="text"> <p>Hi all I9;m new to Yocto and trying to build my first recipe, I have a custom layer which shows up and installs correctly on my system "colibri-imx6ull" but I cannot see any results of my recipes work. Bitbake seems to build them but maybe I9;ve misunderstood something in the build process. I have a longtime goal of installing Golang and a few custom scripts but currently, I9;m not even able to copy a simple text file.</p> <p>Version available is Toradex (2.8) v2017.12 rocko (2.4)</p> <p>I have added my layer to oe-core/build/conf/bblayers.conf</p> <pre><code>${TOPDIR}/../layers/meta-hydroware \ </code></pre> <p>I have a layer configuration file avalible at</p> <pre><code>/layers/meta-hydroware/recipes-golang/conf/layer.conf </code></pre> <p>Containing the following</p> <pre><code>BBPATH := "${BBPATH}:${LAYERDIR}" BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \ ${LAYERDIR}/recipes-*/*/*.bbappend" BBFILE_COLLECTIONS += "golang" BBFILE_PATTERN_golang := "^${LAYERDIR}/" BBFILE_PRIORITY_golang := "105" </code></pre> <p>It9;s included in the list of layers when building so hopefully it works. Firstly I9;m just trying to get anything to copy anywhere into my build and I9;ve tried to use this recipe to copy a simple text file but it does not show up.</p> <p>My recipe file "golang.bb" is located in</p> <pre><code>/layers/meta-hydroware/recipes-golang/golang/golang.bb </code></pre> <p>and the text file is located in</p> <pre><code>/layers/meta-hydroware/recipes-golang/golang/files </code></pre> <p>This is the content of my golang.bb</p> <pre><code>SUMMARY = "Provides GO" DESCRIPTION = "Tools for runnings and compiling GO" SRC_URI = "file://readme.txt" LICENSE = "CLOSED" S = "${WORKDIR}" FILES_${PN} = "" ALLOW_EMPTY_${PN} = "1" do_install() { install -m 0755 -d ${D}${bindir} ${D}${bindir}/go mkdir ~/usr/bin/go cp -a --no-preserve=ownership ${WORKDIR}/* ${D}${bindir}/go/ } </code></pre> <p>My goal is to install golang which is available in the same folder as the textfile</p> <pre><code> /layers/meta-hydroware/recipes-golang/golang/files/go1.11.2.linux-armv6l.tar.gz </code></pre> <p>My first goal is to be able to find the text file somewhere on my installed machine, the second goal is to install go. Is there anything wrong with my recipe which prevents it from placing the file?</p> <p>Are there any additional things I need to do in order to handle to install a .tar.gz file? or do do_install() understand what to do?</p> <p>Thanks for your answers //Confused newbie who spend too many days on this already ^^</p> </div>
©️2020 CSDN 皮肤主题: Age of Ai 设计师:meimeiellie 返回首页
实付 29.90元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值