public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Harald Seiler <hws@denx.de>,
	Gylstorff Quirin <quirin.gylstorff@siemens.com>,
	isar-users@googlegroups.com
Subject: Re: [PATCH] u-boot: add libubootenv
Date: Wed, 24 Jun 2020 10:53:23 +0200	[thread overview]
Message-ID: <c6cd8e41-cc73-b585-c404-e430c2802c53@siemens.com> (raw)
In-Reply-To: <0b933635e8efe15b0884c9d91426bdbd8168d37d.camel@denx.de>

On 24.06.20 10:49, Harald Seiler wrote:
> Hi Quirin,
> 
> On Tue, 2020-06-23 at 17:15 +0200, Gylstorff Quirin wrote:
>> Hi Harald,
>>
>> On 6/23/20 12:28 PM, Harald Seiler wrote:
>>> Hi Quirin,
>>>
>>> On Mon, 2020-06-22 at 13:56 +0200, Q. Gylstorff wrote:
>>>> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>>>
>>>> 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 <quirin.gylstorff@siemens.com>
>>>> ---
>>>>    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 <sbabic@denx.de>
>>>> +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
>>>
>>
>> I can do that, but if we use the package from debian upstream which is
>> currently my intention we should do it the other way around. that the
>> configuration depends necesary tools.
> 
> To me, this is the wrong way around.  The configuration does not depend on
> libubootenv for fulfilling its job (lying around in /etc) but libubootenv
> can't work without configuration.  So the dependency is clearly that
> libubootenv 'depends on' u-boot-config.  More so, the config also works
> with other tools, like the stock debian u-boot-tools so if using those was
> desired, the u-boot-config package would unnecessarily pull in libubootenv
> as a dependency.
> 
> OTOH I think I see your point with the upstream package not containing
> that dependency.  Is it not possible to patch in a dependency with
> dpkg-gbp?  Jan, maybe you can give pointers here?
> 

libubootenv, upstream or our package, will work without a config package 
if you provide that config otherwise (manually, preseeds, customization 
package...). So there is no strict dependency in fact.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

  reply	other threads:[~2020-06-24  8:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22 11:56 Q. Gylstorff
2020-06-22 13:04 ` Jan Kiszka
2020-06-22 14:35   ` Gylstorff Quirin
2020-06-23 10:28 ` Harald Seiler
2020-06-23 10:33   ` Jan Kiszka
2020-06-23 12:01     ` Harald Seiler
2020-06-23 12:05       ` Jan Kiszka
2020-06-23 15:15   ` Gylstorff Quirin
2020-06-24  8:49     ` Harald Seiler
2020-06-24  8:53       ` Jan Kiszka [this message]
2020-08-17  8:24         ` [PATCH v2] " Q. Gylstorff
2020-08-31 16:35           ` Jan Kiszka
2020-10-13 10:29             ` Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c6cd8e41-cc73-b585-c404-e430c2802c53@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=hws@denx.de \
    --cc=isar-users@googlegroups.com \
    --cc=quirin.gylstorff@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox