diff mbox series

[1/2] package/uboot-tools: resolve uboot env source file error

Message ID 20210125145742.42460-1-matthew.weber@rockwellcollins.com
State Accepted
Headers show
Series [1/2] package/uboot-tools: resolve uboot env source file error | expand

Commit Message

Matt Weber Jan. 25, 2021, 2:57 p.m. UTC
From: Kalpesh Panchal <kalpesh.panchal@rockwellcollins.com>

If Target u-boot is not available, the host build of uboot-tools
requires user to provide u-boot environment source file.
This change resolves a missing parentheses and updates the comment
for the same.

Signed-off-by: Kalpesh Panchal <kalpesh.panchal@rockwellcollins.com>
Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
---
 package/uboot-tools/uboot-tools.mk | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Thomas Petazzoni Jan. 25, 2021, 9:15 p.m. UTC | #1
On Mon, 25 Jan 2021 08:57:41 -0600
Matt Weber <matthew.weber@rockwellcollins.com> wrote:

> From: Kalpesh Panchal <kalpesh.panchal@rockwellcollins.com>
> 
> If Target u-boot is not available, the host build of uboot-tools
> requires user to provide u-boot environment source file.
> This change resolves a missing parentheses and updates the comment
> for the same.
> 
> Signed-off-by: Kalpesh Panchal <kalpesh.panchal@rockwellcollins.com>
> Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
> ---
>  package/uboot-tools/uboot-tools.mk | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Applied to master, thanks. I think this bug really shows we need some
unit tests for this uboot-tools package functionality, in
supporting/testing/.

Thomas
Matthew Weber Jan. 25, 2021, 9:30 p.m. UTC | #2
Thomas,

On Mon, Jan 25, 2021 at 3:16 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> On Mon, 25 Jan 2021 08:57:41 -0600
> Matt Weber <matthew.weber@rockwellcollins.com> wrote:
>
> > From: Kalpesh Panchal <kalpesh.panchal@rockwellcollins.com>
> >
> > If Target u-boot is not available, the host build of uboot-tools
> > requires user to provide u-boot environment source file.
> > This change resolves a missing parentheses and updates the comment
> > for the same.
> >
> > Signed-off-by: Kalpesh Panchal <kalpesh.panchal@rockwellcollins.com>
> > Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
> > ---
> >  package/uboot-tools/uboot-tools.mk | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
>
> Applied to master, thanks. I think this bug really shows we need some
> unit tests for this uboot-tools package functionality, in
> supporting/testing/.

I did add autobuilder testing of this feature but it didn't do a case
for when the file isn't provided....
https://github.com/buildroot/buildroot/blob/master/utils/genrandconfig#L304

Matt
Thomas Petazzoni Jan. 25, 2021, 9:37 p.m. UTC | #3
On Mon, 25 Jan 2021 15:30:42 -0600
Matthew Weber <matthew.weber@collins.com> wrote:

> > Applied to master, thanks. I think this bug really shows we need some
> > unit tests for this uboot-tools package functionality, in
> > supporting/testing/.  
> 
> I did add autobuilder testing of this feature but it didn't do a case
> for when the file isn't provided....
> https://github.com/buildroot/buildroot/blob/master/utils/genrandconfig#L304

I think this sort of feature gets better tested by specific targeted
tests in support/testing/.

Thomas
Peter Korsgaard Jan. 28, 2021, 6:32 p.m. UTC | #4
>>>>> "Matt" == Matt Weber <matthew.weber@rockwellcollins.com> writes:

 > From: Kalpesh Panchal <kalpesh.panchal@rockwellcollins.com>
 > If Target u-boot is not available, the host build of uboot-tools
 > requires user to provide u-boot environment source file.
 > This change resolves a missing parentheses and updates the comment
 > for the same.

 > Signed-off-by: Kalpesh Panchal <kalpesh.panchal@rockwellcollins.com>
 > Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>

Committed to 2020.11.x, thanks.
diff mbox series

Patch

diff --git a/package/uboot-tools/uboot-tools.mk b/package/uboot-tools/uboot-tools.mk
index 1313107e0e..10cbd1cdd9 100644
--- a/package/uboot-tools/uboot-tools.mk
+++ b/package/uboot-tools/uboot-tools.mk
@@ -139,11 +139,11 @@  ifeq ($(BR_BUILDING),y)
 ifeq ($(call qstrip,$(BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SIZE)),)
 $(error Please provide U-Boot environment size (BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SIZE setting))
 endif
-# If U-Boot is available, ENVIMAGE_SOURCE is optional because the default can
-# be taken from U-Boot.
+# If U-Boot is not available, ENVIMAGE_SOURCE must be provided by user,
+# otherwise it is optional because the default can be taken from U-Boot
 ifeq ($(BR2_TARGET_UBOOT),)
-ifeq ($(call qstrip,$(BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE),)
-$(error Please provide U-Boot environment file BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE setting))
+ifeq ($(call qstrip,$(BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE)),)
+$(error Please provide U-Boot environment file (BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE setting))
 endif
 endif #BR2_TARGET_UBOOT
 endif #BR_BUILDING