Skip to contentSkip to conversation

Allow fw env tools to be available as library

PATCH In review Stefano Babic 2 participants 3 messages Oct 30, 2015 – Nov 18, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Allow fw env tools to be available as library

Sometimes it can be useful to link the fw_ tools instead of having the fw_setenv/fw_printenv installed. Patch exports the tool as library and allowes to link it with own programs.

---
 tools/env/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tools/env/Makefile +3 -1
index 40164f7..38ad118 100644
@@ -23,10 +23,12 @@ endif
 always := fw_printenv
 hostprogs-y := fw_printenv
 
-fw_printenv-objs := fw_env.o fw_env_main.o \
+lib-y += fw_env.o \
 	crc32.o ctype.o linux_string.o \
 	env_attr.o env_flags.o aes.o
 
+fw_printenv-objs := fw_env_main.o $(lib-y)
+
 quiet_cmd_crosstools_strip = STRIP   $^
       cmd_crosstools_strip = $(STRIP) $^; touch $@
 
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 Allow fw env tools to be available as library

Quoted 7 lines · Stefano Babic

Sometimes it can be useful to link the fw_ tools instead of having the fw_setenv/fw_printenv installed. Patch exports the tool as library and allowes to link it with own programs.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151030/4b7fdf37/attachment.sig>
#2 lore raw
In reply to Stefano Babic
Quoted 8 lines · Stefano Babic

Sometimes it can be useful to link the fw_ tools instead of having the fw_setenv/fw_printenv installed. Patch exports the tool as library and allowes to link it with own programs.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151118/bc75e840/attachment.sig>