From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6841139815099924480 X-Received: by 2002:a5d:63ce:: with SMTP id c14mr8531029wrw.254.1592913923797; Tue, 23 Jun 2020 05:05:23 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:a94e:: with SMTP id s75ls1391500wme.3.canary-gmail; Tue, 23 Jun 2020 05:05:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzagwrC/EcLNOLCAdYyWgx8AnwdFAtAAwIhJZ1bqZhKebHLzhEIMzg7nilR7e50sTVWQ3ju X-Received: by 2002:a1c:ed17:: with SMTP id l23mr25058410wmh.73.1592913922972; Tue, 23 Jun 2020 05:05:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592913922; cv=none; d=google.com; s=arc-20160816; b=VhrSXwDfDj5LT9fNOZmw48qIU0th1RS99dB/iGPit50r2YrPvCch9/TxVpa21E2Dxt 0WnuANarjuHkSAx2P+X0HtNTU9N8FCGNNToPpPH4f88iQm+1XB4mVZnET6DlCQMJ+SgL wb++CmhMW8OG8rXIsq2Zt7GilawhuDB7vxpMhIbp40fLtUhqXvENeNixn8EhAPDNO7dA FFkYL9shQI6PUl+gnA8O4PkOEl5qAIeE/hN7r6uJVJBYI/jfY36aqKUO3V9Lm8cNMQhi 6RLDKCbigtkqX0Zv2mOOQ16XaMDWiQy31TEEdE5SNu1Kuf8lBOq7yVZVvhTDEN2g552d pGTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject; bh=hN5/YTSye8lJlYVl0FSaNkJ33LPk5ROQOYAdszlfXMI=; b=jlf/86cvEHaZzMSlU/75ds9eP3+CqQ/Bg16SfgnDlxA7AYxK4knisgeRV/moiWmlUn fEiYRBVffzJ6bUgmZDcPrJYUvekNdJYiPJkERGj9EPYGBKcKT9otxqhNkMIXNJ1iI1Qu /W/rJCPkHozZ5++WN+I5sm4sFaD4I7yLfU8sd9mxx/irtYprqIsQEV4jWhrU7kCIEwxu i67K9Hb2LrATuBtxSRCJ+6kS9WCue9oa/f3N76mf0COnPUB3aJ/HUxyvwZGCvbzkENue kwUR4eW1m/PPEk6BzEPfSfTMfKUm70oDwuJMn+MrZYFeZ5qfxe/LdsMHESR3W7jeRm+D W0FA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id m16si219044wmg.2.2020.06.23.05.05.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jun 2020 05:05:22 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id 05NC5MTD003845 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 23 Jun 2020 14:05:22 +0200 Received: from [167.87.144.134] ([167.87.144.134]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 05NC5Jq5026360; Tue, 23 Jun 2020 14:05:20 +0200 Subject: Re: [PATCH] u-boot: add libubootenv To: Harald Seiler , "Q. Gylstorff" , isar-users@googlegroups.com References: <20200622115624.4639-1-Quirin.Gylstorff@siemens.com> <9fe766bf55717326b6bba427bff922bc3a9f2b4f.camel@denx.de> <231240a6-9797-cc23-2f06-f1b9c5426823@siemens.com> <4a962810d5b717012bee1c323b2b595ea1a3d6ae.camel@denx.de> From: Jan Kiszka Message-ID: Date: Tue, 23 Jun 2020 14:05:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <4a962810d5b717012bee1c323b2b595ea1a3d6ae.camel@denx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: ZfMseDyQsdyz On 23.06.20 14:01, Harald Seiler wrote: > 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. You are right, that dependency should remain generic! Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux