From: Uwe Geuder <jrswdnan22@snkmail.com>
To: yocto@yoctoproject.org
Subject: Re: adding own shell script
Date: Mon, 29 Oct 2018 14:26:32 +0200 [thread overview]
Message-ID: <87zhuxj5vr.fsf@snkmail.com> (raw)
In-Reply-To: <CAK4Yt2m7sqkaedLj4_hdsLn+WuDHaWZkUkZF6cJBijBrZLOZmQ@mail.gmail.com>
On Mon, Oct 29, 2018 at 11:51 AM Zolee K zoleelikesdebian-at-gmail.com wrote:
>
> I'd like to install my own test.sh script into the image, I created this
> recipe file, however I dont know how to have bitbake put the my test.sh
> into /etc folder
>
> SUMMARY = "test.sh"
> LICENSE = "Z"
>
> SRC_URI = "\
> file://test.sh \
> "
>
> do_configure(){
> :
> }
>
> do_compile() {
> :
> }
>
>
> do_install() {
> install -d ${D}${sysconfdir}
> install -m 0770 ${WORKDIR}/test.sh ${D}${sysconfdir}/test.sh
> }
At least at the first glimpse this recipe looks to me like it might
work. (Executable code does not belong under /etc, but that is a
different issue)
However, bitbake will execute the tasks in the recipe only if they
are pulled in, i. e. some part of your image depends on the package
created. There are always many recipes in the layers of a Yocto based
project, but only those tasks which are really needed will be executed.
There are 2 ways to create the dependency
a.) directly into the image
https://www.yoctoproject.org/docs/2.5.1/mega-manual/mega-manual.html#var-IMAGE_INSTALL
https://www.yoctoproject.org/docs/2.5.1/mega-manual/mega-manual.html#var-PACKAGE_INSTALL
b.) indirectly by making some package already in your image runtime-depend on
your new package
https://www.yoctoproject.org/docs/2.5.1/mega-manual/mega-manual.html#var-RDEPENDS
Regards,
Uwe Geuder
Neuro Event Labs Oy
Tampere, Finland
uwe.gexder at neuroeventlabs.com (Bot check: fix one obvious typo)
prev parent reply other threads:[~2018-10-29 12:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-29 9:50 adding own shell script Zolee K
2018-10-29 12:26 ` Uwe Geuder [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zhuxj5vr.fsf@snkmail.com \
--to=jrswdnan22@snkmail.com \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.