* [PATCH] u-boot: add libubootenv
@ 2020-06-22 11:56 Q. Gylstorff
2020-06-22 13:04 ` Jan Kiszka
2020-06-23 10:28 ` Harald Seiler
0 siblings, 2 replies; 13+ messages in thread
From: Q. Gylstorff @ 2020-06-22 11:56 UTC (permalink / raw)
To: isar-users; +Cc: Quirin Gylstorff
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"
+
+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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] u-boot: add libubootenv
2020-06-22 11:56 [PATCH] u-boot: add libubootenv Q. Gylstorff
@ 2020-06-22 13:04 ` Jan Kiszka
2020-06-22 14:35 ` Gylstorff Quirin
2020-06-23 10:28 ` Harald Seiler
1 sibling, 1 reply; 13+ messages in thread
From: Jan Kiszka @ 2020-06-22 13:04 UTC (permalink / raw)
To: [ext] Q. Gylstorff, isar-users
On 22.06.20 13:56, [ext] 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 +++++++++++++++++++
Can we try
inherit dpkg-gbp
SRC_URI = "git://salsa.debian.org/debian/libubootenv.git;protocol=https"
SRCREV = "2c7cb6d941d906dcc1d2e447cc17e418485dff12"
instead?
Jan
> .../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"
> +
> +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
>
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] u-boot: add libubootenv
2020-06-22 13:04 ` Jan Kiszka
@ 2020-06-22 14:35 ` Gylstorff Quirin
0 siblings, 0 replies; 13+ messages in thread
From: Gylstorff Quirin @ 2020-06-22 14:35 UTC (permalink / raw)
To: Jan Kiszka, isar-users
On 6/22/20 3:04 PM, Jan Kiszka wrote:
> On 22.06.20 13:56, [ext] 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 +++++++++++++++++++
>
> 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 <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"
>> +
>> +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.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] u-boot: add libubootenv
2020-06-22 11:56 [PATCH] u-boot: add libubootenv Q. Gylstorff
2020-06-22 13:04 ` Jan Kiszka
@ 2020-06-23 10:28 ` Harald Seiler
2020-06-23 10:33 ` Jan Kiszka
2020-06-23 15:15 ` Gylstorff Quirin
1 sibling, 2 replies; 13+ messages in thread
From: Harald Seiler @ 2020-06-23 10:28 UTC (permalink / raw)
To: Q. Gylstorff, isar-users
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
> +
> +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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] u-boot: add libubootenv
2020-06-23 10:28 ` Harald Seiler
@ 2020-06-23 10:33 ` Jan Kiszka
2020-06-23 12:01 ` Harald Seiler
2020-06-23 15:15 ` Gylstorff Quirin
1 sibling, 1 reply; 13+ messages in thread
From: Jan Kiszka @ 2020-06-23 10:33 UTC (permalink / raw)
To: Harald Seiler, Q. Gylstorff, isar-users
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 <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"
u-boot-${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
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] u-boot: add libubootenv
2020-06-23 10:33 ` Jan Kiszka
@ 2020-06-23 12:01 ` Harald Seiler
2020-06-23 12:05 ` Jan Kiszka
0 siblings, 1 reply; 13+ messages in thread
From: Harald Seiler @ 2020-06-23 12:01 UTC (permalink / raw)
To: Jan Kiszka, Q. Gylstorff, isar-users
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 <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"
>
> 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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] u-boot: add libubootenv
2020-06-23 12:01 ` Harald Seiler
@ 2020-06-23 12:05 ` Jan Kiszka
0 siblings, 0 replies; 13+ messages in thread
From: Jan Kiszka @ 2020-06-23 12:05 UTC (permalink / raw)
To: Harald Seiler, Q. Gylstorff, isar-users
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 <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"
>>
>> 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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] u-boot: add libubootenv
2020-06-23 10:28 ` Harald Seiler
2020-06-23 10:33 ` Jan Kiszka
@ 2020-06-23 15:15 ` Gylstorff Quirin
2020-06-24 8:49 ` Harald Seiler
1 sibling, 1 reply; 13+ messages in thread
From: Gylstorff Quirin @ 2020-06-23 15:15 UTC (permalink / raw)
To: Harald Seiler, isar-users
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.
Quirin
>> +
>> +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,
>
--
Quirin
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] u-boot: add libubootenv
2020-06-23 15:15 ` Gylstorff Quirin
@ 2020-06-24 8:49 ` Harald Seiler
2020-06-24 8:53 ` Jan Kiszka
0 siblings, 1 reply; 13+ messages in thread
From: Harald Seiler @ 2020-06-24 8:49 UTC (permalink / raw)
To: Gylstorff Quirin, isar-users; +Cc: Jan Kiszka
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?
>
> Quirin
>
> > > +
> > > +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,
> >
>
> --
> Quirin
>
--
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] u-boot: add libubootenv
2020-06-24 8:49 ` Harald Seiler
@ 2020-06-24 8:53 ` Jan Kiszka
2020-08-17 8:24 ` [PATCH v2] " Q. Gylstorff
0 siblings, 1 reply; 13+ messages in thread
From: Jan Kiszka @ 2020-06-24 8:53 UTC (permalink / raw)
To: Harald Seiler, Gylstorff Quirin, isar-users
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2] u-boot: add libubootenv
2020-06-24 8:53 ` Jan Kiszka
@ 2020-08-17 8:24 ` Q. Gylstorff
2020-08-31 16:35 ` Jan Kiszka
0 siblings, 1 reply; 13+ messages in thread
From: Q. Gylstorff @ 2020-08-17 8:24 UTC (permalink / raw)
To: isar-users; +Cc: Quirin Gylstorff
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.
This patch uses dpkg-gdb to build the package from salsa.debian.org and adds
a fix for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=967487.
Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
Changes V2:
- use dpkg-gbd instead dpkg
- use salsa.debian.org as source
- add fix for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=967487
meta-isar/conf/machine/de0-nano-soc.conf | 2 +-
.../0002-Add-support-GNUInstallDirs.patch | 48 +++++++++++++++++++
.../libubootenv/libubootenv_0.2.bb | 30 ++++++++++++
.../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 -
6 files changed, 79 insertions(+), 5 deletions(-)
create mode 100644 meta/recipes-bsp/libubootenv/files/0002-Add-support-GNUInstallDirs.patch
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/0002-Add-support-GNUInstallDirs.patch b/meta/recipes-bsp/libubootenv/files/0002-Add-support-GNUInstallDirs.patch
new file mode 100644
index 0000000..f8c3038
--- /dev/null
+++ b/meta/recipes-bsp/libubootenv/files/0002-Add-support-GNUInstallDirs.patch
@@ -0,0 +1,48 @@
+From b17d194bd8285a19382a902a0bec9e5e042df064 Mon Sep 17 00:00:00 2001
+From: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
+Date: Tue, 16 Apr 2019 08:52:01 +0900
+Subject: [PATCH 2/4] Add support GNUInstallDirs
+
+This adds the functionality of the module "GNUInstallDirs" to make the
+installation compatible with GNU.
+
+https://cmake.org/cmake/help/v3.14/module/GNUInstallDirs.html
+
+Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
+---
+ CMakeLists.txt | 2 ++
+ src/CMakeLists.txt | 8 ++++----
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 104969e..57477fc 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -10,6 +10,8 @@ add_definitions(-DVERSION="${VERSION}")
+
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
+
++include("GNUInstallDirs")
++
+ #set(CMAKE_C_FLAGS_DEBUG "-g")
+ include_directories ("${PROJECT_SOURCE_DIR}/src")
+ add_subdirectory (src)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index ea5979c..d97f221 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -19,7 +19,7 @@ add_executable(fw_setenv fw_setenv.c)
+ target_link_libraries(fw_printenv ubootenv z)
+ target_link_libraries(fw_setenv ubootenv z)
+
+-install (TARGETS ubootenv DESTINATION lib)
+-install (FILES libuboot.h DESTINATION include)
+-install (TARGETS fw_printenv DESTINATION bin)
+-install (TARGETS fw_setenv DESTINATION bin)
++install (TARGETS ubootenv DESTINATION "${CMAKE_INSTALL_LIBDIR}")
++install (FILES libuboot.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
++install (TARGETS fw_printenv DESTINATION "${CMAKE_INSTALL_BINDIR}")
++install (TARGETS fw_setenv DESTINATION "${CMAKE_INSTALL_BINDIR}")
+--
+2.20.1
+
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..995e581
--- /dev/null
+++ b/meta/recipes-bsp/libubootenv/libubootenv_0.2.bb
@@ -0,0 +1,30 @@
+# libubootenv
+#
+# This software is a part of ISAR.
+# Copyright (c) Siemens AG, 2020
+#
+# SPDX-License-Identifier: MIT
+
+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"
+
+inherit dpkg-gbp
+
+SRC_URI = "git://salsa.debian.org/debian/libubootenv.git;protocol=https \
+ file://0002-Add-support-GNUInstallDirs.patch;apply=no "
+SRCREV = "2c7cb6d941d906dcc1d2e447cc17e418485dff12"
+
+S = "${WORKDIR}/git"
+
+do_prepare_build() {
+ cd ${S}
+ export QUILT_PATCHES=debian/patches
+ quilt import -f ${WORKDIR}/*.patch
+ quilt push -a
+}
+
+dpkg_runbuild_prepend() {
+ export DEB_BUILD_OPTIONS="nocheck"
+}
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2] u-boot: add libubootenv
2020-08-17 8:24 ` [PATCH v2] " Q. Gylstorff
@ 2020-08-31 16:35 ` Jan Kiszka
2020-10-13 10:29 ` Jan Kiszka
0 siblings, 1 reply; 13+ messages in thread
From: Jan Kiszka @ 2020-08-31 16:35 UTC (permalink / raw)
To: [ext] Q. Gylstorff, isar-users
On 17.08.20 10:24, [ext] 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.
>
> This patch uses dpkg-gdb to build the package from salsa.debian.org and adds
> a fix for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=967487.
>
> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> ---
>
> Changes V2:
> - use dpkg-gbd instead dpkg
> - use salsa.debian.org as source
> - add fix for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=967487
>
> meta-isar/conf/machine/de0-nano-soc.conf | 2 +-
> .../0002-Add-support-GNUInstallDirs.patch | 48 +++++++++++++++++++
> .../libubootenv/libubootenv_0.2.bb | 30 ++++++++++++
> .../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 -
> 6 files changed, 79 insertions(+), 5 deletions(-)
> create mode 100644 meta/recipes-bsp/libubootenv/files/0002-Add-support-GNUInstallDirs.patch
> 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/0002-Add-support-GNUInstallDirs.patch b/meta/recipes-bsp/libubootenv/files/0002-Add-support-GNUInstallDirs.patch
> new file mode 100644
> index 0000000..f8c3038
> --- /dev/null
> +++ b/meta/recipes-bsp/libubootenv/files/0002-Add-support-GNUInstallDirs.patch
> @@ -0,0 +1,48 @@
> +From b17d194bd8285a19382a902a0bec9e5e042df064 Mon Sep 17 00:00:00 2001
> +From: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> +Date: Tue, 16 Apr 2019 08:52:01 +0900
> +Subject: [PATCH 2/4] Add support GNUInstallDirs
> +
> +This adds the functionality of the module "GNUInstallDirs" to make the
> +installation compatible with GNU.
> +
> +https://cmake.org/cmake/help/v3.14/module/GNUInstallDirs.html
> +
> +Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> +---
> + CMakeLists.txt | 2 ++
> + src/CMakeLists.txt | 8 ++++----
> + 2 files changed, 6 insertions(+), 4 deletions(-)
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index 104969e..57477fc 100644
> +--- a/CMakeLists.txt
> ++++ b/CMakeLists.txt
> +@@ -10,6 +10,8 @@ add_definitions(-DVERSION="${VERSION}")
> +
> + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
> +
> ++include("GNUInstallDirs")
> ++
> + #set(CMAKE_C_FLAGS_DEBUG "-g")
> + include_directories ("${PROJECT_SOURCE_DIR}/src")
> + add_subdirectory (src)
> +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
> +index ea5979c..d97f221 100644
> +--- a/src/CMakeLists.txt
> ++++ b/src/CMakeLists.txt
> +@@ -19,7 +19,7 @@ add_executable(fw_setenv fw_setenv.c)
> + target_link_libraries(fw_printenv ubootenv z)
> + target_link_libraries(fw_setenv ubootenv z)
> +
> +-install (TARGETS ubootenv DESTINATION lib)
> +-install (FILES libuboot.h DESTINATION include)
> +-install (TARGETS fw_printenv DESTINATION bin)
> +-install (TARGETS fw_setenv DESTINATION bin)
> ++install (TARGETS ubootenv DESTINATION "${CMAKE_INSTALL_LIBDIR}")
> ++install (FILES libuboot.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
> ++install (TARGETS fw_printenv DESTINATION "${CMAKE_INSTALL_BINDIR}")
> ++install (TARGETS fw_setenv DESTINATION "${CMAKE_INSTALL_BINDIR}")
> +--
> +2.20.1
> +
> 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..995e581
> --- /dev/null
> +++ b/meta/recipes-bsp/libubootenv/libubootenv_0.2.bb
> @@ -0,0 +1,30 @@
> +# libubootenv
> +#
> +# This software is a part of ISAR.
> +# Copyright (c) Siemens AG, 2020
> +#
> +# SPDX-License-Identifier: MIT
> +
> +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"
> +
> +inherit dpkg-gbp
> +
> +SRC_URI = "git://salsa.debian.org/debian/libubootenv.git;protocol=https \
> + file://0002-Add-support-GNUInstallDirs.patch;apply=no "
> +SRCREV = "2c7cb6d941d906dcc1d2e447cc17e418485dff12"
> +
> +S = "${WORKDIR}/git"
> +
> +do_prepare_build() {
> + cd ${S}
> + export QUILT_PATCHES=debian/patches
> + quilt import -f ${WORKDIR}/*.patch
> + quilt push -a
> +}
> +
> +dpkg_runbuild_prepend() {
> + export DEB_BUILD_OPTIONS="nocheck"
> +}
Inconsitent indention of the functions.
> 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
>
Looks good to me otherwise - and we are already using it in production IIRC.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2] u-boot: add libubootenv
2020-08-31 16:35 ` Jan Kiszka
@ 2020-10-13 10:29 ` Jan Kiszka
0 siblings, 0 replies; 13+ messages in thread
From: Jan Kiszka @ 2020-10-13 10:29 UTC (permalink / raw)
To: [ext] Q. Gylstorff, isar-users
On 31.08.20 18:35, [ext] Jan Kiszka wrote:
> On 17.08.20 10:24, [ext] 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.
>>
>> This patch uses dpkg-gdb to build the package from salsa.debian.org and adds
>> a fix for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=967487.
>>
>> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>> ---
>>
>> Changes V2:
>> - use dpkg-gbd instead dpkg
>> - use salsa.debian.org as source
>> - add fix for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=967487
>>
>> meta-isar/conf/machine/de0-nano-soc.conf | 2 +-
>> .../0002-Add-support-GNUInstallDirs.patch | 48 +++++++++++++++++++
>> .../libubootenv/libubootenv_0.2.bb | 30 ++++++++++++
>> .../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 -
>> 6 files changed, 79 insertions(+), 5 deletions(-)
>> create mode 100644 meta/recipes-bsp/libubootenv/files/0002-Add-support-GNUInstallDirs.patch
>> 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/0002-Add-support-GNUInstallDirs.patch b/meta/recipes-bsp/libubootenv/files/0002-Add-support-GNUInstallDirs.patch
>> new file mode 100644
>> index 0000000..f8c3038
>> --- /dev/null
>> +++ b/meta/recipes-bsp/libubootenv/files/0002-Add-support-GNUInstallDirs.patch
>> @@ -0,0 +1,48 @@
>> +From b17d194bd8285a19382a902a0bec9e5e042df064 Mon Sep 17 00:00:00 2001
>> +From: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
>> +Date: Tue, 16 Apr 2019 08:52:01 +0900
>> +Subject: [PATCH 2/4] Add support GNUInstallDirs
>> +
>> +This adds the functionality of the module "GNUInstallDirs" to make the
>> +installation compatible with GNU.
>> +
>> +https://cmake.org/cmake/help/v3.14/module/GNUInstallDirs.html
>> +
>> +Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
>> +---
>> + CMakeLists.txt | 2 ++
>> + src/CMakeLists.txt | 8 ++++----
>> + 2 files changed, 6 insertions(+), 4 deletions(-)
>> +
>> +diff --git a/CMakeLists.txt b/CMakeLists.txt
>> +index 104969e..57477fc 100644
>> +--- a/CMakeLists.txt
>> ++++ b/CMakeLists.txt
>> +@@ -10,6 +10,8 @@ add_definitions(-DVERSION="${VERSION}")
>> +
>> + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
>> +
>> ++include("GNUInstallDirs")
>> ++
>> + #set(CMAKE_C_FLAGS_DEBUG "-g")
>> + include_directories ("${PROJECT_SOURCE_DIR}/src")
>> + add_subdirectory (src)
>> +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
>> +index ea5979c..d97f221 100644
>> +--- a/src/CMakeLists.txt
>> ++++ b/src/CMakeLists.txt
>> +@@ -19,7 +19,7 @@ add_executable(fw_setenv fw_setenv.c)
>> + target_link_libraries(fw_printenv ubootenv z)
>> + target_link_libraries(fw_setenv ubootenv z)
>> +
>> +-install (TARGETS ubootenv DESTINATION lib)
>> +-install (FILES libuboot.h DESTINATION include)
>> +-install (TARGETS fw_printenv DESTINATION bin)
>> +-install (TARGETS fw_setenv DESTINATION bin)
>> ++install (TARGETS ubootenv DESTINATION "${CMAKE_INSTALL_LIBDIR}")
>> ++install (FILES libuboot.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
>> ++install (TARGETS fw_printenv DESTINATION "${CMAKE_INSTALL_BINDIR}")
>> ++install (TARGETS fw_setenv DESTINATION "${CMAKE_INSTALL_BINDIR}")
>> +--
>> +2.20.1
>> +
>> 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..995e581
>> --- /dev/null
>> +++ b/meta/recipes-bsp/libubootenv/libubootenv_0.2.bb
>> @@ -0,0 +1,30 @@
>> +# libubootenv
>> +#
>> +# This software is a part of ISAR.
>> +# Copyright (c) Siemens AG, 2020
>> +#
>> +# SPDX-License-Identifier: MIT
>> +
>> +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"
>> +
>> +inherit dpkg-gbp
>> +
>> +SRC_URI = "git://salsa.debian.org/debian/libubootenv.git;protocol=https \
>> + file://0002-Add-support-GNUInstallDirs.patch;apply=no "
>> +SRCREV = "2c7cb6d941d906dcc1d2e447cc17e418485dff12"
>> +
>> +S = "${WORKDIR}/git"
>> +
>> +do_prepare_build() {
>> + cd ${S}
>> + export QUILT_PATCHES=debian/patches
>> + quilt import -f ${WORKDIR}/*.patch
>> + quilt push -a
>> +}
>> +
>> +dpkg_runbuild_prepend() {
>> + export DEB_BUILD_OPTIONS="nocheck"
>> +}
>
> Inconsitent indention of the functions.
>
>> 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
>>
>
> Looks good to me otherwise - and we are already using it in production IIRC.
>
> Jan
>
Could you address my comment and check if this still applies over next?
Thanks,
Jan
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2020-10-13 10:29 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-22 11:56 [PATCH] u-boot: add libubootenv 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
2020-08-17 8:24 ` [PATCH v2] " Q. Gylstorff
2020-08-31 16:35 ` Jan Kiszka
2020-10-13 10:29 ` Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox