buildroot

Order of custom kernel module package compilation in Buildroot


I have two custom modules (lets say A and B where B depends on exported functions in A) with Config.in specified in respective sub folders within Buildroot/package folder. In the main Config.in I have specified the order , first source A’s Config.in then B’s. However this order is not maintained for some reason, B is compiled first and fails since I have A’s function calls in B and referenced thru a header file that has not been copied from original location to build location yet. Why does B get compiled first, anybody have any clue? I have tried adding depends on B statement in B’s config but didnt make a difference.

Thanks


Solution

  • Make sure to add:

    B_DEPENDENCIES = a
    

    in package/b/b.mk. This will ensure package "a" is built before package "b".