[U-Boot-Users] tool to create environment on host?
Steven Scholz
steven.scholz at imc-berlin.de
Wed May 25 15:14:53 CEST 2005
Simon,
>>> is there a tool to create a binary environment block from a text file
>>> on the host?
>>
>> No, not yet.
>
> That would be *so* useful for our nightly builds...
Quick and Dirty Hack attached!
Good luck,
Steven
--
Index: tools/Makefile
===================================================================
RCS file: /cvsroot/u-boot/u-boot/tools/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- tools/Makefile 28 Sep 2004 21:39:46 -0000 1.10
+++ tools/Makefile 25 May 2005 13:12:49 -0000
@@ -21,9 +21,9 @@
# MA 02111-1307 USA
#
-BINS = img2srec$(SFX) mkimage$(SFX) envcrc$(SFX) gen_eth_addr$(SFX)
bmp_logo$(SFX)
+BINS = img2srec$(SFX) mkimage$(SFX) envcrc$(SFX) gen_eth_addr$(SFX)
bmp_logo$(SFX) txt2env$(SFX)
-OBJS = environment.o img2srec.o mkimage.o crc32.o envcrc.o gen_eth_addr.o
bmp_logo.o
+OBJS = environment.o img2srec.o mkimage.o crc32.o envcrc.o gen_eth_addr.o
bmp_logo.o txt2env.o
ifeq ($(ARCH),mips)
BINS += inca-swap-bytes$(SFX)
@@ -121,6 +121,9 @@
envcrc$(SFX): envcrc.o crc32.o environment.o
$(CC) $(CFLAGS) -o $@ $^
+txt2env$(SFX): txt2env.o crc32.o environment.o
+ $(CC) $(CFLAGS) -o $@ $^
+
img2srec$(SFX): img2srec.o
$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
$(STRIP) $@
@@ -152,6 +155,9 @@
envcrc.o: envcrc.c
$(CC) -g $(CFLAGS) -c $<
+txt2env.o: txt2env.c
+ $(CC) -g $(CFLAGS) -c $<
+
crc32.o: crc32.c
$(CC) -g $(CFLAGS) -c $<
-------------- next part --------------
A non-text attachment was scrubbed...
Name: txt2env.c
Type: text/x-csrc
Size: 5927 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20050525/c4485490/attachment.c
More information about the U-Boot
mailing list