ST意法半导体
直播中

h1654155275.5661

7年用户 960经验值
私信 关注
[问答]

如何在st-linux发行版中嵌入一个应用程序呢?

我正在尝试在 st-linux 发行版中嵌入一个应用程序。我的意思是目标是用 bitbake 编译它并集成到自定义的 st-image-weston 中。
我尝试使用 Developper 部分的 gtk hello world 示例(运行没有问题),但使用分发包。
所以我做了一个 bitbake 食谱,但是当我运行它时,我收到错误“错误:gtk/gtk.h:没有这样的文件或目录”。
但是 bitbake 层包括 gtk+3,当我运行 bitbake gtk+3 它是成功的。
我尝试将 gtk3 添加到编译标志、DEPENDS、RDEPENDS、do_configure[depends] 但没有任何效果。唯一有用的是采购开发包 sdk 环境设置,但这很奇怪。我是 bitbake 的初学者,我没有找到如何使开发包应用程序与分发包一起工作。
这是我的 .bb 文件:
  • # 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.)
  • # Unable to find any files that looked like license statements. Check the accompanying
  • # documentation and source headers and set LICENSE and LIC_FILES_CHKSUM accordingly.
  • #
  • # NOTE: LICENSE is being set to "CLOSED" to allow you to at least start building - if
  • # this is not accurate with respect to the licensing of the software being built (it
  • # will not be in most cases) you must specify the correct value before using this
  • # recipe for anything other than initial testing/development!
  • LICENSE = "CLOSED"
  • LIC_FILES_CHKSUM = ""
  • # No information for SRC_URI yet (only an external source tree was specified)
  • SRC_URI = ""
  • # NOTE: this is a Makefile-only piece of software, so we cannot generate much of the
  • # recipe automatically - you will need to examine the Makefile yourself and ensure
  • # that the appropriate arguments are passed in.
  • do_configure () {
  •         # Specify any needed configure commands here
  •         :
  • }
  • do_compile () {
  •         # You will almost certainly need to add additional arguments here
  •         #. /mnt/sda3/STM32MP15-Ecosystem-v3.0.0/Developer-Package/openstlinux-5.10-dunfell-mp1-21-03-31/SDK/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
  •     cd ${S}
  •         #oe_runmake
  •     ${CC} ${CFLAGS} ${LDFLAGS} gtk_hello_world.c -o gtk_hello_world
  • }
  • do_install () {
  •         # NOTE: unable to determine what to put here - there is a Makefile but no
  •         # target named "install", so you will need to define this yourself
  •         :
  •         #oe_runmake install
  • }
源代码包含在 .bbappend 文件中。我成功地实现了一个 led 闪烁程序和以下链接到 st-image-weston 与 bitbake 但不知道在这种情况下该怎么做。

更多回帖

发帖
×
20
完善资料,
赚取积分