Reputation: 107
I have a Yocto recipe for a Linux kernel fork, I need to change the defconfig for the different machines I need to support. One of the machines uses an in-tree defconfig, the others will need out-of-tree defconfigs (and devicetrees eventually). This is similar to This unanswered question.
The problem I'm running into is that with my file structure, bitbake cannot find the defconfig, when I make a machine specific SRC_URI
.
recipe-folder
|-files
| |-machineA
| | |-machineA.patch
| |-machineB
| | |-defconfig
| | |-machineB.patch
|-linux-recipe_0.1.bb
If I'm trying to build for machineB, and I do:
SRC_URI += "file://defconfig"
Yocto is able to find the defconfig and build, see This question.
But, If I want the recipe to support both machineA and B:
KBUILD_DEFCONFIG:machineA = "machineA_intree_defconfig"
SRC_URI:machineA += "file://machineA.patch"
SRC_URI:machineB += "file://defconfig file://machineB.patch"
And try and build machineB Yocto cannot find the defconfig file.
Even If I add the lines:
FILESEXTRAPATHS:prepend:machineA := "${THISDIR}/files/machineA:"
FILESEXTRAPATHS:prepend:machineB := "${THISDIR}/files/machineB:"
Yocto still cannot find the files.
How do I have SRC_URI
work on a per-machine basis?
Upvotes: 1
Views: 380
Reputation: 36
You should try something like this:
SRC_URI:machineA += "file://machineA/machineA.patch"
SRC_URI:machineB += "file://machineB/defconfig \
file://machineB/machineB.patch"
The filename you specify within the URL can be either an absolute or relative path to a file.
More details can be found here:
Upvotes: 1