0

I created a Bitbake recipe that does two things: 1) build an out-of-tree kernel module, and 2) copy files into the target root filesystem.

Part 2) uses the update-alternatives class to choose which files to copy based on the package that's being installed, ie, ${PN}-package, similar to the way the "linux-firmware" recipe works.

I also use EXTRA_OEMAKE (as part of the modules class) to pass variables down to the Makefile for the module I'm building. What I would like to do is to select different variables in EXTRA_OEMAKE based on which package is specified, ie, package1, package2, etc.

Is there a way to do this, or can anyone suggest any alternatives?

andrew997
  • 1
  • 1
  • There's only one compilation step per recipe so this doesn't really make sense. – Jussi Kukkonen Jan 23 '17 at 19:43
  • I only want to build/compile a single module. I just want to pass different parameters down to the Makefile depending on which package I select. – andrew997 Jan 23 '17 at 21:20
  • Like jku said, you can't. It's the recipe that get's compiled, not one of the resulting packages. The standard way to handle this, would be to build everything and the put the build artifacts into different packages. Another option would be either make the recipe select what to build depending on the machine (ie making it machine specific) or to make multiple recipes... – Anders Jan 24 '17 at 06:36
  • Yes, if you want to compile one module at a time, you should write a recipe per module even if all the recipes then use the same source (I don't understand why you would want this though -- compile time is rarely a problem compared to everything else) – Jussi Kukkonen Jan 24 '17 at 09:58

0 Answers0