[yocto] Per image customizations

Oleksandr Poznyak oleksandr.poznyak at gmail.com
Mon Jun 6 14:10:58 PDT 2016


Hi,
Unfortunately You can't have two *.bbappend files per one package (recipe).

You can create two new recipes where You'll install what You need and plus
add sysvinit-inittab to DEPENDS variable in those recipes. This will help
to retain the order of packages installation. Original sysvinit -> your
sysvinit.

In this situation You will have several recipes.

Thanks,
Oleksandr Poznyak!

On Mon, Jun 6, 2016 at 11:55 PM, Edward Wingate <edwingate8 at gmail.com>
wrote:

> On Wed, Jun 1, 2016 at 7:15 PM, Diego <diego.ml at zoho.com> wrote:
> >
> > Hi Oleksandr,
> >
> > your approach is really interesting, but I'm unsure how to proceed with
> > step 2) of your list.
> >
> > I've added the following in the bbappend:
> >
> > python do_package_prepend() {
> >     d.setVar('PACKAGES', "${PACKAGES} ${PN}-fstab-regular
> ${PN}-fstab-flash")
> > }
> >
> > which creates the two additional packages, but then I'm confused on how
> to
> > manage the two 'variant' fstab files. The FILES variable doesn't support
> > "source -> destination", so how do I manage the fact that two different
> > files need to go to the same destination path?
> >
> > An easier option would be to remove fstab in the base-files_%s.bbappend,
> > and create 2 different .bb recipes for the 2 fstab files.
>
> I hope you don't mind if I tag onto this thread, but I have a similar
> question.
>
> I've been modifying inittab with a sysvinit-inittab_2.88dsf.bbappend
> file that contains simply this:
>
> do_install_append() {
>     echo "scra:2345:respawn:/opt/script1.sh" >> ${D}${sysconfdir}/inittab
>     echo "scrb:2345:respawn:/opt/script2.sh" >> ${D}${sysconfdir}/inittab
> }
>
> Now, I want to do this if a different image is being created:
>
> do_install_append() {
>     echo "scra:2345:respawn:/opt/script3.sh" >> ${D}${sysconfdir}/inittab
>     echo "scrb:2345:respawn:/opt/script4.sh" >> ${D}${sysconfdir}/inittab
> }
>
> Can I duplicate and rename the bbappend file to have a different
> bbappend execute based on the image being created?  Or perhaps
> duplicate the do_install_append() function in the same file and rename
> the functions to something like do_install_append_[something with
> image name]()?
>
> Or alternatively, can I set something in the image bb files that I can
> then use in the sysvinit-inittab_2.88dsf.bbappend to determine which
> to do?
>
> Thanks for your help.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160607/b530c6a6/attachment.html>


More information about the yocto mailing list