From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6841139815099924480 X-Received: by 2002:a05:651c:512:: with SMTP id o18mr11765905ljp.226.1592913666201; Tue, 23 Jun 2020 05:01:06 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:651c:298:: with SMTP id b24ls432241ljo.4.gmail; Tue, 23 Jun 2020 05:01:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzP2l93/nciqrhoNjWdMSCF3zPbsTg3pEXGt+v5d2uZe0SN8nYEvadrfpG7LCCjh/jahLFr X-Received: by 2002:a2e:9141:: with SMTP id q1mr10575648ljg.196.1592913665503; Tue, 23 Jun 2020 05:01:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592913665; cv=none; d=google.com; s=arc-20160816; b=KLt6L/NwHSmxVCqgq8/VlXM4vlidEGgkPpLrAgKfDzZYYOqfggKJnxOgfiqvuXyZVD wEM6a+b2Q0yDCJMdyVRCeBkdnAB7j/MJP7JFXAAZcqgEGLq6oNT88cNt6SM5JJkli1Aq vuHojPslh3HzylDDVCdV5hBGRl2/6JUu4vvayw8qmlprVFtPiKqosKdOpGuYop6x7Dcq 4nfL4SFToUPKsgnBcCMINjylXblAIergvzA9hLwAbTOqn0KiYpv1A4iAQ7x638Qif+FT 85Ka7/QFgfJ5wJiczI54KxbothpYBzIi1lzHmByMcoYmPEV0RvWYIUzMnVNdGXa1ELKb 2Idw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id; bh=03bNpwJEIVtSdqQAOsIwVsrVz3BqSaCKwBHW2DNDLOs=; b=sARDFB6brhDN1O0CL+A/u+138cL9SY8sXWxeVddRkH0ahVd9EhTT9krnA6IjuyYuUv 9/8J9UW3A4wnqYc1DCT1lch7szKqkh5AuwRLsmMTtLoykjiyAyHXEVEas2qFZhr7VFRB SmoNKoYsAJJfXti9tr+YAsbKDgzdDIQvKtyLE8vrrfcWBNTQfmUxCu4gqeAS8riMWNXm UGui66q60fXLCnykkMpXH37ds95gn6qESl1+qICw0V/hX+u9vxbt6wEPtos3JjqJCxet 933cPpjiAcDXD+lmve0NhVQev/oDqoVJ3A9Zz+F8fefiLWkU9d1ar4+O5LORwwDl9M+u yU0g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of hws@denx.de) smtp.mailfrom=hws@denx.de Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id u23si1042012ljg.7.2020.06.23.05.01.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jun 2020 05:01:05 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of hws@denx.de) client-ip=212.18.0.9; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of hws@denx.de) smtp.mailfrom=hws@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 49rlH44qG5z1qs43; Tue, 23 Jun 2020 14:01:04 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49rlH42tKkz1qqkS; Tue, 23 Jun 2020 14:01:04 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id A7FagGgrWNjE; Tue, 23 Jun 2020 14:01:01 +0200 (CEST) X-Auth-Info: /GmvTCTgrQtMi466cAboQDbN98ZktuqHmyKwkzB4ocs= Received: from maia.denx.de (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 23 Jun 2020 14:01:01 +0200 (CEST) Message-ID: <4a962810d5b717012bee1c323b2b595ea1a3d6ae.camel@denx.de> Subject: Re: [PATCH] u-boot: add libubootenv From: Harald Seiler To: Jan Kiszka , "Q. Gylstorff" , isar-users@googlegroups.com Date: Tue, 23 Jun 2020 14:01:00 +0200 In-Reply-To: <231240a6-9797-cc23-2f06-f1b9c5426823@siemens.com> References: <20200622115624.4639-1-Quirin.Gylstorff@siemens.com> <9fe766bf55717326b6bba427bff922bc3a9f2b4f.camel@denx.de> <231240a6-9797-cc23-2f06-f1b9c5426823@siemens.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUID: XCVBT8CKb7KG On Tue, 2020-06-23 at 12:33 +0200, Jan Kiszka wrote: > On 23.06.20 12:28, Harald Seiler wrote: > > Hi Quirin, > > > > On Mon, 2020-06-22 at 13:56 +0200, Q. Gylstorff wrote: > > > From: Quirin Gylstorff > > > > > > Add the new library libubootenv and remove fw_printenv and fw_setenv > > > form u-boot-tools as the are now part of the new library. > > > > > > libubootenv is a library that provides a hardware independent > > > way to access to U-Boot environment. U-Boot has its default environment > > > compiled board-dependently and this means that tools to access the environment > > > are also board specific, too. > > > > > > libubootenv conflicts with u-boot-tools from Debian 10 > > > as both try to install fw_printenv and fw_sentenv. This conflict is not > > > part of the control file as it breaks the installation of custom u-boot-tools > > > from the u-boot-sources. > > > > > > Signed-off-by: Quirin Gylstorff > > > --- > > > meta-isar/conf/machine/de0-nano-soc.conf | 2 +- > > > .../libubootenv/files/debian/compat | 1 + > > > .../libubootenv/files/debian/control.tmpl | 15 ++++++++++ > > > .../libubootenv/files/debian/rules.tmpl | 24 ++++++++++++++++ > > > .../libubootenv/libubootenv_0.2.bb | 28 +++++++++++++++++++ > > > .../files/debian/u-boot-tools.conffiles | 1 - > > > .../u-boot/files/debian/u-boot-tools.install | 2 -- > > > .../u-boot/files/debian/u-boot-tools.links | 1 - > > > 8 files changed, 69 insertions(+), 5 deletions(-) > > > create mode 100644 meta/recipes-bsp/libubootenv/files/debian/compat > > > create mode 100644 meta/recipes-bsp/libubootenv/files/debian/control.tmpl > > > create mode 100644 meta/recipes-bsp/libubootenv/files/debian/rules.tmpl > > > create mode 100644 meta/recipes-bsp/libubootenv/libubootenv_0.2.bb > > > delete mode 100644 meta/recipes-bsp/u-boot/files/debian/u-boot-tools.conffiles > > > delete mode 100644 meta/recipes-bsp/u-boot/files/debian/u-boot-tools.links > > > > > > diff --git a/meta-isar/conf/machine/de0-nano-soc.conf b/meta-isar/conf/machine/de0-nano-soc.conf > > > index 3a2c009..6558d90 100644 > > > --- a/meta-isar/conf/machine/de0-nano-soc.conf > > > +++ b/meta-isar/conf/machine/de0-nano-soc.conf > > > @@ -15,4 +15,4 @@ WKS_FILE ?= "de0-nano-soc.wks.in" > > > IMAGER_INSTALL += "u-boot-de0-nano-soc" > > > IMAGER_BUILD_DEPS += "u-boot-de0-nano-soc" > > > > > > -IMAGE_INSTALL += "u-boot-tools u-boot-script" > > > +IMAGE_INSTALL += "u-boot-tools libubootenv u-boot-script" > > > diff --git a/meta/recipes-bsp/libubootenv/files/debian/compat b/meta/recipes-bsp/libubootenv/files/debian/compat > > > new file mode 100644 > > > index 0000000..b4de394 > > > --- /dev/null > > > +++ b/meta/recipes-bsp/libubootenv/files/debian/compat > > > @@ -0,0 +1 @@ > > > +11 > > > diff --git a/meta/recipes-bsp/libubootenv/files/debian/control.tmpl b/meta/recipes-bsp/libubootenv/files/debian/control.tmpl > > > new file mode 100644 > > > index 0000000..fade69a > > > --- /dev/null > > > +++ b/meta/recipes-bsp/libubootenv/files/debian/control.tmpl > > > @@ -0,0 +1,15 @@ > > > +Source: libubootenv > > > +Section: embedded > > > +Priority: optional > > > +Maintainer: Stefano Babic > > > +Build-Depends: ${BUILD_DEB_DEPENDS} > > > +Standards-Version: 4.2.1 > > > +Homepage: https://sbabic.github.io/libubootenv > > > + > > > +Package: libubootenv > > > +Architecture: any > > > +Depends: ${DEBIAN_DEPENDS} > > > +Description: libubootenv is a library that provides a hardware independent > > > + way to access to U-Boot environment. U-Boot has its default environment > > > + compiled board-dependently and this means that tools to access the environment > > > + are also board specific, too. > > > diff --git a/meta/recipes-bsp/libubootenv/files/debian/rules.tmpl b/meta/recipes-bsp/libubootenv/files/debian/rules.tmpl > > > new file mode 100644 > > > index 0000000..56ccd19 > > > --- /dev/null > > > +++ b/meta/recipes-bsp/libubootenv/files/debian/rules.tmpl > > > @@ -0,0 +1,24 @@ > > > +#!/usr/bin/make -f > > > + > > > +ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) > > > +export CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)- > > > +export CC=$(DEB_HOST_GNU_TYPE)-gcc > > > +export LD=$(DEB_HOST_GNU_TYPE)-gcc > > > +endif > > > + > > > +export DH_VERBOSE = 1 > > > + > > > +export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow > > > + > > > +override_dh_auto_configure: > > > + dh_auto_configure -- > > > + > > > +%: > > > + echo $@ > > > + dh $@ > > > + > > > +override_dh_installchangelogs: > > > + true > > > + > > > +override_dh_installdocs: > > > + true > > > diff --git a/meta/recipes-bsp/libubootenv/libubootenv_0.2.bb b/meta/recipes-bsp/libubootenv/libubootenv_0.2.bb > > > new file mode 100644 > > > index 0000000..7ada382 > > > --- /dev/null > > > +++ b/meta/recipes-bsp/libubootenv/libubootenv_0.2.bb > > > @@ -0,0 +1,28 @@ > > > +# Copyright (c) 2019 Siemens AG > > > +# Licensed under the Siemens Inner Source License, see LICENSE > > > + > > > +DESCRIPTION = "swupdate utility for software updates" > > > +HOMEPAGE= "https://github.com/sbabic/swupdate" > > > +LICENSE = "GPL-2.0" > > > +LIC_FILES_CHKSUM = "file://${LAYERDIR_isar}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe" > > > +SRC_URI = "gitsm://github.com/sbabic/libubootenv.git;branch=master;protocol=https" > > > + > > > +SRCREV = "bf6ff631c0e38cede67268ceb8bf1383b5f8848e" > > > + > > > +BUILD_DEB_DEPENDS = "cmake, zlib1g-dev" > > > > libubootenv requires a proper config and default environment file to work. > > I sent a patch a few days ago (not yet applied) which creates a package > > for those [1] and I think it would make sense to have libubootenv depend > > on that package to ensure config exists alongside the tools. That would > > mean: > > > > DEPENDS="u-boot-config" > > DEBIAN_DEPENDS="u-boot-config" > > u-boot-${MACHINE}-config Actually u-boot-config was intentional, my patch PROVIDES= this name as well with the idea that libubootenv and other technically board-independent packages can remain board-independent that way. (And of course the debian control file also lists u-boot-config as a 'Provides:') Selection of the actual package can then happen via the preferred provider mechanism in the machine config. > Makes sense. > > > [1]: https://groups.google.com/forum/#!msg/isar-users/H_CixMXvd6Q/cXbO4VzgAgAJ > > > > > + > > > +SRC_URI += "file://debian" > > > +TEMPLATE_FILES = "debian/control.tmpl debian/rules.tmpl" > > > +TEMPLATE_VARS += "BUILD_DEB_DEPENDS DEFCONFIG DEBIAN_DEPENDS" > > > + > > > + > > > +inherit dpkg > > > + > > > +S = "${WORKDIR}/git" > > > + > > > +do_prepare_build() { > > > + DEBDIR=${S}/debian > > > + install -d ${DEBDIR} > > > + cp -R ${WORKDIR}/debian ${S} > > > + deb_add_changelog > > > +} > > > diff --git a/meta/recipes-bsp/u-boot/files/debian/u-boot-tools.conffiles b/meta/recipes-bsp/u-boot/files/debian/u-boot-tools.conffiles > > > deleted file mode 100644 > > > index d49a8fb..0000000 > > > --- a/meta/recipes-bsp/u-boot/files/debian/u-boot-tools.conffiles > > > +++ /dev/null > > > @@ -1 +0,0 @@ > > > -/etc/fw_env.config > > > diff --git a/meta/recipes-bsp/u-boot/files/debian/u-boot-tools.install b/meta/recipes-bsp/u-boot/files/debian/u-boot-tools.install > > > index d1ae3e0..2893b9a 100644 > > > --- a/meta/recipes-bsp/u-boot/files/debian/u-boot-tools.install > > > +++ b/meta/recipes-bsp/u-boot/files/debian/u-boot-tools.install > > > @@ -1,5 +1,3 @@ > > > tools/dumpimage /usr/bin/ > > > -tools/env/fw_printenv /usr/bin/ > > > tools/mkenvimage /usr/bin/ > > > tools/mkimage /usr/bin/ > > > -tools/env/fw_env.config /etc > > > diff --git a/meta/recipes-bsp/u-boot/files/debian/u-boot-tools.links b/meta/recipes-bsp/u-boot/files/debian/u-boot-tools.links > > > deleted file mode 100644 > > > index 92f5a6c..0000000 > > > --- a/meta/recipes-bsp/u-boot/files/debian/u-boot-tools.links > > > +++ /dev/null > > > @@ -1 +0,0 @@ > > > -/usr/bin/fw_printenv /usr/bin/fw_setenv > > > -- > > > 2.20.1 > > > > Regards, > > > > Jan > -- Harald DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-62 Fax: +49-8142-66989-80 Email: hws@denx.de