From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6841139815099924480 X-Received: by 2002:a5d:6884:: with SMTP id h4mr20996926wru.198.1592836558036; Mon, 22 Jun 2020 07:35:58 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:aace:: with SMTP id i14ls10709654wrc.3.gmail; Mon, 22 Jun 2020 07:35:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx41fd3ZXyS2+3KNaPY1hPChHsJ7t4dVQXcnGhH/scB7qMYXvk14kIqICKGHdl8+1TNkf6o X-Received: by 2002:adf:f745:: with SMTP id z5mr20324431wrp.128.1592836557479; Mon, 22 Jun 2020 07:35:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592836557; cv=none; d=google.com; s=arc-20160816; b=ftXnVTHUTlqpkZDOkXr4vCctG3ND2Lk1S6I5BeL25DP1O9HBYogeW9IR1Ei+OX8HBK KpyN9mewrcbraXs50lzCaIHdprPhqB0cf+u+VEw3RXxbrA3p+A6ZRvZwE4RZNoTrXhLB nVLjroHLcqjjRlyVnIQZBlWTctI/8kh3YJVcnmuQi4FpPOC/Srp2GlLohdSrmvD44ULg O/N3r0YhXKKCQ18gL9hkU82XNysDemrtAP17vAmgyKRfccObfN6At7tXnGeumH7lBbqb AxLvWakERUh6mKTL85KBsAdMKmEqvM0EwxcdG8bz0JcO0cJaQ55ciEPkGPem6bcC92QH m7qQ== 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=OGesto3OAmqiLPhLHbt4uxgV7Hi+grY529WhwAST05E=; b=qif2WGLxfL/E47Ivmemp/6IoJNlpuj2C0+j7lkX+ZooWC9E1Cv2d2jZaX8+DDtwzFW Xvrgk6Mrk6ChNhqqhht+Kl68do2RC+J49A6Z0kh1Jh2SwNxS3pqwJhGTOUULmLkAAqjO qONQBHQ6/g/MrqgmZp8XKhe71sVN+BKkuFFGXAigFxEAoqJZ98OElOuZNxexdKA405XG P4mlwvDj8WO4+TRHm5VZOeyk49dSjKlOYXta0xHN3bMvzOsU8W7SFbHXF9HOGa68AB46 pIdHJiMCDRoO5qFpBx+g1DrZSSW1ABf+NJeexrt5WlQUYidlWuuGWgpwO+1nL7z2G0P5 A8HQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of quirin.gylstorff@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=quirin.gylstorff@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 s18si499442wme.2.2020.06.22.07.35.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jun 2020 07:35:57 -0700 (PDT) Received-SPF: pass (google.com: domain of quirin.gylstorff@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 quirin.gylstorff@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=quirin.gylstorff@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 05MEZurP026592 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 22 Jun 2020 16:35:57 +0200 Received: from [139.25.69.120] (iep-nanobox-2.ppmd.siemens.net [139.25.69.120] (may be forged)) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 05MEZuuW020532; Mon, 22 Jun 2020 16:35:56 +0200 Subject: Re: [PATCH] u-boot: add libubootenv To: Jan Kiszka , isar-users@googlegroups.com References: <20200622115624.4639-1-Quirin.Gylstorff@siemens.com> <2f9ec0c4-2012-2a37-58e2-5b4e85d8b131@siemens.com> From: Gylstorff Quirin Message-ID: Date: Mon, 22 Jun 2020 16:35:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <2f9ec0c4-2012-2a37-58e2-5b4e85d8b131@siemens.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: MRYxssKUYyB9 On 6/22/20 3:04 PM, Jan Kiszka wrote: > On 22.06.20 13:56, [ext] 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 +++++++++++++++++++ > > Can we try > > inherit dpkg-gbp > > SRC_URI = "git://salsa.debian.org/debian/libubootenv.git;protocol=https" > SRCREV = "2c7cb6d941d906dcc1d2e447cc17e418485dff12" > > instead? > > Jan OK my first try with dpkg-gbp did lead to following cmake error: -- The C compiler identification is GNU 8.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done CMake Error at src/CMakeLists.txt:29 (install): install TARGETS given no RUNTIME DESTINATION for executable target "fw_printenv". CMake Error at src/CMakeLists.txt:30 (install): install TARGETS given no RUNTIME DESTINATION for executable target "fw_setenv". ... I will try to patch that. Quirin > >> .../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" >> + >> +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 >> > -- Quirin Gylstorff Siemens AG Corporate Technology Research in Digitalization and Automation Smart Embedded Systems CT RDA IOT SES-DE Otto-Hahn-Ring 6 81739 Muenchen, Germany Mobile: +49 173 3746683 mailto:quirin.gylstorff@siemens.com www.siemens.com/ingenuityforlife Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Jim Hagemann Snabe; Managing Board: Joe Kaeser, Chairman, President and Chief Executive Officer; Roland Busch, Lisa Davis, Klaus Helmrich, Cedrik Neike, Michael Sen, Ralf P. Thomas; Registered offices: Berlin and Munich, Germany; Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684; WEEE-Reg.-No. DE 23691322 Important notice: This e-mail and any attachment thereof contain corporate proprietary information. If you have received it by mistake, please notify us immediately by reply e-mail and delete this e-mail and its attachments from your system. Thank you.