Skip to contentSkip to conversation

mender updates

PATCH New aduskett at gmail.com 2 participants 10 messages Mar 7, 2021 – Mar 15, 2021

lore
Share & tools
lore
#0 lore raw

cover mender updates

From: Adam Duskett <[email protected]>

The upstream developers asked me to update the mender packages as a favor, as they are pretty outdated right now.

This patch series includes updates to all of the mender packages and a small change that removes auto-selecting uboot-tools if uboot is selected in mender/Config.in (the patch itself has an explination as to why.)

Adam Duskett (4):
package/mender-artifact: bump to version 3.4.1
package/mender: bump version to 2.4.2
package/mender-grubenv: bump version to

    f39c2c7ec7c9c24aae0108a9b04a0e6e61a3e96b

package/mender: Do not automatically select uboot tools if uboot is
selected

 package/mender-artifact/mender-artifact.hash |  7 ++++---
 package/mender-artifact/mender-artifact.mk   |  5 +++--
 package/mender-grubenv/mender-grubenv.hash   |  4 ++--
 package/mender-grubenv/mender-grubenv.mk     |  4 ++--
 package/mender/Config.in                     | 15 +++++++++++++--
 package/mender/mender.hash                   | 16 +++++++++-------
 package/mender/mender.mk                     | 13 ++++++++-----
 7 files changed, 41 insertions(+), 23 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/4 package/mender-artifact: bump to version 3.4.1

From: Adam Duskett <[email protected]>

Also:
- Set new License hashes due to new dependencies.

---
 package/mender-artifact/mender-artifact.hash | 7 ++++---
 package/mender-artifact/mender-artifact.mk   | 5 +++--
 2 files changed, 7 insertions(+), 5 deletions(-)
package/mender-artifact/mender-artifact.hash +4 -3
index a9fba2971e..a3af951997 100644
@@ -1,6 +1,6 @@
 # Locally computed:
-sha256  c085479a6e2ae598687a15b646bfaaa68e5d76d08382bdcc4a27a9b4021d6540  mender-artifact-3.4.0.tar.gz
-sha256  08b0209abb7e87bb1d21aca8a40693b7d29406d1edffd443f17c59d5d68f6467  LIC_FILES_CHKSUM.sha256
+sha256  5a3c204fb68bdc793e7e11cd631a4463b2fa6f325a2b9b8b795ef4f3160e6e36  mender-artifact-3.4.1.tar.gz
+sha256  cb0d00827fd4fc3329c9ec0aa510a811b375cb17537c0f46a94852cc7aa199f6  LIC_FILES_CHKSUM.sha256
 
 # License hash extracted from LIC_FILES_CHKSUM.sha256 using the
 # following command:
@@ -8,7 +8,7 @@ sha256  08b0209abb7e87bb1d21aca8a40693b7d29406d1edffd443f17c59d5d68f6467  LIC_FI
 #     sed '/^[A-Za-z0-9_]/s/^/sha256  /' LIC_FILES_CHKSUM.sha256
 
 # Apache 2.0 licenses.
-sha256  32714818ad6f98ee0185a52e23a475d89122e3efd2b2c26c733781c28e798c99  LICENSE
+sha256  b4acfcfa2a0ba1a8c82ec3965fbcee886cff8394ca4214e0ddac0a36beb1e05a  LICENSE
 sha256  32714818ad6f98ee0185a52e23a475d89122e3efd2b2c26c733781c28e798c99  vendor/github.com/mendersoftware/mendertesting/LICENSE
 sha256  cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  vendor/github.com/minio/sha256-simd/LICENSE
 sha256  b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1  vendor/gopkg.in/yaml.v2/LICENSE
@@ -34,3 +34,4 @@ sha256  51a0c9ec7f8b7634181b8d4c03e5b5d204ac21d6e72f46c313973424664b2e6b  vendor
 sha256  7709cc030f078b17809884f92f33a2016944e1180312dc3f1371b02313d313ed  vendor/github.com/klauspost/pgzip/LICENSE
 sha256  a55959c4e3e8917bfa857359bb641115336276a6cc97408fd8197e079fb18470  vendor/github.com/cpuguy83/go-md2man/v2/LICENSE.md
 sha256  c8024e31c1de453fea90f22a221968835cc7af9d520274a2576c9ec9976055b0  vendor/github.com/shurcooL/sanitized_anchor_name/LICENSE
+sha256  a94710b55e03b5285f77d048c5ba61bb9d6ee04a06c0eb90e68821e11b0c707a  vendor/gopkg.in/yaml.v2/LICENSE.libyaml
package/mender-artifact/mender-artifact.mk +3 -2
index b2310d5bc2..162f57eee3 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-HOST_MENDER_ARTIFACT_VERSION = 3.4.0
+HOST_MENDER_ARTIFACT_VERSION = 3.4.1
 HOST_MENDER_ARTIFACT_SITE = $(call github,mendersoftware,mender-artifact,$(HOST_MENDER_ARTIFACT_VERSION))
 HOST_MENDER_ARTIFACT_LICENSE = Apache2.0, BSD-2-Clause, BSD-3-Clause, ISC, MIT
 HOST_MENDER_ARTIFACT_LICENSE_FILES = \
@@ -26,7 +26,8 @@ HOST_MENDER_ARTIFACT_LICENSE_FILES = \
 	vendor/github.com/sirupsen/logrus/LICENSE \
 	vendor/github.com/klauspost/pgzip/LICENSE \
 	vendor/github.com/cpuguy83/go-md2man/v2/LICENSE.md \
-	vendor/github.com/shurcooL/sanitized_anchor_name/LICENSE
+	vendor/github.com/shurcooL/sanitized_anchor_name/LICENSE \
+	vendor/gopkg.in/yaml.v2/LICENSE.libyaml
 
 HOST_MENDER_ARTIFACT_DEPENDENCIES = host-xz
 
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/4 package/mender: bump version to 2.4.2

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

Other changes:
- Openssl is now a dependency.
- Set new license hashes due to new dependencies.
- Set new license file hash due to a year change.

---
 package/mender/Config.in   |  1 +
 package/mender/mender.hash | 16 +++++++++-------
 package/mender/mender.mk   | 13 ++++++++-----
 3 files changed, 18 insertions(+), 12 deletions(-)
package/mender/Config.in +1 -0
index 5cb3a3f2e0..6a80c410ce 100644
@@ -3,6 +3,7 @@ config BR2_PACKAGE_MENDER
 	depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
 	depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
 	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_XZ
 	select BR2_PACKAGE_UBOOT_TOOLS if BR2_TARGET_UBOOT # runtime
 	select BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV if BR2_TARGET_UBOOT # runtime
package/mender/mender.hash +9 -7
index f1eef656fe..43bb92d6ed 100644
@@ -1,13 +1,14 @@
 # Locally computed:
-sha256  d7c885a34f7b7f9969970132411225895c136e22be0caaa6dd3e08ca4bb71ff9  2.3.0.tar.gz
+sha256  ff9dccef31b0c6c1710ee767f8f05bc8038034e50968b207ee1a09a10f801ab4  2.4.2.tar.gz
 
 # Vendor licenses
 # Generated with sed '/^[A-Za-z0-9_]/s/^/sha256  /' LIC_FILES_CHKSUM.sha256
 
 # Apache-2.0 license.
-sha256  32714818ad6f98ee0185a52e23a475d89122e3efd2b2c26c733781c28e798c99  LICENSE
+sha256  b4acfcfa2a0ba1a8c82ec3965fbcee886cff8394ca4214e0ddac0a36beb1e05a  LICENSE
 sha256  32714818ad6f98ee0185a52e23a475d89122e3efd2b2c26c733781c28e798c99  vendor/github.com/mendersoftware/mendertesting/LICENSE
 sha256  32714818ad6f98ee0185a52e23a475d89122e3efd2b2c26c733781c28e798c99  vendor/github.com/mendersoftware/mender-artifact/LICENSE
+sha256  73ba74dfaa520b49a401b5d21459a8523a146f3b7518a833eea5efa85130bf68  vendor/github.com/mendersoftware/openssl/LICENSE
 #
 # BSD 2 Clause license.
 sha256  8d427fd87bc9579ea368fde3d49f9ca22eac857f91a9dec7e3004bdfab7dee86  vendor/github.com/pkg/errors/LICENSE
@@ -26,14 +27,15 @@ sha256  1b93a317849ee09d3d7e4f1d20c2b78ddb230b4becb12d7c224c927b9d470251  vendor
 #
 # MIT license.
 sha256  51a0c9ec7f8b7634181b8d4c03e5b5d204ac21d6e72f46c313973424664b2e6b  vendor/github.com/sirupsen/logrus/LICENSE
-sha256  dad2b0b2cc2dbdbf95ad5d800ef7588956e74dc2479014829d42be295125c25d  vendor/github.com/stretchr/testify/LICENSE
-sha256  402f39eed8a1851385d0703999aa9f23d067c2ea3e15c63c074e389cbf8f8f8f  vendor/github.com/stretchr/testify/LICENCE.txt
-sha256  fde7d610b9b95fc5a6304055c4dae951025b630aaa42a24e95ebf76675ae832c  vendor/github.com/stretchr/objx/LICENSE.md
+sha256  f8e536c1c7b695810427095dc85f5f80d44ff7c10535e8a9486cf393e2599189  vendor/github.com/stretchr/testify/LICENSE
 sha256  ffa15bdce332058a03a1d923910864fb6e58bf6df66a0e3914284725b327183e  vendor/github.com/ungerik/go-sysfs/LICENSE
-sha256  da277af11b85227490377fbcac6afccc68be560c4fff36ac05ca62de55345fd7  vendor/github.com/urfave/cli/LICENSE
+sha256  da277af11b85227490377fbcac6afccc68be560c4fff36ac05ca62de55345fd7  vendor/github.com/urfave/cli/v2/LICENSE
+sha256  b2663894033a05fd80261176cd8da1d72546e25842d5c1abcc852ca23b6b61b0  vendor/github.com/stretchr/objx/LICENSE
+sha256  95b8ef9c4137a8f75ddd3101ffdc4cfd594fa875b261697b68baddc16b0e537c  vendor/github.com/konsorten/go-windows-terminal-sequences/LICENSE
+sha256  d18f6323b71b0b768bb5e9616e36da390fbd39369a81807cca352de4e4e6aa0b  vendor/gopkg.in/yaml.v3/LICENSE
 #
 # OpenLDAP Public License
 sha256  310fe25c858a9515fc8c8d7d1f24a67c9496f84a91e0a0e41ea9975b1371e569  vendor/github.com/bmatsuo/lmdb-go/LICENSE.mdb.md
 
 # sha256 of all the vendor licenses combined
-sha256  39f8e574fa6d082b650a5d6159045cdec7c4662da6ccbd67271079904353b8d5  LIC_FILES_CHKSUM.sha256
+sha256  d872f963cdd188b384eb673bf11002e4afb94830710f420a3f3d322695801847  LIC_FILES_CHKSUM.sha256
package/mender/mender.mk +7 -5
index ca24b853b5..082c0156d6 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-MENDER_VERSION = 2.3.0
+MENDER_VERSION = 2.4.2
 MENDER_SITE = https://github.com/mendersoftware/mender/archive
 MENDER_SOURCE = $(MENDER_VERSION).tar.gz
 MENDER_LICENSE = Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC, MIT, OLDAP-2.8
@@ -16,6 +16,7 @@ MENDER_LICENSE_FILES = \
 	LIC_FILES_CHKSUM.sha256 \
 	vendor/github.com/mendersoftware/mendertesting/LICENSE \
 	vendor/github.com/mendersoftware/mender-artifact/LICENSE \
+	vendor/github.com/mendersoftware/openssl/LICENSE \
 	vendor/github.com/pkg/errors/LICENSE \
 	vendor/github.com/pmezard/go-difflib/LICENSE \
 	vendor/golang.org/x/crypto/LICENSE \
@@ -27,13 +28,14 @@ MENDER_LICENSE_FILES = \
 	vendor/github.com/davecgh/go-spew/LICENSE \
 	vendor/github.com/sirupsen/logrus/LICENSE \
 	vendor/github.com/stretchr/testify/LICENSE \
-	vendor/github.com/stretchr/testify/LICENCE.txt \
-	vendor/github.com/stretchr/objx/LICENSE.md \
 	vendor/github.com/ungerik/go-sysfs/LICENSE \
-	vendor/github.com/urfave/cli/LICENSE \
+	vendor/github.com/urfave/cli/v2/LICENSE \
+	vendor/github.com/stretchr/objx/LICENSE \
+	vendor/github.com/konsorten/go-windows-terminal-sequences/LICENSE \
+	vendor/gopkg.in/yaml.v3/LICENSE \
 	vendor/github.com/bmatsuo/lmdb-go/LICENSE.mdb.md
 
-MENDER_DEPENDENCIES = xz
+MENDER_DEPENDENCIES = openssl xz
 
 MENDER_LDFLAGS = -X main.Version=$(MENDER_VERSION)
 
Signature · 1 line
2.25.1
#3 lore raw

PATCH 3/4 package/mender-grubenv: bump version to f39c2c7ec7c9c24aae0108a9b04a0e6e61a3e96b

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

According to the developers, mender-grubenv is no longer tagging releases for the mender-grubenv project. However, they asked me if I could submit a patch upstream to update the package to the latest commit, including quality of life improvements since the last official 1.3.0 release.

Notable improvements are:
- Support for separate A/B kernel partitions.
- Use regexp to dynamically set mender_grub_storage_device
- Add "rootwait" as a default rootfs argument

Other changes:
- Update license hashes due to a copyright year bump.

---
 package/mender-grubenv/mender-grubenv.hash | 4 ++--
 package/mender-grubenv/mender-grubenv.mk   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
package/mender-grubenv/mender-grubenv.hash +2 -2
index 1b1eaa758a..b6b9db72a7 100644
@@ -1,3 +1,3 @@
 # Locally computed
-sha256 e50cc18a844e3fd1edef7af9224733b0338a34d51f1186ee19803ef7af1a5065 mender-grubenv-1.3.0.tar.gz
-sha256 98ed35b5a138f58164b5c0dbccd9d7f01ef4d84b9dba01e896f0a3241c50c0f7 LICENSE
+sha256 5be4222a6934813da431ae472a633e766b73f4614020745b777c15c65bcfd032 mender-grubenv-f39c2c7ec7c9c24aae0108a9b04a0e6e61a3e96b.tar.gz
+sha256 32714818ad6f98ee0185a52e23a475d89122e3efd2b2c26c733781c28e798c99 LICENSE
package/mender-grubenv/mender-grubenv.mk +2 -2
index 6e38557eb3..ade0f4c0ed 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-MENDER_GRUBENV_VERSION = 1.3.0
+MENDER_GRUBENV_VERSION = f39c2c7ec7c9c24aae0108a9b04a0e6e61a3e96b
 MENDER_GRUBENV_SITE = $(call github,mendersoftware,grub-mender-grubenv,$(MENDER_GRUBENV_VERSION))
 MENDER_GRUBENV_LICENSE = Apache-2.0
 MENDER_GRUBENV_LICENSE_FILES = LICENSE
@@ -30,7 +30,7 @@ MENDER_GRUBENV_DEFINES = \
 
 # These grub modules must be built in for the grub scripts to work properly.
 # Without them, the system will not boot.
-MENDER_GRUBENV_MANDATORY_MODULES=loadenv hashsum echo halt gcry_sha256 test
+MENDER_GRUBENV_MANDATORY_MODULES=loadenv hashsum echo halt gcry_sha256 test regexp
 MENDER_GRUBENV_MODULES_MISSING = \
 	$(filter-out $(call qstrip,$(BR2_TARGET_GRUB2_BUILTIN_MODULES)),\
 		$(MENDER_GRUBENV_MANDATORY_MODULES))
Signature · 1 line
2.25.1
#4 lore raw

PATCH 4/4 package/mender: Do not automatically select uboot tools if uboot is selected

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

Because uboot requires a set of unique patches for each board, the upstream package developers are phasing out supporting uboot wherever possible. Instead, they recommend using Grub as a secondary bootloader and using mender-grubenv whenever possible.

As such, remove selecting uboot tools when uboot is selected, and instead add a note in the help section about what Mender requires for uboot and grub-based systems.

---
 package/mender/Config.in | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
package/mender/Config.in +12 -2
index 6a80c410ce..6c84157734 100644
@@ -5,14 +5,24 @@ config BR2_PACKAGE_MENDER
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_XZ
-	select BR2_PACKAGE_UBOOT_TOOLS if BR2_TARGET_UBOOT # runtime
-	select BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV if BR2_TARGET_UBOOT # runtime
 	help
 	  Mender is an open source over-the-air (OTA) software updater
 	  for embedded Linux devices. Mender comprises a client
 	  running at the embedded device, as well as a server that
 	  manages deployments across many devices.
 
+	  Note:
+	  For systems using uboot as the bootloader:
+	    - uboot must be patched with the mender uboot patches.
+	    - uboot-tools must be selected.
+	    - fw_printenv must be functional on the device.
+
+	  For systems using Grub as the bootloader:
+	    - Mender depends on the mender-grubenv package.
+
+	  The mender project recommends using uboot to load Grub as a
+	  secondary bootloader when possible.
+
 	  https://github.com/mendersoftware/mender
 
 comment "mender needs a toolchain w/ threads"
Signature · 1 line
2.25.1
#5 lore raw

PATCH 4/4 package/mender: Do not automatically select uboot tools if uboot is selected

Hello Adam,

package/mender/Config.in config BR2_PACKAGE_MENDER · line 9

Quoted 10 lines · On Sun, 7 Mar 2021 14:25:36 -0800 aduskett at gmail.com wrote:
package/mender/Config.in +0 -2
index 6a80c410ce..6c84157734 100644
@@ -5,14 +5,24 @@ config BR2_PACKAGE_MENDER
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_XZ
-	select BR2_PACKAGE_UBOOT_TOOLS if BR2_TARGET_UBOOT # runtime
-	select BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV if BR2_TARGET_UBOOT # runtime

It's a bit odd to drop these.

package/mender/Config.in config BR2_PACKAGE_MENDER · line 18

Quoted 11 lines
package/mender/Config.in +5 -0
 	help
 	  Mender is an open source over-the-air (OTA) software updater
 	  for embedded Linux devices. Mender comprises a client
 	  running at the embedded device, as well as a server that
 	  manages deployments across many devices.
 
+	  Note:
+	  For systems using uboot as the bootloader:
+	    - uboot must be patched with the mender uboot patches.
+	    - uboot-tools must be selected.
+	    - fw_printenv must be functional on the device.

Indeed, here you are precisely saying that fw_printenv is needed. What about keeping the selects *and* adding your Config.in comment, perhaps without the "uboot-tools must be selected". It would be nice to have some more specific reference to the Mender U-Boot patches.

package/mender/Config.in config BR2_PACKAGE_MENDER · line 21

Quoted 2 lines
package/mender/Config.in +2 -0
+	  For systems using Grub as the bootloader:
+	    - Mender depends on the mender-grubenv package.

What about selecting BR2_PACKAGE_MENDER_GRUBENV then when BR2_TARGET_GRUB is enabled?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#6 lore raw

PATCH 4/4 package/mender: Do not automatically select uboot tools if uboot is selected

Quoted 6 lines · Thomas Petazzoni

Hello Adam,

On Sun, 7 Mar 2021 14:25:36 -0800
aduskett at gmail.com wrote:

Quoted 13 lines

package/mender/Config.in config BR2_PACKAGE_MENDER · line 9

Quoted 10 lines
package/mender/Config.in +0 -2
index 6a80c410ce..6c84157734 100644
@@ -5,14 +5,24 @@ config BR2_PACKAGE_MENDER
      depends on BR2_TOOLCHAIN_HAS_THREADS
      select BR2_PACKAGE_OPENSSL
      select BR2_PACKAGE_XZ
-     select BR2_PACKAGE_UBOOT_TOOLS if BR2_TARGET_UBOOT # runtime
-     select BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV if BR2_TARGET_UBOOT # runtime

It's a bit odd to drop these.

Not really, because mender-grubenv has it's own fake fw_printenv.

Quoted 12 lines

package/mender/Config.in config BR2_PACKAGE_MENDER · line 18

Quoted 11 lines
package/mender/Config.in +5 -0
      help
        Mender is an open source over-the-air (OTA) software updater
        for embedded Linux devices. Mender comprises a client
        running at the embedded device, as well as a server that
        manages deployments across many devices.
 
+       Note:
+       For systems using uboot as the bootloader:
+         - uboot must be patched with the mender uboot patches.
+         - uboot-tools must be selected.
+         - fw_printenv must be functional on the device.
Quoted 4 lines

Indeed, here you are precisely saying that fw_printenv is needed. What about keeping the selects *and* adding your Config.in comment, perhaps without the "uboot-tools must be selected". It would be nice to have some more specific reference to the Mender U-Boot patches.

The problem with this suggestion is that mender-grubenv has its own fw_printenv. So if both were built then
uboot's fw_printenv may be built last, which would overwrite the fw_printenv provided by mender-grubenv.

I could provide a URL to the meta-mender repository for links to the uboot patches. Would that work?

Quoted 14 lines

package/mender/Config.in config BR2_PACKAGE_MENDER · line 21

Quoted 3 lines
package/mender/Config.in +2 -0
+       For systems using Grub as the bootloader:
+         - Mender depends on the mender-grubenv package.

What about selecting BR2_PACKAGE_MENDER_GRUBENV then when BR2_TARGET_GRUB is enabled?

Thanks!

Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

#7 lore raw

PATCH 4/4 package/mender: Do not automatically select uboot tools if uboot is selected

Quoted 19 lines · On Mon, 15 Mar 2021 08:44:35 -0700 Adam Duskett <[email protected]> wrote:
Quoted 5 lines

package/mender/Config.in config BR2_PACKAGE_MENDER · line 9

Quoted 2 lines
package/mender/Config.in +0 -2
-     select BR2_PACKAGE_UBOOT_TOOLS if BR2_TARGET_UBOOT # runtime
-     select BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV if BR2_TARGET_UBOOT # runtime  

It's a bit odd to drop these.

Not really, because mender-grubenv has it's own fake fw_printenv.

Quoted 12 lines
Quoted 11 lines

help
Mender is an open source over-the-air (OTA) software updater for embedded Linux devices. Mender comprises a client running at the embedded device, as well as a server that manages deployments across many devices.

package/mender/Config.in +5 -0
+       Note:
+       For systems using uboot as the bootloader:
+         - uboot must be patched with the mender uboot patches.
+         - uboot-tools must be selected.
+         - fw_printenv must be functional on the device.  
Quoted 8 lines
Quoted 4 lines

Indeed, here you are precisely saying that fw_printenv is needed. What about keeping the selects *and* adding your Config.in comment, perhaps without the "uboot-tools must be selected". It would be nice to have some more specific reference to the Mender U-Boot patches.

The problem with this suggestion is that mender-grubenv has its own fw_printenv. So if both were built then
uboot's fw_printenv may be built last, which would overwrite the fw_printenv provided by mender-grubenv.

Ah, so the problem comes from the situation where both U-Boot and grub are enabled, I see. I still find that a very odd combination, are there really people who do that?

That being said, with that info, indeed you can't really know if U-Boot's fw_printenv should be used, or mender-grubenv's fw_printenv should be used, so not selecting any of them probably makes the most sense.

Quoted 2 lines

I could provide a URL to the meta-mender repository for links to the uboot patches. Would that work?

That would certainly be a useful addition.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#8 lore raw

PATCH 4/4 package/mender: Do not automatically select uboot tools if uboot is selected

Quoted 27 lines · Thomas Petazzoni
Quoted 23 lines · On Mon, 15 Mar 2021 08:44:35 -0700 Adam Duskett <[email protected]> wrote:
Quoted 5 lines

package/mender/Config.in config BR2_PACKAGE_MENDER · line 9

Quoted 2 lines
package/mender/Config.in +0 -2
-     select BR2_PACKAGE_UBOOT_TOOLS if BR2_TARGET_UBOOT # runtime
-     select BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV if BR2_TARGET_UBOOT # runtime

It's a bit odd to drop these.

Not really, because mender-grubenv has it's own fake fw_printenv.

Quoted 16 lines

package/mender/Config.in config BR2_PACKAGE_MENDER · line 18

Quoted 11 lines

help
Mender is an open source over-the-air (OTA) software updater for embedded Linux devices. Mender comprises a client running at the embedded device, as well as a server that manages deployments across many devices.

package/mender/Config.in +5 -0
+       Note:
+       For systems using uboot as the bootloader:
+         - uboot must be patched with the mender uboot patches.
+         - uboot-tools must be selected.
+         - fw_printenv must be functional on the device.

Indeed, here you are precisely saying that fw_printenv is needed. What about keeping the selects *and* adding your Config.in comment, perhaps without the "uboot-tools must be selected". It would be nice to have some more specific reference to the Mender U-Boot patches.

Quoted 9 lines
Quoted 4 lines

The problem with this suggestion is that mender-grubenv has its own fw_printenv. So if both were built then
uboot's fw_printenv may be built last, which would overwrite the fw_printenv provided by mender-grubenv.

Ah, so the problem comes from the situation where both U-Boot and grub are enabled, I see. I still find that a very odd combination, are there really people who do that?

Yes actually! Mender recommends doing it this way because then a developer only needs to use mender-grubenev instead of porting the uboot patches to every new platform. Uboot is indeed capable of loading grub as a kernel image which is quite nice!

Quoted 4 lines

That being said, with that info, indeed you can't really know if U-Boot's fw_printenv should be used, or mender-grubenv's fw_printenv should be used, so not selecting any of them probably makes the most sense.

I'm glad you agree!

Quoted 6 lines
Quoted 3 lines

I could provide a URL to the meta-mender repository for links to the uboot patches. Would that work?

That would certainly be a useful addition.

Great! I will add the new information and resubmit the patch!

Quoted 7 lines

Thanks!

Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

#9 lore raw

cover mender updates

In reply to aduskett at gmail.com

Hello,

Quoted 5 lines · On Sun, 7 Mar 2021 14:25:32 -0800 aduskett at gmail.com wrote:

Adam Duskett (4):
package/mender-artifact: bump to version 3.4.1
package/mender: bump version to 2.4.2
package/mender-grubenv: bump version to

    f39c2c7ec7c9c24aae0108a9b04a0e6e61a3e96b

Thanks, I've applied those patches to master!

Quoted 2 lines

package/mender: Do not automatically select uboot tools if uboot is
selected

I do have a few comments/questions on this one, so I'll reply to it directly.

Thomas

Signature · 3 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com