Yocto Project Discussions
 help / color / mirror / Atom feed
From: "Quentin Schulz" <quentin.schulz@streamunlimited.com>
To: NIKHIL PATIL <nikhilvp29@gmail.com>
Cc: Yocto-mailing-list <yocto@lists.yoctoproject.org>
Subject: Re: [yocto] Enaable to add binary in /usr/bin using .bb file
Date: Thu, 19 Nov 2020 10:16:31 +0100	[thread overview]
Message-ID: <MADEUP.1648FA6D635D9AFA.20312@lists.yoctoproject.org> (raw)
In-Reply-To: <CAJw=dJ9E4e1g_V1NnZj6adf415GAK_DO1VNjS3EmnJXyTiEiQA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2661 bytes --]

Hi,

On Thu, Nov 19, 2020 at 01:13:43PM +0530, NIKHIL PATIL wrote:
> Hi ,
>     I want to add binary in /usr/bin , for these i made own .bb file (
> obexpushtest.bb),      When i am compiling obexpushtest package separately

You're not compiling a package, you're compiling a recipe named
obexpushtest whose output is packages (one of which is named the same as
the recipe, hence the confusion).

> that time it is compiling fine  , but when i am adding obexpushtest in
> local.conf as a IMAGE_INSTALL , i am getting error.
> 

But here, you're adding a package into an image. Effectively, the first
and second commands you ran don't do the same thing.

> ## Error :-
> 
> /data/nikhil/inti_dmsv/yocto_build/build/tmp/work/intel_corei7_64-poky-linux/core-image-intel/1.0-r0/oe-rootfs-repo
> Last metadata expiration check: 0:00:01 ago on Thu 19 Nov 2020 05:57:19 AM
> UTC.
> No match for argument: obexpushtest
> Error: Unable to find a match
> 
> ## obexpushtest.bb file :-
> 
>     # file recipes-kernel/linux-firmware/linux-firmware_%.bbappend
> SUMMARY = "tset_mount example"
> SECTION = "test_mount"
> LICENSE = "MIT"
> LIC_FILES_CHKSUM =
> "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
> 
> S = "${WORKDIR}"
> 
> SRC_URI += "file://obexpushd"
> 
> INSANE_SKIP_${PN} = "ldflags"
> INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
> INHIBIT_PACKAGE_STRIP = "1"
> 

You should probably inherit bin_package but override do_install
(otherwise you'll have an issue with the do_install task coming from the
bin_package bbclass trying to pack your whole ${WORKDIR} (S) which
include way too many files you're not interested in).

> do_install_append () {

No need for _append since the following is the only thing your recipe
will do, so better just override do_install.

>         install -d ${D}/${bindir}
>         install -m 0644 ${WORKDIR}/obexpushd ${D}/${bindir}
>         cp ${WORKDIR}/obexpushd ${D}/${bindir}
> }
> 
> # NOTE: Use "=+" instead of "+=". Otherwise, the file is placed into the
> linux-firmware package.
> PACKAGES =+ "${PN}-example"
> FILES_${PN}-example = "/usr/bin/obexpushd"

Here's the issue, you put your file into the obexpushtest-example and
I'm pretty sure that your obexpushtest package is actually empty and by
default empty packages are removed, hence why the image recipe can't
include this package.

IMHO, no need for your PACKAGES and FILES variables as the default will
put your binary in the obexpushtest package, and since your recipe isn't
creating any other package (explicitly), I don't see the use for a new
package.

Quentin




  parent reply	other threads:[~2020-11-19 17:56 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19  7:43 Enaable to add binary in /usr/bin using .bb file NIKHIL PATIL
2020-11-19  9:16 ` [yocto] " Quentin Schulz
2020-11-19 11:15   ` NIKHIL PATIL
2020-11-19 11:15   ` NIKHIL PATIL
2020-11-19 11:18     ` Quentin Schulz
2020-11-19 13:00       ` NIKHIL PATIL
     [not found]       ` <1648EA3F963FB36F.4882@lists.yoctoproject.org>
2020-11-19 14:44         ` NIKHIL PATIL
2020-11-19 14:44         ` NIKHIL PATIL
2020-11-19 14:44         ` NIKHIL PATIL
2020-11-19 14:44         ` NIKHIL PATIL
2020-11-19 14:44         ` NIKHIL PATIL
2020-11-19 14:44         ` NIKHIL PATIL
2020-11-19 14:44         ` NIKHIL PATIL
2020-11-19 14:44         ` NIKHIL PATIL
2020-11-19 14:44         ` NIKHIL PATIL
2020-11-19 14:44         ` NIKHIL PATIL
2020-11-19 14:44         ` NIKHIL PATIL
2020-11-19 14:44         ` NIKHIL PATIL
2020-11-19 14:44         ` NIKHIL PATIL
2020-11-19 14:44         ` NIKHIL PATIL
2020-11-19 14:44         ` NIKHIL PATIL
2020-11-19 14:44         ` NIKHIL PATIL
2020-11-19 14:44         ` NIKHIL PATIL
2020-11-19 14:44         ` NIKHIL PATIL
2020-11-19 14:44         ` NIKHIL PATIL
2020-11-19  9:16 ` Quentin Schulz [this message]
2020-11-19  9:16 ` Quentin Schulz
  -- strict thread matches above, loose matches on Subject: below --
2020-11-19  7:43 NIKHIL PATIL
     [not found] <1648D8FA1BEC786F.8629@lists.yoctoproject.org>
2020-11-19  8:39 ` NIKHIL PATIL
2020-11-19  8:39 ` NIKHIL PATIL
2020-11-19  9:04   ` Paul Barker
2020-11-19  9:04   ` Paul Barker

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=MADEUP.1648FA6D635D9AFA.20312@lists.yoctoproject.org \
    --to=quentin.schulz@streamunlimited.com \
    --cc=nikhilvp29@gmail.com \
    --cc=yocto@lists.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox