From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6841139815099924480 X-Received: by 2002:a17:906:7c07:: with SMTP id t7mr14155639ejo.487.1592908126484; Tue, 23 Jun 2020 03:28:46 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:aa7:c302:: with SMTP id l2ls2319385edq.1.gmail; Tue, 23 Jun 2020 03:28:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5rni1gpmJssIPKwB2/cVjyNxrVcRnzZZDsLdnRRxnPfe3awmEChp6ciJj3XeZGDV5FYMm X-Received: by 2002:a50:cd53:: with SMTP id d19mr2202965edj.300.1592908125891; Tue, 23 Jun 2020 03:28:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592908125; cv=none; d=google.com; s=arc-20160816; b=oJEmm6zYaJNLNwLTSdUP5E1AjPPjWWAzXfYwu0ysuyMHEvLEASbpGB/lDD1g8fMVK/ RwA1TlOTjGR++CZSj6pmGiXsIg+rCXYe3qJVDfOmOqxh1/egaifqLlQ3kAU1ChRhKnxK GRzGzoIu1KRR/Q9TXiQyPA9Xg7pA+9dJzjQlfqFEIUctR1j0Y+s2vVAFtIXFGUQJX5on EwJJtlYg8A4m+HY6inVHiEdg5WqEIKCk0ybRo23Z/dRg34WftZvwcv14xl4P0tzOLoYa 2Z0Kosges103vnpRdPshsn6F/BCcsrEXtf5nmbjxOnijEFftG6XXhwu63Qm8vPeI7dp0 AIHA== 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=NqorgKC2u/IeZCTPrgYu/RoQiMqe0US2RxfHwWvA6xY=; b=KYviop9nUblI4Iujc7xOCh3JrZdlEUJDd5ftRfLS3VdRr3B4u5INmtDCN34o52DcDO X/k+71VVkDtDXquaWbx4e9UuD6b9J8f98Tyd6wBG0ijkDPDjCsZT96N/T+XUu95m5aAk d7FCbPobVB1Wkd/do84iRfg4gpsK4xlRpPhgFkh6SC/ooSoGsWBB6YqFj7ii39C75GKI 6QiEAtB5wFHJKtdnrJ+hVuVl+lcvgFE4x4x7Qy5MQs57+xWIeIIpR6MnZdBmXi/ujyWb wHNetHwO9yl9Kpni/BPdKRWEDJz2r6rCebgDJ78IDw4A1F7NMSNIXh+6FYGUvSFzLhkD HGyg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 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. [2001:a60:0:28:0:1:25:1]) by gmr-mx.google.com with ESMTPS id x14si160620edq.2.2020.06.23.03.28.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jun 2020 03:28:45 -0700 (PDT) Received-SPF: neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of hws@denx.de) client-ip=2001:a60:0:28:0:1:25:1; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 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 49rjDY4Zqwz1rtN6; Tue, 23 Jun 2020 12:28:45 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49rjDY4J5tz1r56J; Tue, 23 Jun 2020 12:28:45 +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 xfwx_OlQ8WBG; Tue, 23 Jun 2020 12:28:43 +0200 (CEST) X-Auth-Info: DEEnsZiCDei5s3umqNoKUGZmHZsRwacWffZeRjYskP0= 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 12:28:43 +0200 (CEST) Message-ID: <9fe766bf55717326b6bba427bff922bc3a9f2b4f.camel@denx.de> Subject: Re: [PATCH] u-boot: add libubootenv From: Harald Seiler To: "Q. Gylstorff" , isar-users@googlegroups.com Date: Tue, 23 Jun 2020 12:28:43 +0200 In-Reply-To: <20200622115624.4639-1-Quirin.Gylstorff@siemens.com> References: <20200622115624.4639-1-Quirin.Gylstorff@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: H0hPWaSeTOCG 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" [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, -- 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