boot.bin for AT91RM9200 problem

Hi to all AT91RM9200 experts!

As i am in deep trouble i kindly ask you for some help ...

On my board, everything is running perfect (u-boot, linux, application on top of linux). The only thing that troubles me is the bootstrap code boot.bin that resides on the external flash (at 0x1000 0000). This boot.bin refuses to unzip and load any other u-boot exept the one that was delivered with my demoboard (at91rm9200-EK). But i had to adapt the u-boot code so that it works with the new flash (AT49BV642D instead of AT49BV6416 as this part is obsolete).

So i took a look on the atmel cd that was delivered with the at91rm9200-EK. Found the boot.bin and the sourcecode for it in boot.gz (send those two files in the attachment for you). Strange thing is when i load the boot.bin from the cd together with the u-boot.bin on my demoboard it works. But if i compile the delivered sourcecode and take the compiled boot.bin, it doesnt work (just says "uncompressing image ..." and then nothing happens). The only changes to make it compilable were that i had to take away the option -mshort-load-bytes from the compiler and that i had to add .rodata.str1.4 in ld.script. So i did some kind of testing and found out that the program is able to read from flash but cannot write to SDRAM (i write 4 bytes at adress 0x21F0 0000 and immediately afterwards read these bytes - the first one is correct, the others not). SDRAM init looks ok for me.

For me it looks like just changing a few lines and everything would work perfect, but i'm very ashamed to say that i haven't a glue which ones.

There should be a newer version of boot.bin on the

formatting link
site, but the page is broken and i only ge a 'fatal error' when trying to download it.

I have to deliver my sourcecode to the customer next week so there is quite a time pressure

Please can you help me?!!!

thanks and kind regards Renate Lehotzki

Reply to
lep
Loading thread data ...

There are three loaders for the AT91.

  • boot.bin which runs from a parallel flash
  • dataflashboot.bin which is loaded into SRAM from an AT45 SPI flash.
  • at91-bootstrap which is for AT91SAM9 parts and supports both serial flash and NAND flash (not par flash).

"boot.bin" assumes that u-boot is gzipped, and "dataflashboot.bin" assumes that the u-boot is a binary (IIRC). "at91-bootstrap" assumes that the u-boot is a binary.

While the working u-boot.bin filename sounds like a binary, I think this is a gzipped file, and I suspect that the u-boot.bins you fail to load are not gzipped.

--
Best Regards,
Ulf Samuelsson
 Click to see the full signature
Reply to
Ulf Samuelsson

Hi Ulf!

I investigated into that and found out that my compiler produces

2 output files. One is boot.bin and one is boot.gz. Boot.bin's size is >80K and this is the one i can run on the board via serial with loader.bin sent first. Boot.gz is gnu-zipped (i looked at the first bytes with good old ME) is about 45k of size and that is the one i tried to open with boot.bin and failed. So i think that shouldn't be the problem.

If you could send the upated version of boot to me (that one that should be availabe on the at91 webpage), that would help ...

thanks & k> > As i am in deep trouble i kindly ask you for some help ...

Reply to
lep

skrev i meddelandet news: snipped-for-privacy@n2g2000hse.googlegroups.com...

boot.bin should be used to open u-boot.gz (or maybe u-boot.bin), not boot.gz.

--
Best Regards,
Ulf Samuelsson
 Click to see the full signature
Reply to
Ulf Samuelsson

So after all a friend sent me the correct sources for boot.bin and i'm able to compile them. I adopted boot.bin in the way that it takes the uncompressed u_boot.bin from flash (10010000 ...) and loads it to 21F00000 then jumps to the beginning. I am very sure that the correct code is in RAM before the jump, still one problem is open:

If i take the original boot.bin that came with my development kit, the program works perfect. If i take the u_boot i compiled for my new flash, it doesnt (Though my u_boot works perfect if i load it via the serial line with loader.bin). So what's the difference? Do i have to make any special settings (registers or so)?

any help appreciated kind regards

Renate

Reply to
lep

I fixed the problem with the over-long lines (shouldn't exceed 72, but 67 chars is better) but nothing can fix the total lack of context, which makes your article incomprehensible. All Usenet articles should be capable of standing by themselves. See my sig. below:

--
 If you want to post a followup via groups.google.com, ensure 
 you quote enough for the article to make sense. Google is only
 Click to see the full signature
Reply to
CBFalconer

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.