From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6551704819136987136 X-Received: by 2002:a19:c793:: with SMTP id x141-v6mr298651lff.33.1525708474779; Mon, 07 May 2018 08:54:34 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:db9d:: with SMTP id t29-v6ls1328923lfi.7.gmail; Mon, 07 May 2018 08:54:34 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpfuAQRbaXRu5LeIUgQ4NotogIunIj7oGWGgeENtg0dvr4SvlHAeRDZgFQm/hlbAeE69MxV X-Received: by 2002:a19:d89c:: with SMTP id r28-v6mr751650lfi.13.1525708474268; Mon, 07 May 2018 08:54:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525708474; cv=none; d=google.com; s=arc-20160816; b=vN0H9058uOHEfvBdcmdA046EZgSU6bbiqck64JSXQd7bAXWnZL/1+2+JZreaWD7U91 nZczg87uOHLP7XNekOMeOh3+5KsgGl60+XPBppNH2BnKm9UlP7KSynbeysbE6npJFNWb x6ywmQEsG7ZgZmGJHfGGG/h3w6B84q9bDFefhOxFS+9a8VTi54540+y+GQjDENG4JsqU QfTZSE2l0/yPUsx84g5RAI4bTAXhapWjdLjVBATJB/mHDzfzevs76o6HHy11R5jax5y5 qikRzeS7oUJw0i3+46elxdkWPBSegT094Cu+UsbA6WD0i8LudBMVpPbFveEJVoQmUDDM +u0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=6ZMv4iQzUkYtQ2+sn9j1PorGe3GVqKDaWGbR9WbFmo4=; b=gd33NB0hl5VKCWNbJmqu7kxIsAU0ENHF7cY36/LS47ZWV08ZE9bLrx4y2EKY4QnAhA SS/Nshi/EL+dgUSJ5aBzIEA7CORXWMVDWuJbN8YbW+wdqMStDXF6ezgFK7eA3eUf3gdF JrCHeaUxQXcglyxKkb57nVYPuhkp7c3rrTUjtQxPkwBM0twvSaWz76Q9nK+H/Yc1cpOd xqNTLBlrTYnkG8ynD8SqpKQBL4+b7kxNmlQgNMQoF97JuMpguIGTPNZZQBHJ1qbFBPl+ AQu3Piffjdf8e0xCLuMxc7THElEetJNyAoByoHeYSvTlFLavBiPNSbKXvOkoPwAmX1TG +KpA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id j3-v6si303232lfb.1.2018.05.07.08.54.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 May 2018 08:54:34 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id w47FsQ3x026222 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 7 May 2018 17:54:26 +0200 Received: from md1pvb1c.ad001.siemens.net (md1pvb1c.ad001.siemens.net [139.25.68.40]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id w47FsQY8027427; Mon, 7 May 2018 17:54:26 +0200 Date: Mon, 7 May 2018 17:54:25 +0200 From: Henning Schild To: Francesco Cc: Alexander Smirnov , Subject: Re: build and install .deb package Message-ID: <20180507175425.67e99895@md1pvb1c.ad001.siemens.net> In-Reply-To: References: <96b097fa-b6b4-a3a3-3264-9988029a0c94@ilbers.de> <8d0fe46e-1de6-81db-12a1-51764da65740@dave.eu> <72c018b0-2740-04af-1baa-e2b19170d83c@ilbers.de> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-TUID: 2mKjjf/gEw00 Am Fri, 4 May 2018 16:32:35 +0200 schrieb Francesco : > Here it is: >=20 > 1. Name and path to your mypackage recipe: >=20 > =C2=A0=C2=A0=C2=A0 meta-dave/recipes-devtools/testpkg/testpkg_0.1.bb >=20 > 2. The variables from your mypackage recipe: PN, PROVIDES. >=20 > =C2=A0=C2=A0=C2=A0 DESCRIPTION =3D "Sample application for ISAR" > =C2=A0=C2=A0=C2=A0 MAINTAINER =3D "Your name here " > =C2=A0=C2=A0=C2=A0 DEBIAN_DEPENDS =3D "apt (>=3D 0.4.2), passwd" > =C2=A0=C2=A0=C2=A0 PN =3D "testpkg" PN is already testpkg because of the filename you chose. =20 > =C2=A0=C2=A0=C2=A0 SRC_URI =3D "file://README \ > =C2=A0=C2=A0=C2=A0 file://postinst \ > =C2=A0=C2=A0=C2=A0 file://uImage \ > =C2=A0=C2=A0=C2=A0 file://lynx-modules.tar.gz \ add ";unpack=3Dfalse" if you want to unpack this yourself. > =C2=A0=C2=A0=C2=A0 file://imx6ul-lynx-som0013-cb002f.dtb \ > =C2=A0=C2=A0=C2=A0 " 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." 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 >=20 > 3. The content of your conf/bblayers.conf file. >=20 > =C2=A0=C2=A0=C2=A0 # LAYER_CONF_VERSION is increased each time > build/conf/bblayers.conf # changes incompatibly > =C2=A0=C2=A0=C2=A0 LCONF_VERSION =3D "6" >=20 > =C2=A0=C2=A0=C2=A0 BBPATH =3D "${TOPDIR}" > =C2=A0=C2=A0=C2=A0 BBFILES ?=3D "" >=20 > =C2=A0=C2=A0=C2=A0 BBLAYERS ?=3D " \ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /mnt/elbe/Isar/isar/meta \ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /mnt/elbe/Isar/isar/meta-isar \ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /mnt/elbe/Isar/isar/meta-dave \ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 " > =C2=A0=C2=A0=C2=A0 BBLAYERS_NON_REMOVABLE ?=3D " \ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /mnt/elbe/Isar/isar/meta \ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 " > 4. The full line IMAGE_INSTALL you've added. > =C2=A0=C2=A0=C2=A0 IMAGE_INSTALL +=3D "testpkg" >=20 > P.S. Also, am I right, that you are able to run 'bitbake mypackage'=20 > without errors? > /bitbake multiconfig:lynx-config:lynx-image/ > Parsing recipes: 100%=20 > |########################################################################= ###################################################################|=20 > 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%=20 > |########################################################################= ################################################################|=20 > Time: 0:00:00 > NOTE: Executing RunQueue Tasks > NOTE: Tasks Summary: Attempted 9 tasks of which 0 didn't need to be=20 > rerun and all succeeded. > /=C2=A0bitbake multiconfig:lynx-config:testpkg/ > Loading cache: 100%=20 > |########################################################################= #####################################################################|=20 > 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%=20 > |########################################################################= ################################################################|=20 > Time: 0:00:00 > NOTE: Executing RunQueue Tasks > NOTE: Tasks Summary: Attempted 14 tasks of which 3 didn't need to be=20 > rerun and all succeeded. >=20 > As you can see the package and the image can be built fine if the=20 > variable IMAGE_INSTALL is left empty. As soon as I add testpkg to the=20 > IMAGE_INSTALL variable I get this error: >=20 > | Fetched 12.6 MB in 10s (1,174 kB/s) > | Reading package lists... > | W: GPG error: http://security.debian.org jessie/updates InRelease:=20 > Could not execute 'gpgv' to verify signature (is gpgv installed?) > | W: GPG error: http://ftp.debian.org jessie-updates InRelease: Could=20 > 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=C2=A0 -o Apt::Architecture=3Darmhf -o=20 > Dir::Etc::TrustedParts=3D/mnt/elbe/Isar/isar/build/tmp/work/lynx-armhf/ly= nx-image/rootfs/etc/apt/trusted.gpg.d=20 > -o Dir::Etc::Trusted=3D/mn > t/elbe/Isar/isar/build/tmp/work/lynx-armhf/lynx-image/rootfs/etc/apt/trus= ted.gpg.d/trusted.gpg=20 > -o Apt::Get::AllowUnauthenticated=3Dtrue -o > Apt::Get::Download-Only=3Dtrue -o Apt::Ins > tall-Recommends=3Dfalse -o=20 > Dir=3D/mnt/elbe/Isar/isar/build/tmp/work/lynx-armhf/lynx-image/rootfs/ > -o > Dir::Etc=3D/mnt/elbe/Isar/isar/build/tmp/work/lynx-armhf/lynx-image/rootf= s/etc/apt / > -o > Dir::Etc::Parts=3D/mnt/elbe/Isar/isar/build/tmp/work/lynx-armhf/lynx-imag= e/rootfs/etc/apt/apt.conf.d/ > -o > Dir::Etc::PreferencesParts=3D/mnt/elbe/Isar/isar/build/tmp/work/lynx-ar > mhf/lynx-image/rootfs/etc/apt/preferences.d/ -o > APT::Default-Release=3D* -o > Dir::State=3D/mnt/elbe/Isar/isar/build/tmp/work/lynx-armhf/lynx-image/roo= tfs/var/lib/apt/ > -o Dir::State:: > Status=3D/mnt/elbe/Isar/isar/build/tmp/work/lynx-armhf/lynx-image/rootfs/= var/lib/dpkg/status > -o > Dir::Cache=3D/mnt/elbe/Isar/isar/build/tmp/work/lynx-armhf/lynx-image/roo= tfs/var/cach > e/apt/ install=C2=A0 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=20 > /mnt/elbe/Isar/isar/build/tmp/work/lynx-armhf/lynx-image/temp/log.do_root= fs.17385) > ERROR: Task=20 > (multiconfig:lynx-config:/mnt/elbe/Isar/isar/meta-dave/recipes-core/image= s/lynx-image.bb:do_rootfs)=20 > failed with exit code '1' > NOTE: Tasks Summary: Attempted 6 tasks of which 5 didn't need to be=20 > rerun and 1 failed. >=20 > My understanding is this: The testpkg.deb is generated and placed=20 > correctly inside the build/tmp/work/lynx-armhf/testpkg-0.1-r0 but > then it seems that=C2=A0 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,=C2=A0 were not being produced at > runtime.=C2=A0 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=20 > both yocto and isar is quite limited. > Thanks >=20 > Frank >=20 > On 04/05/2018 15:17, Alexander Smirnov wrote: > > On 05/04/2018 04:03 PM, Francesco wrote: =20 > >> 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.=20 > > > > 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'=20 > > without errors? > > > > Alex > > =20 > >> Frank > >> > >> > >> On 04/05/2018 14:49, Alexander Smirnov wrote: =20 > >>> Hello, > >>> > >>> On 05/04/2018 03:40 PM, Francesco wrote: =20 > >>>> Hello guys, > >>>> > >>>> I still have a question regarding the management of customised=20 > >>>> 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=C2=A0 not seem to= =20 > >>>> work. Perhaps another recipe is required? =20 > >>> > >>> it depends where you've added IMAGE_INSTALL. It should be visible=20 > >>> 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 > >>> =20 > >> =20 >=20