How to add my own qt application to buildroot?

55 Views Asked by At

I'm absolutely new in working with Buildroot and my task seems to be simple but i can't beat it.

So I have a project that i want to add to buildroot. According to this instruction https://bootlin.com/blog/building-a-linux-system-for-the-stm32mp1-setting-up-a-qt5-application-development-environment/ i did my config.in:

config BR2_PACKAGE_MYPROJECT
        bool "myproject"
        depends on BR2_PACKAGE_QT5
        select BR2_PACKAGE_QT5BASE_WIDGETS
        help
          This is the MYPROJECT application.

and myproject.mk

#MYPROJECT_SITE = /home/username/work/myproject
MYPROJECT_SITE = $(TOPDIR)/../../myproject

MYPROJECT_SITE_METHOD = local

MYPROJECT_DEPENDENCIES = qt5base

define MYPROJECT_CONFIGURE_CMDS
    (cd $(@D); $(QT5_QMAKE))
endef

define MYPROJECT_BUILD_CMDS
    $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
endef

define MYPROJECT_INSTALL_TARGET_CMDS
    $(INSTALL) -D -m 0755 $(@D)/myproject $(TARGET_DIR)/usr/bin/myproject
endef

$(eval $(generic-package))

and put them into /home/username/work/buildroot-v3.1.0-2019-09-27/buildroot/package/myproject

my project is in: /home/username/work/myproject

according to instruction i should see this:

>>> qt-sensor-demo  Configuring
(cd /home/thomas/buildroot/output/build/qt-sensor-demo; /home/thomas/buildroot/output/host/bin/qmake -spec devices/linux-buildroot-g++)
>>> qt-sensor-demo  Building

but instead of building part i see:

Usage: /home/username/work/buildroot-v3.1.0-2019-09-27/buildroot/output/host/bin/qmake [mode] [options] [files]

a lot of qmake options

make[2]: *** [/home/username/work/buildroot-v3.1.0-2019-09-27/buildroot/output/build/myproject/.stamp_configured] Error 1
make[1]: *** [_all] Error 2
make[1]: Leaving directory `/home/username/work/buildroot-v3.1.0-2019-09-27/buildroot'
make: *** [all] Error 2

my first thought was that i have wrong $(TOPDIR) understanding so i changed MYPROJECT_SITE to absolute path but this changed nothing

it seems smth is wrong with qmake but what?

UPD:

if i try Building manually outside of Buildroot from instruction:

/path/to/buildroot/output/host/bin/qmake
make

it seems everything is fine

0

There are 0 best solutions below