[uClinux-dev] Combining bin files

Van Rafelghem, Dominique VanRafelghemD at intheairnet.com
Wed Mar 26 12:40:35 EST 2003


Lars,
 
Thanks for the Makefile code, this is really helpful.  I tried it as a bash
shell script with a little tweaking and it works great :-).  The next thing
I'll do is add this to my Makefile.
 
Dominique

-----Original Message-----
From: Lars-Åke Ekstrand [mailto:lars-ake.ekstrand at intellicom.se]
Sent: Wednesday, March 26, 2003 12:20 AM
To: uclinux-dev at uclinux.org
Subject: RE: [uClinux-dev] Combining bin files


Hi, 
 
we use the following method to acomplish what you are after:
 
#
# Sizes of the flash partitions in kbytes
#
BOOTSIZE = 64
KERNELSIZE = 832
 
dd if=/dev/zero bs=1024 count=$(BOOTSIZE) of=$(IMAGEDIR)/null.bin
cat $(IMAGEDIR)/colilo.bin $(IMAGEDIR)/null.bin >
$(IMAGEDIR)/colilo-null.bin
dd if=$(IMAGEDIR)/colilo-null.bin bs=1024 count=$(BOOTSIZE)
of=$(IMAGEDIR)/colilo-aligned.bin
rm $(IMAGEDIR)/null.bin
dd if=/dev/zero bs=1024 count=$(KERNELSIZE) of=$(IMAGEDIR)/null.bin
cat $(IMAGEDIR)/zimage.bin $(IMAGEDIR)/null.bin >
$(IMAGEDIR)/zimage-null.bin
dd if=$(IMAGEDIR)/zimage-null.bin bs=1024 count=$(KERNELSIZE)
of=$(IMAGEDIR)/zimage-aligned.bin
cat $(IMAGEDIR)/colilo-aligned.bin $(IMAGEDIR)/zimage-aligned.bin >
$(IMAGEDIR)/bootimage.bin
rm $(IMAGEDIR)/zimage-null.bin $(IMAGEDIR)/zimage-aligned.bin
$(IMAGEDIR)/colilo-null.bin $(IMAGEDIR)/colilo-aligned.bin

 

This piece is cut from a Makefile. Basically it pads the colilo image so it
grows in size to fill the flash up to where the kernel image begins. Then it
concaternates the two images into one image called bootimage.bin. 
 
/Regards
Lars-Ake
 

-----Original Message-----
From: Van Rafelghem, Dominique [mailto:VanRafelghemD at intheairnet.com] 
Sent: den 25 mars 2003 17:57
To: 'uclinux-dev at uclinux.org'
Subject: [uClinux-dev] Combining bin files



Hello, 

This may be a rookie question but since I am new to uClinux here it goes
anyway. 

This is my problem.  I am bringing up a new board with our hardware engineer
here, and I have a Colilo boot loader and a uClinux image file.  We would
like to combine the two bin files so that we can burn them into flash with
one go.

Does anyone know how to combine the two bin files (colilo.bin, and
image.bin) and create one bin file to load on the target?  Also, the
image.bin file needs to be placed at a known location in flash so that the
boot loader can find it and launch the kernel?

Any help with this would be greatly appreciated. 

Dominique Van Rafelghem 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.uclinux.org/pipermail/uclinux-dev/attachments/20030326/42b56ae2/attachment.html>


More information about the uClinux-dev mailing list