All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 1/2] env: Fix operation of 'make environ'
@ 2017-09-05  7:53 Simon Glass
  2017-09-05  7:53 ` [U-Boot] [PATCH v2 2/2] env: Add 'envtools' target to 'make help' Simon Glass
  2017-09-06  0:35 ` [U-Boot] [U-Boot,v2,1/2] env: Fix operation of 'make environ' Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Simon Glass @ 2017-09-05  7:53 UTC (permalink / raw)
  To: u-boot

This was broken by the recent environment refactoring. Specifically:

$  make environ
scripts/Makefile.build:59: tools/environ/Makefile: No such file or directory
make[1]: *** No rule to make target 'tools/environ/Makefile'.  Stop.
make: *** [Makefile:1469: environ] Error 2

Fix this by updating the Makefile and adjusting the #include filesnames in
two C files.

Fixes: ec74f5f (Makefile: Rename 'env' target to 'environ')
Reported-by: Måns Rullgård <mans@mansr.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2:
- Use 'envtools' target
- Update tools/env/Makefile to mention the new target

 Makefile              | 4 ++--
 tools/env/README      | 4 ++--
 tools/env/env_attr.c  | 2 +-
 tools/env/env_flags.c | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 7921625211..b19e3bd388 100644
--- a/Makefile
+++ b/Makefile
@@ -1465,8 +1465,8 @@ checkarmreloc: u-boot
 		false; \
 	fi
 
-environ: scripts_basic
-	$(Q)$(MAKE) $(build)=tools/$@
+envtools: scripts_basic
+	$(Q)$(MAKE) $(build)=tools/env
 
 tools-only: scripts_basic $(version_h) $(timestamp_h)
 	$(Q)$(MAKE) $(build)=tools
diff --git a/tools/env/README b/tools/env/README
index 24e31bc9f8..bc6e2c11ef 100644
--- a/tools/env/README
+++ b/tools/env/README
@@ -3,9 +3,9 @@ This is a demo implementation of a Linux command line tool to access
 the U-Boot's environment variables.
 
 In order to cross-compile fw_printenv, run
-    make CROSS_COMPILE=<your cross-compiler prefix> env
+    make CROSS_COMPILE=<your cross-compiler prefix> envtools
 in the root directory of the U-Boot distribution. For example,
-    make CROSS_COMPILE=arm-linux- env
+    make CROSS_COMPILE=arm-linux- envtools
 
 For the run-time utility configuration uncomment the line
 #define CONFIG_FILE  "/etc/fw_env.config"
diff --git a/tools/env/env_attr.c b/tools/env/env_attr.c
index 502d4c900b..4d8536335c 100644
--- a/tools/env/env_attr.c
+++ b/tools/env/env_attr.c
@@ -1 +1 @@
-#include "../../common/env_attr.c"
+#include "../../env/attr.c"
diff --git a/tools/env/env_flags.c b/tools/env/env_flags.c
index b261cb8e39..71e13e2021 100644
--- a/tools/env/env_flags.c
+++ b/tools/env/env_flags.c
@@ -1 +1 @@
-#include "../../common/env_flags.c"
+#include "../../env/flags.c"
-- 
2.14.1.581.gf28d330327-goog

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

* [U-Boot] [PATCH v2 2/2] env: Add 'envtools' target to 'make help'
  2017-09-05  7:53 [U-Boot] [PATCH v2 1/2] env: Fix operation of 'make environ' Simon Glass
@ 2017-09-05  7:53 ` Simon Glass
  2017-09-06  0:35   ` [U-Boot] [U-Boot, v2, " Tom Rini
  2017-09-06  0:35 ` [U-Boot] [U-Boot,v2,1/2] env: Fix operation of 'make environ' Tom Rini
  1 sibling, 1 reply; 4+ messages in thread
From: Simon Glass @ 2017-09-05  7:53 UTC (permalink / raw)
  To: u-boot

The target is not currently mentioned anywhere. Add it to the help so
people can find it.

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

Changes in v2:
- Add new patch with a message in 'make help'

 Makefile         | 1 +
 tools/env/README | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/Makefile b/Makefile
index b19e3bd388..2746976393 100644
--- a/Makefile
+++ b/Makefile
@@ -1586,6 +1586,7 @@ help:
 	@echo  '  ubootrelease	  - Output the release version string (use with make -s)'
 	@echo  '  ubootversion	  - Output the version stored in Makefile (use with make -s)'
 	@echo  "  cfg		  - Don't build, just create the .cfg files"
+	@echo  "  envtools	  - Build only the target-side environment tools"
 	@echo  ''
 	@echo  'Static analysers'
 	@echo  '  checkstack      - Generate a list of stack hogs'
diff --git a/tools/env/README b/tools/env/README
index bc6e2c11ef..709251383c 100644
--- a/tools/env/README
+++ b/tools/env/README
@@ -7,6 +7,9 @@ In order to cross-compile fw_printenv, run
 in the root directory of the U-Boot distribution. For example,
     make CROSS_COMPILE=arm-linux- envtools
 
+You should then create a symlink from fw_setenv to fw_printenv. They use
+the same program and its function depends on its basename.
+
 For the run-time utility configuration uncomment the line
 #define CONFIG_FILE  "/etc/fw_env.config"
 in fw_env.h.
-- 
2.14.1.581.gf28d330327-goog

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

* [U-Boot] [U-Boot,v2,1/2] env: Fix operation of 'make environ'
  2017-09-05  7:53 [U-Boot] [PATCH v2 1/2] env: Fix operation of 'make environ' Simon Glass
  2017-09-05  7:53 ` [U-Boot] [PATCH v2 2/2] env: Add 'envtools' target to 'make help' Simon Glass
@ 2017-09-06  0:35 ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2017-09-06  0:35 UTC (permalink / raw)
  To: u-boot

On Tue, Sep 05, 2017 at 01:53:58AM -0600, Simon Glass wrote:

> This was broken by the recent environment refactoring. Specifically:
> 
> $  make environ
> scripts/Makefile.build:59: tools/environ/Makefile: No such file or directory
> make[1]: *** No rule to make target 'tools/environ/Makefile'.  Stop.
> make: *** [Makefile:1469: environ] Error 2
> 
> Fix this by updating the Makefile and adjusting the #include filesnames in
> two C files.
> 
> Fixes: ec74f5f (Makefile: Rename 'env' target to 'environ')
> Reported-by: Måns Rullgård <mans@mansr.com>
> Signed-off-by: Simon Glass <sjg@chromium.org>

With a little re-working (as yes, I thought I had applied this patch,
but had not, oops), applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170905/d34811a2/attachment.sig>

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

* [U-Boot] [U-Boot, v2, 2/2] env: Add 'envtools' target to 'make help'
  2017-09-05  7:53 ` [U-Boot] [PATCH v2 2/2] env: Add 'envtools' target to 'make help' Simon Glass
@ 2017-09-06  0:35   ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2017-09-06  0:35 UTC (permalink / raw)
  To: u-boot

On Tue, Sep 05, 2017 at 01:53:59AM -0600, Simon Glass wrote:

> The target is not currently mentioned anywhere. Add it to the help so
> people can find it.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170905/c40a3b69/attachment.sig>

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

end of thread, other threads:[~2017-09-06  0:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-05  7:53 [U-Boot] [PATCH v2 1/2] env: Fix operation of 'make environ' Simon Glass
2017-09-05  7:53 ` [U-Boot] [PATCH v2 2/2] env: Add 'envtools' target to 'make help' Simon Glass
2017-09-06  0:35   ` [U-Boot] [U-Boot, v2, " Tom Rini
2017-09-06  0:35 ` [U-Boot] [U-Boot,v2,1/2] env: Fix operation of 'make environ' Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.