[uClinux-dev] Combining bin files

Michael Caisse mcaisse at allweatherinc.com
Tue Mar 25 13:54:20 EST 2003

Dominique -

I'm there are several ways to accomplish this. I modified the colilo 
since it is what is looking for the binary to be located at a specific 

Specifically, I modified the colilo.bin rule so that:

    $(OBJCOPY) -O binary colilo.elf $@


    $(OBJCOPY) --pad-to=32767 -O binary colilo.elf $@

The first sector for my flash is 32k and holds the boot. Just change the 
pad-to value
to whatever you would like ( see man objcopy ).

I then do the following:

    cp colilo.bin flashImage.bin
    cat image.bin >> flashImage.bin

flashImage.bin will contain what you want.


Van Rafelghem, Dominique wrote:

> 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

More information about the uClinux-dev mailing list