Reputation: 21
I want to add a task in bitbake which is supposed to run after a task but not before any task. In other words, I want the custom task to run as the last task while building the image.
Example:
I have two tasks named do_task_A() and do_task_B(). Now, I want do_task_B() to execute after do_task_A().
do_task_A() {
..........
..........
..........
}
addtask task_A
do_task_B() {
..........
..........
..........
}
addtask task_B after do_task_A
The above snippet ensures that task_B if executed, gets executed after task_A. However it does not guarantee the execution of task_B.
This requirement is that do_task_B() must run as the last task when the image is built.
Things that I have already tried:
The above methods (1-3) failed due to circular dependency
The above methods (4-6) failed with Exception: IndexError: list index out of range
Is there any way to forcefully run task_B while building an image? I want do_task_B() to get executed by default, and not by using bitbake -c <task_name> <image_name>
Upvotes: 2
Views: 3924
Reputation: 11
build is the final task, so you have to set:
addtask do_task_A after do_deploy before do_build
addtask do_task_B after do_task_A before do_build
Maybe you can take a look here: How can I add a task after do_deploy()?
Upvotes: 1