[uClinux-dev] Combining bin files

Erwin Authried eauth at softsys.co.at
Wed Mar 26 04:56:03 EST 2003


Am Mit, 2003-03-26 um 09.20 schrieb Lars-Åke Ekstrand:
> 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

Hi,
you can get the same thing much cheaper (all in one line):

dd if=$(IMAGEDIR)/colilo.bin bs=${BOOTSIZE}k 
of=$(IMAGEDIR)/colilo-aligned.bin conv=sync

Regards,
Erwin





More information about the uClinux-dev mailing list