Skip to contentSkip to conversation

booting uboot from flash on a memec evaluation board

U-Boot-Users grave 4 participants 9 messages Mar 18, 2005 – Mar 22, 2005

lore
Share & tools
lore

grave

author
#0 lore raw

Hi,

I'm new to uboot and I try to boot it on an evaluation board with a VirtexIIpro. I have compiled an uboot version inspired from the ml300 design and flashed it to our flash media using uboot.srec and a memec flash programmer. Now I wonder how to make the ppc boot in the flash. Do I need a specific and very simple code at address 0xfffffffc that jump to the flash address where there is the uboot code ?

Any hint would be welcome...

Thanks in advance, Xavier

#1 lore raw
Quoted 3 lines · In message <1111149539l.12024l.3l@ipnnarval> you wrote:

Do I need a specific and very simple code at address 0xfffffffc that jump to the flash address where there is the uboot code ?

Yes - typically a branch instruction.

Best regards,

Wolfgang Denk

Signature · 6 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I have never bought, sold, nor stolen a piece of software in my life,
and would rather quit the industry than become a thrall of $Bill,  or
even touch his slimy idiocy.
         -- Tom Christiansen in <[email protected]>
author
#2 lore raw

Le 18.03.2005 17:31:05, Wolfgang Denk a ?crit?:

Quoted 7 lines
Quoted 4 lines · In message <1111149539l.12024l.3l@ipnnarval> you wrote:

Do I need a specific and very simple code at address 0xfffffffc that

jump to the flash address where there is the uboot code ?

Yes - typically a branch instruction.

Thanks, but the branch instruction only (as far as I understand) support 24 bits address jump and there is only room for one instruction in 0xfffffffc. So I tryed to set a jump to 0xffff8000 where there is some code that store a 32 bits address in the link register before trying a jump and it didn't work. Can you send me an example please ?

xavier

#3 lore raw
Quoted 4 lines · In message <1111164669l.12024l.4l@ipnnarval> you wrote:

Thanks, but the branch instruction only (as far as I understand) support 24 bits address jump and there is only room for one instruction in 0xfffffffc. So I tryed to set a jump to 0xffff8000 where there is

What is your problem?

Quoted 2 lines

some code that store a 32 bits address in the link register before trying a jump and it didn't work. Can you send me an example please ?

You got a lot of examples already - look for example for any 4xx board in u-boot.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
War isn't a good life, but it's life.
	-- Kirk, "A Private Little War", stardate 4211.8
author
#4 lore raw

Le 18.03.2005 18:32:46, Wolfgang Denk a ?crit?:

Quoted 9 lines
Quoted 3 lines · In message <1111164669l.12024l.4l@ipnnarval> you wrote:

Thanks, but the branch instruction only (as far as I understand) support 24 bits address jump and there is only room for one

instruction

Quoted 1 line

in 0xfffffffc. So I tryed to set a jump to 0xffff8000 where there is

What is your problem?

To find the address where to boot perhaps ?
I compile u-boot with the same monitor address as in the ml300 disign, I put the uboot.srec file in flash, do I need to boot at flash address
+ 100 ?

Thanks in advance, xavier

author
#5 lore raw

[U-Boot-Users] more on booting uboot from flash on a memec evaluation board

More information on our design :

We have 32 MB of RAM @ 0x00000000
A flash system @ 0x0300000

I have copied the ml300 design and change a few things :
monitor address goes from 0x04000000 to 0x01000000 in ml300.h the same in config.mk

I put the uboot.srec file in the flash memory and I setup the following code to jump to 0x03000100

file depart.s :

	.section ".boot","ax"
	.align 2
	.globl _boot
	.type _boot, at function

_boot:
b _uboot

file suite.s :
.section ".text"
align 2
.globl _uboot
.type _uboot, at function
_uboot:

	lis 0,0x300
	ori 0,0,256
	mtlr 0
	blrl

ld script :
ENTRY(_boot)
SECTIONS
{
.text 0xffff8000 :

   {
       *(.text)
??}
   .boot 0xfffffffc :
   {
       *(.boot)

}
}

the small code generated is used to boot the ppc with the xilinx edk.

uboot doesn't seem to boot, what I have done wrong ?

xavier

#6 lore raw

[U-Boot-Users] more on booting uboot from flash on a memec evaluation board

Quoted 4 lines · grave

More information on our design :

We have 32 MB of RAM @ 0x00000000
A flash system @ 0x0300000

Is that your only flash? It needs to be mapped at the top of mem so it provides the 0xfffffffc address.

Quoted 5 lines

.boot 0xfffffffc :

  {
      *(.boot)

}
}

If flash is mapped at 0x0300000 then what does it read at 0xfffffffc? I think the typical ref designs call for using BRAM up there to put your boot code, but that may just be a waste to have it just jump to flash. You might at well move flash up to the top of the mem map.

#7 lore raw

[U-Boot-Users] more on booting uboot from flash on a memec evaluation board

In reply to grave

Keep in mind that the ML300 board is "special" because it does not have flash on the board and always "boots" from System ACE CF. To make use of u-boot on that board an ACE file containing u-boot is loaded by System ACE CF into main memory and u-boot is started from there. The IIC EEPROM on the board is used as storage space for the environment.

- Peter

Quoted 64 lines · grave

More information on our design :

We have 32 MB of RAM @ 0x00000000
A flash system @ 0x0300000

I have copied the ml300 design and change a few things :
monitor address goes from 0x04000000 to 0x01000000 in ml300.h the same in config.mk

I put the uboot.srec file in the flash memory and I setup the following code to jump to 0x03000100

file depart.s :
.section ".boot","ax"
.align 2
.globl _boot
.type _boot, at function
_boot:
b _uboot

file suite.s :
.section ".text"
align 2
.globl _uboot
.type _uboot, at function
_uboot:

    lis 0,0x300
    ori 0,0,256
    mtlr 0
    blrl

ld script :
ENTRY(_boot)
SECTIONS
{
.text 0xffff8000 :

  {
      *(.text)
  }
  .boot 0xfffffffc :
  {
      *(.boot)

}
}

the small code generated is used to boot the ppc with the xilinx edk.

uboot doesn't seem to boot, what I have done wrong ?

xavier

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

#8 lore raw
In reply to grave

What you actually want to do is to modify the EDK design to map the flash to the top of the memory. Assuming that you used the ML300 board support as your starting point to port u-boot to the Memec board modify board/xilinx/ml300/u-boot.lds and include the following right after the beginning of the SECTORS declaration:

.resetvec oxFFFFFFFC :

{
    *(.resetvec)
} = 0xffff

Modify board/xilinx/ml300/config.mk and change the TEXT_BASE to the start of the u-boot monitor. Further, you need to modify include/configs/ml300.h to map the monitor to the area of your flash, e.g.
#define CFG_MONITOR_BASE 0xfffc0000 // needs to match TEXT_BASE
#define CFG_FLASH_BASE 0xff800000 // start of flash in
memory map

If you compile flash support into u-boot you will be able to use u-boot to install a newer version of itself into the flash.

- Peter

Quoted 25 lines · grave

Hi,

I'm new to uboot and I try to boot it on an evaluation board with a VirtexIIpro. I have compiled an uboot version inspired from the ml300 design and flashed it to our flash media using uboot.srec and a memec flash programmer. Now I wonder how to make the ppc boot in the flash. Do I need a specific and very simple code at address 0xfffffffc that jump to the flash address where there is the uboot code ?

Any hint would be welcome...

Thanks in advance, Xavier

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users