From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6551704819136987136 X-Received: by 2002:adf:c7cf:: with SMTP id y15-v6mr2262087wrg.20.1525760783251; Mon, 07 May 2018 23:26:23 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:b05c:: with SMTP id g28-v6ls68058wra.5.gmail; Mon, 07 May 2018 23:26:22 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpI8MokLgtAzcf8bHhvfCMtOB6D3xz/kwH1cjvTPy/GyQIvEIdVfiFVkTN68Vu38URXA13d X-Received: by 2002:adf:c7cf:: with SMTP id y15-v6mr2262084wrg.20.1525760782738; Mon, 07 May 2018 23:26:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525760782; cv=none; d=google.com; s=arc-20160816; b=K88686iLC2FaP2e5TtKlLbwrNOLuhGmxbTrVHlbRnbOBWZhKWT/VFk+oQqzzb55kaw 0AwbOH0zHeU3H6V3cV1cNgpJHFOJ+y4ygwuhg2fTC6TDchfjN/YHbMMF1tCxQcaKwDwR Dfj2+Loq6He0PN6VVp6xcElKFKPOt1KCvNzoQ/iei/ioam73Z4JWX+2jclwpdO+8w1xy VTE7WE3Lm9d4/J5f5WrWL4YxZS3my69OvNHNS7vGen7XwUpykZS0DSaPUhFPA0HLZ90z 8WSo9pwrMWR2HuUM4EpePbQirM+CtqrDib0/FIr4ne9W+9gOvwugCR6Il3G6xB3TBYfL Kz5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-language:content-transfer-encoding:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject :arc-authentication-results; bh=622g4g3IdeQ2G29jE8e1buGerGcol0ltmvYqO1Oq3nA=; b=fNoJG0MVSZljnErmHxee5DS/99KCsk2hmqmuS1nCX+0PBIQRQJQ/LyU1ImHMVddd2F a3zLZgOuP9qJ+Gp2sAs2JQXi3Ar18Mm36eA9KLOveoPS28OCj1Hkjkil0Ez+oAKC7lQA Lz2XTqhPaOgTIK9tIXFCtqsSBSobHwtBK0fL3zA7lGGtqYlCUFX27KNsu9/ThvqeaGMA ThpoqsbWxIK4k7o2Y4JPPQV+ZgXkICvQ+sSvs+oGdJMVL8C83L4JUBFLJRr60MFc0II3 fkOqnVIpzPfE65KAKaRD1/xVdjJDIOs2U8V/7+ZBXvTeSMn/u+mAb5RNylr35Oyqom5w 99SA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of fdprnd@dave.eu designates 185.100.109.150 as permitted sender) smtp.mailfrom=fdprnd@dave.eu Return-Path: Received: from mx.dave-tech.it (mx.dave-tech.it. [185.100.109.150]) by gmr-mx.google.com with ESMTP id m80-v6si608633wmb.1.2018.05.07.23.26.22 for ; Mon, 07 May 2018 23:26:22 -0700 (PDT) Received-SPF: pass (google.com: domain of fdprnd@dave.eu designates 185.100.109.150 as permitted sender) client-ip=185.100.109.150; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of fdprnd@dave.eu designates 185.100.109.150 as permitted sender) smtp.mailfrom=fdprnd@dave.eu Received: from [127.0.0.1] (unknown [192.168.0.115]) by mx.dave-tech.it (Postfix) with ESMTPS id 4AAC08F for ; Tue, 8 May 2018 08:26:22 +0200 (CEST) Subject: Re: build and install .deb package To: isar-users@googlegroups.com References: <96b097fa-b6b4-a3a3-3264-9988029a0c94@ilbers.de> <8d0fe46e-1de6-81db-12a1-51764da65740@dave.eu> <72c018b0-2740-04af-1baa-e2b19170d83c@ilbers.de> <20180507175425.67e99895@md1pvb1c.ad001.siemens.net> From: Francesco Message-ID: <1590a699-5099-626a-31a7-63924cfa1b23@dave.eu> Date: Tue, 8 May 2018 08:26:22 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180507175425.67e99895@md1pvb1c.ad001.siemens.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-TUID: a36Ok1q/iu69 Hello, On 07/05/2018 17:54, Henning Schild wrote: > Am Fri, 4 May 2018 16:32:35 +0200 > schrieb Francesco : > >> Here it is: >> >> 1. Name and path to your mypackage recipe: >> >>     meta-dave/recipes-devtools/testpkg/testpkg_0.1.bb >> >> 2. The variables from your mypackage recipe: PN, PROVIDES. >> >>     DESCRIPTION = "Sample application for ISAR" >>     MAINTAINER = "Your name here " >>     DEBIAN_DEPENDS = "apt (>= 0.4.2), passwd" >>     PN = "testpkg" > PN is already testpkg because of the filename you chose. > >>     SRC_URI = "file://README \ >>     file://postinst \ >>     file://uImage \ >>     file://lynx-modules.tar.gz \ > add ";unpack=false" if you want to unpack this yourself. > >>     file://imx6ul-lynx-som0013-cb002f.dtb \ >>     " > you are missing some things here, try adding the following > > -- > inherit dpkg-raw > > do_install() { > install -v -d ${D}/boot > install -v -m 644 ${WORKDIR}/uImage ${D}/boot/ > install -v -m 644 ${WORKDIR}/*.dtb ${D}/boot/ > tar xfvz lynx-modules.tar.gz -C ${D}/lib/modules/ > } > -- > > When building your package you should have seen a NOTE saying "The > included, default BB base.bbclass does not define a useful default > task."     I had done this, in fact the package could be built without problems.  Deleting the tmp folder before restarting the building process solved the other issue I was getting.     Luckily I can now build and install the .deb package with no troubles :)     Thanks. > > And once you you the class dpkg-raw you will have to provide an > implementation of do_install to tell Isar where your files will go in > the package. > > Henning >> 3. The content of your conf/bblayers.conf file. >> >>     # LAYER_CONF_VERSION is increased each time >> build/conf/bblayers.conf # changes incompatibly >>     LCONF_VERSION = "6" >> >>     BBPATH = "${TOPDIR}" >>     BBFILES ?= "" >> >>     BBLAYERS ?= " \ >>       /mnt/elbe/Isar/isar/meta \ >>       /mnt/elbe/Isar/isar/meta-isar \ >>       /mnt/elbe/Isar/isar/meta-dave \ >>       " >>     BBLAYERS_NON_REMOVABLE ?= " \ >>       /mnt/elbe/Isar/isar/meta \ >>       " >> 4. The full line IMAGE_INSTALL you've added. >>     IMAGE_INSTALL += "testpkg" >> >> P.S. Also, am I right, that you are able to run 'bitbake mypackage' >> without errors? >> /bitbake multiconfig:lynx-config:lynx-image/ >> Parsing recipes: 100% >> |###########################################################################################################################################| >> Time: 0:00:01 >> Parsing of 17 .bb files complete (0 cached, 17 parsed). 187 targets, >> 0 skipped, 0 masked, 0 errors. >> NOTE: Resolving any missing task queue dependencies >> NOTE: Resolving any missing task queue dependencies >> NOTE: Resolving any missing task queue dependencies >> NOTE: Resolving any missing task queue dependencies >> NOTE: Resolving any missing task queue dependencies >> NOTE: Resolving any missing task queue dependencies >> NOTE: Resolving any missing task queue dependencies >> NOTE: Resolving any missing task queue dependencies >> NOTE: Resolving any missing task queue dependencies >> NOTE: Resolving any missing task queue dependencies >> NOTE: Resolving any missing task queue dependencies >> Initialising tasks: 100% >> |########################################################################################################################################| >> Time: 0:00:00 >> NOTE: Executing RunQueue Tasks >> NOTE: Tasks Summary: Attempted 9 tasks of which 0 didn't need to be >> rerun and all succeeded. >> / bitbake multiconfig:lynx-config:testpkg/ >> Loading cache: 100% >> |#############################################################################################################################################| >> Time: 0:00:00 >> Loaded 187 entries from dependency cache. >> NOTE: Resolving any missing task queue dependencies >> NOTE: Resolving any missing task queue dependencies >> NOTE: Resolving any missing task queue dependencies >> NOTE: Resolving any missing task queue dependencies >> NOTE: Resolving any missing task queue dependencies >> NOTE: Resolving any missing task queue dependencies >> NOTE: Resolving any missing task queue dependencies >> NOTE: Resolving any missing task queue dependencies >> NOTE: Resolving any missing task queue dependencies >> NOTE: Resolving any missing task queue dependencies >> NOTE: Resolving any missing task queue dependencies >> Initialising tasks: 100% >> |########################################################################################################################################| >> Time: 0:00:00 >> NOTE: Executing RunQueue Tasks >> NOTE: Tasks Summary: Attempted 14 tasks of which 3 didn't need to be >> rerun and all succeeded. >> >> As you can see the package and the image can be built fine if the >> variable IMAGE_INSTALL is left empty. As soon as I add testpkg to the >> IMAGE_INSTALL variable I get this error: >> >> | Fetched 12.6 MB in 10s (1,174 kB/s) >> | Reading package lists... >> | W: GPG error: http://security.debian.org jessie/updates InRelease: >> Could not execute 'gpgv' to verify signature (is gpgv installed?) >> | W: GPG error: http://ftp.debian.org jessie-updates InRelease: Could >> not execute 'gpgv' to verify signature (is gpgv installed?) >> | W: GPG error: http://ftp.debian.org jessie Release: Could not >> execute 'gpgv' to verify signature (is gpgv installed?) >> | I: Calculating required packages. >> | apt-get -y  -o Apt::Architecture=armhf -o >> Dir::Etc::TrustedParts=/mnt/elbe/Isar/isar/build/tmp/work/lynx-armhf/lynx-image/rootfs/etc/apt/trusted.gpg.d >> -o Dir::Etc::Trusted=/mn >> t/elbe/Isar/isar/build/tmp/work/lynx-armhf/lynx-image/rootfs/etc/apt/trusted.gpg.d/trusted.gpg >> -o Apt::Get::AllowUnauthenticated=true -o >> Apt::Get::Download-Only=true -o Apt::Ins >> tall-Recommends=false -o >> Dir=/mnt/elbe/Isar/isar/build/tmp/work/lynx-armhf/lynx-image/rootfs/ >> -o >> Dir::Etc=/mnt/elbe/Isar/isar/build/tmp/work/lynx-armhf/lynx-image/rootfs/etc/apt / >> -o >> Dir::Etc::Parts=/mnt/elbe/Isar/isar/build/tmp/work/lynx-armhf/lynx-image/rootfs/etc/apt/apt.conf.d/ >> -o >> Dir::Etc::PreferencesParts=/mnt/elbe/Isar/isar/build/tmp/work/lynx-ar >> mhf/lynx-image/rootfs/etc/apt/preferences.d/ -o >> APT::Default-Release=* -o >> Dir::State=/mnt/elbe/Isar/isar/build/tmp/work/lynx-armhf/lynx-image/rootfs/var/lib/apt/ >> -o Dir::State:: >> Status=/mnt/elbe/Isar/isar/build/tmp/work/lynx-armhf/lynx-image/rootfs/var/lib/dpkg/status >> -o >> Dir::Cache=/mnt/elbe/Isar/isar/build/tmp/work/lynx-armhf/lynx-image/rootfs/var/cach >> e/apt/ install  apache2 apt base-files base-passwd bash bsdutils >> build-essential coreutils curl dash dbus debconf debconf-i18n >> debianutils diffutils dpkg e2fslibs e2fsprogs find utils gcc-4.8-base >> gcc-4.9-base gpgv grep gzip hostname init initscripts libacl1 >> libattr1 libblkid1 libc-bin libc6 libcomerr2 libgcc1 >> liblocale-gettext-perl liblzma5 libmount1 l ibncurses5 libpam-modules >> libpam-modules-bin libpam-runtime libpam0g libpcre3 libselinux1 >> libsepol1 libsmartcols1 libss2 libtext-charwidth-perl >> libtext-iconv-perl libtext-wrapi1 8n-perl libtinfo5 libuuid1 >> localepurge login lsb-base mawk mount multiarch-support ncurses-base >> ncurses-bin nginx openssh-server passwd perl-base sed sensible-utils >> sqlite3 star tpar sudo sysv-rc sysvinit-utils tar testpkg tftp tzdata >> util-linux vim wget zlib1g | Reading package lists... >> | Building dependency tree... >> | E: Unable to locate package testpkg >> | apt download failed. Exit value: 100 >> | WARNING: exit code 100 from a shell command. >> | ERROR: Function failed: do_rootfs (log file is located at >> /mnt/elbe/Isar/isar/build/tmp/work/lynx-armhf/lynx-image/temp/log.do_rootfs.17385) >> ERROR: Task >> (multiconfig:lynx-config:/mnt/elbe/Isar/isar/meta-dave/recipes-core/images/lynx-image.bb:do_rootfs) >> failed with exit code '1' >> NOTE: Tasks Summary: Attempted 6 tasks of which 5 didn't need to be >> rerun and 1 failed. >> >> My understanding is this: The testpkg.deb is generated and placed >> correctly inside the build/tmp/work/lynx-armhf/testpkg-0.1-r0 but >> then it seems that  it can't be found while the image is being built. >> How does bitbake know how to install the package? For other >> pre-compiled packages I used a dedicated recipe which inherits from >> dpkg class. These packages however,  were not being produced at >> runtime.  The situation now is a bit different. I'm trying to build >> the package and install it on the rootfs at runtime. >> Perhaps I'm misunderstanding something, given that my experience with >> both yocto and isar is quite limited. >> Thanks >> >> Frank >> >> On 04/05/2018 15:17, Alexander Smirnov wrote: >>> On 05/04/2018 04:03 PM, Francesco wrote: >>>> I tried to add the package name to the IMAGE_INSTALL variable >>>> inside my image recipe. This returned an error: Unable to locate >>>> package mypackage. I thought that I was doing something wrong, but >>>> I guess that if this is the correct way, the problem is somewhere >>>> else. >>> Possibly I could also take a look on this, if you provide: >>> >>> 1. Name and path to your mypackage recipe, like: >>> >>> meta-isar/recipes-app/libhello/libhello.bb >>> >>> 2. The variables from your mypackage recipe: PN, PROVIDES. >>> >>> 3. The content of your conf/bblayers.conf file. >>> >>> 4. The full line IMAGE_INSTALL you've added. >>> >>> P.S. Also, am I right, that you are able to run 'bitbake mypackage' >>> without errors? >>> >>> Alex >>> >>>> Frank >>>> >>>> >>>> On 04/05/2018 14:49, Alexander Smirnov wrote: >>>>> Hello, >>>>> >>>>> On 05/04/2018 03:40 PM, Francesco wrote: >>>>>> Hello guys, >>>>>> >>>>>> I still have a question regarding the management of customised >>>>>> packages. >>>>>> >>>>>> I managed to create my .deb package using dpkg-raw but I would >>>>>> like also to install it on the rootfs of my image. How can this >>>>>> be done? >>>>>> >>>>>> Adding the package to IMAGE_INSTALL variable, does  not seem to >>>>>> work. Perhaps another recipe is required? >>>>> it depends where you've added IMAGE_INSTALL. It should be visible >>>>> for image recipe, so you have to add it to one of the following >>>>> places: 1. Into you image recipe. If you use isar-image-base, >>>>> then update file 'meta-isar/recipes-core/isar-image-base.bb' >>>>> 2. Edit 'conf/local.conf' file in your build directory and add >>>>> this line to the end. >>>>> >>>>> Alex >>>>> >>>>