初識Buildroot
轉(zhuǎn)自CSDN ,記錄是為了作者小編學(xué)習(xí)需要
作者:xixihaha331
什么是buildroot
buildroot目錄結(jié)構(gòu)
2.buildroot/output/是編譯出來的輸出文件夾,里面的build/目錄存放著解壓后的各種軟件包編譯完后的現(xiàn)場。host/目錄放著制作好的編譯工具鏈,target/ 目錄是用來制作rootfs的,里面放著Linux系統(tǒng)基本的目錄結(jié)構(gòu),以及各種編譯好的應(yīng)用庫和bin可執(zhí)行文件。Images/目錄下就是最終生成的可燒寫到板子上的各種image。
3.buildroot/dl存放下載的源碼包及應(yīng)用軟件的壓縮包
4.buildroot/fs放各種文件系統(tǒng)的源代碼
5.buildroot/fs/skeleton放生成文件系統(tǒng)鏡像的地方,及板子里面的系統(tǒng)
6.buildroot/linux/ 存放著Linux kernel的自動構(gòu)建腳本。
7.buildroot/configs放置開發(fā)板的一些配置參數(shù)。
8.buildroot/dl/目錄存在從官網(wǎng)上下載的開源軟件包,第一次下載后,下次就不會再去從官網(wǎng)下載了,而是從dl/目錄下拿開源包,以節(jié)約時間。
9.buildroot/docs/ 存放相關(guān)的參考文檔。
10.buildroot/arch/ 目錄存放CPU架構(gòu)相關(guān)的配置腳本,如arm/mips/x86 ,這些CPU相關(guān)的配置,在制作工具鏈,編譯boot和內(nèi)核時很關(guān)鍵。
buildroot工作原理
Buildroot提供了函數(shù)框架和變量命令框架(下一篇文章將介紹細節(jié)),采用它的框架編寫的app_pkg.mk這種Makefile格式的自動構(gòu)建腳本,將被package/pkg-generic.mk 這個核心腳本展開填充到buildroot主目錄下的Makefile中去。最后make all執(zhí)行Buildroot主目錄下的Makefile,生成你想要的image。

In case anyone is interested....
I modified buildroot to create a distribution for the STM32F4 processor. (It should be fairly portable to different Cortex-M processors though, the STM32F4 is the only one I've tested so far).
So far it:
Builds the toolchain
Builds a modified Nuttx RTOS
Builds the icsp tools for programming and debugging (openocd/gdb)
It also integrates the filesystem buildroot generates into the Nuttx kernel so it shows up in Nuttx's filesystem.
It still has a ways to go, but right now it builds everything and works on my hardware.
So far I've tested it on hardware I built, and on the STM32F407 discovery board with the attached baseboard.
You can find instructions here
http://www.vxmdesign.com/STM32.html
The git repo is
https://github.com/vxmdesign/prjpluto.git
and vdsc_defconfig is the config for the discovery board.
Happy programming!
-Chris
感謝完成閱讀,我是喜歡打籃球的寫代碼的籃球球癡,這個是我的公眾號,感謝你關(guān)注并支持。我從大學(xué)開始接觸電子和嵌入式軟件知識,至今,已經(jīng)畢業(yè)工作了9年,我喜歡嵌入式,也愿意從事這個行業(yè)。不管是從技術(shù)還是職場經(jīng)驗,都積累了足夠多的經(jīng)驗,目前在一個非常優(yōu)秀的團隊中做開發(fā)工作。
很高興認識每一個對技術(shù)努力,對人用心的朋友。
