Yocto:从bbfile到sdk

这篇博客详细介绍了如何使用Yocto项目创建bb file,生成SDK,安装SDK,并执行SDK环境变量设置脚本。从创建特定的nativesdk-custom-ps1-setting.bb文件开始,到将它添加到TOOLCHAIN_HOST_TASK,再到编译和安装SDK,最后是配置环境变量以运行SDK。
摘要由CSDN通过智能技术生成

创建bb file:

poky/meta/recipes-devtools/nativesdk-custom-ps1-setting/nativesdk-custom-ps1-setting.bb

$ vi ../../poky/meta/recipes-devtools/nativesdk-custom-ps1-setting/nativesdk-custom-ps1-setting.bb 

LICENSE = "CLOSED"

inherit nativesdk

do_generate(){
    echo "export PS1=\"(yocto-sdk) \${PS1}\"" > ${B}/custom-ps1-setting.sh
}

do_install(){
    install -d ${D}/environment-setup.d/
    cp ${B}/custom-ps1-setting.sh ${D}/environment-setup.d/
}

addtask generate

PACKAGES = "${PN}"
FILES_${PN} = "/"

do_generate() 创建文件:build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-custom-ps1-setting/1.0-r0/custom-ps1-setting-1.0/custom-ps1-setting.sh

${D}: tmp/deploy/

生成的rpm在:build/tmp/deploy/rpm/x86_64_nativesdk/nativesdk-custom-ps1-setting-1.0-r0.x86_64_nativesdk.rpm

生成SDK:

将nativesdk-custom-ps

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值