1. 程式人生 > >Yocto tips (15): Yocto中的包管理器

Yocto tips (15): Yocto中的包管理器

med track .net ins imp 管理 ann 包管理 管理器

使用包管理器

在local.conf中使能就可以:

技術分享

然後編譯後就會有rpm包了:

技術分享

配置文件server

能夠使用ngix和apache。可是我們也能夠僅僅用使用python:

python -m SimpleHTTPServer


技術分享

打開瀏覽器能夠看到:

技術分享

在機器上面查看包的status

smart status

技術分享技術分享


在機器上面配置channel

對於rpm使用的smart工具,加入channel:

smart channel --add all type=rpm-md baseurl=http://192.168.2.100:8000/all
smart channel --add  cortexa9hf_vfp_neon  type=rpm-md baseurl=http://192.168.2.100:8000/cortexa9hf_vfp_neon 
smart channel --add cortexa9hf_vfp_neon_mx6qdl type=rpm-md baseurl=http://192.168.2.100:8000/cortexa9hf_vfp_neon_mx6qdl
smart channel --add imx6qsabresd type=rpm-md baseurl=http://192.168.2.100:8000/imx6qsabresd


加入參數之後。就能夠update了:

smart update

正確的是以下命令的情形:

技術分享

假設配置參數不正確,那麽就會出錯。假設出錯。那麽檢查IP與格式是否正確。比如以下的http少了兩個//:

技術分享

假設弄錯了。那麽能夠先移除掉:

smart channel --remove all cortexa9hf_vfp_neon_mx6qdl imx6qsabresd cortexa9hf_vfp_neon

然後又一次加入。

再看包的數量,能夠看到變多了:

技術分享技術分享


使用包管理器安裝軟件

使用smart install Package就可以安裝:

技術分享


假設在PC中使用bitbake新編譯了程序,那麽須要使用以下命令重建index,否則客服端找不到新的軟件包:

bitbake package-index

參考:

http://www.jumpnowtek.com/yocto/Using-your-build-workstation-as-a-remote-package-repository.html

package-manager-white-paper.pdf


Yocto tips (15): Yocto中的包管理器