Ads 468x60px

##EasyReadMore##

21 11月, 2017

bitbake 介紹&command

bitbake 是 python 寫的
bitbake的主要目標是產生單一的安裝包。或者一個kernel或者一個軟體開發環境。甚至一個完整的主板相關的img,包括所有的一切。可以通過在bitbake命令行後面添加。
Make用makefile,而bitbake用recipe。
bitbake是根據構成這個任務的元數據(metadata)來執行任務的。元數據主要保存在recipe(.bb)文件,append(.append)文件 配置文件(.conf) 以及包含(include)文件(.inc) 和類(.class)

-b //直接從指定的bb菜譜執行任務。並不處理來自於其他菜譜的依賴關係
 //bitbake -b foo_1.0.bb 不處理任何依賴。執行foo_1.0.bb的構建任務
--continue //出現錯誤以後,儘可能多地執行任務。直到停止。也就是出現錯誤並不馬上停止。如果還可以繼續執行。那麼就繼續執行
-f //強制指定任務運行
-C //使得任務指定的標記文件徐曉。然後與運行默認的任務。(有些東西是有緩存的。比如已經編譯過了。沒有任何修改就不再重新編譯,這個就是無論如何都重編譯)
-c //CMD
 compile
 listtask
 clean
  //bitbake -b foo_1.0.bb -c clean 對於這個菜譜執行清理任務
-v //輸出日誌信息

//Start a build:
//To get a package build just type

 bitbake foo
//where foo is the name of the package without any extension or version number.

//Clean up
 bitbake -c clean foo
//This command will clean up your tmp dir for the given package. It is very useful if you work on a new .bb recipe. Without it your changes to the recipe may not work.

//If you want to clean out intermediate build products for the target just to recover disk space, you can delete those directories by hand.  From the build directory:
 
rm -fr tmp/work
 
//If you want to clean out the various host-side tools:
 
rm -fr tmp/sysroots
 
//If you want to clean out all the accumulated system images (because they're big and take a lot of space):
 
rm -fr tmp/deploy/images
 
//If you want to clean out a particular component so it will get rebuilt:
 
bitbake  -c clean -f
 
//If you think the build and/or download caches are corrupt and want bitbake to forget everything it thinks it knows about a component so it can be rebuilt from scratch:
 
bitbake  -c cleanall -f



//Working with tmp/work
//To recompile your source code if you change a line in it.

 bitbake -f -c compile foo
// The command above recompiled the code for foo. To build the ipk use the command below,-f, --force

// Check Recipe Version
 bitbake -s | grep foo
// Check Bitbake Version
  bitbake --version
// Run Bitbake A Little at a Time
  bitbake -c listtasks foo
     // lists the tasks
  bitbake -c taskname foo
// Show build environment
   bitbake -e foo

// make menuconfig
 bitbake -c menuconfig linux-yocto
 bitbake -c menuconfig virtual/kernel

// Execute the command menuconfig on the package busybox. 
 bitbake -c menuconfig busybox
// Run all the tasks for package busybox
 bitbake busybox  

Refer:
- https://goo.gl/V8Ts2N

Bitbake cheat sheet - Openembedded.org - https://goo.gl/8rHzAK
YOCTO project clean | NXP Community - https://goo.gl/vpRikx

0 意見:

張貼留言

 
Blogger Templates