2008-02-12 06:16:13     Difference in *.bin and *.ldr files

Document created by Aaronwu Employee on Sep 17, 2013
Version 1Show Document
  • View in full screen mode

2008-02-12 06:16:13     Difference in *.bin and *.ldr files

Ivan Koryakovskiy (RUSSIAN FEDERATION)

Message: 50925    Hi everybody! The problem is: as I understand ldr files are used to be programmed into flash and then a blackfin built-it bootloader will boot it, allocate in defined memory, etc. But what kind of information is in bin file? It cannot be opend by LDR Viewer. How to start u-boot or uclinux if I have only a bin file? And the last one: how to inform blackfin gcc toolchain to create an ldr file instead of bin? Thanks!

QuoteReplyEditDelete

 

 

2008-02-12 06:24:53     Re: Difference in *.bin and *.ldr files

Phil Wilshire (UNITED STATES)

Message: 50927    Take a look at the documentation

 

http://docs.blackfin.uclinux.org/doku.php?id=toolchain:ldr-utils&s=ldr%20files

  Phil WIlshire

QuoteReplyEditDelete

 

 

2008-02-12 09:23:58     Re: Difference in *.bin and *.ldr files

Ivan Koryakovskiy (RUSSIAN FEDERATION)

Message: 50934    Thank you for this link. One more question - after compiling and linking uclinux, as an output I have a bin file - formatted image of file system with uclinux files. Can I make an ldr file from it? I'd like to start uclinux without having an u-boot, and I am confused a bit since bin image contains much more information than it is neded to be used at the moment of start.

QuoteReplyEditDelete

 

 

2008-02-12 09:41:26     Re: Difference in *.bin and *.ldr files

Robin Getz (UNITED STATES)

Message: 50936    Ivan:

 

While it is possible to use a kernel image as an ldr - this has no support for compression - so the image sizes are huge compared to uImage files (which require U-Boot). In the past - we thought it was not pratical - So we have not done/tested this.

 

Do you see a need for this?

 

-Robin

QuoteReplyEditDelete

 

 

2008-02-12 10:57:11     Re: Difference in *.bin and *.ldr files

Ivan Koryakovskiy (RUSSIAN FEDERATION)

Message: 50943    Robin, well... I'm not sure I really need this option. I will work on u-boot again (to adjust it to my bf531) and give you an answer ASAP. You know my problems with 8M SDRAM - that's why I am digging around it.

QuoteReplyEditDelete

 

 

2008-02-12 11:36:41     Re: Difference in *.bin and *.ldr files

Robin Getz (UNITED STATES)

Message: 50945    Ivan:

 

With 8 Meg of SDRAM, you need to follow the options outlined in:

http://docs.blackfin.uclinux.org/doku.php?id=reduce_kernel_memory_footprint

 

I think this is a work in progress - and may still not get you where you want to go.

 

How much flash do you have in the system?

 

-Robin

QuoteReplyEditDelete

 

 

2008-02-13 06:30:20     Re: Difference in *.bin and *.ldr files

Ivan Koryakovskiy (RUSSIAN FEDERATION)

Message: 50990    Robin - I have 1Mb spi flash (e.g. for u-boot) and 4Mb parallel (for uclinux, etc.)

QuoteReplyEditDelete

 

 

2008-02-13 13:43:36     Re: Difference in *.bin and *.ldr files

Robin Getz (UNITED STATES)

Message: 50998    Ivan:

 

SPI Flash is 1Mbit (128kBytes)?

 

You should be able to have kernel run from ram, and the file system be in flash as XIP (execute in place). This will leave alot more SDRAM for your applications...

 

-Robin

QuoteReplyEditDelete

 

 

2008-02-14 10:12:38     Re: Difference in *.bin and *.ldr files

Ivan Koryakovskiy (RUSSIAN FEDERATION)

Message: 51055    Robin - SPI flash is 8Mbit = 1MByte. Parallel is 32Mbit. Thanks a lot for help.

QuoteReplyEditDelete

 

 

2008-02-14 13:29:21     Re: Difference in *.bin and *.ldr files

Robin Getz (UNITED STATES)

Message: 51061    Ivan:

 

OK - so it is practical to put U-Boot (128kbytes) and kernel (750kbytes) and put the filesystem completely into Parallel flash.

 

Was that the plan?

 

-Robin

QuoteReplyEditDelete

 

 

2008-02-14 14:03:27     Re: Difference in *.bin and *.ldr files

Ivan Koryakovskiy (RUSSIAN FEDERATION)

Message: 51064   

 

Actually I was not pretty much familiar wih blackfin when I started this project. So it seemd to me that it was easier to start with SPI flash (especially because I wanted to write program in VisualDSP - without any OS). But then I read about uCLinux and decided to use it if possible - so I added Parallel flash.

 

Robin, do you suggest me to put either u-boot or uclinux-kernel into SPI flash, while filesystem into Parallel, don't you?

 

How I can divide Image (after uclinux linking) onto two parts - kernel and others?

QuoteReplyEditDelete

 

 

2008-02-14 14:10:04     Re: Difference in *.bin and *.ldr files

Mike Frysinger (UNITED STATES)

Message: 51066    for development, we dont initially put anything but u-boot into the flash.  the kernel/filesystem gets loaded over the network via tftp and is booted out of ram.

QuoteReplyEditDelete

 

 

2008-02-14 16:33:09     Re: Difference in *.bin and *.ldr files

Ivan Koryakovskiy (RUSSIAN FEDERATION)

Message: 51070   

 

I am trying to compile u-boot for bf531 now. The problem is:

 

Since processor is 531 -  defBF533-extern.h is not included. But it contains a line

 

#define OFFSET_( x )  ((x) & 0x0000FFFF) /* define macro for offset */

 

Without this line I was unable to compile cpu/bf531/start.c (had "Parse error . Input text was (." ). So I added a definition of OFFSET_( x ) to file cdefBF531.h

 

Now, there is new error with which I don't know what to do:

 

reloc 591 not supported by object file format

 

It occures when compiling text like p0.h = SWRST  >> 16 in start.s. How can I fight with it?

 

Moreover, if it's written somewere how to customize own u-boot - please give me a link - it would be very helpful. Information in wiki (customizing_u-boot_for_your_own_board [Blackfin Linux Docs]) is not enough at least because there is the same processor - BF533.

QuoteReplyEditDelete

 

 

2008-02-14 16:49:33     Re: Difference in *.bin and *.ldr files

Mike Frysinger (UNITED STATES)

Message: 51072    building for variants is not supported in the 2007R1 release or older.  dont waste your time.

 

it has all been properly fixed in the new 2008R1 release.

QuoteReplyEditDelete

 

 

2008-02-14 17:18:51     Re: Difference in *.bin and *.ldr files

Ivan Koryakovskiy (RUSSIAN FEDERATION)

Message: 51074    Mike - where can I find 2008R1?   In u-boot files  see latest release 2007R1 (:

QuoteReplyEditDelete

 

 

2008-02-14 17:30:48     Re: Difference in *.bin and *.ldr files

Mike Frysinger (UNITED STATES)

Message: 51075    you should be able to see it if you view all releases.  it hasnt been officially released yet though, so you may just want to wait a week ... you'll need the 2008R1 toolchain as well.

QuoteReplyEditDelete

 

 

2008-02-15 09:53:14     Re: Difference in *.bin and *.ldr files

Ivan Koryakovskiy (RUSSIAN FEDERATION)

Message: 51109   

 

can you give me a direct link to *.tar.bz2 file of u-boot 2008R1?

 

And to the 2008R1 toolchain (i386.rpm) also...

QuoteReplyEditDelete

Attachments

    Outcomes