09-30-2019 08:39 AM - 编辑日期 09-30-2019 08:57 AM
各位大佬，请问：在petalinux-config -c rootfs中有一个filesystem packages，里面包含了如gstreamer,glib,ffmpeg等包，但是我使能了之后，在我的应用文件中添加了#include<gst/gst.h>依然找不到这个头文件，所以我想请问使能了这些包的作用是什么？还有如果我编程应用程序需要用到这些库怎么办？
修改时间 09-30-2019 08:47 AM
Did you install source file in this rootfs ?
If no, would you install source file first ?
However, if you add your origianl gstreamer's plugin, I suggest you to use recipe file to add it.
修改时间 09-30-2019 08:54 AM
修改时间 10-01-2019 07:36 AM
1. I'm sure tgat you want to use "gst/gst.h". So, you need tar ball file which include "gst/gst.h" file.
2. Could you share linux kernel arguments ?
=> $ petalinux-config
=> Enter "DTG Settins" => Enter "Kernel Bootargs"
3. What do you mean "the packages in filesystem packages" ? Do you want to use ex. yum or apt ?
修改时间 10-04-2019 09:55 AM
修改时间 10-04-2019 10:55 AM
Hi, so if I recapitulate, you include some filesystem package (e.g the one that contains gstreamer) into your petalinux-build. Now you are trying to build an application that uses some of the header files that this package provides.
If you are developping your application seperately i.e you are working on XSDK, then you have to include those header files so that your code knows about it. If I remember correctly, you can use a 'petalinux-package --SDK' or something like this, and its going to produce you something you can use in SDK to build applications targeted to the system you are trying to put together (i.e. the libraries and header files).
修改时间 10-04-2019 01:26 PM
修改时间 10-04-2019 01:46 PM
修改时间 10-04-2019 11:21 PM
Okay, let's explain a little bit how this works.
When you play with 'petalinux-config -c rootfs' command, you are provifing the information to petalinux about what you want to be included in your final build, or more specifically, your final root file system. By default, petalinux produces your rootfs in several types : etx4, etxa.gz, cpio, tar.gz, etc. You can find them in the <project_dir>/images/linux. Let's say you activate your gstreamer package. Then you will be able to verify that indeed petalinux have put gstreamer shared libraries (.so) : browse the rootfs.tar.gz in the above location and you will see in the /lib folder that your stuff will be there.
Now, if you want the headers too (.h) you will have to activate <your_package>-dev, in your case, gstreamer-dev. Activating the dev version will include the header files required to develop with the package.
Now, this archive's (the .tar.gz) purpose is to be decompressed onto, let's say, the ext4 partition of your SD card, of SSD or whatever storage you decide to have your root file system to be on.
In theory, you can use this rootfs.tar.gz archive (since it will contain the .so shared libraries of your package, and possibly it's .h header files) to work in SDK while developping your application that will use gstreamer.
Simply decompress this archive somewhere, and in your SDK project properties, go in the section about include paths, put a path to the /lib/include directory of the rootfs. Now SDK will find the header files.
You will have to indicate the library files too (.so)
Hope it clarifies a bit