From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Scholz Date: Wed, 25 May 2005 15:14:53 +0200 Subject: [U-Boot-Users] tool to create environment on host? In-Reply-To: <4294507C.1050104@themalago.net> References: <20050525091514.EDD52C1512@atlas.denx.de> <4294507C.1050104@themalago.net> Message-ID: <42947A4D.4070805@imc-berlin.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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