chinese直男口爆体育生外卖, 99久久er热在这里只有精品99, 又色又爽又黄18禁美女裸身无遮挡, gogogo高清免费观看日本电视,私密按摩师高清版在线,人妻视频毛茸茸,91论坛 兴趣闲谈,欧美 亚洲 精品 8区,国产精品久久久久精品免费

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

bitbake使用教程

瑞薩MCU小百科 ? 來源:瑞薩MCU小百科 ? 2025-03-04 14:27 ? 次閱讀
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

14.5.2 開發(fā)第一個應(yīng)用程序

1安裝工具鏈

對于需要在不同的HOST主機(jī)上針對于G2L RemiPI進(jìn)行應(yīng)用開發(fā),我們需要手動安裝上一章節(jié)生成的工具鏈程序,才可以進(jìn)行后續(xù)的開發(fā)操作。

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

左右滑動查看完整內(nèi)容

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測試工具鏈

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

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

出現(xiàn)以上信息,表示SDK安裝成功,接下來就可以直接使用安裝好的SDK進(jìn)行應(yīng)用開發(fā)。

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

?CC

?CFLAGS

?CXX

?CXXFLAGS

?LD

?LDFLAGS

?ARCH

?CROSS_COMPILE

?GDB

?OBJDUMP

編譯器。

C標(biāo)志,由C編譯器使用。

C++編譯器。

C++標(biāo)志,由CPP使用

鏈接器。

鏈接標(biāo)志,由鏈接器使用。

芯片架構(gòu)名稱。

用于內(nèi)核編譯。

調(diào)試器。

objdump。

如果你需要編譯系統(tǒng)鏡像配套的應(yīng)用程序,則需要在編譯時指定sysroot對應(yīng)的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編寫應(yīng)用程序

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

左右滑動查看完整內(nèi)容

#include 


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

設(shè)置環(huán)境變量,編譯hello.c文件。

左右滑動查看完整內(nèi)容

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上傳并運(yùn)行

編譯完成后,通過前面章節(jié)介紹的SCP方式,發(fā)送到開發(fā)板內(nèi),然后運(yùn)行,即可看到C程序打印的Hello RemiPi!!

左右滑動查看完整內(nèi)容

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

在開發(fā)板上執(zhí)行hello程序:

左右滑動查看完整內(nèi)容

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 清除編譯數(shù)據(jù)

bitbake-c cleanall recipe_name

清除包括clean、cleanall、cleanstate

14.6.3 編譯過程的信息

附帶debug信息:

bitbake-vDD

14.6.4 查看某個配方的任務(wù)

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

bitbake-c listtasks recipe_name

14.6.5 顯示所有配方的版本

當(dāng)前版本和首選版本:

bitbake-s

14.6.6 構(gòu)建一個recipe

執(zhí)行該recipe的所有tasks:

bitbade recipe-name

14.6.7 執(zhí)行某個recipe的.bb文件

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

14.6.8 只運(yùn)行recipe中的某個task

bitbake-c your-task recipe-name

常見task:

左右滑動查看完整內(nèi)容

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

左右滑動查看完整內(nèi)容

do_checkuri Validates the SRC_URI value

左右滑動查看完整內(nèi)容

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

左右滑動查看完整內(nèi)容

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

左右滑動查看完整內(nèi)容

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

左右滑動查看完整內(nèi)容

do_compile Compiles the source in the compilation directory

左右滑動查看完整內(nèi)容

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

左右滑動查看完整內(nèi)容

do_devpyshell Starts an interactive Python shell for development/deb
ugging

左右滑動查看完整內(nèi)容

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

左右滑動查看完整內(nèi)容

do_fetch Fetches the source code

左右滑動查看完整內(nèi)容

do_fetchall Fetches all remote sources required to build a target

左右滑動查看完整內(nèi)容

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

左右滑動查看完整內(nèi)容

do_listtasks Lists all defined tasks for a target

左右滑動查看完整內(nèi)容

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

左右滑動查看完整內(nèi)容

do_package_qa Runs QA checks on packaged files

左右滑動查看完整內(nèi)容

do_package_qa_setscene Runs QA checks on packaged files (setscene version)

左右滑動查看完整內(nèi)容

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

左右滑動查看完整內(nèi)容

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

左右滑動查看完整內(nèi)容

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

左右滑動查看完整內(nèi)容

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

左右滑動查看完整內(nèi)容

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

左右滑動查看完整內(nèi)容

do_patch Locates patch files and applies them to the source code

左右滑動查看完整內(nèi)容

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

左右滑動查看完整內(nèi)容

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

左右滑動查看完整內(nèi)容

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

左右滑動查看完整內(nèi)容

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

左右滑動查看完整內(nèi)容

do_unpack Unpacks the source code into a working directory

下載(fetch)、解包(unpack)、打補(bǔ)?。╬atch)、配置(configure)、編譯(compile)、安裝(install)、打包(package)、staging、做安裝包

(package_write_ipk)、構(gòu)建文件系統(tǒng)等。

14.6.9 有錯繼續(xù)執(zhí)行

bitbake-k recipe-name

14.6.10 顯示包的依賴關(guān)系

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

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

14.6.11 查看bitbake的版本信息

bitbake--version

14.6.12 bitbake使用說明

bitbake--help

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請聯(lián)系本站處理。 舉報投訴
  • Ubuntu
    +關(guān)注

    關(guān)注

    5

    文章

    590

    瀏覽量

    31041
  • 應(yīng)用程序
    +關(guān)注

    關(guān)注

    38

    文章

    3328

    瀏覽量

    58875
  • 編譯
    +關(guān)注

    關(guān)注

    0

    文章

    676

    瀏覽量

    33867
  • 虛擬機(jī)
    +關(guān)注

    關(guān)注

    1

    文章

    966

    瀏覽量

    29217

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

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

收藏 人收藏
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

    評論

    相關(guān)推薦
    熱點(diǎn)推薦

    求助:在使用bitbake時出現(xiàn)報錯

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

    在IMX93自定義構(gòu)建期間運(yùn)行bitbake imx image full時遇到報錯怎么解決?

    在 IMX93 自定義構(gòu)建期間運(yùn)行 bitbake imx image full 時,我們遇到錯誤。您能否盡早提供解決方案?我們使用的是 imx 6.6.52 版本。
    發(fā)表于 04-10 06:29

    講解bitbake的執(zhí)行過程及涉及的變量

    1、yocto---學(xué)習(xí)2-bitbake  bitbake是OpenEmbedded構(gòu)建系統(tǒng)的引擎,通過解析一系列配置文件(主要為recipes,即bb/bbappend文件)來創(chuàng)建任務(wù)列表,并
    發(fā)表于 11-04 15:11

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

    你好呀,我正在按照分發(fā)包中描述的所有步驟為 STM32MP157F-DK2 (stm32mp1) 編譯 yocto 構(gòu)建。在編譯開始時 (bitbake st-image-weston) 我收到
    發(fā)表于 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
    發(fā)表于 12-07 06:47

    如何對rpsmg-sdb-mod進(jìn)行bitbake?

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

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

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

    如何對meta-toolchain-qt5進(jìn)行bitbake?

    大家好,我設(shè)法在我的 STM32MP157C-DK2 上構(gòu)建了具有一些額外圖像功能的 st-example-image-qt?,F(xiàn)在我只想運(yùn)行 bitbake meta-toolchain-qt5 但構(gòu)建最終會出現(xiàn)我無法解決的錯誤。當(dāng)我嘗試構(gòu)建它時,我附上了輸出控制臺。你知道如何解決這個問題嗎?
    發(fā)表于 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
    發(fā)表于 03-20 06:11

    Yocto Bitbake Glibc構(gòu)建失敗了怎么解決?

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

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

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

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

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

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

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

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

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

    bitbake imx-image-full時出現(xiàn)qt6錯誤怎么解決?

    我在 bitbake imx-image-full 時遇到與 qt6 相關(guān)的問題 附上日志,顯示有錯誤:ERROR: Task (virtual:native:/home/ivslab/imx
    發(fā)表于 05-29 08:11