Toto
Toto

Reputation: 89

Buildroot custom package not built automatically

I have created a custom package for buildroot and put it in an external buildroot tree. I have enabled it by using make menuconfig BR_EXTERNAL=../buildroot-external

It is build successfully when triggered with make mypackage.

However when run make clean && make BR_EXTERNAL=../buildroot-external everything rebuilds while my custom package is simply forgotten. I want it to be automatically compiled as all the other packages.

As I am still developing that package the sourcecode is stored locally which is configured in the ../buildroot-external/locals.mk

For completeness those are the config-files for defining the package:

buildroot-external/package/mypackage/Config.in

config BR2_PACKAGE_MY_PACKAGE
       bool "MyPackage"
       help
            Some help about MyPackage

buildroot-external/package/mypackage/mypackage.mk

################################################################################
#
# mypackage
#
################################################################################

MYPACKAGE_VERSION = 1.0
MYPACKAGE_SOURCE = mypackage

# PACKAGE_OVERRIDE_SRC_DIR set in buildroot-external/local.mk
# sources are taken from local folder to ease development

MYPACKAGE_LICENSE = GPL-3.0+
MYPACKAGE_LICENSE_FILES = COPYING

define MYPACKAGE_BUILD_CMDS
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/Buildserver all
endef

define MYPACKAGE_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/Buildserver/MyPackage $(TARGET_DIR)/root/MyPackageBamboo
endef

$(eval $(generic-package))

Upvotes: 1

Views: 3696

Answers (2)

Jörgen Sigvardsson
Jörgen Sigvardsson

Reputation: 4887

Even though this issue was solved, I bumped into this as well, but with another source of error: I had forgotten to include/source my package's Config.in in the top level package/Config.in.

I didn't spot this in make menuconfig, because I'm using predefined configuration files (in which I had selected my package).

Different source of error, but exactly the same symptoms.

(The question and previous answers and comments acted as a fine rubber duck to make me find my issue, so a big thank you to all previously engaged!)

Upvotes: 0

Luca Ceresoli
Luca Ceresoli

Reputation: 1661

Enter make menuconfig, enable your package, exit saving changes. Now make will build your package too.

This is because by default nearly all packages are disabled since Buildroot cannot know what you need on your target root filesystem.

Upvotes: 2

Related Questions