Skip to contentSkip to conversation

packages build order and dependencies

Buildroot Jan Pohanka 2 participants 2 messages Jul 12, 2013

lore
Share & tools
lore
#0 lore raw

Hello all,

I would like to clarify myself how the order of the package build is defined. I thought that when I specify the package dependency in Kconfig, then the top one should be built first. But it seems that I need also it to add MY_PACKAGE_DEPENDENCIES variable in mk file. Am I right?

Like this example
# Kconfig
config MY_PACKAGE
bool "my_package"
depends on BR2_LINUX_KERNEL

#my_package.mk
...
#is this needed for building linux before my_package? MY_PACKAGE_DEPENDENCIES += linux
...

best regards
Jan

#1 lore raw

Dear Jan Pohanka,

Quoted 4 lines · Jan Pohanka

I would like to clarify myself how the order of the package build is defined. I thought that when I specify the package dependency in Kconfig, then the top one should be built first. But it seems that I need also it to add MY_PACKAGE_DEPENDENCIES variable in mk file. Am I right?

What defines the order of build is the <pkg>_DEPENDENCIES variable in the package .mk file.

Quoted 5 lines

Like this example
# Kconfig
config MY_PACKAGE
bool "my_package"
depends on BR2_LINUX_KERNEL

The Config.in stuff doesn't take care of anything build order. It's just here to ensure consistency of the configuration, i.e that when one package selects libpng, all packages that can optionally use libpng are informed and can use it.

Quoted 4 lines

#my_package.mk
...
#is this needed for building linux before my_package? MY_PACKAGE_DEPENDENCIES += linux

Yes, this is precisely what tells Buildroot to build the 'linux' package, then the 'my-package' package.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com