U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Environment: Change reporting "nowhere" as "magic hat" to user
@ 2024-11-28 15:12 Alicja Michalska
  2024-11-28 18:13 ` Simon Glass
  2024-11-29 10:35 ` Andrew Goodbody
  0 siblings, 2 replies; 6+ messages in thread
From: Alicja Michalska @ 2024-11-28 15:12 UTC (permalink / raw)
  To: u-boot; +Cc: joe.hershberger, sjg, Alicja Michalska

Make string more user-friendly

Signed-off-by: Alicja Michalska <alicja.michalska@9elements.com>
---
 doc/arch/sandbox/sandbox.rst       | 2 +-
 doc/board/emulation/qemu-x86.rst   | 2 +-
 doc/board/sophgo/milkv_duo.rst     | 2 +-
 doc/board/starfive/visionfive2.rst | 2 +-
 doc/develop/uefi/u-boot_on_efi.rst | 2 +-
 env/nowhere.c                      | 2 +-
 test/py/tests/test_env.py          | 4 ++--
 7 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/doc/arch/sandbox/sandbox.rst b/doc/arch/sandbox/sandbox.rst
index a8b0d7f039..d88f05285e 100644
--- a/doc/arch/sandbox/sandbox.rst
+++ b/doc/arch/sandbox/sandbox.rst
@@ -469,7 +469,7 @@ Here is an example trace::
    Address in environment is	02:00:11:22:33:44
    Core:  103 devices, 51 uclasses, devicetree: board
    MMC:
-   Loading Environment from nowhere... OK
+   Loading Environment from a magic hat... OK
    In:    serial,cros-ec-keyb,usbkbd
    Out:   serial,vidconsole
    Err:   serial,vidconsole
diff --git a/doc/board/emulation/qemu-x86.rst b/doc/board/emulation/qemu-x86.rst
index c604e42990..06e9dcd999 100644
--- a/doc/board/emulation/qemu-x86.rst
+++ b/doc/board/emulation/qemu-x86.rst
@@ -142,7 +142,7 @@ The output will be something like this::
    CPU:   QEMU Virtual CPU version 2.5+
    DRAM:  8 GiB
    Core:  20 devices, 13 uclasses, devicetree: separate
-   Loading Environment from nowhere... OK
+   Loading Environment from a magic hat... OK
    Model: QEMU x86 (I440FX)
    Net:   e1000: 52:54:00:12:34:56
           eth0: e1000#0
diff --git a/doc/board/sophgo/milkv_duo.rst b/doc/board/sophgo/milkv_duo.rst
index cb2ed1ad98..243468bf10 100644
--- a/doc/board/sophgo/milkv_duo.rst
+++ b/doc/board/sophgo/milkv_duo.rst
@@ -53,7 +53,7 @@ Sample boot log from Milk-V Duo board
 
    DRAM:  63.3 MiB
    Core:  10 devices, 8 uclasses, devicetree: separate
-   Loading Environment from nowhere... OK
+   Loading Environment from a magic hat... OK
    In:    serial@4140000
    Out:   serial@4140000
    Err:   serial@4140000
diff --git a/doc/board/starfive/visionfive2.rst b/doc/board/starfive/visionfive2.rst
index 2c68df3ce4..7a926dc021 100644
--- a/doc/board/starfive/visionfive2.rst
+++ b/doc/board/starfive/visionfive2.rst
@@ -209,7 +209,7 @@ Sample boot log from StarFive VisionFive2 board
 	DRAM:  8 GiB
 	Core:  107 devices, 18 uclasses, devicetree: separate
 	MMC:   mmc@16010000: 0, mmc@16020000: 1
-	Loading Environment from nowhere... OK
+	Loading Environment from a magic hat... OK
 	In:    serial@10000000
 	Out:   serial@10000000
 	Err:   serial@10000000
diff --git a/doc/develop/uefi/u-boot_on_efi.rst b/doc/develop/uefi/u-boot_on_efi.rst
index 245b4af1fa..dbc2b74c6e 100644
--- a/doc/develop/uefi/u-boot_on_efi.rst
+++ b/doc/develop/uefi/u-boot_on_efi.rst
@@ -230,7 +230,7 @@ This shows running with serial enabled (see `include/configs/efi-x86_app.h`)::
    DRAM:  32 MiB
     0: efi_media_0  PciRoot(0x0)/Pci(0x3,0x0)/Sata(0x0,0xFFFF,0x0)
     1: <partition>  PciRoot(0x0)/Pci(0x3,0x0)/Sata(0x0,0xFFFF,0x0)/HD(1,GPT,0FFD5E61-3B0C-4326-8049-BDCDC910AF72,0x800,0xB000)
-   Loading Environment from nowhere... OK
+   Loading Environment from a magic hat... OK
    Model: EFI x86 Application
    Hit any key to stop autoboot:  0
 
diff --git a/env/nowhere.c b/env/nowhere.c
index 6b9b6e2fe0..63fc4647f6 100644
--- a/env/nowhere.c
+++ b/env/nowhere.c
@@ -45,5 +45,5 @@ U_BOOT_ENV_LOCATION(nowhere) = {
 	.location	= ENVL_NOWHERE,
 	.init		= env_nowhere_init,
 	.load		= env_nowhere_load,
-	ENV_NAME("nowhere")
+	ENV_NAME("a magic hat")
 };
diff --git a/test/py/tests/test_env.py b/test/py/tests/test_env.py
index 4471db7d9c..3cd06c5c90 100644
--- a/test/py/tests/test_env.py
+++ b/test/py/tests/test_env.py
@@ -527,10 +527,10 @@ def test_env_ext4(state_test_env):
 
         # restore env location: NOWHERE (prio 0 in sandbox)
         response = c.run_command('env select nowhere')
-        assert 'Select Environment on nowhere: OK' in response
+        assert 'Select Environment from a magic hat: OK' in response
 
         response = c.run_command('env load')
-        assert 'Loading Environment from nowhere... OK' in response
+        assert 'Loading Environment from a magic hat... OK' in response
 
         response = c.run_command('env info')
         assert 'env_valid = invalid' in response
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] Environment: Change reporting "nowhere" as "magic hat" to user
  2024-11-28 15:12 [PATCH] Environment: Change reporting "nowhere" as "magic hat" to user Alicja Michalska
@ 2024-11-28 18:13 ` Simon Glass
  2024-11-29 10:35 ` Andrew Goodbody
  1 sibling, 0 replies; 6+ messages in thread
From: Simon Glass @ 2024-11-28 18:13 UTC (permalink / raw)
  To: Alicja Michalska; +Cc: u-boot, joe.hershberger

On Thu, 28 Nov 2024 at 08:12, Alicja Michalska
<alicja.michalska@9elements.com> wrote:
>
> Make string more user-friendly
>
> Signed-off-by: Alicja Michalska <alicja.michalska@9elements.com>
> ---
>  doc/arch/sandbox/sandbox.rst       | 2 +-
>  doc/board/emulation/qemu-x86.rst   | 2 +-
>  doc/board/sophgo/milkv_duo.rst     | 2 +-
>  doc/board/starfive/visionfive2.rst | 2 +-
>  doc/develop/uefi/u-boot_on_efi.rst | 2 +-
>  env/nowhere.c                      | 2 +-
>  test/py/tests/test_env.py          | 4 ++--
>  7 files changed, 8 insertions(+), 8 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

A little more whimsy in U-Boot would be nice!

BTW it would be helpful mention these environment drivers in
doc/usage/environment.rst

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Environment: Change reporting "nowhere" as "magic hat" to user
  2024-11-28 15:12 [PATCH] Environment: Change reporting "nowhere" as "magic hat" to user Alicja Michalska
  2024-11-28 18:13 ` Simon Glass
@ 2024-11-29 10:35 ` Andrew Goodbody
  2024-11-29 11:23   ` Fabio Estevam
  1 sibling, 1 reply; 6+ messages in thread
From: Andrew Goodbody @ 2024-11-29 10:35 UTC (permalink / raw)
  To: u-boot

On 28/11/2024 15:12, Alicja Michalska wrote:
> Make string more user-friendly

I disagree. I can make a guess as to what 'Loading Environment from 
nowhere' means. To me it suggests that it has not found anywhere 
additional to load an environment from. It is a bit awkwardly phrased 
but it can be understood and it at least sticks to reality.
As for 'Loading Environment from a magic hat' - I have no idea what that 
is trying to convey and that lack of meaning is not, IMO, user-friendly.

Andrew

> Signed-off-by: Alicja Michalska <alicja.michalska@9elements.com>
> ---
>   doc/arch/sandbox/sandbox.rst       | 2 +-
>   doc/board/emulation/qemu-x86.rst   | 2 +-
>   doc/board/sophgo/milkv_duo.rst     | 2 +-
>   doc/board/starfive/visionfive2.rst | 2 +-
>   doc/develop/uefi/u-boot_on_efi.rst | 2 +-
>   env/nowhere.c                      | 2 +-
>   test/py/tests/test_env.py          | 4 ++--
>   7 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/doc/arch/sandbox/sandbox.rst b/doc/arch/sandbox/sandbox.rst
> index a8b0d7f039..d88f05285e 100644
> --- a/doc/arch/sandbox/sandbox.rst
> +++ b/doc/arch/sandbox/sandbox.rst
> @@ -469,7 +469,7 @@ Here is an example trace::
>      Address in environment is	02:00:11:22:33:44
>      Core:  103 devices, 51 uclasses, devicetree: board
>      MMC:
> -   Loading Environment from nowhere... OK
> +   Loading Environment from a magic hat... OK
>      In:    serial,cros-ec-keyb,usbkbd
>      Out:   serial,vidconsole
>      Err:   serial,vidconsole
> diff --git a/doc/board/emulation/qemu-x86.rst b/doc/board/emulation/qemu-x86.rst
> index c604e42990..06e9dcd999 100644
> --- a/doc/board/emulation/qemu-x86.rst
> +++ b/doc/board/emulation/qemu-x86.rst
> @@ -142,7 +142,7 @@ The output will be something like this::
>      CPU:   QEMU Virtual CPU version 2.5+
>      DRAM:  8 GiB
>      Core:  20 devices, 13 uclasses, devicetree: separate
> -   Loading Environment from nowhere... OK
> +   Loading Environment from a magic hat... OK
>      Model: QEMU x86 (I440FX)
>      Net:   e1000: 52:54:00:12:34:56
>             eth0: e1000#0
> diff --git a/doc/board/sophgo/milkv_duo.rst b/doc/board/sophgo/milkv_duo.rst
> index cb2ed1ad98..243468bf10 100644
> --- a/doc/board/sophgo/milkv_duo.rst
> +++ b/doc/board/sophgo/milkv_duo.rst
> @@ -53,7 +53,7 @@ Sample boot log from Milk-V Duo board
>   
>      DRAM:  63.3 MiB
>      Core:  10 devices, 8 uclasses, devicetree: separate
> -   Loading Environment from nowhere... OK
> +   Loading Environment from a magic hat... OK
>      In:    serial@4140000
>      Out:   serial@4140000
>      Err:   serial@4140000
> diff --git a/doc/board/starfive/visionfive2.rst b/doc/board/starfive/visionfive2.rst
> index 2c68df3ce4..7a926dc021 100644
> --- a/doc/board/starfive/visionfive2.rst
> +++ b/doc/board/starfive/visionfive2.rst
> @@ -209,7 +209,7 @@ Sample boot log from StarFive VisionFive2 board
>   	DRAM:  8 GiB
>   	Core:  107 devices, 18 uclasses, devicetree: separate
>   	MMC:   mmc@16010000: 0, mmc@16020000: 1
> -	Loading Environment from nowhere... OK
> +	Loading Environment from a magic hat... OK
>   	In:    serial@10000000
>   	Out:   serial@10000000
>   	Err:   serial@10000000
> diff --git a/doc/develop/uefi/u-boot_on_efi.rst b/doc/develop/uefi/u-boot_on_efi.rst
> index 245b4af1fa..dbc2b74c6e 100644
> --- a/doc/develop/uefi/u-boot_on_efi.rst
> +++ b/doc/develop/uefi/u-boot_on_efi.rst
> @@ -230,7 +230,7 @@ This shows running with serial enabled (see `include/configs/efi-x86_app.h`)::
>      DRAM:  32 MiB
>       0: efi_media_0  PciRoot(0x0)/Pci(0x3,0x0)/Sata(0x0,0xFFFF,0x0)
>       1: <partition>  PciRoot(0x0)/Pci(0x3,0x0)/Sata(0x0,0xFFFF,0x0)/HD(1,GPT,0FFD5E61-3B0C-4326-8049-BDCDC910AF72,0x800,0xB000)
> -   Loading Environment from nowhere... OK
> +   Loading Environment from a magic hat... OK
>      Model: EFI x86 Application
>      Hit any key to stop autoboot:  0
>   
> diff --git a/env/nowhere.c b/env/nowhere.c
> index 6b9b6e2fe0..63fc4647f6 100644
> --- a/env/nowhere.c
> +++ b/env/nowhere.c
> @@ -45,5 +45,5 @@ U_BOOT_ENV_LOCATION(nowhere) = {
>   	.location	= ENVL_NOWHERE,
>   	.init		= env_nowhere_init,
>   	.load		= env_nowhere_load,
> -	ENV_NAME("nowhere")
> +	ENV_NAME("a magic hat")
>   };
> diff --git a/test/py/tests/test_env.py b/test/py/tests/test_env.py
> index 4471db7d9c..3cd06c5c90 100644
> --- a/test/py/tests/test_env.py
> +++ b/test/py/tests/test_env.py
> @@ -527,10 +527,10 @@ def test_env_ext4(state_test_env):
>   
>           # restore env location: NOWHERE (prio 0 in sandbox)
>           response = c.run_command('env select nowhere')
> -        assert 'Select Environment on nowhere: OK' in response
> +        assert 'Select Environment from a magic hat: OK' in response
>   
>           response = c.run_command('env load')
> -        assert 'Loading Environment from nowhere... OK' in response
> +        assert 'Loading Environment from a magic hat... OK' in response
>   
>           response = c.run_command('env info')
>           assert 'env_valid = invalid' in response


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Environment: Change reporting "nowhere" as "magic hat" to user
  2024-11-29 10:35 ` Andrew Goodbody
@ 2024-11-29 11:23   ` Fabio Estevam
  2024-11-29 12:33     ` Rasmus Villemoes
  2024-11-29 14:36     ` Tom Rini
  0 siblings, 2 replies; 6+ messages in thread
From: Fabio Estevam @ 2024-11-29 11:23 UTC (permalink / raw)
  To: Andrew Goodbody; +Cc: u-boot

On Fri, Nov 29, 2024 at 7:35 AM Andrew Goodbody
<andrew.goodbody@linaro.org> wrote:
>
> On 28/11/2024 15:12, Alicja Michalska wrote:
> > Make string more user-friendly
>
> I disagree. I can make a guess as to what 'Loading Environment from
> nowhere' means. To me it suggests that it has not found anywhere
> additional to load an environment from. It is a bit awkwardly phrased
> but it can be understood and it at least sticks to reality.
> As for 'Loading Environment from a magic hat' - I have no idea what that
> is trying to convey and that lack of meaning is not, IMO, user-friendly.

I have the same opinion as Andrew.

It is easy to associate "Loading Environment from nowhere... OK" with
CONFIG_ENV_IS_NOWHERE=y.

Changing it to 'Loading Environment from a magic hat' will not make
things better or clearer, IMHO.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Environment: Change reporting "nowhere" as "magic hat" to user
  2024-11-29 11:23   ` Fabio Estevam
@ 2024-11-29 12:33     ` Rasmus Villemoes
  2024-11-29 14:36     ` Tom Rini
  1 sibling, 0 replies; 6+ messages in thread
From: Rasmus Villemoes @ 2024-11-29 12:33 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Andrew Goodbody, u-boot, Alicja Michalska

On Fri, Nov 29 2024, Fabio Estevam <festevam@gmail.com> wrote:

> On Fri, Nov 29, 2024 at 7:35 AM Andrew Goodbody
> <andrew.goodbody@linaro.org> wrote:
>>
>> On 28/11/2024 15:12, Alicja Michalska wrote:
>> > Make string more user-friendly
>>
>> I disagree. I can make a guess as to what 'Loading Environment from
>> nowhere' means. To me it suggests that it has not found anywhere
>> additional to load an environment from. It is a bit awkwardly phrased
>> but it can be understood and it at least sticks to reality.
>> As for 'Loading Environment from a magic hat' - I have no idea what that
>> is trying to convey and that lack of meaning is not, IMO, user-friendly.
>
> I have the same opinion as Andrew.

Seconded. Or rather thirded [*].

If anything, the message could be changed to say "from default", "from
built-in", "from build-time default" or something along those lines else
that conveys the message that the environment comes from something
defined at compile time.

Rasmus

[*] I was pleasantly surprised to see that that actually exists:
https://en.wiktionary.org/wiki/third#Verb

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Environment: Change reporting "nowhere" as "magic hat" to user
  2024-11-29 11:23   ` Fabio Estevam
  2024-11-29 12:33     ` Rasmus Villemoes
@ 2024-11-29 14:36     ` Tom Rini
  1 sibling, 0 replies; 6+ messages in thread
From: Tom Rini @ 2024-11-29 14:36 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Andrew Goodbody, u-boot

[-- Attachment #1: Type: text/plain, Size: 1116 bytes --]

On Fri, Nov 29, 2024 at 08:23:57AM -0300, Fabio Estevam wrote:
> On Fri, Nov 29, 2024 at 7:35 AM Andrew Goodbody
> <andrew.goodbody@linaro.org> wrote:
> >
> > On 28/11/2024 15:12, Alicja Michalska wrote:
> > > Make string more user-friendly
> >
> > I disagree. I can make a guess as to what 'Loading Environment from
> > nowhere' means. To me it suggests that it has not found anywhere
> > additional to load an environment from. It is a bit awkwardly phrased
> > but it can be understood and it at least sticks to reality.
> > As for 'Loading Environment from a magic hat' - I have no idea what that
> > is trying to convey and that lack of meaning is not, IMO, user-friendly.
> 
> I have the same opinion as Andrew.
> 
> It is easy to associate "Loading Environment from nowhere... OK" with
> CONFIG_ENV_IS_NOWHERE=y.
> 
> Changing it to 'Loading Environment from a magic hat' will not make
> things better or clearer, IMHO.

Yes. As I mentioned on IRC, there's one match for \"nowhere in the
sources and it's in env/nowhere.c so it's easy to see where that line
comes from.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-11-29 14:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-28 15:12 [PATCH] Environment: Change reporting "nowhere" as "magic hat" to user Alicja Michalska
2024-11-28 18:13 ` Simon Glass
2024-11-29 10:35 ` Andrew Goodbody
2024-11-29 11:23   ` Fabio Estevam
2024-11-29 12:33     ` Rasmus Villemoes
2024-11-29 14:36     ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox