imx8 yocto增加文件

参考yocto(四)——添加程序和脚本_caodongwang的博客-CSDN博客_yocto添加自己的程序

一、单文件代码添加编译

adv@adv:/work/code/$ tree sources/meta-imx/meta-sdk/recipes-extended
sources/meta-imx/meta-sdk/recipes-extended
├── hello
│   ├── files
│   │   └── helloworld.c
│   └── hello.bb


11 directories, 15 files

hello.bb 

adv@adv:/work/code/$ cat sources/meta-imx/meta-sdk/recipes-extended/hello/hello.bb
#hello.bb文件
SUMMARY = "Simple helloworld application"
SECTION = "examples"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

# FILESPATH 为什么不要?思考一下,参考《bitbake工作流程》文章内容~~~
#FILESPATH := "${THISDIR}/files:"
SRC_URI = "file://helloworld.c"

# 为什么要指定S变量?思考一下,参考《bitbake工作流程》文章内容~~~
S = "${WORKDIR}"

# 重载do_compile任务,编译工作就是下面这条命令,注意使用${CC}
do_compile() {
    ${CC} ${LDFLAGS} helloworld.c -o helloworld
}

# 重载do_instal任务,安装编译成果helloworld
do_install() {
    install -d ${D}${bindir}
    install -m 0755 helloworld ${D}${bindir}
}

# FILES 表示这个软件包,需要打包进映像的文件是helloworld,但决定这个软件包是否参与打包,需要在其他地方配置
# FILES 为什么不要?思考一下,参考《bitbake工作流程》文章内容~~~
#FILES_${PN} += " ${bindir}/helloworld "
adv@adv:/work/code/$

helloworld.c 

adv@adv:/work/code/$ cat sources/meta-imx/meta-sdk/recipes-extended/hello/files/helloworld.c
//helloworld.c文件
#include <stdio.h>

int main(int argc, char *argv[])
{
    printf("Hello world!\n");

    return 0;
}

编译后生成helloworld可执行文件,

编译命令:

bitbake hello -c compile -v -f

生成路径:

/work/code/build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/hello/1.0-r0

如果需要增加到rootfs中可以在conf中增加

IMAGE_INSTALL_append += "hello"

进行全编译后,helloworld路径 

tmp/work/imx8mpevk-poky-linux/imx-robot-sdk/1.0-r0/rootfs/usr/bin/helloworld

二、多文件代码编译

文件列表

adv@adv:/work/code/sources/meta-imx/meta-sdk/recipes-extended$ tree hellomake/
hellomake/
├── files
│   ├── helloworld.c
│   ├── main.c
│   └── Makefile
└── hellomake.bb

1 directory, 4 files

增加后可以查看是否有对应的hellomake软件包,说明yocto识别到了软件包

adv@adv:/work/code//build-imx-robot$ bitbake -s | grep hello*
go-helloworld                                         :0.1-r0
hello                                                 :1.0-r0
hellomake                                             :1.0-r0
python3-configshell-fb                             :1.1.29-r0
rqt-shell                                         :1.0.2-1-r0

main.c

adv@adv:/work/code//sources/meta-imx/meta-sdk/recipes-extended/hellomake$ cat files/main.c
#include <stdio.h>

extern void myhello(void);

int main(int argc, char *argv[])
{
        myhello();
        return 0;
}

helloworld.c

adv@adv:/work/code/sources/meta-imx/meta-sdk/recipes-extended/hellomake$ cat files/helloworld.c
#include <stdio.h>

int myhello(int argc, char *argv[])
{
    printf("Hello world!\n");

    return 0;
}

hellomake.bb

adv@adv:/work/code//sources/meta-imx/meta-sdk/recipes-extended/hellomake$ cat hellomake.bb
#hellomake.bb文件
SUMMARY = "Simple hellomake application"
SECTION = "examples"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SRC_URI = " \
    file://main.c \
    file://helloworld.c \
    file://Makefile \
    "

S = "${WORKDIR}"

EXTRA_OEMAKE = " 'CC=${CC}' 'CFLAGS=${CFLAGS}' 'LDFLAGS=${LDFLAGS}' "
EXTRA_OEMAKE_append = " 'DESTDIR=${D}/${bindir}' "
#上面这条语句可以不要,下面语句改为oe_runmake DESTDIR=${D}/${bindir} install即可
do_install() {
    oe_runmake install
}

# FILES 表示这个软件包,需要打包进映像的文件是hellomake,但决定这个软件包是否参与打包,需要在其他地方配置
#FILES_${PN} += " ${bindir}/hellomake "

使用bitbake hellomake编译生成路径

./tmp/work/cortexa53-crypto-poky-linux/hellomake/1.0-r0/image/usr/bin/hellomake

三、cmake代码编译

adv@adv:/work/code/sources/meta-imx/meta-sdk/recipes-extended/hellocmake$ tree
.
├── files
│   ├── CMakeLists.txt
│   └── src
│       ├── helloworld.c
│       └── main.c
└── hellocmake.bb

2 directories, 4 files

hellworld.c和main.c与上面一样

CMakeLists.txt

adv@adv:/work/code/sources/meta-imx/meta-sdk/recipes-extended/hellocmake$ cat files/CMakeLists.txt
#CMakeLists.txt文件
cmake_minimum_required (VERSION 3.0)
project(hellocmake)

set(SRC_LIST ./src/helloworld.c ./src/main.c)
add_executable(hellocmake ${SRC_LIST})

install(TARGETS hellocmake DESTINATION ${CMAKE_INSTALL_PREFIX}/sbin)
adv@adv:/work/code/sources/meta-imx/meta-sdk/recipes-extended/hellocmake$ cat hellocmake.bb
#hellocmake.bb文件
SUMMARY = "Simple hellocmake application"
SECTION = "examples"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

#继承cmake类
inherit cmake

SRC_URI = " \
    file://src/main.c \
    file://src/helloworld.c \
    file://CMakeLists.txt \
    "

S = "${WORKDIR}"

# FILES 表示这个软件包,需要打包进映像的文件是hellomake,但决定这个软件包是否参与打包,需要在其他地方配置
#FILES_${PN} += " ${sbindir}/hellocmake "

进入hellocmake/files目录下执行cmake .命令,再执行make命令,确保编译无误,然后返回yocto工程目录顶层在进行编译

bitbake hellocmake

./tmp/work/cortexa53-crypto-poky-linux/hellocmake/1.0-r0/image/usr/sbin/hellocmake

四、Autotools代码编译

adv@adv:/work/code//sources/meta-imx/meta-sdk/recipes-extended/helloauto$ tree
.
├── files
│   ├── configure.ac
│   ├── Makefile.am
│   └── src
│       ├── helloworld.c
│       ├── main.c
│       └── Makefile.am
└── helloauto.bb

2 directories, 6 files

helloauto/files目录下执行 命令,确保编译执行无误,然后返回yocto工程目录顶层。

autoreconf --install && ./configure && make && ./src/helloauto 

bitbake  helloauto

./tmp/work/cortexa53-crypto-poky-linux/helloauto/1.0-r0/image/usr/bin/helloauto

五、添加已经有的软件包

CORE_IMAGE_EXTRA_INSTALL += "xxx"

六、添加脚本

adv@adv:/work/code//sources/meta-imx/meta-sdk/recipes-extended/myscript$ tree
.
├── files
│   ├── ldapwhoami
│   └── serialportuserinit
└── scripts.bb

1 directory, 3 files

 FILESPATH目录未做修改了

adv@adv:/work/code/sources/meta-imx/meta-sdk/recipes-extended/myscript$ cat scripts.bb
SUMMARY = "examples"
SECTION = "examples"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

#${THISDIR}表示bb文件所在路径,即meta-byosoft/meta-4u-x201/recipes-mytest/scripts
#FILESPATH := "${THISDIR}/../../sources/${PN}:"

S = "${WORKDIR}"

SRC_URI = "\
          file://ldapwhoami \
          file://serialportuserinit \
          "
do_install() {
        install -m 0755 -d ${D}${sbindir}
        install -m 0755 ${S}/ldapwhoami ${D}${sbindir}
        install -m 0755 ${S}/serialportuserinit ${D}${sbindir}
}

编译命令 bitbake scripts

tmp/work/cortexa53-crypto-poky-linux/scripts/1.0-r0/image/usr/sbin/

七、软件包打包到rootfs中

在对应conf中增加,先删除conf/layer.conf

IMAGE_INSTALL_append += "hellomake"
IMAGE_INSTALL_append += "hellocmake"
IMAGE_INSTALL_append += "helloauto"
IMAGE_INSTALL_append += "scripts"

八、新增geos压缩文件编译 

 由于系统中已经有geos bb文件,我们改成geosaa

adv@adv:/work/code/sources/meta-imx/meta-sdk/recipes-extended/geosaa$ tree
.
├── files
│   └── geos-3.9.3.tar.bz2
└── geosaa.bb

1 directory, 2 files

 注意修改编译目录S

#hellocmake.bb文件
SUMMARY = "Simple geos_aa application"
SECTION = "examples"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"



SRC_URI = " \ 
    file://geos-3.9.3.tar.bz2 \
    "

#继承cmake类
inherit cmake

#修改了编译目录
S = "${WORKDIR}/geos-3.9.3"

# FILES 表示这个软件包,需要打包进映像的文件是hellomake,但决定这个软件包是否参与打包,需要在其他地方配置
#FILES_${PN} += " ${sbindir}/hellocmake "

bitbake geosaa后

tmp/work/cortexa53-crypto-poky-linux/geosaa/1.0-r0/image/usr/
├── bin
│   └── geos-config
├── include
│   ├── geos
│   │   ├── algorithm
│   │   │   ├── Angle.h
│   │   │   ├── Area.h
│   │   │   ├── BoundaryNodeRule.h
│   │   │   ├── CentralEndpointIntersector.h
│   │   │   ├── Centroid.h
│   │   │   ├── CGAlgorithmsDD.h
│   │   │   ├── construct
│   │   │   │   ├── LargestEmptyCircle.h
│   │   │   │   └── MaximumInscribedCircle.h
│   │   │   ├── ConvexHull.h
│   │   │   ├── ConvexHull.inl
│   │   │   ├── distance
│   │   │   │   ├── DiscreteFrechetDistance.h
│   │   │   │   ├── DiscreteHausdorffDistance.h
│   │   │   │   ├── DistanceToPoint.h
│   │   │   │   └── PointPairDistance.h
│   │   │   ├── Distance.h
│   │   │   ├── HCoordinate.h
│   │   │   ├── InteriorPointArea.h
│   │   │   ├── InteriorPointLine.h
│   │   │   ├── InteriorPointPoint.h
│   │   │   ├── Intersection.h
│   │   │   ├── Length.h
│   │   │   ├── LineIntersector.h
│   │   │   ├── locate
│   │   │   │   ├── IndexedPointInAreaLocator.h
│   │   │   │   ├── PointOnGeometryLocator.h
│   │   │   │   └── SimplePointInAreaLocator.h
│   │   │   ├── MinimumBoundingCircle.h
│   │   │   ├── MinimumDiameter.h
│   │   │   ├── NotRepresentableException.h
│   │   │   ├── Orientation.h
│   │   │   ├── PointLocation.h
│   │   │   ├── PointLocator.h
│   │   │   ├── RayCrossingCounterDD.h
│   │   │   ├── RayCrossingCounter.h
│   │   │   └── RobustDeterminant.h
│   │   ├── constants.h
│   │   ├── edgegraph
│   │   │   ├── EdgeGraphBuilder.h
│   │   │   ├── EdgeGraph.h
│   │   │   ├── HalfEdge.h
│   │   │   └── MarkHalfEdge.h
│   │   ├── export.h
│   │   ├── geom
│   │   │   ├── CoordinateArraySequenceFactory.h
│   │   │   ├── CoordinateArraySequenceFactory.inl
│   │   │   ├── CoordinateArraySequence.h
│   │   │   ├── CoordinateFilter.h
│   │   │   ├── Coordinate.h
│   │   │   ├── Coordinate.inl
│   │   │   ├── CoordinateList.h
│   │   │   ├── CoordinateSequenceFactory.h
│   │   │   ├── CoordinateSequenceFilter.h
│   │   │   ├── CoordinateSequence.h
│   │   │   ├── DefaultCoordinateSequenceFactory.h
│   │   │   ├── Dimension.h
│   │   │   ├── Envelope.h
│   │   │   ├── Envelope.inl
│   │   │   ├── FixedSizeCoordinateSequence.h
│   │   │   ├── GeometryCollection.h
│   │   │   ├── GeometryCollection.inl
│   │   │   ├── GeometryComponentFilter.h
│   │   │   ├── GeometryFactory.h
│   │   │   ├── GeometryFactory.inl
│   │   │   ├── GeometryFilter.h
│   │   │   ├── Geometry.h
│   │   │   ├── HeuristicOverlay.h
│   │   │   ├── IntersectionMatrix.h
│   │   │   ├── LinearRing.h
│   │   │   ├── LineSegment.h
│   │   │   ├── LineSegment.inl
│   │   │   ├── LineString.h
│   │   │   ├── Location.h
│   │   │   ├── MultiLineString.h
│   │   │   ├── MultiLineString.inl
│   │   │   ├── MultiPoint.h
│   │   │   ├── MultiPolygon.h
│   │   │   ├── MultiPolygon.inl
│   │   │   ├── Point.h
│   │   │   ├── Polygon.h
│   │   │   ├── Position.h
│   │   │   ├── PrecisionModel.h
│   │   │   ├── PrecisionModel.inl
│   │   │   ├── prep
│   │   │   │   ├── AbstractPreparedPolygonContains.h
│   │   │   │   ├── BasicPreparedGeometry.h
│   │   │   │   ├── PreparedGeometryFactory.h
│   │   │   │   ├── PreparedGeometry.h
│   │   │   │   ├── PreparedLineStringDistance.h
│   │   │   │   ├── PreparedLineString.h
│   │   │   │   ├── PreparedLineStringIntersects.h
│   │   │   │   ├── PreparedLineStringNearestPoints.h
│   │   │   │   ├── PreparedPoint.h
│   │   │   │   ├── PreparedPolygonContains.h
│   │   │   │   ├── PreparedPolygonContainsProperly.h
│   │   │   │   ├── PreparedPolygonCovers.h
│   │   │   │   ├── PreparedPolygonDistance.h
│   │   │   │   ├── PreparedPolygon.h
│   │   │   │   ├── PreparedPolygonIntersects.h
│   │   │   │   └── PreparedPolygonPredicate.h
│   │   │   ├── Quadrant.h
│   │   │   ├── Quadrant.inl
│   │   │   ├── Triangle.h
│   │   │   └── util
│   │   │       ├── ComponentCoordinateExtracter.h
│   │   │       ├── CoordinateOperation.h
│   │   │       ├── Densifier.h
│   │   │       ├── GeometryCombiner.h
│   │   │       ├── GeometryEditor.h
│   │   │       ├── GeometryEditorOperation.h
│   │   │       ├── GeometryExtracter.h
│   │   │       ├── GeometryTransformer.h
│   │   │       ├── LinearComponentExtracter.h
│   │   │       ├── PointExtracter.h
│   │   │       ├── PolygonExtracter.h
│   │   │       ├── ShortCircuitedGeometryVisitor.h
│   │   │       └── SineStarFactory.h
│   │   ├── geomgraph
│   │   │   ├── Depth.h
│   │   │   ├── Depth.inl
│   │   │   ├── DirectedEdge.h
│   │   │   ├── DirectedEdge.inl
│   │   │   ├── DirectedEdgeStar.h
│   │   │   ├── EdgeEnd.h
│   │   │   ├── EdgeEndStar.h
│   │   │   ├── Edge.h
│   │   │   ├── EdgeIntersection.h
│   │   │   ├── EdgeIntersectionList.h
│   │   │   ├── EdgeList.h
│   │   │   ├── EdgeNodingValidator.h
│   │   │   ├── EdgeRing.h
│   │   │   ├── GeometryGraph.h
│   │   │   ├── GeometryGraph.inl
│   │   │   ├── GraphComponent.h
│   │   │   ├── index
│   │   │   │   ├── EdgeSetIntersector.h
│   │   │   │   ├── MonotoneChainEdge.h
│   │   │   │   ├── MonotoneChain.h
│   │   │   │   ├── MonotoneChainIndexer.h
│   │   │   │   ├── SegmentIntersector.h
│   │   │   │   ├── SegmentIntersector.inl
│   │   │   │   ├── SimpleEdgeSetIntersector.h
│   │   │   │   ├── SimpleMCSweepLineIntersector.h
│   │   │   │   ├── SimpleSweepLineIntersector.h
│   │   │   │   ├── SweepLineEvent.h
│   │   │   │   ├── SweepLineEventObj.h
│   │   │   │   └── SweepLineSegment.h
│   │   │   ├── Label.h
│   │   │   ├── Label.inl
│   │   │   ├── NodeFactory.h
│   │   │   ├── Node.h
│   │   │   ├── NodeMap.h
│   │   │   ├── PlanarGraph.h
│   │   │   ├── TopologyLocation.h
│   │   │   └── TopologyLocation.inl
│   │   ├── geom.h
│   │   ├── index
│   │   │   ├── bintree
│   │   │   │   ├── Bintree.h
│   │   │   │   ├── Interval.h
│   │   │   │   ├── Key.h
│   │   │   │   ├── NodeBase.h
│   │   │   │   ├── Node.h
│   │   │   │   └── Root.h
│   │   │   ├── chain
│   │   │   │   ├── MonotoneChainBuilder.h
│   │   │   │   ├── MonotoneChain.h
│   │   │   │   ├── MonotoneChainOverlapAction.h
│   │   │   │   └── MonotoneChainSelectAction.h
│   │   │   ├── intervalrtree
│   │   │   │   ├── IntervalRTreeBranchNode.h
│   │   │   │   ├── IntervalRTreeLeafNode.h
│   │   │   │   ├── IntervalRTreeNode.h
│   │   │   │   └── SortedPackedIntervalRTree.h
│   │   │   ├── ItemVisitor.h
│   │   │   ├── kdtree
│   │   │   │   ├── KdNode.h
│   │   │   │   ├── KdNodeVisitor.h
│   │   │   │   └── KdTree.h
│   │   │   ├── quadtree
│   │   │   │   ├── IntervalSize.h
│   │   │   │   ├── Key.h
│   │   │   │   ├── NodeBase.h
│   │   │   │   ├── Node.h
│   │   │   │   ├── Quadtree.h
│   │   │   │   └── Root.h
│   │   │   ├── SpatialIndex.h
│   │   │   ├── strtree
│   │   │   │   ├── AbstractNode.h
│   │   │   │   ├── AbstractSTRtree.h
│   │   │   │   ├── Boundable.h
│   │   │   │   ├── BoundablePair.h
│   │   │   │   ├── EnvelopeUtil.h
│   │   │   │   ├── GeometryItemDistance.h
│   │   │   │   ├── Interval.h
│   │   │   │   ├── ItemBoundable.h
│   │   │   │   ├── ItemDistance.h
│   │   │   │   ├── SimpleSTRdistance.h
│   │   │   │   ├── SimpleSTRnode.h
│   │   │   │   ├── SimpleSTRtree.h
│   │   │   │   ├── SIRtree.h
│   │   │   │   └── STRtree.h
│   │   │   └── sweepline
│   │   │       ├── SweepLineEvent.h
│   │   │       ├── SweepLineIndex.h
│   │   │       ├── SweepLineInterval.h
│   │   │       └── SweepLineOverlapAction.h
│   │   ├── inline.h
│   │   ├── io
│   │   │   ├── ByteOrderDataInStream.h
│   │   │   ├── ByteOrderDataInStream.inl
│   │   │   ├── ByteOrderValues.h
│   │   │   ├── CLocalizer.h
│   │   │   ├── ParseException.h
│   │   │   ├── StringTokenizer.h
│   │   │   ├── WKBConstants.h
│   │   │   ├── WKBReader.h
│   │   │   ├── WKBWriter.h
│   │   │   ├── WKTReader.h
│   │   │   ├── WKTReader.inl
│   │   │   ├── WKTWriter.h
│   │   │   └── Writer.h
│   │   ├── linearref
│   │   │   ├── ExtractLineByLocation.h
│   │   │   ├── LengthIndexedLine.h
│   │   │   ├── LengthIndexOfPoint.h
│   │   │   ├── LengthLocationMap.h
│   │   │   ├── LinearGeometryBuilder.h
│   │   │   ├── LinearIterator.h
│   │   │   ├── LinearLocation.h
│   │   │   ├── LocationIndexedLine.h
│   │   │   ├── LocationIndexOfLine.h
│   │   │   └── LocationIndexOfPoint.h
│   │   ├── math
│   │   │   └── DD.h
│   │   ├── namespaces.h
│   │   ├── noding
│   │   │   ├── BasicSegmentString.h
│   │   │   ├── BasicSegmentString.inl
│   │   │   ├── FastNodingValidator.h
│   │   │   ├── FastSegmentSetIntersectionFinder.h
│   │   │   ├── GeometryNoder.h
│   │   │   ├── IntersectionAdder.h
│   │   │   ├── IntersectionFinderAdder.h
│   │   │   ├── IteratedNoder.h
│   │   │   ├── MCIndexNoder.h
│   │   │   ├── MCIndexNoder.inl
│   │   │   ├── MCIndexSegmentSetMutualIntersector.h
│   │   │   ├── NodableSegmentString.h
│   │   │   ├── NodedSegmentString.h
│   │   │   ├── Noder.h
│   │   │   ├── NodingIntersectionFinder.h
│   │   │   ├── NodingValidator.h
│   │   │   ├── Octant.h
│   │   │   ├── OrientedCoordinateArray.h
│   │   │   ├── ScaledNoder.h
│   │   │   ├── SegmentIntersectionDetector.h
│   │   │   ├── SegmentIntersector.h
│   │   │   ├── SegmentNode.h
│   │   │   ├── SegmentNodeList.h
│   │   │   ├── SegmentPointComparator.h
│   │   │   ├── SegmentSetMutualIntersector.h
│   │   │   ├── SegmentString.h
│   │   │   ├── SegmentStringUtil.h
│   │   │   ├── SimpleNoder.h
│   │   │   ├── SinglePassNoder.h
│   │   │   ├── snap
│   │   │   │   ├── SnappingIntersectionAdder.h
│   │   │   │   ├── SnappingNoder.h
│   │   │   │   └── SnappingPointIndex.h
│   │   │   ├── snapround
│   │   │   │   ├── HotPixel.h
│   │   │   │   ├── HotPixelIndex.h
│   │   │   │   ├── HotPixel.inl
│   │   │   │   ├── MCIndexPointSnapper.h
│   │   │   │   ├── MCIndexSnapRounder.h
│   │   │   │   ├── SnapRoundingIntersectionAdder.h
│   │   │   │   └── SnapRoundingNoder.h
│   │   │   └── ValidatingNoder.h
│   │   ├── operation
│   │   │   ├── buffer
│   │   │   │   ├── BufferBuilder.h
│   │   │   │   ├── BufferInputLineSimplifier.h
│   │   │   │   ├── BufferOp.h
│   │   │   │   ├── BufferParameters.h
│   │   │   │   ├── BufferSubgraph.h
│   │   │   │   ├── OffsetCurveBuilder.h
│   │   │   │   ├── OffsetCurveSetBuilder.h
│   │   │   │   ├── OffsetSegmentGenerator.h
│   │   │   │   ├── OffsetSegmentString.h
│   │   │   │   ├── RightmostEdgeFinder.h
│   │   │   │   └── SubgraphDepthLocater.h
│   │   │   ├── distance
│   │   │   │   ├── ConnectedElementLocationFilter.h
│   │   │   │   ├── ConnectedElementPointFilter.h
│   │   │   │   ├── DistanceOp.h
│   │   │   │   ├── FacetSequence.h
│   │   │   │   ├── FacetSequenceTreeBuilder.h
│   │   │   │   ├── GeometryLocation.h
│   │   │   │   └── IndexedFacetDistance.h
│   │   │   ├── GeometryGraphOperation.h
│   │   │   ├── intersection
│   │   │   │   ├── Rectangle.h
│   │   │   │   ├── RectangleIntersectionBuilder.h
│   │   │   │   └── RectangleIntersection.h
│   │   │   ├── IsSimpleOp.h
│   │   │   ├── linemerge
│   │   │   │   ├── EdgeString.h
│   │   │   │   ├── LineMergeDirectedEdge.h
│   │   │   │   ├── LineMergeEdge.h
│   │   │   │   ├── LineMergeGraph.h
│   │   │   │   ├── LineMerger.h
│   │   │   │   └── LineSequencer.h
│   │   │   ├── overlay
│   │   │   │   ├── EdgeSetNoder.h
│   │   │   │   ├── ElevationMatrixCell.h
│   │   │   │   ├── ElevationMatrix.h
│   │   │   │   ├── LineBuilder.h
│   │   │   │   ├── MaximalEdgeRing.h
│   │   │   │   ├── MinimalEdgeRing.h
│   │   │   │   ├── MinimalEdgeRing.inl
│   │   │   │   ├── OverlayNodeFactory.h
│   │   │   │   ├── OverlayOp.h
│   │   │   │   ├── PointBuilder.h
│   │   │   │   ├── PolygonBuilder.h
│   │   │   │   ├── snap
│   │   │   │   │   ├── GeometrySnapper.h
│   │   │   │   │   ├── LineStringSnapper.h
│   │   │   │   │   ├── SnapIfNeededOverlayOp.h
│   │   │   │   │   └── SnapOverlayOp.h
│   │   │   │   └── validate
│   │   │   │       ├── FuzzyPointLocator.h
│   │   │   │       ├── OffsetPointGenerator.h
│   │   │   │       └── OverlayResultValidator.h
│   │   │   ├── overlayng
│   │   │   │   ├── Edge.h
│   │   │   │   ├── EdgeKey.h
│   │   │   │   ├── EdgeMerger.h
│   │   │   │   ├── EdgeNodingBuilder.h
│   │   │   │   ├── EdgeSourceInfo.h
│   │   │   │   ├── ElevationModel.h
│   │   │   │   ├── IndexedPointOnLineLocator.h
│   │   │   │   ├── InputGeometry.h
│   │   │   │   ├── IntersectionPointBuilder.h
│   │   │   │   ├── LineBuilder.h
│   │   │   │   ├── LineLimiter.h
│   │   │   │   ├── MaximalEdgeRing.h
│   │   │   │   ├── OverlayEdge.h
│   │   │   │   ├── OverlayEdgeRing.h
│   │   │   │   ├── OverlayGraph.h
│   │   │   │   ├── OverlayLabel.h
│   │   │   │   ├── OverlayLabeller.h
│   │   │   │   ├── OverlayMixedPoints.h
│   │   │   │   ├── OverlayNG.h
│   │   │   │   ├── OverlayNGRobust.h
│   │   │   │   ├── OverlayPoints.h
│   │   │   │   ├── OverlayUtil.h
│   │   │   │   ├── PolygonBuilder.h
│   │   │   │   ├── PrecisionReducer.h
│   │   │   │   ├── PrecisionUtil.h
│   │   │   │   ├── RingClipper.h
│   │   │   │   ├── RobustClipEnvelopeComputer.h
│   │   │   │   └── UnaryUnionNG.h
│   │   │   ├── polygonize
│   │   │   │   ├── BuildArea.h
│   │   │   │   ├── EdgeRing.h
│   │   │   │   ├── HoleAssigner.h
│   │   │   │   ├── PolygonizeDirectedEdge.h
│   │   │   │   ├── PolygonizeEdge.h
│   │   │   │   ├── PolygonizeGraph.h
│   │   │   │   └── Polygonizer.h
│   │   │   ├── predicate
│   │   │   │   ├── RectangleContains.h
│   │   │   │   ├── RectangleIntersects.h
│   │   │   │   └── SegmentIntersectionTester.h
│   │   │   ├── relate
│   │   │   │   ├── EdgeEndBuilder.h
│   │   │   │   ├── EdgeEndBundle.h
│   │   │   │   ├── EdgeEndBundleStar.h
│   │   │   │   ├── RelateComputer.h
│   │   │   │   ├── RelateNodeFactory.h
│   │   │   │   ├── RelateNodeGraph.h
│   │   │   │   ├── RelateNode.h
│   │   │   │   └── RelateOp.h
│   │   │   ├── sharedpaths
│   │   │   │   └── SharedPathsOp.h
│   │   │   ├── union
│   │   │   │   ├── CascadedPolygonUnion.h
│   │   │   │   ├── CascadedUnion.h
│   │   │   │   ├── CoverageUnion.h
│   │   │   │   ├── GeometryListHolder.h
│   │   │   │   ├── OverlapUnion.h
│   │   │   │   ├── PointGeometryUnion.h
│   │   │   │   ├── UnaryUnionOp.h
│   │   │   │   └── UnionStrategy.h
│   │   │   └── valid
│   │   │       ├── ConnectedInteriorTester.h
│   │   │       ├── ConsistentAreaTester.h
│   │   │       ├── IndexedNestedShellTester.h
│   │   │       ├── IsValidOp.h
│   │   │       ├── MakeValid.h
│   │   │       ├── QuadtreeNestedRingTester.h
│   │   │       ├── RepeatedPointRemover.h
│   │   │       ├── RepeatedPointTester.h
│   │   │       ├── SimpleNestedRingTester.h
│   │   │       ├── SweeplineNestedRingTester.h
│   │   │       └── TopologyValidationError.h
│   │   ├── planargraph
│   │   │   ├── algorithm
│   │   │   │   └── ConnectedSubgraphFinder.h
│   │   │   ├── DirectedEdge.h
│   │   │   ├── DirectedEdgeStar.h
│   │   │   ├── Edge.h
│   │   │   ├── GraphComponent.h
│   │   │   ├── Node.h
│   │   │   ├── NodeMap.h
│   │   │   ├── PlanarGraph.h
│   │   │   └── Subgraph.h
│   │   ├── precision
│   │   │   ├── CommonBits.h
│   │   │   ├── CommonBitsOp.h
│   │   │   ├── CommonBitsRemover.h
│   │   │   ├── EnhancedPrecisionOp.h
│   │   │   ├── GeometryPrecisionReducer.h
│   │   │   ├── MinimumClearance.h
│   │   │   ├── PrecisionReducerCoordinateOperation.h
│   │   │   └── SimpleGeometryPrecisionReducer.h
│   │   ├── profiler.h
│   │   ├── shape
│   │   │   └── fractal
│   │   │       ├── HilbertCode.h
│   │   │       ├── HilbertEncoder.h
│   │   │       └── MortonCode.h
│   │   ├── simplify
│   │   │   ├── DouglasPeuckerLineSimplifier.h
│   │   │   ├── DouglasPeuckerSimplifier.h
│   │   │   ├── LineSegmentIndex.h
│   │   │   ├── TaggedLineSegment.h
│   │   │   ├── TaggedLinesSimplifier.h
│   │   │   ├── TaggedLineString.h
│   │   │   ├── TaggedLineStringSimplifier.h
│   │   │   └── TopologyPreservingSimplifier.h
│   │   ├── triangulate
│   │   │   ├── DelaunayTriangulationBuilder.h
│   │   │   ├── IncrementalDelaunayTriangulator.h
│   │   │   ├── quadedge
│   │   │   │   ├── LastFoundQuadEdgeLocator.h
│   │   │   │   ├── LocateFailureException.h
│   │   │   │   ├── QuadEdge.h
│   │   │   │   ├── QuadEdgeLocator.h
│   │   │   │   ├── QuadEdgeQuartet.h
│   │   │   │   ├── QuadEdgeSubdivision.h
│   │   │   │   ├── TrianglePredicate.h
│   │   │   │   ├── TriangleVisitor.h
│   │   │   │   └── Vertex.h
│   │   │   └── VoronoiDiagramBuilder.h
│   │   ├── unload.h
│   │   ├── util
│   │   │   ├── Assert.h
│   │   │   ├── AssertionFailedException.h
│   │   │   ├── CoordinateArrayFilter.h
│   │   │   ├── GeometricShapeFactory.h
│   │   │   ├── GEOSException.h
│   │   │   ├── IllegalArgumentException.h
│   │   │   ├── IllegalStateException.h
│   │   │   ├── Interrupt.h
│   │   │   ├── Machine.h
│   │   │   ├── math.h
│   │   │   ├── TopologyException.h
│   │   │   ├── UniqueCoordinateArrayFilter.h
│   │   │   └── UnsupportedOperationException.h
│   │   ├── util.h
│   │   └── version.h
│   └── geos_c.h
└── lib
    ├── cmake
    │   └── GEOS
    │       ├── geos-config.cmake
    │       ├── geos-config-version.cmake
    │       ├── geos-targets.cmake
    │       └── geos-targets-release.cmake
    ├── libgeos_c.so -> libgeos_c.so.1
    ├── libgeos_c.so.1 -> libgeos_c.so.1.14.3
    ├── libgeos_c.so.1.14.3
    ├── libgeos.so -> libgeos.so.3.9.3
    ├── libgeos.so.3.9.3
    └── pkgconfig
        └── geos.pc

55 directories, 439 files

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 安装imx6 Yocto交叉编译环境需要以下步骤: 1. 下载并安装交叉编译工具链,可以从官方网站或第三方网站下载。 2. 下载并解压imx6 Yocto源代码,可以从官方网站下载。 3. 进入源代码目录,执行“source setup-environment <build_dir>”命令来设置编译环境变量。 4. 配置编译选项,在conf文件中进行修改。 5. 执行“bitbake core-image-minimal”命令来开始编译。 6. 等待编译完成,将生成的镜像烧写到imx6设备上即可。 ### 回答2: IMX6 Yocto是一种基于Linux的嵌入式操作系统,它可以在各种嵌入式设备中运行,包括智能手机、平板电脑和其他嵌入式设备。IMX6 Yocto需要交叉编译才能在设备上运行,因此需要设置IMX6 Yocto交叉编译环境。 在安装IMX6 Yocto交叉编译环境之前,需要准备以下事项: 1. 一台运行Linux或Mac OS X的计算机; 2. 安装交叉编译工具链; 3. 安装Git; 4. 安装文本编辑器,如Vim或Nano。 接下来,我们将逐步介绍如何在Linux或Mac OS X上安装IMX6 Yocto交叉编译环境。 第一步:安装交叉编译工具链 IMX6 Yocto需要使用交叉编译工具链,可从官方网站下载。可以选择下载解压后放在/usr/local/目录下。然后将/bin/i686-pc-linux-gnu-路径添加到$PATH环境变量中,例如,在~/.bashrc文件中添加以下行: export PATH=$PATH:/usr/local/gcc-arm-none-eabi-10-2020-q4-major/bin/ 然后运行source ~/.bashrc或重新打开终端窗口以应用更改。 第二步:安装Git $ sudo apt-get update $ sudo apt-get install git 第三步:创建工作目录 创建一个新目录,例如imx6-yocto,并进入该目录: $ mkdir ~/imx6-yocto $ cd ~/imx6-yocto 第四步:下载IMX6 Yocto源码 使用Git从GitHub上克隆IMX6 Yocto存储库。你需要安装Git,假设下载地址为git@github.com:xxx/imx6-yocto.git: $ git clone git@github.com:xxx/imx6-yocto.git 等待下载过程结束。 第五步:配置Yocto Build Environment 进入imx6-yocto目录并执行以下命令: $ source setup-environment build 它将为您创建一个build目录和一些配置文件。如果在运行此命令时出现任何问题,请确保已正确安装所有依赖项,例如安装了python、perl、help2man等软件包。 第六步:构建Image文件 输入以下命令执行Image文件的构建: $ bitbake core-image-minimal 进程可能需要一段时间才能完成。执行成功将会在/tmp/deploy/images/imx6/中产生core-image-minimal-imx6qdl.sdcard.bz2压缩文件,即镜像文件。可以将镜像文件下载到SD卡中进行运行。 到此,IMX6 Yocto交叉编译环境的安装就完成了。如果出现错误,请检查依赖项是否正确安装,或在官方网站或社区论坛上查找解决方案。 ### 回答3: imx6是一款性能强大的嵌入式处理器,使用yocto构建嵌入式系统,可以有效优化系统性能,提高开发效率。而交叉编译则是嵌入式开发中必不可少的一环,可以在一台主机上编译出适用于目标平台的二进制文件。因此,安装imx6 yocto交叉编译环境是非常重要的。 安装imx6 yocto交叉编译环境的步骤如下: 1. 准备工作 在安装环境之前,需要准备以下环境: a. 一台可运行Linux系统的主机,推荐使用Ubuntu 16.04以上版本。 b. 下载并安装ARM架构交叉编译器,比如arm-linux-gnueabihf。 c. 下载并安装支持imx6的交叉编译工具,比如imx6q-poky-linux-gcc。 d. 下载并安装yocto-sdk环境,这是一个类似于开发工具包的软件,提供了一些模块和库供开发者使用。 2. 安装库文件 在主机上安装所需要的库文件,这些文件包括g++,make,findutils和python。 sudo apt-get install g++ make findutils python 3. 配置环境变量 在主机上配置环境变量,以允许主机寻找交叉编译器和yocto-sdk环境。 export CROSS_COMPILE=arm-linux-gnueabihf export SDKTARGETSYSROOT=/path/to/sdk/sysroot 4. 配置yocto源码 下载并配置yocto源码,以便使用yocto构建嵌入式系统。 git clone git://git.yoctoproject.org/poky cd poky git checkout -b imx6 origin/imx6 5. 构建yocto环境 配置和构建yocto环境,以便构建所需的软件包。 source oe-init-build-env bitbake core-image-minimal 6. 交叉编译应用程序 使用交叉编译工具来交叉编译应用程序,以便在imx6上运行。 arm-poky-linux-gnueabi-gcc -o hello_world hello_world.c 7. 部署应用程序 将交叉编译生成的可执行文件部署到目标设备上,以便在设备上运行。 scp hello_world user@device:/path/to/hello_world 总之,以上就是安装imx6 yocto交叉编译环境的大致步骤。在实际开发中,可能会遇到各种问题,需要仔细检查每一个步骤,找出问题并解决。通过使用yocto构建嵌入式系统,可以大大提高开发效率,减少开发周期,让嵌入式开发更加简单和高效。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值