[uClinux-dev] Combining bin files

Van Rafelghem, Dominique VanRafelghemD at intheairnet.com
Tue Mar 25 16:04:48 EST 2003


Michael,

I tried changing the make rule as you pointed out,
$(OBJCOPY) --pad-to=32767 -O binary colilo.elf $@ 

but this didn't work for me. The file size didn't change.  The file size of
the colilo.bin file remained at 20641 regardless of the pad.  So my
colleague suggested that I write a c program to do the job.  This worked and
I was able to cat the colilo.bin and image.bin files together and get the
result I want.

Thanks for the help.

Dominique

-----Original Message-----
From: Michael Caisse [mailto:mcaisse at allweatherinc.com]
Sent: Tuesday, March 25, 2003 10:54 AM
To: uclinux-dev at uclinux.org
Subject: Re: [uClinux-dev] Combining bin files


Dominique -

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

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

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

reads

    $(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.


michael



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
>


_______________________________________________
uClinux-dev mailing list
uClinux-dev at uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev at uclinux.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.uclinux.org/pipermail/uclinux-dev/attachments/20030325/1bb4858d/attachment.html>


More information about the uClinux-dev mailing list