Advertisement
Guest User

Untitled

a guest
Jun 12th, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.92 KB | None | 0 0
  1. $ cat meta-local/recipes-example/example/example_0.1.bb
  2. SUMMARY = "bitbake-layers recipe"
  3. DESCRIPTION = "Recipe created by bitbake-layers"
  4. LICENSE = "MIT"
  5.  
  6. python do_build() {
  7.     bb.plain("***********************************************");
  8.     bb.plain("*                                             *");
  9.     bb.plain("*  Example recipe created by bitbake-layers   *");
  10.     bb.plain("*                                             *");
  11.     bb.plain("***********************************************");
  12. }
  13.  
  14. python do_foobar_prepend() {
  15.     d.setVar("FOO", "well this should work")
  16. }
  17.  
  18. python do_foobar () {
  19.     print("FOO is set to: " + d.getVar("FOO"))
  20. }
  21.  
  22. addtask foobar after do_fetch before do_build
  23.  
  24.  
  25. $ cat tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/example/0.1-r0/temp/log.do_foobar
  26. DEBUG: Executing python function do_foobar
  27. DEBUG: Python function do_foobar finished
  28. FOO is set to: well this should work
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement