Creating own recipe in yocto

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Creating own recipe in yocto

跳至解决方案
1,477 次查看
manjunathjoshi
Contributor V

Hello all,

Is there any way that we can create a recipe which can simply copy a file from host computer to the bitbake process so that after the complete bitbake process we may just have the file in the right place in yocto filesystem?

I know this is weird but is there a way? I tried as shown below it didn't work. do_install failure.

this is the .bb file in a new layer i have created.

SUMMARY = "Example to copy from my filesystem to yocto filesystem"

DESCRIPTION = "Not needed"

SECTION = "examples"

LICENSE = "MIT"

LIC_FILES_CHKSUM += "file://README;md5=0d20a0079cbd6add839dcca5f80c7d0b"

PR = "r0"

DEPENDS = "boost"

SRC_URI="file://README \

        "

S="${WORKDIR}"

do_install() {

     install -m 0755 ${WORKDIR}/README  ${D}$/usr/sbin/README

}

Regards,

Manju

标签 (3)
0 项奖励
回复
1 解答
826 次查看
gusarambula
NXP TechSupport
NXP TechSupport

Hello Manju,

Your recipe looks good in general but it may need some tweaking. Would you please try with the following changes? (The first part of the recipe looks good).

do_install() {

   install -d  ${D}$/usr/sbin/

     install -m 0755 ${WORKDIR}/README  ${D}$/usr/sbin/

}

FILES_${PN} = "$/usr/sbin/README"

I hope this helps, let us know of your progress! One would think that copying a file into the filesystem should be pretty straightforward but it’s not so trivial in Yocto. I’m sure other community users may have the same question.

Regards,

Gus

在原帖中查看解决方案

0 项奖励
回复
2 回复数
827 次查看
gusarambula
NXP TechSupport
NXP TechSupport

Hello Manju,

Your recipe looks good in general but it may need some tweaking. Would you please try with the following changes? (The first part of the recipe looks good).

do_install() {

   install -d  ${D}$/usr/sbin/

     install -m 0755 ${WORKDIR}/README  ${D}$/usr/sbin/

}

FILES_${PN} = "$/usr/sbin/README"

I hope this helps, let us know of your progress! One would think that copying a file into the filesystem should be pretty straightforward but it’s not so trivial in Yocto. I’m sure other community users may have the same question.

Regards,

Gus

0 项奖励
回复
826 次查看
manjunathjoshi
Contributor V

Hello gusarambula,

I am sorry i didn't update this on the community. Your answer is right i have already done this. But right now i am in to writing a recipe which does every bit of a standard one. I have posted the same in

Custom recipe for YOCTO

Please reply if you have needed information on the same.

Thanks a lot in advance.

Regards

Manju

0 项奖励
回复