在线观看www成人影院-在线观看www日本免费网站-在线观看www视频-在线观看操-欧美18在线-欧美1级

0
  • 聊天消息
  • 系統消息
  • 評論與回復
登錄后你可以
  • 下載海量資料
  • 學習在線課程
  • 觀看技術視頻
  • 寫文章/發帖/加入社區
會員中心
創作中心

完善資料讓更多小伙伴認識你,還能領取20積分哦,立即完善>

3天內不再提示

bitbake使用教程

瑞薩MCU小百科 ? 來源:瑞薩MCU小百科 ? 2025-03-04 14:27 ? 次閱讀

14.5.2 開發第一個應用程序

1安裝工具鏈

對于需要在不同的HOST主機上針對于G2L RemiPI進行應用開發,我們需要手動安裝上一章節生成的工具鏈程序,才可以進行后續的開發操作。

首先我們將poky-glibc-x86_64-myir-image-full-aarch64-myir-remi-1g-toolchain-3.1.20.sh工具鏈拷貝至ubuntu虛擬機家目錄下,拷貝完成后,直接執行即可開始安裝,參考步驟如下。

左右滑動查看完整內容

ubuntu@ubuntu2004:~$ ls poky-glibc-x86_64-myir-image-full-aarch64-myir-remi-1g-toolc
hain-3.1.20.sh -l
-rwxr-xr-x 1 ubuntu ubuntu 1967617427 May 9 05:23 poky-glibc-x86_64-myir-image-full-
aarch64-myir-remi-1g-toolchain-3.1.20.sh
ubuntu@ubuntu2004:~$ ./poky-glibc-x86_64-myir-image-full-aarch64-myir-remi-1g-toolch
ain-3.1.20.sh Each time you wish to use the SDK in a new shell session, you need to s
ource the environment setup script e.g.
$ . /opt/remi-sdk/environment-setup-aarch64-poky-linux
$ . /opt/remi-sdk/environment-setup-armv7vet2hf-neon-vfpv4-pokymllib32-linux-gnueab
i

安裝時,會彈出對話框,提示輸入安裝路徑,以及是否安裝,具體操作參考下圖所示:

7125583e-f7e4-11ef-9310-92fbcf53809c.png

2測試工具鏈

執行`source /opt/poky/3.1.20/environment-setup-aarch64-poky-linux`與`$CC-v`兩條命令:

7133c054-f7e4-11ef-9310-92fbcf53809c.png

出現以上信息,表示SDK安裝成功,接下來就可以直接使用安裝好的SDK進行應用開發。

配置完成工具鏈以后會有一下編譯器名稱,分別是:

?CC

?CFLAGS

?CXX

?CXXFLAGS

?LD

?LDFLAGS

?ARCH

?CROSS_COMPILE

?GDB

?OBJDUMP

編譯器。

C標志,由C編譯器使用。

C++編譯器。

C++標志,由CPP使用

鏈接器。

鏈接標志,由鏈接器使用。

芯片架構名稱。

用于內核編譯。

調試器。

objdump。

如果你需要編譯系統鏡像配套的應用程序,則需要在編譯時指定sysroot對應的lib庫與頭文件。

lib64庫路徑

/opt/poky/3.1.20/sysroots/aarch64-poky-linux/usr/lib64

7150e418-f7e4-11ef-9310-92fbcf53809c.png

頭文件路徑

/opt/poky/3.1.20/sysroots/aarch64-poky-linux/usr/include

7162e5be-f7e4-11ef-9310-92fbcf53809c.png

3編寫應用程序

接下來使用c語言編寫一個簡單的helloword程序,通過前面我們安裝好的工具鏈交叉編譯,最后上傳至G2L RemiPI安裝。

左右滑動查看完整內容

#include 


int main(int argc,char **argv)
{
 printf("Hello RemiPi!!
");
 return 0;
}

設置環境變量,編譯hello.c文件。

左右滑動查看完整內容

ubuntu@ubuntu2004:~$ source /opt/poky/3.1.20/environment-setup-aarch64-poky-linux
ubuntu@ubuntu2004:~$ $CC hello.c -o hello
In file included from /opt/poky/3.1.20/sysroots/aarch64-poky-linux/usr/include/bits/
libc-header-start.h:33,
 from /opt/poky/3.1.20/sysroots/aarch64-poky-linux/usr/include/stdio.
h:27,
 from hello.c:1:
/opt/poky/3.1.20/sysroots/aarch64-poky-linux/usr/include/features.h:397:4: warning: 
#warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
 ^~~~~~~
ubuntu@ubuntu2004:~$ file hello
hello: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linke
d, interpreter /lib64/ld-linux-aarch64.so.1, for GNU/Linux 3.14.0, BuildID[sha1]=eb5
28014693897face9614c09959056f19759777, with debug_info, not stripped

4上傳并運行

編譯完成后,通過前面章節介紹的SCP方式,發送到開發板內,然后運行,即可看到C程序打印的Hello RemiPi!!

左右滑動查看完整內容

ubuntu@ubuntu2004:~/C-Test$ scp hello root@192.168.5.9:/mnt/
hello 100% 13KB 
2.1MB/s 00:00

在開發板上執行hello程序:

左右滑動查看完整內容

root@myir-remi-1g:/mnt# ls
hello
root@myir-remi-1g:/mnt# ./hello
Hello RemiPi!!

14.6bitbake使用

14.6.1 顯示編譯過程

bitbake-v <>

14.6.2 清除編譯數據

bitbake-c cleanall recipe_name

清除包括clean、cleanall、cleanstate

14.6.3 編譯過程的信息

附帶debug信息:

bitbake-vDD

14.6.4 查看某個配方的任務

({recipe}_{version}.bb):

bitbake-c listtasks recipe_name

14.6.5 顯示所有配方的版本

當前版本和首選版本:

bitbake-s

14.6.6 構建一個recipe

執行該recipe的所有tasks:

bitbade recipe-name

14.6.7 執行某個recipe的.bb文件

bitbake-b {recipe}_{version}.bb

14.6.8 只運行recipe中的某個task

bitbake-c your-task recipe-name

常見task:

左右滑動查看完整內容

do_build Default task for a recipe - depends on all other normal
tasks required to 'build' a recipe

左右滑動查看完整內容

do_checkuri Validates the SRC_URI value

左右滑動查看完整內容

do_checkuriall Validates the SRC_URI value for all recipes required t
o build a target

左右滑動查看完整內容

do_clean Removes all output files for a target
do_cleanall Removes all output files, shared state cache, and downl
oaded source files for a target

左右滑動查看完整內容

do_cleansstate Removes all output files and shared state cache for a t
arget

左右滑動查看完整內容

do_compile Compiles the source in the compilation directory

左右滑動查看完整內容

do_configure Configures the source by enabling and disabling any bui
ld-time and configuration options for the software being built

左右滑動查看完整內容

do_devpyshell Starts an interactive Python shell for development/deb
ugging

左右滑動查看完整內容

do_devshell Starts a shell with the environment set up for developm
ent/debugging

左右滑動查看完整內容

do_fetch Fetches the source code

左右滑動查看完整內容

do_fetchall Fetches all remote sources required to build a target

左右滑動查看完整內容

do_install Copies files from the compilation directory to a holdin
g area

左右滑動查看完整內容

do_listtasks Lists all defined tasks for a target

左右滑動查看完整內容

do_package Analyzes the content of the holding area and splits it 
into subsets based on available packages and files

左右滑動查看完整內容

do_package_qa Runs QA checks on packaged files

左右滑動查看完整內容

do_package_qa_setscene Runs QA checks on packaged files (setscene version)

左右滑動查看完整內容

do_package_setscene Analyzes the content of the holding area and splits it
into subsets based on available packages and files (setscene version)

左右滑動查看完整內容

do_package_write_ipk Creates the actual IPK packages and places them in the
Package Feed area

左右滑動查看完整內容

do_package_write_ipk_setscene Creates the actual IPK packages and places them in the
Package Feed area (setscene version)

左右滑動查看完整內容

do_packagedata Creates package metadata used by the build system to ge
nerate the final packages

左右滑動查看完整內容

do_packagedata_setscene Creates package metadata used by the build system to g
enerate the final packages (setscene version)

左右滑動查看完整內容

do_patch Locates patch files and applies them to the source code

左右滑動查看完整內容

do_populate_lic Writes license information for the recipe that is coll
ected later when the image is constructed

左右滑動查看完整內容

do_populate_lic_setscene Writes license information for the recipe that is coll
ected later when the image is constructed (setscene version)

左右滑動查看完整內容

do_populate_sysroot Copies a subset of files installed by do_install into 
the sysroot in order to make them available to other recipes

左右滑動查看完整內容

do_populate_sysroot_setscene Copies a subset of files installed by do_install into 
the sysroot in order to make them available to other recipes (setscene version)

do_prebuilt 
do_recipe_sanity 
do_recipe_sanity_all

左右滑動查看完整內容

do_unpack Unpacks the source code into a working directory

下載(fetch)、解包(unpack)、打補丁(patch)、配置(configure)、編譯(compile)、安裝(install)、打包(package)、staging、做安裝包

(package_write_ipk)、構建文件系統等。

14.6.9 有錯繼續執行

bitbake-k recipe-name

14.6.10 顯示包的依賴關系

注意必須是發行版包含的包才可以顯示

717b8cc2-f7e4-11ef-9310-92fbcf53809c.png

14.6.11 查看bitbake的版本信息

bitbake--version

14.6.12 bitbake使用說明

bitbake--help

聲明:本文內容及配圖由入駐作者撰寫或者入駐合作網站授權轉載。文章觀點僅代表作者本人,不代表電子發燒友網立場。文章及其配圖僅供工程師學習之用,如有內容侵權或者其他違規問題,請聯系本站處理。 舉報投訴
  • Ubuntu
    +關注

    關注

    5

    文章

    569

    瀏覽量

    30229
  • 應用程序
    +關注

    關注

    38

    文章

    3305

    瀏覽量

    58146
  • 編譯
    +關注

    關注

    0

    文章

    665

    瀏覽量

    33186
  • 虛擬機
    +關注

    關注

    1

    文章

    954

    瀏覽量

    28595

原文標題:bitbake使用——RZ MPU工業控制教程連載(61)

文章出處:【微信號:瑞薩MCU小百科,微信公眾號:瑞薩MCU小百科】歡迎添加關注!文章轉載請注明出處。

收藏 人收藏

    評論

    相關推薦

    求助:在使用bitbake時出現報錯

    求助:在使用bitbake時出現18 contains an operation using the old override syntax. Please convert this layer
    發表于 07-03 08:20

    講解bitbake的執行過程及涉及的變量

    1、yocto---學習2-bitbake  bitbake是OpenEmbedded構建系統的引擎,通過解析一系列配置文件(主要為recipes,即bb/bbappend文件)來創建任務列表,并
    發表于 11-04 15:11

    bitbake期間出錯這是個問題嗎?我錯過了什么?

    你好呀,我正在按照分發包中描述的所有步驟為 STM32MP157F-DK2 (stm32mp1) 編譯 yocto 構建。在編譯開始時 (bitbake st-image-weston) 我收到
    發表于 12-01 07:05

    使用bitbake PermissionError: [Errno 13] Permission denied: '/home/dev' 報錯怎么解決?

    /STM32MPU_workspace/openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/layers/openembedded-core/bitbake/lib/bb
    發表于 12-07 06:47

    如何對rpsmg-sdb-mod進行bitbake

    /How_to_exchange_large_data_buffers_with_the_coprocessor_-_principle#User_space_interface我試著 bitbake,但我有一個錯誤。= 步驟 =$ cd [我的分發包目錄
    發表于 01-29 08:04

    bitbake openocd-stm32mp有效,但bitbake openocd-stm32mp-native無效的原因?

    當我運行 bitbake openocd-stm32mp-native 時,我在烘焙應用程序時遇到問題,但是當我運行 bitbake openocd-stm32mp 時,它工作正常。任何想法為什么會
    發表于 02-01 08:40

    如何對meta-toolchain-qt5進行bitbake

    大家好,我設法在我的 STM32MP157C-DK2 上構建了具有一些額外圖像功能的 st-example-image-qt。現在我只想運行 bitbake meta-toolchain-qt5 但構建最終會出現我無法解決的錯誤。當我嘗試構建它時,我附上了輸出控制臺。你知道如何解決這個問題嗎?
    發表于 02-07 10:14

    在imx8 bsp L5.15.32-2.0.0中使用bitbake qtwebengine -cconfigure時報錯怎么解決?

    嗨恩智浦專家,我得到 NXP BSP LF5.15.32_2.0.0 并在嘗試“bitbake qtwebengine -c configure”時遇到失敗的問題。日志消息顯示src
    發表于 03-20 06:11

    Yocto Bitbake Glibc構建失敗了怎么解決?

    我正在嘗試構建 Yocto 映像,但在編譯 glibc 時構建失敗。我運行了這個命令:bitbake 精簡版圖像我收到如下編譯錯誤: | /media/ubu/LocalDisk
    發表于 03-24 08:01

    添加RAUC后的Bitbake不起作用的原因?

    ;3.0" TUNE_FEATURES = “aarch64 cortexa53 crc 加密” TARGET_FPU =“” Bitbake core-image-minimal 烘焙成功。現在我檢查了
    發表于 03-29 06:51

    bitbake -c clean core-image-minimal會起作用嗎?還是有侵入性較小的修復方法?

    是什么? bitbake -c clean core-image-minimal 會起作用嗎?還是有侵入性較小的修復方法? 我們使用 yocto 和 dunfell 分支構建(因為 EOL 問題)
    發表于 04-07 06:48

    bitbake元工具鏈編譯錯誤如何解決?

    我在編譯元工具鏈期間收到了以下錯誤消息,如何解決這個問題,使用的命令:bitbake meta-toolchain 和 bitbake meta-toolchain-qt6注意:執行任務錯誤
    發表于 04-10 08:40

    在centos 5.9上bitbake fsl-image-minima時出現SDK錯誤怎么處理?

    [yw079@localhost build_t2080rdb-64b]$ bitbake fsl-image-minimal Traceback(最近調用最后):文件“/opt/phenix
    發表于 04-11 06:14

    fsl-auto-yocto-bsp在bitbake fsl-image-base中給出錯誤是為什么?

    在 yocto (bitbake fsl-image-base) 中構建時,我遇到了 Invalid MACHINE and DISTRO package not found 問題。 請幫我解決這個
    發表于 05-10 08:17

    bitbake imx-image-full時出現qt6錯誤怎么解決?

    我在 bitbake imx-image-full 時遇到與 qt6 相關的問題 附上日志,顯示有錯誤:ERROR: Task (virtual:native:/home/ivslab/imx
    發表于 05-29 08:11
    主站蜘蛛池模板: 综合色影院 | 久久精品1| 免费一级毛片在级播放 | 婷婷99精品国产97久久综合 | 欧美视频不卡一区二区三区 | 91md天美精东蜜桃传媒在线 | 国产美女视频黄a视频免费全过程 | 四虎精品成在线播放 | 久久精品第一页 | 99国产福利| 婷婷激情狠狠综合五月 | 日本三黄色大 | 国产资源在线免费观看 | 狠狠色婷婷 | 亚洲hhh | 日本一线a视频免费观看 | 色视频在线免费 | 高清在线免费观看 | 天天干天天操天天干 | 亚洲开心激情网 | 免费国产网站 | 天天干一干 | 特黄色片 | 精品玖玖| 国产大片91精品免费观看不卡 | 欧美大片国产在线永久播放 | 在线资源你懂的 | 看日本黄大片在线观看 | 亚洲国产欧美视频 | 末发育娇小性色xxxxx视频 | 在线午夜视频 | 国产人成午夜免视频网站 | 糖心vlog麻豆精东影业传媒 | 香蕉久久精品 | 自拍中文字幕 | 美女黄视频免费 | 久久视频免费看 | 黄色大片在线视频 | 一级毛片免费不卡在线视频 | 色多多视频官网 | 韩国xxxxxxxx69 |